113 lines
3.4 KiB
Scheme
Executable file
113 lines
3.4 KiB
Scheme
Executable file
#!/usr/bin/guile
|
|
!#
|
|
|
|
(define (hc command)
|
|
(system (string-append "herbstclient " command)))
|
|
|
|
(define (keybind modkey key command)
|
|
(display (string-append "keybind " modkey "-" key " " command "\n"))
|
|
(hc (string-append "keybind " modkey "-" key " " command)))
|
|
|
|
(define (mousebind modkey button command)
|
|
(hc (string-append "mousebind " modkey "-" button " " command)))
|
|
|
|
(define (add-tag name)
|
|
(hc (string-append "add " name)))
|
|
|
|
(define (set variable value)
|
|
(hc (string-append "set " variable " " value)))
|
|
|
|
(define (unrule)
|
|
(hc "unrule -F"))
|
|
|
|
(define (rule spec)
|
|
(hc (string-append "rule " spec)))
|
|
|
|
(define modkey "Mod4")
|
|
|
|
(define (create-tag name)
|
|
(add-tag name)
|
|
(keybind modkey name (string-append "use " name))
|
|
(keybind modkey
|
|
(string-append "Shift-" name)
|
|
(string-append "move " name)))
|
|
|
|
(define (dmenu-command fn nb nf)
|
|
(string-append "dmenu_run -fn '" fn "' -nb '" nb "' -nf '" nf "'"))
|
|
|
|
;; keybindings
|
|
(keybind modkey "Mod1-q" "quit")
|
|
(keybind modkey "Mod1-r" "reload")
|
|
(keybind modkey "Shift-Mod1-c" "close")
|
|
(keybind modkey "Return" "spawn urxvt")
|
|
(keybind modkey "r"
|
|
(string-append
|
|
"spawn "
|
|
(dmenu-command
|
|
"-misc-dejavu sans mono-medium-r-*-*-10-*-*-*-*-*-*-*"
|
|
"#252a2b" "#eeeeec")))
|
|
|
|
;; tags
|
|
(hc "rename default q")
|
|
(for-each create-tag '("q" "w" "e" "a" "s" "d" "z" "x" "c"))
|
|
|
|
;; layout
|
|
(hc "remove_monitor 1")
|
|
(hc "move_monitor 0 1680x1050+0+0")
|
|
(hc "add_monitor 1280x1024+1680+0 w")
|
|
|
|
;; layouting
|
|
(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")
|
|
|
|
;; resizing
|
|
(define resizestep "0.05")
|
|
(keybind modkey "Control-h" (string-append "resize left +" resizestep))
|
|
(keybind modkey "Control-j" (string-append "resize down +" resizestep))
|
|
(keybind modkey "Control-k" (string-append "resize up +" resizestep))
|
|
(keybind modkey "Control-l" (string-append "resize right +" resizestep))
|
|
|
|
;; mouse
|
|
(mousebind modkey "Button1" "move")
|
|
(mousebind modkey "Button2" "resize")
|
|
(mousebind modkey "Button3" "zoom")
|
|
|
|
;; focus
|
|
(keybind modkey "BackSpace" "cycle_monitor")
|
|
(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")
|
|
|
|
;; colors
|
|
(set "frame_border_active_color" "\\#2e3436")
|
|
(set "frame_border_normal_color" "\\#0c191c")
|
|
(set "frame_bg_normal_color" "\\#2e3436")
|
|
(set "frame_bg_active_color" "\\#0c191c")
|
|
(set "frame_border_width" "0")
|
|
(set "window_border_width" "2")
|
|
(set "window_border_normal_color" "\\#0c191c")
|
|
(set "window_border_active_color" "\\#800000")
|
|
|
|
;; rules
|
|
(unrule)
|
|
(rule "focus=off") ; normally do not focus new clients
|
|
(rule "class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on")
|
|
(rule "windowtype=_NET_WM_WINDOW_TYPE_DIALOG focus=on pseudotile=on")
|
|
(rule "class=Xephyr pseudotile=on")
|
|
|
|
;; Show panel
|
|
|
|
(system "~/.config/herbstluftwm/panel.sh &")
|