Difference between revisions of "Alopex"

From ArchWiki
Jump to: navigation, search
(Launching programs: Add Note about Interrobang)
(37 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:Dynamic WMs]]
 
[[Category:Dynamic WMs]]
 
{{Article summary start|Summary}}
 
{{Article summary start|Summary}}
{{Article summary text|Information on installing and configuring TTWM}}
+
{{Article summary text|Information on installing and configuring Alopex}}
 
{{Article summary heading|Related}}
 
{{Article summary heading|Related}}
 
{{Article summary wiki|dmenu}}
 
{{Article summary wiki|dmenu}}
Line 7: Line 7:
 
{{Article summary wiki|i3}}
 
{{Article summary wiki|i3}}
 
{{Article summary end}}
 
{{Article summary end}}
{{DISPLAYTITLE:TTWM}}
+
{{DISPLAYTITLE:Alopex}}
[https://github.com/TrilbyWhite/ttwm/ TTWM] is a minimal tiling window manager combining concepts or elements from {{AUR|tinywm}}, [[dwm]], and [[i3|i3wm]]. Inspiration has also been drawn from other great tilers like [[monsterwm]]. It manages windows using tiling, horizontal or vertical stacking layouts with transient floating and fullscreen modes.
+
[https://github.com/TrilbyWhite/alopex Alopex] (formerly, TTWM) is a minimal tiling window manager combining concepts or elements from {{AUR|tinywm}}, [[dwm]], and [[i3|i3wm]]. Inspiration has also been drawn from other great tilers like [[monsterwm]]. It manages windows using tiling, horizontal or vertical stacking layouts with transient floating and fullscreen modes.
 
+
TTWM is currently available in the [[AUR]] in two versions, {{AUR|ttwm}} and {{AUR|ttwm-git}}. The first is the final stable build of TTWM 1.0, whereas the "-git" version is the development branch of TTWM 2.0. This page refers almost entirely to {{AUR|ttwm-git}} and TTWM 2.0. More information on TTWM 1.0 can be found [http://trilbywhite.github.com/ttwm/ upstream].
+
  
 
==Installation==
 
==Installation==
  
Installing TTWM, from the AUR, is as simple as fetching the PKGBUILD and running the following:
+
Installing {{AUR|alopex-git}}, from the [[AUR]], is as simple as fetching the PKGBUILD and running the following:
 
  $ makepkg -si
 
  $ makepkg -si
  
{{Tip|As configuration is done at compile-time, modifications (such as customized keybindings or colorschemes) can be achieved by moving a copy of {{ic|config.h}} (from upstream) to {{ic|~/.ttwm_conf.h}} and editing it to reflect any user preferences. See [[#Configuration]]}}
+
{{Tip|As configuration is done at compile-time, modifications (such as customized keybindings or colorschemes) can be achieved by moving a copy of {{ic|config.h}} (from upstream) to {{ic|$HOME/.alopex_config.h}} or {{ic|$XDG_CONFIG_HOME/alopex/config.h}} and editing it to reflect any user preferences. See [[#Configuration]]}}
  
 +
==Recommended Reading==
 +
Alopex provides three manpages ({{ic|alopex.1}}, {{ic|alopex.config.5}} and {{ic|alopex.icons.5}}). They provide much more in-depth detail about much of the information on this page.
 +
{{Note|As the manpages reach finalization, this page's information will be modified to reflect default settings and some clarification. }}
 
==Basic usage==
 
==Basic usage==
By Default, TTWM tracks the following four modifier masks:
+
By Default, Alopex tracks the following four modifier masks:
{|
+
{| class="wikitable" border="1" style="text-align:center"
 
! scope="col" | Reference
 
! scope="col" | Reference
 
! scope="col" | Key
 
! scope="col" | Key
 
|-
 
|-
! {{Keypress|Mod1}}
+
! {{ic|KEY1}}
 
| "Super"
 
| "Super"
 
|-
 
|-
! {{Keypress|Mod2}}
+
! {{ic|KEY2}}
 
| "Alternate"
 
| "Alternate"
 
|-
 
|-
! {{Keypress|Mod3}}
+
! {{ic|KEY3}}
 
| "Control"
 
| "Control"
 
|-
 
|-
! {{Keypress|Mod4}}
+
! {{ic|KEY4}}
 
| "Shift"
 
| "Shift"
 
|-
 
|-
Line 40: Line 41:
  
 
===Launching programs===
 
===Launching programs===
[[dmenu|Dmenu]] is a useful addon to TTWM. As opposed to list-style or drop-down menus, dmenu is a type-to-complete program launcher. It is the recommended launcher for TTWM, and the default configuration maps running dmenu to {{Keypress|Mod1}} + {{Keypress|p}}.
+
[[dmenu|Dmenu]] is a useful addon to Alopex. As opposed to list-style or drop-down menus, dmenu is a type-to-complete program launcher. It is the recommended launcher for Alopex, and the default configuration maps running dmenu to {{ic|KEY1}} + {{ic|p}}.
  
{{Note|The creator of TTWM has also made a very small, light-weight alternative to [[dmenu]] called [https://bbs.archlinux.org/viewtopic.php?id=160182 interrobang]. The PKGBUILD is not yet available on the AUR, but is linked to from the aforementioned BBS thread. To replace dmenu with interrobang, read on how to customize keybindings in [[#Using ~/.ttwm_conf.h]].}}
+
{{Note|The creator of Alopex has also made a very small, light-weight alternative to [[dmenu]] called [https://bbs.archlinux.org/viewtopic.php?id=160182 interrobang]. It can be installed easily using {{AUR|interrobang-git}}. To replace dmenu with interrobang, read on how to customize keybindings in [[#Custom Configuration]].}}
  
 
===Using tags===
 
===Using tags===
To move or assign a window to a given tag, the intended window must first be focused. This can be accomplished by using {{Keypress|Mod1}} + {{Keypress|j}} and/or {{Keypress|Mod1}} + {{Keypress|k}}.
+
To move or assign a window to a given tag, the intended window must first be focused. This can be accomplished by using {{ic|KEY1}} + {{ic|j}} and/or {{ic|KEY1}} + {{ic|k}}.
{| border="1" cellpadding="4" cellspacing="0"
+
{| class="wikitable" border="1" style="text-align:center"
 
! scope="col" | Action
 
! scope="col" | Action
 
! scope="col" | Keybind
 
! scope="col" | Keybind
 
|-
 
|-
 
! View Tag "x"
 
! View Tag "x"
| {{Keypress|Mod1}} + {{Keypress|x}}
+
| {{ic|KEY1}} + {{ic|x}}
 
|-
 
|-
 
! Move to Tag "x"
 
! Move to Tag "x"
| {{Keypress|Mod1}} + {{Keypress|Mod2}} + {{Keypress|x}}
+
| {{ic|KEY1}} + {{ic|KEY2}} + {{ic|x}}
 
|-
 
|-
 
! Assign to Tag "x"
 
! Assign to Tag "x"
| {{Keypress|Mod1}} + {{Keypress|Mod3}} + {{Keypress|x}}
+
| {{ic|KEY1}} + {{ic|KEY3}} + {{ic|x}}
 
|-
 
|-
 
! Toggle Visibility of Tag "x"
 
! Toggle Visibility of Tag "x"
| {{Keypress|Mod1}} + {{Keypress|Mod4}} + {{Keypress|x}}
+
| {{ic|KEY1}} + {{ic|KEY4}} + {{ic|x}}
 
|-
 
|-
 
|}
 
|}
{{Note|As with [[dwm]], TTWM makes a distinction between tags and views (workspaces). By default, TTWM has five tags enabled and two views available. You can switch between the two views using {{Keypress|Mod2}} + {{Keypress|Tab}}. To better understand the difference and how you can arrange your workflow to utilize the difference, [http://www.wongdev.com/blog/2013/01/24/dwm-tags-are-not-workspaces/ this article] (written for dwm) may be helpful.}}
+
{{Note|As with [[dwm]], Alopex makes a distinction between tags and views (workspaces). By default, Alopex has six tags enabled and two views available. You can switch between the two views using {{ic|KEY2}} + {{ic|Tab}}. To better understand the difference and how you can arrange your workflow to utilize the difference, [http://www.wongdev.com/blog/2013/01/24/dwm-tags-are-not-workspaces/ this article] (written for dwm) may be helpful.}}
 +
 
 +
{{Tip|It is possible to customize how tags are labeled using a custom {{ic|config.h}} and {{ic|icons.h}}. See [[#Customizing Tags]].}}
  
 
===Window layouts===
 
===Window layouts===
TTWM has three rule-based layouts complimented by transient fullscreen and floating modes: Vertical and Horizontal Stacking and "Monocle" (Full screen with statusbar tabs). By default, TTWM will run using the Vertical Stacking layout. Cycling through all three layouts can be done by pressing {{Keypress|Mod1}} + {{Keypress|space}}. You can select each mode more directly with the following shortcuts:
+
Alopex has three rule-based layouts complimented by transient fullscreen and floating modes: Vertical and Horizontal Stacking and "Monocle" (Full screen with statusbar tabs). By default, the vertical stacking layout will be used. Cycling through all three layouts can be done by pressing {{ic|KEY1}} + {{ic|space}}. You can select each mode more directly with the following shortcuts:
{| border="1" cellpadding="4" cellspacing="0"
+
{| class="wikitable" border="1" style="text-align:center"
 
! scope="col" | Mode
 
! scope="col" | Mode
 
! scope="col" | Keybind
 
! scope="col" | Keybind
Line 74: Line 77:
 
|-
 
|-
 
! V-Stack (rstack)
 
! V-Stack (rstack)
| {{Keypress|Mod1}} + {{Keypress|Mod2}} + {{Keypress|r}} || 3 || Master on left, stack on right
+
| {{ic|KEY1}} + {{ic|KEY2}} + {{ic|r}} || 3 || Master on left, stack on right
 
|-
 
|-
 
! H-Stack (bstack)
 
! H-Stack (bstack)
| {{Keypress|Mod1}} + {{Keypress|Mod2}} + {{Keypress|b}} || 3 || Master on top, stack on bottom
+
| {{ic|KEY1}} + {{ic|KEY2}} + {{ic|b}} || 3 || Master on top, stack on bottom
 
|-
 
|-
 
! Monocle
 
! Monocle
| {{Keypress|Mod1}} + {{Keypress|Mod2}} + {{Keypress|m}} || 1 || Variable sized tabs for each window
+
| {{ic|KEY1}} + {{ic|KEY2}} + {{ic|m}} || 1 || Variable sized tabs for each window
 
|-
 
|-
 
|}
 
|}
  
Using the {{ic|stackcount}} option in {{ic|~/.ttwm_conf.h}}, you can specify how many windows you would like to be visible in the stack. You can also use {{Keypress|Mod1}} + {{Keypress|=}} and {{Keypress|Mod1}} + {{Keypress|-}} to dynamically increment and decrement the number of visible windows in the stack (respectively). Furthermore, using {{Keypress|Mod1}} + {{Keypress|.}} will keep all open windows visible.
+
Using the {{ic|stackcount}} option, you can specify how many windows you would like to be visible in the stack. You can also use {{ic|KEY1}} + {{ic|=}} and {{ic|KEY1}} + {{ic|-}} to dynamically increment and decrement the number of visible windows in the stack (respectively). Furthermore, using {{ic|KEY1}} + {{ic|.}} will keep all open windows visible.
  
{{Tip|You can toggle a window to and from Fullscreen mode by pressing {{Keypress|Mod1}} + {{Keypress|f}}, and, similarly, you can toggle floating mode by pressing {{Keypress|Mod1}} + {{Keypress|Mod2}} + {{Keypress|f}}.}}
+
{{Tip|You can toggle a window to and from Fullscreen mode by pressing {{ic|KEY1}} + {{ic|f}}, and, similarly, you can toggle floating mode by pressing {{ic|KEY1}} + {{ic|KEY2}} + {{ic|f}}.}}
  
 
===Exiting===
 
===Exiting===
Cleanly killing a window can be done by pressing {{Keypress|Mod2}} + {{Keypress|F4}}. Cleanly exiting TTWM can be done by pressing {{Keypress|Mod1}} + {{Keypress|Mod4}} + {{Keypress|Q}}.
+
Cleanly killing a window can be done by pressing {{ic|KEY2}} + {{ic|F4}}. Cleanly exiting Alopex can be done by pressing {{ic|KEY1}} + {{ic|KEY4}} + {{ic|Q}}.
  
 
==Extended Usage==
 
==Extended Usage==
As mentioned previously, TTWM is almost entirely configured at compile-time via the editing of its source files, primarily {{ic|config.h}} and {{ic|icons.h}}. The upstream configuration provides sane defaults, but configuration per user-preference is easy to achieve.
+
===Custom Configuration===
 +
As mentioned previously, Alopex is almost entirely configured at compile-time via the editing of its source files, primarily {{ic|config.h}} and {{ic|icons.h}}. The upstream configuration provides sane defaults, but configuration per user-preference is easy to achieve.
  
===Using ~/.ttwm_conf.h===
+
As mentioned in [[#Installation]], {{AUR|alopex-git}} will check for {{ic|$HOME/.alopex_config.h}} and {{ic|$XDG_CONFIG_HOME/alopex/config.h}}, and, if either exists, use them to replace the default {{ic|config.h}} before commencing the build. After using {{Pkg|makepkg}} to grab the source, simply copy the {{ic|config.h}} to either {{ic|$HOME/.alopex_config.h}} or {{ic|$XDG_CONFIG_HOME/alopex/config.h}} and make your modifications.
As mentioned in [[#Installation]], {{AUR|ttwm-git}} will check for {{ic|~/.ttwm_conf.h}}, and, if it exists, use it to replace the default {{ic|config.h}} before commencing the build. After using {{Pkg|makepkg}} to grab the source, simply copy the {{ic|config.h}} to {{ic|~/.ttwm_conf.h}}. For example, if you have the package directory in your user's {{ic|home}} folder named {{ic|ttwm-git}}, you would run the following command:
+
$ cp ~/ttwm-git/src/ttwm/config.h ~/.ttwm_conf.h
+
  
 
Once the desired modifications have been made, return to the package directory and compile/install:
 
Once the desired modifications have been made, return to the package directory and compile/install:
Line 102: Line 104:
 
{{Tip|If you have already compiled, you may need to use the {{ic|f}} switch to force a recompile}}
 
{{Tip|If you have already compiled, you may need to use the {{ic|f}} switch to force a recompile}}
  
Assuming the configuration changes were valid, the customized TTWM will have been compiled and installed. If problems were encountered, review the output for specific information.
+
Assuming the configuration changes were valid, the customized Alopex will have been compiled and installed. If problems were encountered, review the output for specific information.
  
For any changes to take effect, it will be necessary to (re)start TTWM.
+
For any changes to take effect, it will be necessary to (re)start Alopex.
  
 
====Custom Keybindings====
 
====Custom Keybindings====
One of the main customizations that must be made in {{ic|~/.ttwm_conf.h}} is the use of custom keybindings. To map a custom keybinding, add the necessary lines to the {{ic|static Key keys=[]}} array using the following syntax:
+
One of the main customizations that must be made in a custom {{ic|config.h}} is the use of custom keybindings. To map a custom keybinding, add the necessary lines to the {{ic|keys}} array using the following syntax:
 
  { MODKEY, <key>, spawn, CMD("program") },
 
  { MODKEY, <key>, spawn, CMD("program") },
 
{{Tip|To map a single key to a function (that is, without a modifier key), use {{ic|0}} for {{ic|MODKEY}}.}}
 
{{Tip|To map a single key to a function (that is, without a modifier key), use {{ic|0}} for {{ic|MODKEY}}.}}
  
<key> can either be a hex keycode (e.g., {{ic|0x68}}) or an X keysym (e.g., {{ic|XK_h}}). You can check for keycodes and keysyms by using {{Pkg|xorg-xev}}.
+
{{ic|<key>}} can either be a hex keycode (e.g., {{ic|0x68}}) or an X keysym (e.g., {{ic|XK_h}}). You can check for keycodes and keysyms by using {{Pkg|xorg-xev}}. If you would like to use the XF86 keysyms (for instance, for media keys), you can do so, but you must have the following line uncommented in your {{ic|config.h}}:
 +
#include <X11/XF86keysym.h>
  
 
You can also define special functions for more complex commands by using {{ic|#define}}:
 
You can also define special functions for more complex commands by using {{ic|#define}}:
Line 119: Line 122:
 
{{Note|Using {{ic|#define FUNCTION}}, you do not quote {{ic|FUNCTION}} in the keybinding declaration.}}
 
{{Note|Using {{ic|#define FUNCTION}}, you do not quote {{ic|FUNCTION}} in the keybinding declaration.}}
  
====Configuration Options====
+
====Customizing Tags====
Aside from custom keybinds, TTWM offers various configuration options which can be modified in {{ic|~/.ttwm_conf.h}} to help you fine-tune your TTWM setup. Below is an abridged list of available configuration options and explanations of their settings:
+
It is possible, using the {{ic|tagcons}} array, to customize how tags appear on the statusbar. By default, the default tags are named {{ic|one}} through {{ic|six}}. Using the {{ic|tagcons}} array, you can have them appear with any combination of a prefix, an icon and a suffix. You can add, or customize tag appearances using the following syntax:
{| border="1" cellpadding="4" cellspacing="0"
+
static const Tagcon tagcons=[] = {
! scope="col" | Option
+
    { "prefix",  #,  "suffix" },
! scope="col" | Possible Values
+
};
! scope="col" | Function
+
With this syntax {{ic|#}} refers to the position of the icon in the array at the bottom of {{ic|icons.h}}; {{ic|"prefix"}} and {{ic|"suffix"}} refer to the labels of text given to the tag before and after the icon, respectively. If you do not want the tag to appear with an icon, replace {{ic|#}} with {{ic|NO_ICON}} or {{ic|-1}}. If you would rather a tag appear without any label, replace {{ic|"prefix"}} and {{ic|"suffix"}} with {{ic|NULL}}. The order each tag appears on the bar depends on the order in which they appear in the {{ic|tagcons}} array.
|-
+
{{Note|{{ic|NULL}} should appear without quotes, whereas text prefixes and suffixes must be quoted.}}
! borderwidth
+
| 0, 1, 2, etc. || Sets the size of a border to be drawn around the focused window
+
|-
+
! tilegap
+
| 0, 1, 2, etc. || Sets the size of a gap to be left between windows
+
|-
+
! win_min
+
| 0, 1, 2, etc. || Sets the smallest allowed width and height of a window
+
|-
+
! focusfollowmouse
+
| True or False || If "True," hovering the mouse over a window will shift focus to that window
+
|-
+
! showbar
+
| True or False || Enables or disables the statusbar
+
|-
+
! topbar
+
| True or False || If "True," the statusbar is displayed on the top of the screen. If "False," on bottom
+
|-
+
! tilebias
+
| 0, 1, 2, etc. || Determine how much larger (in pixels) the master section is than the stack (0 divides them equally)
+
|-
+
! attachmode
+
| 0, 1 or 2 || Determines where to place new windows (0 == master section, 1 == top of the stack, 2 == bottom of the stack)
+
|-
+
|}
+
  
 
===Statusbar===
 
===Statusbar===
By passing a script or program as an argument to TTWM, it can create a minimalistic statusbar. To avoid a [https://bbs.archlinux.org/viewtopic.php?id=146889&p=13 CPU race] (See post #321), TTWM provides a default statusbar script if none is passed to it. This default script displays only a simple clock. For a more powerful statusbar, you can either write a script (or your own small program) or use a statusbar program such as conky.
+
By passing a script or program as an argument to Alopex, it can create a minimalistic statusbar. To avoid a [https://bbs.archlinux.org/viewtopic.php?pid=1237677#p1237677 CPU race], Alopex provides a default statusbar script if none is passed to it. This default script displays only a simple clock. For a more powerful statusbar, you can either write a script (or your own small program) or use a statusbar program such as conky.
If the script (or program) you use takes arguments itself, remember to quote the whole statusbar argument. For example, the following commands would start TTWM with a script or conky (respectively):
+
If the script (or program) you use takes arguments itself, remember to quote the whole statusbar argument. For example, the following commands would start Alopex with a script or conky (respectively):
  $ xinit /usr/bin/ttwm "/home/username/script.sh -args"
+
  $ xinit /usr/bin/alopex "/home/username/script.sh -args"
  
  $ xinit /usr/bin/ttwm "conky -c /path/to/conkyrc"
+
  $ xinit /usr/bin/alopex "conky -c /path/to/conkyrc"
  
To colorize parts (or all) of the output of the script, you can use {#RRGGBB}. "#RRGGBB" is a standard hex color code and using these in brackets will colorize everything on the statusbar following it until another color code is passed.
+
To colorize parts (or all) of the output of the script, you can use {{ic|{#RRGGBB} }}. "#RRGGBB" is a standard hex color code and using these in brackets will colorize everything on the statusbar following it until another color code is passed.
  
====Using ~/.ttwm_icons.h====
+
====Custom Icons====
As with {{ic|config.h}}, TTWM supports custom iconsets using a customized {{ic|icons.h}} which should be placed at {{ic|~/.ttwm_icons.h}}.
+
As with {{ic|config.h}}, Alopex supports custom iconsets using a customized {{ic|icons.h}} which should be placed at {{ic|$HOME/.alopex_icons.h}} or {{ic|$XDG_CONFIG_HOME/alopex/icons.h}}.
  
Icons, similar to the bracketed color codes, are referenced in the statusbar script or program using {i X} where "X" is the number of the icon. View the default {{ic|icons.h}} to see which icons are available and what their value for X is (it is determined by the order in which each icon appears in the array at the bottom of the file). To enable TTWM to use icons, the following line must be included in {{ic|~/.ttwm_conf.h}}:
+
Icons, similar to the bracketed color codes, are referenced in the statusbar script or program using {{ic|{i X} }} where "X" is the number of the icon. View the default {{ic|icons.h}} to see which icons are available and what their value for X is (it is determined by the order in which each icon appears in the array at the bottom of the file).
#include icons.h
+
{{Note|Because these icons are sourced at compile-time, any customization of the icon-set will require the user to recompile, reinstall and restart Alopex.}}
Because these icons are sourced at compile-time, any customization of the icon-set will require the user to recompile, reinstall and restart TTWM.
+
 
 +
===Themes===
 +
Alopex has support for rudimentary themes in the form of colorschemes applied at compile-time. These themes are defined in {{ic|theme.h}}. By default, Alopex ships three themes, {{ic|WinterCoat}}, {{ic|SummerCoat}} and {{ic|DayLight}}. Adding a custom theme is as simple as copying the default {{ic|theme.h}} to {{ic|$XDG_CONFIG_HOME/alopex/theme.h}} or {{ic|$HOME/.alopex_theme.h}} and adding a new array with your desired colors. To select which theme to use, simply pass the environment variable {{ic|MOLT}} defined as the name of your desired theme before {{ic|makepkg}}. For example:
 +
$ MOLT=DayLight makepkg -s
 +
If no theme is explicitly selected, the {{ic|WinterCoat}} theme will be applied by default.
  
 
===Multi-Monitor Support===
 
===Multi-Monitor Support===
TTWM has experimental support for up to 16 external monitors using xrandr. Though auto-detection of external montiors is not yet supported, it is planned for version 2.1. Unlike with the internal monitor, TTWM handles windows with slightly different rulesets on external monitors. Each window is assigned a monitor number (in addition to tags/flags and other info).  If the monitor number is higher than the number of available monitors, the window is placed on the highest numbered monitor, otherwise it is placed on the monitor matching its number. See the documentation on the [https://bbs.archlinux.org/viewtopic.php?id=146889&p=16 BBS] (See post 387), and in {{ic|config.h}} for more details.
+
Alopex has experimental support for up to 16 external monitors using xrandr. Though auto-detection of external montiors is not yet supported, it is planned for version 2.1. Unlike with the internal monitor, Alopex handles windows with slightly different rulesets on external monitors. Each window is assigned a monitor number (in addition to tags/flags and other info).  If the monitor number is higher than the number of available monitors, the window is placed on the highest numbered monitor, otherwise it is placed on the monitor matching its number. See the documentation in the manpages and in {{ic|config.h}} for more details.
 +
 
 +
===Window Rules===
 +
Alopex also has the ability to define limited window rules based on the resource name or class name strings from the client window's {{ic|WM_CLASS}} property. You can modify, or add to, these rules by editing the {{ic|rules}} array in {{ic|config.h}} using the following syntax:
 +
static Rule rules[] = {
 +
    { "name",  "class",  tags,  flags },
 +
}
 +
You can replace either {{ic|"name"}} or {{ic|"class"}} with {{ic|NULL}} to ignore those values in a given rule. If both are specified, then the rule will only apply if both conditions are met. To determine what values you should use for {{ic|"name"}} or {{ic|"class"}}, you can use {{Pkg|xorg-xprop}}. The value you give for {{ic|tags}} allows you to specify what tags a window will be given by default when it opens. If you wish not to affect this behavior, use {{ic|0}} in place of {{ic|tags}}. Finally, the {{ic|flags}} value allows you to specify special properties to be given to the window (e.g., force floating mode). If you wish to not affect this behavior, you can replace {{ic|flags}} with {{ic|0}}. For further explanation, consult the manpages (See, [[ #Recommended Reading ]]).
  
 
==See also==
 
==See also==
* [http://trilbywhite.github.com/ttwm/ TTWM's official website] (Refers to 1.0)
+
* [http://trilbywhite.github.io/alopex/index.html Alopex Homepage]
* [https://github.com/TrilbyWhite/ttwm TTWM's Sourcecode on GitHub]
+
* [https://github.com/TrilbyWhite/alopex Alopex Sourcecode on GitHub]
 
* [[dmenu]] - Simple application launcher from the developers of dwm
 
* [[dmenu]] - Simple application launcher from the developers of dwm
* The [https://bbs.archlinux.org/viewtopic.php?id=146889 TTWM thread] on the forums
+
* The [https://bbs.archlinux.org/viewtopic.php?id=146889 Alopex thread] on the forums
 +
* The [https://bbs.archlinux.org/viewtopic.php?id=160182 Interrobang thread] on the forums

Revision as of 11:45, 1 September 2013

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary end

Alopex (formerly, TTWM) is a minimal tiling window manager combining concepts or elements from tinywmAUR, dwm, and i3wm. Inspiration has also been drawn from other great tilers like monsterwm. It manages windows using tiling, horizontal or vertical stacking layouts with transient floating and fullscreen modes.

Installation

Installing alopex-gitAUR, from the AUR, is as simple as fetching the PKGBUILD and running the following:

$ makepkg -si
Tip: As configuration is done at compile-time, modifications (such as customized keybindings or colorschemes) can be achieved by moving a copy of config.h (from upstream) to $HOME/.alopex_config.h or $XDG_CONFIG_HOME/alopex/config.h and editing it to reflect any user preferences. See #Configuration

Recommended Reading

Alopex provides three manpages (alopex.1, alopex.config.5 and alopex.icons.5). They provide much more in-depth detail about much of the information on this page.

Note: As the manpages reach finalization, this page's information will be modified to reflect default settings and some clarification.

Basic usage

By Default, Alopex tracks the following four modifier masks:

Reference Key
KEY1 "Super"
KEY2 "Alternate"
KEY3 "Control"
KEY4 "Shift"

Launching programs

Dmenu is a useful addon to Alopex. As opposed to list-style or drop-down menus, dmenu is a type-to-complete program launcher. It is the recommended launcher for Alopex, and the default configuration maps running dmenu to KEY1 + p.

Note: The creator of Alopex has also made a very small, light-weight alternative to dmenu called interrobang. It can be installed easily using interrobang-gitAUR. To replace dmenu with interrobang, read on how to customize keybindings in #Custom Configuration.

Using tags

To move or assign a window to a given tag, the intended window must first be focused. This can be accomplished by using KEY1 + j and/or KEY1 + k.

Action Keybind
View Tag "x" KEY1 + x
Move to Tag "x" KEY1 + KEY2 + x
Assign to Tag "x" KEY1 + KEY3 + x
Toggle Visibility of Tag "x" KEY1 + KEY4 + x
Note: As with dwm, Alopex makes a distinction between tags and views (workspaces). By default, Alopex has six tags enabled and two views available. You can switch between the two views using KEY2 + Tab. To better understand the difference and how you can arrange your workflow to utilize the difference, this article (written for dwm) may be helpful.
Tip: It is possible to customize how tags are labeled using a custom config.h and icons.h. See #Customizing Tags.

Window layouts

Alopex has three rule-based layouts complimented by transient fullscreen and floating modes: Vertical and Horizontal Stacking and "Monocle" (Full screen with statusbar tabs). By default, the vertical stacking layout will be used. Cycling through all three layouts can be done by pressing KEY1 + space. You can select each mode more directly with the following shortcuts:

Mode Keybind Windows visible Arrangement
V-Stack (rstack) KEY1 + KEY2 + r 3 Master on left, stack on right
H-Stack (bstack) KEY1 + KEY2 + b 3 Master on top, stack on bottom
Monocle KEY1 + KEY2 + m 1 Variable sized tabs for each window

Using the stackcount option, you can specify how many windows you would like to be visible in the stack. You can also use KEY1 + = and KEY1 + - to dynamically increment and decrement the number of visible windows in the stack (respectively). Furthermore, using KEY1 + . will keep all open windows visible.

Tip: You can toggle a window to and from Fullscreen mode by pressing KEY1 + f, and, similarly, you can toggle floating mode by pressing KEY1 + KEY2 + f.

Exiting

Cleanly killing a window can be done by pressing KEY2 + F4. Cleanly exiting Alopex can be done by pressing KEY1 + KEY4 + Q.

Extended Usage

Custom Configuration

As mentioned previously, Alopex is almost entirely configured at compile-time via the editing of its source files, primarily config.h and icons.h. The upstream configuration provides sane defaults, but configuration per user-preference is easy to achieve.

As mentioned in #Installation, alopex-gitAUR will check for $HOME/.alopex_config.h and $XDG_CONFIG_HOME/alopex/config.h, and, if either exists, use them to replace the default config.h before commencing the build. After using makepkg to grab the source, simply copy the config.h to either $HOME/.alopex_config.h or $XDG_CONFIG_HOME/alopex/config.h and make your modifications.

Once the desired modifications have been made, return to the package directory and compile/install:

$ makepkg -si
Tip: If you have already compiled, you may need to use the f switch to force a recompile

Assuming the configuration changes were valid, the customized Alopex will have been compiled and installed. If problems were encountered, review the output for specific information.

For any changes to take effect, it will be necessary to (re)start Alopex.

Custom Keybindings

One of the main customizations that must be made in a custom config.h is the use of custom keybindings. To map a custom keybinding, add the necessary lines to the keys array using the following syntax:

{ MODKEY, <key>, spawn, CMD("program") },
Tip: To map a single key to a function (that is, without a modifier key), use 0 for MODKEY.

<key> can either be a hex keycode (e.g., 0x68) or an X keysym (e.g., XK_h). You can check for keycodes and keysyms by using xorg-xev. If you would like to use the XF86 keysyms (for instance, for media keys), you can do so, but you must have the following line uncommented in your config.h:

#include <X11/XF86keysym.h>

You can also define special functions for more complex commands by using #define:

#define FUNCTION "program -switches --options arguments"

which could then be mapped to a keybind using CMD(FUNCTION) in the above syntax.

Note: Using #define FUNCTION, you do not quote FUNCTION in the keybinding declaration.

Customizing Tags

It is possible, using the tagcons array, to customize how tags appear on the statusbar. By default, the default tags are named one through six. Using the tagcons array, you can have them appear with any combination of a prefix, an icon and a suffix. You can add, or customize tag appearances using the following syntax:

static const Tagcon tagcons=[] = {
   { "prefix",   #,   "suffix" },
};

With this syntax # refers to the position of the icon in the array at the bottom of icons.h; "prefix" and "suffix" refer to the labels of text given to the tag before and after the icon, respectively. If you do not want the tag to appear with an icon, replace # with NO_ICON or -1. If you would rather a tag appear without any label, replace "prefix" and "suffix" with NULL. The order each tag appears on the bar depends on the order in which they appear in the tagcons array.

Note: NULL should appear without quotes, whereas text prefixes and suffixes must be quoted.

Statusbar

By passing a script or program as an argument to Alopex, it can create a minimalistic statusbar. To avoid a CPU race, Alopex provides a default statusbar script if none is passed to it. This default script displays only a simple clock. For a more powerful statusbar, you can either write a script (or your own small program) or use a statusbar program such as conky. If the script (or program) you use takes arguments itself, remember to quote the whole statusbar argument. For example, the following commands would start Alopex with a script or conky (respectively):

$ xinit /usr/bin/alopex "/home/username/script.sh -args"
$ xinit /usr/bin/alopex "conky -c /path/to/conkyrc"

To colorize parts (or all) of the output of the script, you can use {#RRGGBB} . "#RRGGBB" is a standard hex color code and using these in brackets will colorize everything on the statusbar following it until another color code is passed.

Custom Icons

As with config.h, Alopex supports custom iconsets using a customized icons.h which should be placed at $HOME/.alopex_icons.h or $XDG_CONFIG_HOME/alopex/icons.h.

Icons, similar to the bracketed color codes, are referenced in the statusbar script or program using {i X} where "X" is the number of the icon. View the default icons.h to see which icons are available and what their value for X is (it is determined by the order in which each icon appears in the array at the bottom of the file).

Note: Because these icons are sourced at compile-time, any customization of the icon-set will require the user to recompile, reinstall and restart Alopex.

Themes

Alopex has support for rudimentary themes in the form of colorschemes applied at compile-time. These themes are defined in theme.h. By default, Alopex ships three themes, WinterCoat, SummerCoat and DayLight. Adding a custom theme is as simple as copying the default theme.h to $XDG_CONFIG_HOME/alopex/theme.h or $HOME/.alopex_theme.h and adding a new array with your desired colors. To select which theme to use, simply pass the environment variable MOLT defined as the name of your desired theme before makepkg. For example:

$ MOLT=DayLight makepkg -s

If no theme is explicitly selected, the WinterCoat theme will be applied by default.

Multi-Monitor Support

Alopex has experimental support for up to 16 external monitors using xrandr. Though auto-detection of external montiors is not yet supported, it is planned for version 2.1. Unlike with the internal monitor, Alopex handles windows with slightly different rulesets on external monitors. Each window is assigned a monitor number (in addition to tags/flags and other info). If the monitor number is higher than the number of available monitors, the window is placed on the highest numbered monitor, otherwise it is placed on the monitor matching its number. See the documentation in the manpages and in config.h for more details.

Window Rules

Alopex also has the ability to define limited window rules based on the resource name or class name strings from the client window's WM_CLASS property. You can modify, or add to, these rules by editing the rules array in config.h using the following syntax:

static Rule rules[] = {
   { "name",   "class",  tags,   flags },
}

You can replace either "name" or "class" with NULL to ignore those values in a given rule. If both are specified, then the rule will only apply if both conditions are met. To determine what values you should use for "name" or "class", you can use xorg-xprop. The value you give for tags allows you to specify what tags a window will be given by default when it opens. If you wish not to affect this behavior, use 0 in place of tags. Finally, the flags value allows you to specify special properties to be given to the window (e.g., force floating mode). If you wish to not affect this behavior, you can replace flags with 0. For further explanation, consult the manpages (See, #Recommended Reading ).

See also