Home

Awesome

<!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

Table of Contents generated with DocToc

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

awesome Window Manager configuration

<img alt="a screenshot of it in action" src="https://raw.githubusercontent.com/pw4ever/awesome-wm-config/master/screenshot/pengw-awesome-screenshot-20150215.png" width="960px" />

intro

awesome is awesome. I use it on all Arch Linux desktop/laptop machines that I have control over (admittedly, it is not designed for handheld smartphones/tablets).

Me using it to demo Figurehead.

Search YouTube for "awesome wm" to see awesome in action.

Among my favorites features:

This repo holds my personal take of awesome's configuration. Hightlights:

setup

install on Linux

cd $HOME/.config && git clone https://github.com/pw4ever/awesome-wm-config.git awesome

dependencies

These dependencies are mostly derived from the application keybindings. Some are needed to enable basic features like theming (feh), Desktop Entry Specification-style autostart (dex), audio setup (alsa-utils), backlight (xorg-xbacklight), Webcam (cheese), music player (mpd and mpc), screen lock (xscreensaver), network management (network-manager-applet), terminal (sakura), task manager (lxtask), and screen setup (arandr), etc..

On Arch Linux:

sudo pacman -S --needed --noconfirm feh dex xdg-utils screenfetch scrot xcompmgr kdeaccessibility wmname
sudo pacman -S --needed --noconfirm alsa-utils gnome-alsamixer xorg-xbacklight xf86-input-synaptics cheese mpd mpc workrave
sudo pacman -S --needed --noconfirm xscreensaver networkmanager network-manager-applet mate-power-manager arandr xfce4-appfinder xfce4-screenshooter gnome-control-center lxtask
sudo pacman -S --needed --noconfirm pcmanfm gvfs udisks udiskie lxsession lxappearance xarchiver 
sudo pacman -S --needed --noconfirm sakura terminator conky gksu launchy
sudo pacman -S --needed --noconfirm gvim emacs firefox chromium putty remmina synergy
sudo pacman -S --needed --noconfirm fcitx-im fcitx-googlepinyin fcitx-configtool

miscellaneous

usage

Take a look at the "rc.lua" configuration file ($HOME/.config/awesome/rc.lua; perhaps by pressing the keybinding <kbd>Modkey</kbd><kbd>c</kbd> which will open rc.lua with the primary editor---for me, Vim).

Most keybindings are prefixed with the <kbd>Modkey</kbd>. This config associates <kbd>Modkey</kbd> to X Window's <kbd>Mod4</kbd>. On many machines, this associates the <kbd>Super_L</kbd> (tip: use xmodmap in terminal emulator to verify/change this), which usually translate to the (intuitively) <kbd>Windows</kbd> key.

Some keybinding requires further input (e.g., rename a tag), which will grab the key focus from your application. The <kbd>Esc</kbd> key is used to cancel partial input.

universal argument

Universal Argument (UniArg), inspired by the namesake Emacs feature, supplies a positive numeric argument to the following command. Depending on the context, it may supply a number of repetitions (search for uniarg:key_repeat in rc.lua) or a numeric argument (search for uniarg:key_numarg in rc.lua) such as percentage of volume adjustment or pixels to resize the client window. For example, with the UniArg being 3, "open terminal" operation (<kbd>Modkey</kbd><kbd>Enter</kbd> by default) will open 3 terminals.

Universal argument is activated when inputing a great-than-1 integer, and is deactivated when inputing a less-than-2 integer or a non-number. When universal argument is deactivated, the default behavior kicks in, which follows some heuristics to do sensible things such as the "extend client by 1/7 of the margin" and "shrink client by 1/11 of client width and leave client width at least 50 pixels" behavior for client window side expansion/shrinking documented below.

There are two modes of universal argument: Regular and persistent. Regular universal argument only applies to the next operation, while persistent universal argument applies to all following operations until changed or deactivated.

