summaryrefslogtreecommitdiff
path: root/.config/dwl-guile/init.scm
blob: d23d7936f4349fb9ec2783e343d22c9a35adc6f5 (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
;; Default bindings.
;; This file will only be loaded if 'inhibit-defaults? is #f.
(setq inhibit-defaults? #t)
;; M-x geiser-connect-local /tmp/dwl-guile.socket
(dwl:start-repl-server)

(dwl:set-tty-keys "C-M")
(dwl:set-tag-keys "s" "s-S")

(setq tags (list "dev" "web" "doc" "wte" "art" "ws6" "img" "vid" "agd"))
(set-layouts 'default "[]=" 'dwl:tile
             'monocle "[M]" 'dwl:monocle)

;; TODO add back hyper!
(set-xkb-rules '((layout . us)
                 (options . "ctrl:nocaps")))

(setq repeat-rate 70
      repeat-delay 250
      ;; aka focus follows mouse
      sloppy-focus? #f)

;; colors :)
(setq focus-color "#ffffff"
      border-color "#666666")

(set-rules '((id . "emacs")
             (tags . 1)
             (floating? . #f)
             (monitor . -1)
             (id . "icecat")
             (tags . 2)
             (floating? . #f)
             (monitor . -1)
             (id . "librewolf")
             (tags . 2)
             (floating? . #f)
             (monitor . -1)
             (id . "Zathura")
             (tags . 3)
             (floating? . #f)
             (monitor . -1)
             (id . "libreoffice")
             (tags . 4)
             (floating? . #f)
             (monitor . -1)
             (id . "gimp")
             (tags . 5)
             (floating? . #t)
             (monitor . -1)
             (id . "imv")
             (tags . 7)
             (floating? . #f)
             (monitor . -1)
             (id . "Mpv")
             (tags . 8)
             (floating? . #f)
             (monitor . -1)))


(set-keys "s-x" '(dwl:spawn "bemenu-run")
          "s-S-<return>" '(dwl:spawn "emacsclient" "-nc")
          "s-S-b" '(dwl:spawn "icecat")
          "s-S-c" '(dwl:spawn "librewolf")
          ;; "s-S-o" '(dwl:spawn "BOOKMARKS!")
          ;; "s-S-p" '(dwl:spawn "PASSMENU!")
          ;; BRIGHTNESS
          ;; VOL
          ;; MPD
          "s-<print>" '(dwl:spawn "flameshot launcher")
          "<print>" '(dwl:spawn "flameshot full")
          "s-n" '(dwl:focus-stack 1)
          "s-p" '(dwl:focus-stack -1)
          "s-f" '(dwl:change-master-factor 0.01)
          "s-b" '(dwl:change-master-factor -0.01)
          "s-<page-up>" '(dwl:change-masters 1)
          "s-<page-down>" '(dwl:change-masters -1)
          "s-t" '(dwl:cycle-layout 1)
          "s-<left>" '(dwl:focus-monitor 'DIRECTION-LEFT)
          "s-<right>" '(dwl:focus-monitor 'DIRECTION-RIGHT)
          "s-<up>" '(dwl:focus-monitor 'DIRECTION-UP)
          "s-<down>" '(dwl:focus-monitor 'DIRECTION-DOWN)
          "s-S-<left>" '(dwl:tag-monitor 'DIRECTION-LEFT)
          "s-S-<right>" '(dwl:tag-monitor 'DIRECTION-RIGHT)
          "s-S-<up>" '(dwl:tag-monitor 'DIRECTION-UP)
          "s-S-<down>" '(dwl:tag-monitor 'DIRECTION-DOWN)
          "s-q" 'dwl:kill-client
          "s-<return>" 'dwl:zoom
          "s-<tab>" 'dwl:view
          "s-0" '(dwl:view 0) ;; 0 will show all tags
          "s-m" '(dwl:set-layout "monocle")
          "s-t" '(dwl:set-layout "default")
          "s-S-<space>" 'dwl:toggle-floating
          "s-S-q" 'dwl:quit
          "s-<mouse-left>" 'dwl:move
          "s-<mouse-right>" 'dwl:resize
          "s-=" '(dwl:change-gaps -4)
          "s-<backspace>" '(dwl:change-gaps 4))

(set-monitor-rules '((masters . 1)
                     (master-factor . 0.55)
                     (scale . 1)
                     (transform . TRANSFORM-NORMAL)
                     (layout . default)))

(add-hook! dwl:hook-startup
           (lambda ()
             (dwl:spawn "set-bg")
             (dwl:change-gaps 8)
             (dwl:spawn "emacs" "--daemon")))