Difference between revisions of "User:Chazza"

From ArchWiki
Jump to: navigation, search
((Openbox) Keybinds: nest volume control subsection under multimedia keys)
m (add link to github)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[ArchWiki:Maintainers|ArchWiki Maintainer]]
 
[[ArchWiki:Maintainers|ArchWiki Maintainer]]
  
Hello all. I'm from the UK and I've been using Arch since mid 2013. See also, my [https://aur.archlinux.org/packages/?SeB=m&K=Chazza AUR packages].
+
Hello all. I'm from the UK and I've been using Arch since mid 2013. See also, my [https://aur.archlinux.org/packages/?SeB=m&K=Chazza AUR packages] and my [https://github.com/charlesbos GitHub].
 
 
== (Openbox) Keybinds ==
 
 
 
All keybinds must be added to the {{ic|~/.config/openbox/rc.xml}} file, and below the {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}} heading. Although a brief overview has been provided here, a more in-depth explanation of keybindings can be found at [http://openbox.org/wiki/Help:Bindings openbox.org].
 
 
 
Keybinds can be added to the configuration file using the following syntax:
 
 
 
<keybind key="'''my-key-combination'''">
 
  <action name="'''my-action'''">
 
    '''...'''
 
  </action>
 
</keybind>
 
 
 
The action name for running an external command is ''Execute''. Use the following syntax to define an external command to execute:
 
 
 
<action name="Execute">
 
  <command>'''my-command'''</command>
 
</action>
 
 
 
See [http://openbox.org/wiki/Help:Actions the Openbox wiki] for a list of all available actions.
 
 
 
{{Note|The {{AUR|obkey}} utility provides a graphical interface for configuring key bindings. Before using ''obkey'', you should use ''obconf'' to create {{ic|~/.config/openbox/rc.xml}}.}}
 
 
 
=== Special keys ===
 
 
 
While the use of standard alpha-numeric keys for keybindings is self-explanatory, special names are assigned to other types of keys, such as {{ic|modifers}}, {{ic|multimedia}} keys and {{ic|navigation}} keys.
 
 
 
==== Modifiers ====
 
 
 
{{ic|Modifier}} keys play an important role in keybindings (e.g. holding down the {{ic|shift}} or {{ic|CTRL / control}} key in combination with another key to undertake an action). Using modifiers helps to prevent conflicting keybinds, whereby two or more actions are linked to the same key or combination of keys. The syntax to use a modifier with another key is:
 
 
 
"<modifier>-<key>"
 
 
 
The modifer codes are as follows:
 
 
 
* {{ic|S}}: Shift
 
* {{ic|C}}: Control / CTRL
 
* {{ic|A}}: Alt
 
* {{ic|W}}: Super / Windows
 
* {{ic|M}}: Meta
 
* {{ic|H}}: Hyper (If it is bound to something)
 
 
 
==== Multimedia keys ====
 
 
 
Where available, it is possible to set the appropriate {{ic|multimedia}} keys to perform their intended functions, such as to control the volume and/or the screen brightness. These will usually be integrated into the {{ic|function}} keys, and are identified by their appropriate symbols. See [[Extra keyboard keys]] for details.
 
 
 
The volume and brightness multimedia codes are as follows (note that commands will still have to be assigned to them to actually function):
 
 
 
* {{ic|XF86AudioRaiseVolume}}: Increase volume
 
* {{ic|XF86AudioLowerVolume}}: Decrease volume
 
* {{ic|XF86AudioMute}}: Mute / unmute volume
 
* {{ic|XF86MonBrightnessUp}}: Increase screen brightness
 
* {{ic|XF86MonBrightnessDown}}: Decrease screen brightness
 
 
 
For a full list of XF86 multimedia keys, see the [http://wiki.linuxquestions.org/wiki/XF86_keyboard_symbols LinuxQuestions wiki].
 
 
 
===== Volume control =====
 
 
 
What commands should be used for controlling the volume will depend on whether [[ALSA]], [[PulseAudio]], or [[OSS]] is used for sound.
 
 
 
*ALSA: see [[Advanced Linux Sound Architecture#Keyboard volume control]].
 
*PulseAudio: see [[PulseAudio#Keyboard volume control]]
 
*OSS: see [[OSS#Using multimedia keys with OSS]].
 
 
 
==== Navigation keys ====
 
 
 
These are the directional / arrow keys, usually used to move the cursor up, down, left, or right. The (self-explanatory) navigation codes are as follows:
 
 
 
* {{ic|Up}}: Up
 
* {{ic|Down}}: Down
 
* {{ic|Left}}: Left
 
* {{ic|Right}}: Right
 
 
 
=== Window snapping ===
 
 
 
Many desktop environments and window managers support ''window snapping'' (e.g. Windows 7 Aero snap), whereby they will automatically snap into place when moved to the edge of the screen. This effect can also be simulated in Openbox through the use of keybinds on focused windows.
 
 
 
As illustrated in the example below, percentages must be used to determine window sizes (see [http://openbox.org/wiki/Help:Actions openbox.org] for further information). In this instance, The {{ic|super}} key is used in conjunction with the {{ic|navigation}} keys:
 
 
 
<keybind key="W-Left">
 
    <action name="UnmaximizeFull"/>
 
    <action name="MaximizeVert"/>
 
    <action name="MoveResizeTo">
 
        <width>50%</width>
 
    </action>
 
    <action name="MoveToEdge"><direction>west</direction></action>
 
</keybind>
 
<keybind key="W-Right">
 
    <action name="UnmaximizeFull"/>
 
    <action name="MaximizeVert"/>
 
    <action name="MoveResizeTo">
 
        <width>50%</width>
 
    </action>
 
    <action name="MoveToEdge"><direction>east</direction></action>
 
</keybind>
 
 
 
However, it should be noted that once a window has been 'snapped' to an edge, it will remain vertically maximised unless subsequently maximised and then restored. The solution is to implement additional keybinds - in this instance using the {{ic|down}} and {{ic|up}} keys - to do so. This will also make pulling 'snapped' windows from screen edges faster as well:
 
 
 
<keybind key="W-Down">
 
    <action name="Unmaximize"/>
 
</keybind>
 
<keybind key="W-Up">
 
    <action name="Maximize"/>
 
</keybind>
 
 
 
This [http://ubuntuforums.org/showthread.php?t=1796793 Ubuntu forum thread] provides more information. Applications such as {{AUR|opensnap-git}} are also available to automatically simulate window snapping behaviour without the use of keybinds.
 

Latest revision as of 11:08, 28 September 2017

ArchWiki Maintainer

Hello all. I'm from the UK and I've been using Arch since mid 2013. See also, my AUR packages and my GitHub.