key combofunctioncomment
<kbd>Modkey</kbd><kbd>u</kbd>prompt for universal argumentsee above paragraphs for details
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>u</kbd>prompt for persistent universal argumentsee above paragraphs for details

window management

restart/quit/info

key combofunctioncomment
<kbd>Modkey</kbd><kbd>Ctrl</kbd><kbd>r</kbd>restart"r" for restart; used for apply updated "rc.lua" config file
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>q</kbd>quit"q" for quit; used for apply updated "rc.lua" config file
<kbd>Modkey</kbd><kbd>\</kbd>system info popup
<kbd>Modkey</kbd><kbd>f1</kbd>open help in browser
<kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>Esc</kbd>open task managerlxtask

layout

key combofunctioncomment
<kbd>Modkey</kbd><kbd>Space</kbd>change to next layout
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>Space</kbd>change to prev layout
mouse actionfunction
<kbd>left button</kbd>change to next layout
<kbd>right button</kbd>change to prev layout
<kbd>scroll up</kbd>change to prev layout
<kbd>scroll down</kbd>change to next layout

only the following layouts are enabled

layoutcomment
floatingallow window stacking; the default
tiletiling with master on the left
fairfair allocation of screen space
fullscreenthe focused client fullscreened
magnifierthe focused client centered but not fullscreened

in the floating mode, the following mouse actions on client window are enabled

mouse actionfunction
<kbd>Modkey</kbd><kbd>left button</kbd>move client
<kbd>Modkey</kbd><kbd>right button</kbd>resize client

multiple screens/multi-head/RANDR

key combofunctioncomment
<kbd>Modkey</kbd><kbd>Ctrl</kbd><kbd>j</kbd>focus on the next screen"j" is easy to reach
<kbd>Modkey</kbd><kbd>Ctrl</kbd><kbd>k</kbd>focus on the prev screen"k" is easy to reach
<kbd>Modkey</kbd><kbd>o</kbd>send client to the other screen
<kbd>Modkey</kbd><kbd>Ctrl</kbd><kbd>o</kbd>send tag to next screen
<kbd>Modkey</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>o</kbd>send tag to prev screen

misc

