HLWM: Tronify, emacsify and doc

Tronify the herbstluftwm colors, emacsify some of the keybindings and
add some docstrings to some of the functions.
This commit is contained in:
Tom Willemsen 2012-01-06 11:05:53 +01:00
parent 3f688c06d4
commit 60f95d2e60

View file

@ -2,25 +2,33 @@
!#
(define (hc command)
"Calls the herbstclient program to execute a command"
(system (string-append "herbstclient " command)))
(define (keybind modkey key command)
"Binds a keyboard key to a command, also prints it for testing
purposes"
(display (string-append "keybind " modkey "-" key " " command "\n"))
(hc (string-append "keybind " modkey "-" key " " command)))
(define (mousebind modkey button command)
"Binds a mouse button to a command"
(hc (string-append "mousebind " modkey "-" button " " command)))
(define (add-tag name)
"Create a new tag"
(hc (string-append "add " name)))
(define (set variable value)
"Set the value of a variable"
(hc (string-append "set " variable " " value)))
(define (unrule)
"Clear all rules from memory"
(hc "unrule -F"))
(define (rule spec)
"Add a new rule"
(hc (string-append "rule " spec)))
(define modkey "Mod4")
@ -40,12 +48,12 @@
(hc (string-append "set_layout " layout)))
;; colors
(set "frame_bg_normal_color" "\\#2e3436")
(set "frame_bg_active_color" "\\#0c191c")
(set "frame_bg_normal_color" "\\#0c191c")
(set "frame_bg_active_color" "\\#000000")
(set "frame_border_width" "0")
(set "window_border_width" "2")
(set "window_border_width" "1")
(set "window_border_normal_color" "\\#0c191c")
(set "window_border_active_color" "\\#4E9A06")
(set "window_border_active_color" "\\#15abc3")
;; other settings
(set "default_frame_layout" "2")
@ -61,7 +69,7 @@
"spawn "
(dmenu-command
"-misc-tamsyn-medium-r-normal-*-14-*-*-*-*-*-iso8859-*"
"#252a2b" "#eeeeec")))
"#000000" "#15abc3")))
(keybind "Control" "Mod1-l" "spawn i3lock -c 000000")
(keybind modkey "t" "spawn ~/bin/hlwm/capture-todo")
(keybind modkey "Shift-t" "spawn ~/bin/hlwm/show-todo")
@ -76,13 +84,13 @@
(hc "add_monitor 1280x1024+1680+0 w")
;; layouting
(keybind modkey "Shift-r" "remove")
(keybind modkey "Shift-r" "remove")
(keybind modkey "space" "cycle_layout 1")
(keybind modkey "u" "split vertical 0.5")
(keybind modkey "o" "split horizontal 0.5")
(keybind modkey "f" "floating toggle")
(keybind modkey "Shift-f" "fullscreen toggle")
(keybind modkey "p" "pseudotile toggle")
(keybind modkey "Mod1-f" "floating toggle")
(keybind modkey "Mod1-Shift-f" "fullscreen toggle")
(keybind modkey "Mod1-p" "pseudotile toggle")
;; resizing
(define resizestep "0.05")
@ -101,14 +109,14 @@
(keybind modkey "Tab" "cycle_all +1")
(keybind modkey "Shift-Tab" "cycle_all -1")
(keybind modkey "Mod1-c" "cycle")
(keybind modkey "h" "focus left")
(keybind modkey "j" "focus down")
(keybind modkey "k" "focus up")
(keybind modkey "l" "focus right")
(keybind modkey "Shift-h" "shift left")
(keybind modkey "Shift-j" "shift down")
(keybind modkey "Shift-k" "shift up")
(keybind modkey "Shift-l" "shift right")
(keybind modkey "b" "focus left")
(keybind modkey "n" "focus down")
(keybind modkey "p" "focus up")
(keybind modkey "f" "focus right")
(keybind modkey "Shift-b" "shift left")
(keybind modkey "Shift-n" "shift down")
(keybind modkey "Shift-p" "shift up")
(keybind modkey "Shift-f" "shift right")
;; rules
(unrule)