abele / awesome-wm-config

awesome-wm-config

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Table of Contents generated with DocToc

a screenshot of it in action

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:

  • persistent dynamic tagging across (both regular and randr-induced) restarts.
    • dynamic tagging means tags can be created/moved/renamed/deleted on the fly without touching the configuration.
    • persistent means tags and the clients/programs associated with each tag is preserved across awesome restart.
    • this is the feature I have desired for that is lacking in current default configuration.
  • confirmation before quit/restart to minimize data loss accidents.
    • you have to type "yes" (case insensitive) before quitting/restarting.
    • this minimizes the chance that you lose your work by accidents.
  • keybindings for tuning transparency (using xcompmgr), stay-on-top, sticky.
    • these features combined, along with tiling and floating layouts, allow you to type in one window while seeing the content of others.
  • keybindings to my preferred applications.
  • only cycle through the most sensible (IMHO) layouts.
  • keybinding optimized for Arch Linux over Thinkpad W530 (my current workhorse).

setup

install on Linux

cd $HOME/.config && git clone https://github.com/pw4ever/awesome-wm-config.git awesome
  • setup .xinitrc or Display Manager accordingly

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), 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 xorg-xbacklight cheese mpd mpc 
sudo pacman -S --needed --noconfirm xscreensaver networkmanager network-manager-applet mate-power-manager arandr xfce4-appfinder xfce4-screenshooter
sudo pacman -S --needed --noconfirm pcmanfm gvfs udisks udiskie lxsession lxappearance xarchiver 
sudo pacman -S --needed --noconfirm sakura conky gksu
sudo pacman -S --needed --noconfirm gvim emacs firefox chromium putty remmina qsynergy
sudo pacman -S --needed --noconfirm fcitx-im fcitx-googlepinyin fcitx-configtool

miscellaneous

patching

old note

The discussions on the bug report) result in upstream commits 27f483a and ec8db18. The patches fix this problem.

Therefore, this problem will be fixed in v3.5.5.

This configuration is known to work with awesome v3.5.2

awesome releases from awesome v3.5.3 to (at least) awesome v3.5.4 has a commit that obliterates the order of dynamic tags. I have filed an upstream bug report and released a patch against it.

Options for patching:

usage

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

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

Some keybinding requires further input (e.g., rename a tag), which will "grab" the key focus from your application. The [esc] key is used to cancel partial input.

window management

restart/quit/info

key combo function comment
[modkey]+[ctrl]+r restart "r" for restart; used for apply updated "rc.lua" config file
[modkey]+[shift]+q quit "q" for quit; used for apply updated "rc.lua" config file
[modkey]+|system info popup
[modkey]+[f1] open help in browser

layout

key combo function comment
[modkey]+[space] change to next layout
[modkey]+[shift]+[space] change to prev layout
mouse action function
[left button]] change to next layout
[right button] change to prev layout
[scroll up] change to prev layout
[scroll down] change to next layout

only the following layouts are enabled

layout comment
floating allow window stacking; the default
tile tiling with master on the left
fair fair allocation of screen space
fullscreen the focused client fullscreened
magnifier the focused client centered but not fullscreened

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

mouse action function
[modkey]+[left button] move client
[modkey]+[right button] resize client

multiple screens/multi-head/RANDR

key combo function comment
[modkey]+[ctrl]+j focus on the next screen "j" is easy to reach
[modkey]+[ctrl]+j focus on the prev screen "k" is easy to reach
[modkey]+o send client to the other screen

misc