key combofunctioncomment
<kbd>Modkey</kbd><kbd>f2</kbd>prompt a program to launchinherited from awesome defaults
<kbd>Modkey</kbd><kbd>r</kbd>prompt a program to launch"r" for run
<kbd>Modkey</kbd><kbd>f3</kbd>toggle touchpaddepend on synclient from xf86-input-synaptics
<kbd>Modkey</kbd><kbd>f4</kbd>prompt Lua code to be eval-ed in awesomeinherited from awesome defaults
<kbd>Modkey</kbd><kbd>c</kbd>edit "rc.lua" with the primary editor"c" for configuration file
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>/</kbd>show main menu
<kbd>Modkey</kbd><kbd>x</kbd>show main menuMSFT Windows key
<kbd>Modkey</kbd><kbd>X</kbd>show main menuMSFT Windows key
<kbd>Modkey</kbd><kbd>;</kbd>toggle task action menu
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>;</kbd>toggle tag action menu
<kbd>Modkey</kbd><kbd>'</kbd>choose from clients on current tag
<kbd>Modkey</kbd><kbd>Ctrl</kbd><kbd>'</kbd>prompt to choose from clients on current tag
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>'</kbd>choose from all clients
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>Ctrl</kbd><kbd>'</kbd>prompt to choose from all clients
<kbd>Modkey</kbd><kbd>`</kbd>lock screen with screensaver
<kbd>Modkey</kbd><kbd>Enter</kbd>launch user terminal
<kbd>Modkey</kbd><kbd>Alt</kbd><kbd>Enter</kbd>launch root terminal

persistent dynamic tagging

tag persistence

key combofunctioncomment
<kbd>Modkey</kbd><kbd>Ctrl</kbd><kbd>Alt</kbd><kbd>t</kbd>toggle tag persistencetags persist across exit/restart by default

add/delete/rename

key combofunctioncomment
<kbd>Modkey</kbd><kbd>a</kbd>create a new tag after the current one and view it"a" for add
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>a</kbd>create a new tag before the current one and view it"a" for add
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>d</kbd>delte the current tag if there is no client on it"d" for delete
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>r</kbd>rename the current tag"r" for rename

view

key combofunctioncomment
<kbd>Modkey</kbd><kbd>p</kbd>view previous tag"p" for previous
<kbd>Modkey</kbd><kbd>n</kbd>view next tag"n" for next
<kbd>Modkey</kbd><kbd>z</kbd>view last tag
<kbd>Modkey</kbd><kbd>g</kbd>prompted for a tag to viewwith tag name completion with <kbd>Tab</kbd>
<kbd>Modkey</kbd>+[1-9,0]view the first-ninth, tenth tagprompt for "add a new tag" if not already existed
<kbd>Modkey</kbd><kbd>Ctrl</kbd>+[1-9,0]view also the first-ninth, tenth tagprompt for "add a new tag" if not already existed

move

key combofunctioncomment
<kbd>Modkey</kbd><kbd>Ctrl</kbd><kbd>p</kbd>move the current tag backward by 1 position
<kbd>Modkey</kbd><kbd>Ctrl</kbd><kbd>n</kbd>move the current tag forward by 1 position

client management

operation

key combofunctioncomment
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>c</kbd>kill focused client
<kbd>Alt</kbd><kbd>f4</kbd>kill focused clientMSFT Windows key
<kbd>Modkey</kbd><kbd>f</kbd>toggle fullscreen statushides statusbar
<kbd>Modkey</kbd><kbd>m</kbd>toggle maximized statusleaves statusbar visible
<kbd>Modkey</kbd><kbd>Left</kbd>move window to left half screenleaves statusbar visible
<kbd>Modkey</kbd><kbd>Right</kbd>move window to right half screenleaves statusbar visible
<kbd>Modkey</kbd><kbd>Up</kbd>move window to top half screenleaves statusbar visible
<kbd>Modkey</kbd><kbd>Down</kbd>move window to bottom half screenleaves statusbar visible
<kbd>Modkey</kbd><kbd>Alt</kbd><kbd>Left</kbd>extend client to the leftby 1/7 of the margin
<kbd>Modkey</kbd><kbd>Alt</kbd><kbd>Right</kbd>extend client to the rightby 1/7 of the margin
<kbd>Modkey</kbd><kbd>Alt</kbd><kbd>Up</kbd>extend client to the topby 1/7 of the margin
<kbd>Modkey</kbd><kbd>Alt</kbd><kbd>Down</kbd>extend client to the bottomby 1/7 of the margin
<kbd>Modkey</kbd><kbd>Alt</kbd><kbd>Shift</kbd><kbd>Left</kbd>shrink client from rightby 1/11 of client width; leave client width at least 50 pixels
<kbd>Modkey</kbd><kbd>Alt</kbd><kbd>Shift</kbd><kbd>Right</kbd>shrink client from leftby 1/11 of client width; leave client width at least 50 pixels
<kbd>Modkey</kbd><kbd>Alt</kbd><kbd>Shift</kbd><kbd>Up</kbd>shrink client from bottomby 1/11 of client height; leave client height at least 50 pixels
<kbd>Modkey</kbd><kbd>Alt</kbd><kbd>Shift</kbd><kbd>Down</kbd>shrink client from topby 1/11 of client height; leave client height at least 50 pixels
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>m</kbd>minimizeminimized client need mouse click on tasklist to restore
<kbd>Modkey</kbd><kbd>Ctrl</kbd><kbd>Space</kbd>toggle floating status
<kbd>Modkey</kbd><kbd>t</kbd>toggle ontop status
<kbd>Modkey</kbd><kbd>s</kbd>toggle sticky status
<kbd>Modkey</kbd><kbd>,</kbd>toggle horizontal maximized status
<kbd>Modkey</kbd><kbd>.</kbd>toggle vertical maximized status
<kbd>Modkey</kbd><kbd>[</kbd>decrease opacity by 10%need composite manager, e.g., xcompmgr
<kbd>Modkey</kbd><kbd>]</kbd>increase opacity by 10%need composite manager, e.g., xcompmgr
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>[</kbd>disable composite manager
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>]</kbd>enable composite manager

change focus

key combofunctioncomment
<kbd>Modkey</kbd><kbd>j</kbd>focus on the next client in current tag"j" is easy to reach
<kbd>Modkey</kbd><kbd>Tab</kbd>focus on the next client in current tagMSFT Windows key
<kbd>Modkey</kbd><kbd>k</kbd>focus on the prev client in current tag"k" is easy to reach
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>Tab</kbd>focus on the prev client in current tagMSFT Windows key
<kbd>Modkey</kbd><kbd>y</kbd>jump to the urgent client"y" next to "u" (taken by universal argument) for urgent

swap order/select master

key combofunctioncomment
<kbd>Modkey</kbd><kbd>Ctrl</kbd><kbd>Enter</kbd>select current client as the mastermaster is featured on the screen
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>j</kbd>swap current client with the next one"j" is easy to reach
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>k</kbd>swap current client with the prev one"k" is easy to reach

move/copy to tag

all these keys work on the single currently focused client

key combofunctioncomment
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>p</kbd>send the client to the previous tag"p" for previous
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>n</kbd>send the client to the next tag"n" for next
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>g</kbd>move the client to the named tagwith tag name completion by <kbd>Tab</kbd>
<kbd>Modkey</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>g</kbd>toggle the named tag for the clientwith tag name completion by <kbd>Tab</kbd>
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>1-9,0</kbd>move the client to {first-ninth, tenth} tagprompt for "add a new tag" if not already existed
<kbd>Modkey</kbd><kbd>Ctrl</kbd><kbd>Shift</kbd><kbd>1-9,0</kbd>toggle the {first-ninth, tenth} tag for the clientprompt for "add a new tag" if not already existed

change space allocation in tile layout

key combofunctioncomment
<kbd>Modkey</kbd><kbd>=</kbd>reset master width to 50%"=" for equal partition of screen
<kbd>Modkey</kbd><kbd>l</kbd>increase master width by 5%"l" towards right on keyboard
<kbd>Modkey</kbd><kbd>h</kbd>decrease master width by 5%"h" towards left on keyboard
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>l</kbd>increase number of masters by 1"l" towards right on keyboard
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>h</kbd>decrease number of masters by 1"h" towards left on keyboard
<kbd>Modkey</kbd><kbd>Ctrl</kbd><kbd>l</kbd>increase number of columns by 1"l" towards right on keyboard
<kbd>Modkey</kbd><kbd>Ctrl</kbd><kbd>h</kbd>decrease number of columns by 1"h" towards left on keyboard

misc

key combofunctioncomment
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>`</kbd>toggle the visibility of current client's titlebar

