summaryrefslogtreecommitdiffstats
path: root/.config/herbstluftwm/autostart
blob: 69ee36d6b2fd8fcfe4837bd95866bab05fe7a451 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#!/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)))

;; keybindings
(keybind modkey "Mod1-q"  "quit")
(keybind modkey "Shift-r" "reload")
(keybind modkey "Shift-c" "close")
(keybind modkey "Return"  "spawn urxvt")
(keybind modkey "d"       "spawn dmenu_run")

;; tags
(hc "rename default 1")
(for-each create-tag '("1" "2" "3" "4" "5" "6" "7" "8" "9"))

;; layout
(hc "move_monitor 0 1680x1050+0+0")
(hc "add_monitor 1280x1024+1680+0 2")

;; layouting
(keybind modkey "r"      "remove")
(keybind modkey "space"  "cycle_layout 1")
(keybind modkey "u"      "split vertical 0.5")
(keybind modkey "o"      "split horizontal 0.5")
(keybind modkey "s"      "floating toggle")
(keybind modkey "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 "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
(display "set frame_border_active_color \\#49351D\n")
(set "frame_border_active_color"   "\\#49351D")
(display "set frame_border_normal_color\n")
(set "frame_border_normal_color"   "\\#73532D")
(display "set frame_bg_normal_color\n")
(set "frame_bg_normal_color"       "\\#BD9768")
(display "set frame_bg_active_color\n")
(set "frame_bg_active_color"       "\\#BD8541")
(display "set frame_border_width\n")
(set "frame_border_width"          "2")
(display "set window_border_width\n")
(set "window_border_width"         "2")
(display "set window_border_normal_color\n")
(set "window_border_normal_color"  "\\#AE8451")
(display "set window_border_active_color\n")
(set "window_border_active_color"  "\\#F6FF00")

;; rules
(display "unrule\n")
(unrule)
(display "rule focus=off\n")
(rule "focus=off")                 ; normally do not focus new clients
(display "rule focus terminal\n")
(rule "class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on")

;; Show panel

(system "/etc/xdg/herbstluftwm/panel.sh &")