Difference between revisions of "Herbstluftwm"

From ArchWiki
Jump to navigation Jump to search
m (See also: small correction)
m (Installation: added stable version of herbstluftwm)
Line 6: Line 6:
[https://aur.archlinux.org/packages.php?ID=51895 herbstluftwm-git] currently is available from the '''AUR'''.
{{ic|Herbstluftwm}} is currently available from the '''AUR'''.
Download the tarball with PKGBUILD [https://aur.archlinux.org/packages/he/herbstluftwm-git/herbstluftwm-git.tar.gz here].
[https://aur.archlinux.org/packages.php?ID=56098 herbstluftwm] - stable version
Extract it and run in the herbstluftwm-git directory:
[https://aur.archlinux.org/packages.php?ID=51895 herbstluftwm-git] - development version
Download the tarball with PKGBUILD.
Extract it and run in the herbstluftwm or herbstluftwm-git directory:
{{bc|$ makepkg -si}}
{{bc|$ makepkg -si}}

Revision as of 19:04, 26 January 2012

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Herbstluftwm is a manual tiling window manager for X11 using Xlib and Glib.


Herbstluftwm is currently available from the AUR.

herbstluftwm - stable version

herbstluftwm-git - development version

Download the tarball with PKGBUILD. Extract it and run in the herbstluftwm or herbstluftwm-git directory:

$ makepkg -si

First steps

Read carefully herbstluftwm and herbstclient man pages in your favorite terminal emulator or online (herbstluftwm, herbstclient).


Copy /etc/xdg/herbstluftwm/autostart file to $HOME/.config/herbstluftwm/autostart. You can edit that file for your needs.

Autostart file

# sample autostart file


# this is a simple config for herbstluftwm

function hc() {
    herbstclient "$@"

hc emit_hook reload

xsetroot -solid '#5A8E3A'

# remove all existing keybindings
hc keyunbind --all

# keybindings
hc keybind $Mod-Shift-q quit
hc keybind $Mod-Shift-r reload
hc keybind $Mod-Shift-c close
hc keybind $Mod-u spawn urxvt

#herbstclient load ${TAG_NAMES[0]} '(clients max:0)'

# tags
TAG_NAMES=( {1..4} )
TAG_KEYS=( {1..4} 0 )

hc rename default "${TAG_NAMES[0]}" || true
for i in ${!TAG_NAMES[@]} ; do
    hc add "${TAG_NAMES[$i]}"
    if ! [ -z "$key" ] ; then
        hc keybind "$Mod-$key" use "${TAG_NAMES[$i]}"
        hc keybind "$Mod-Shift-$key" move "${TAG_NAMES[$i]}"

# layouting
hc keybind $Mod-r remove
hc keybind $Mod-space cycle_layout 1
hc keybind $Mod-v split vertical 0.5
hc keybind $Mod-h split horizontal 0.5
hc keybind $Mod-s floating toggle
hc keybind $Mod-f fullscreen toggle
hc keybind $Mod-p pseudotile toggle

## resizing
hc keybind $Mod-Control-Left resize left +$RESIZESTEP
hc keybind $Mod-Control-Down resize down +$RESIZESTEP
hc keybind $Mod-Control-Up resize up +$RESIZESTEP
hc keybind $Mod-Control-Right resize right +$RESIZESTEP

## mouse
hc mousebind $Mod-Button1 move
hc mousebind $Mod-Button2 resize
hc mousebind $Mod-Button3 zoom

## focus
hc keybind $Mod-Tab        cycle_all +1
hc keybind $Mod-Shift-Tab  cycle_all -1
hc keybind $Mod-c cycle
hc keybind $Mod-Left  focus left
hc keybind $Mod-Down  focus down
hc keybind $Mod-Up    focus up
hc keybind $Mod-Right focus right
hc keybind $Mod-Shift-Left  shift left
hc keybind $Mod-Shift-Down  shift down
hc keybind $Mod-Shift-Up    shift up
hc keybind $Mod-Shift-Right shift right

## colors
hc set frame_border_active_color '#49351D'
hc set frame_border_normal_color '#73532D'
hc set frame_bg_normal_color '#BD9768'
hc set frame_bg_active_color '#BD8541'
hc set frame_border_width 2
hc set window_border_width 2
hc set window_border_normal_color '#AE8451'
hc set window_border_active_color '#F6FF00'
hc set always_show_frame 1
hc set default_frame_layout 2
hc set snap_distance 5
hc set snap_gap 5

## rules
hc unrule -F
#hc rule class=XTerm tag=3 # move all xterms to tag 3
hc rule focus=off # normally do not focus new clients
# give focus to most common terminals
hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on
hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off
hc rule class=Opera tag=2
hc rule class~'(MPlayer|Vlc)' tag=3 fullscreen=on


There is a tab-completion for the parameters for herbstclient. Try herbstclient list_commands to show all parameters.

See also

  • The herbstluftwm thread
  • /usr/share/doc/herbstluftwm/examples/ - various scripts
  • /usr/share/doc/herbstluftwm/BUGS - bugs
  • #herbstluftwm - IRC channel at the irc.freenode.net