app bindings

shortcut keys are bound for most common apps; the keybinding is designed to be balanced between the left (pressing the <kbd>Modkey</kbd>) and the right hand (an additional easy to reach key).

admin

key comboappmy choice
<kbd>Modkey</kbd><kbd>Alt</kbd><kbd>Enter</kbd>root terminalgksudo sakura
<kbd>Modkey</kbd><kbd>`</kbd>screen saver/lockerxscreensaver
<kbd>Modkey</kbd><kbd>Home</kbd>screen saver/lockerxscreensaver
<kbd>Modkey</kbd><kbd>End</kbd>suspendsystemctl suspend
<kbd>Modkey</kbd><kbd>Alt</kbd><kbd>Home</kbd>hibernate (will confirm)systemctl hibernate
<kbd>Modkey</kbd><kbd>Alt</kbd><kbd>End</kbd>hybrid sleep (will confirm)systemctl hybrid-sleep
<kbd>Modkey</kbd><kbd>Insert</kbd>reboot (will confirm)systemctl reboot
<kbd>Modkey</kbd><kbd>Delete</kbd>power off (will confirm)systemctl poweroff
<kbd>Modkey</kbd><kbd>/</kbd>GUI appfinderxfce4-appfinder

everyday

key comboappmy choice
<kbd>Modkey</kbd><kbd>Alt</kbd><kbd>l</kbd>file managerpcmanfm
<kbd>Modkey</kbd><kbd>e</kbd>file managerpcmanfm; MSFT Windows key
<kbd>Modkey</kbd><kbd>E</kbd>file managerpcmanfm; MSFT Windows key
<kbd>Modkey</kbd><kbd>Enter</kbd>user terminalsakura
<kbd>Modkey</kbd><kbd>Alt</kbd><kbd>p</kbd>remote terminalputty
<kbd>Modkey</kbd><kbd>Alt</kbd><kbd>r</kbd>remote terminalremmina
<kbd>Modkey</kbd><kbd>i</kbd>primary editorgvim
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>i</kbd>secondary editoremacs
<kbd>Modkey</kbd><kbd>b</kbd>primary browserchromium
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>b</kbd>secondary browserfirefox
<kbd>Modkey</kbd><kbd>Alt</kbd><kbd>v</kbd>secondary browservirtualbox
<kbd>Modkey</kbd><kbd>Shift</kbd><kbd>\</kbd>screen magnifierkmag
<kbd>PrtSc</kbd>screen shooterxfce4-screenshooter

the rest

tag list

mouse actionfunction
<kbd>left button</kbd>view the tag
<kbd>Modkey</kbd><kbd>left button</kbd>move current client to the tag
<kbd>middle button</kbd>toggle whether to view the tag
<kbd>Modkey</kbd><kbd>middle button</kbd>toggle the tag for current client
<kbd>right button</kbd>show tag action menu
<kbd>Modkey</kbd><kbd>right button</kbd>delete the tag if empty
<kbd>scroll up</kbd>view the prev tag
<kbd>scroll down</kbd>view the next tag

task list

mouse actionfunction
<kbd>left button</kbd>toggle task minimize status
<kbd>middle button</kbd>choose from clients on current tag
<kbd>Modkey</kbd><kbd>middle button</kbd>choose from all clients
<kbd>right button</kbd>show task action menu
<kbd>scroll up</kbd>focus on prev task
<kbd>scroll down</kbd>focus on next task

root window/"the desktop"

mouse actionfunction
<kbd>left button</kbd>choose from all clients
<kbd>middle button</kbd>show tag action menu
<kbd>right button</kbd>show main menu
<kbd>scroll up</kbd>view the prev tag
<kbd>scroll down</kbd>view the next tag

window/task/client title bar

mouse actionfunction
<kbd>left button</kbd>move the window
<kbd>right button</kbd>resize the window

the five buttons on the upper right corner

button (fromt left to right)function
1toggle floating status
2toggle maximized status
3toggle sticky/show-in-all-tags status
4toggle always-on-top status
5close window

customization

The items can be changed with awesome-client. Example:

customization.option.wallpaper_change_p=true -- enable random wallpaper choosing
customization.timer.change_wallpaper.timeout=7.5 -- choose a wallpaper every 7.5 seconds
valuetypemeaningdefault value
customization.option.wallpaper_change_pbooleanrandom wallpaper choosing enabled?true
customization.timer.change_wallpaper.timeoutnumberrandomly choose a wallpaper from the "wallpaper" directory after every this number of seconds15
customization.option.tag_persistent_pbooleantag persistent across restart? false for clean slatetrue
customization.option.low_battery_notification_pbooleanwarn about low battery conditiontrue
customization.widgets.bat.warning_thresholdnumberlow battery notification threshold in percentage10
customization.widgets.bat.instancestringbattery under monitor for low battery notification"BAT0"

todo