key combo function comment
[modkey]+[f2] prompt a program to launch inherited from awesome defaults
[modkey]+[f3] toggle touchpad depend on synclient from xf86-input-synaptics
[modkey]+[f4] prompt Lua code to be eval-ed in awesome inherited from awesome defaults
[modkey]+c edit "rc.lua" with the primary editor "c" for configuration file
[modkey]+/ show main menu
[modkey]+` launch screen saver/locker
[modkey]+[enter] launch user terminal
[modkey]+[alt]+[enter] launch root terminal

dynamic tagging

add/delete/rename

key combo function comment
[modkey]+a create a new tag after the current one and view it "a" for add
[modkey]+[shift]+a create a new tag before the current one and view it "a" for add
[modkey]+[shift]+d delte the current tag if there is no client on it "d" for delete
[modkey]+[shift]+r rename the current tag "r" for rename

view

key combo function comment
[modkey]+p view previous tag "p" for previous
[modkey]+n view next tag "n" for next
[modkey]+z view last tag
[modkey]+g prompted for a tag to view with tag name completion with [tab]
[modkey]+[1-9,0] view the first-ninth, tenth tag prompt for "add a new tag" if not already existed
[modkey]+[ctrl]+[1-9,0] view also the first-ninth, tenth tag prompt for "add a new tag" if not already existed

move

key combo function comment
[modkey]+[ctrl]+p move the current tag backward by 1 position
[modkey]+[ctrl]+n move the current tag forward by 1 position

client management

operation

key combo function comment
[modkey]+[shift]+c kill focused client
[modkey]+f toggle fullscreen status "fullscreen" hides statusbar
[modkey]+m toggle maximized status "maximized" leaves statusbar visible
[modkey]+[shift]+m minimize minimized client need mouse click on tasklist to restore
[modkey]+[ctrl]+[space] toggle floating status
[modkey]+t toggle ontop status
[modkey]+s toggle sticky status
[modkey]+, toggle horizontal maximized status
[modkey]+. toggle vertical maximized status
[modkey]+[ decrease opacity by 10% need composite manager, e.g., xcompmgr
[modkey]+] increase opacity by 10% need composite manager, e.g., xcompmgr
[modkey]+[shift]+[ disable composite manager
[modkey]+[shift]+] enable composite manager

change focus

key combo function comment
[modkey]+j focus on the next client in current tag "j" is easy to reach
[modkey]+k focus on the prev client in current tag "k" is easy to reach
[modkey]+[tab] focus on the last-focus client in current tag
[modkey]+u jump to the urgent client "u" for urgent

swap order/select master

key combo function comment
[modkey]+[ctrl]+[enter] select current client as the master master is featured on the screen
[modkey]+[shift]+j swap current client with the next one "j" is easy to reach
[modkey]+[shift]+k 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 combo function comment
[modkey]+[shift]+p send the client to the previous tag "p" for previous
[modkey]+[shift]+n send the client to the next tag "n" for next
[modkey]+[shift]+g move the client to the named tag with tag name completion by [tab]
[modkey]+[ctrl]+[shift]+g toggle the named tag for the client with tag name completion by [tab]
[modkey]+[shift]+[1-9,0] move the client to {first-ninth, tenth} tag prompt for "add a new tag" if not already existed
[modkey]+[ctrl]+[shift]+[1-9,0] toggle the {first-ninth, tenth} tag for the client prompt for "add a new tag" if not already existed

change space allocation in tile layout

key combo function comment
[modkey]+= reset master width to 50% "=" for equal partition of screen
[modkey]+l increase master width by 5% "l" towards right on keyboard
[modkey]+h decrease master width by 5% "h" towards left on keyboard
[modkey]+[shift]+l increase number of masters by 1 "l" towards right on keyboard
[modkey]+[shift]+h decrease number of masters by 1 "h" towards left on keyboard
[modkey]+[ctrl]+l increase number of columns by 1 "l" towards right on keyboard
[modkey]+[ctrl]+h decrease number of columns by 1 "h" towards left on keyboard

misc

key combo function comment
[modkey]+[shift]+` 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 [modkey]) and the right hand (an additional easy to reach key).

admin

key combo app my choice
[modkey]+[alt]+[enter] root terminal gksudo sakura
[modkey]+` screen saver/locker xscreensaver
[modkey]+' GUI appfinder xfce4-appfinder

everyday

key combo app my choice
[modkey]+[alt]+l file manager pcmanfm
[modkey]+[enter] user terminal sakura
[modkey]+[alt]+p remote terminal putty
[modkey]+[alt]+r remote terminal remmina
[modkey]+i primary editor gvim
[modkey]+[shift]+i secondary editor emacs
[modkey]+b primary browser chromium
[modkey]+[shift]+b secondary browser firefox
[modkey]+[alt]+v secondary browser virtualbox
[modkey]+[shift]+/ screen magnifier kmag
PrintScreen screen shooter xfce4-screenshooter

the rest

tag list

mouse action function
[left button] view the tag
[modkey]+[left button] move current client to the tag
[right button] toggle whether to view the tag
[modkey]+[right button] toggle the tag for current client
[scroll up] view the prev tag
[scroll down] view the next tag

task list

mouse action function
[left button] toggle task minimize status
[right button] menu of all tasks across tags
[scroll up] focus on prev task
[scroll down] focus on next task

root window/"the desktop"

mouse action function
[right button] show main menu
[scroll up] view the prev tag
[scroll down] view the next tag

window/task/client title bar

mouse action function
[left button] move the window
[right button] resize the window

the five buttons on the upper right corner

button (fromt left to right) function
1 toggle floating status
2 toggle maximized status
3 toggle sticky/show-in-all-tags status
4 toggle always-on-top status
5 close 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
value type meaning default value
customization.option.wallpaper_change_p boolean random wallpaper choosing enabled? true
customization.timer.change_wallpaper.timeout number randomly choose a wallpaper from the "wallpaper" directory after every this number of seconds 15

todo

  • improve persistent dynamic tagging: preserve tag configuration (e.g., layout style and client positions)

About

awesome-wm-config


Languages

Language:Lua 96.7%Language:Shell 3.3%