aboutsummaryrefslogtreecommitdiffstats
path: root/oni/home/data/config.scm
blob: f54221f1ff9c9032837c7030902e4061cc1ee77c (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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
(define-module (oni home data config)
  #:use-module (gnu home)
  #:use-module (gnu home services)
  #:use-module (gnu home services shells)
  #:use-module (gnu home services desktop)
  #:use-module (gnu home services ssh)
  #:use-module (gnu services)
  #:use-module (gnu packages)
  #:use-module (gnu packages admin)
  #:use-module (gnu packages shellutils)
  #:use-module (gnu packages wm)
  #:use-module (gnu packages xdisorg)
  #:use-module (guix gexp)
  #:use-module (oni home services rofi)
  #:use-module (oni home services xmodmap)
  #:use-module (oni home services kitty)
  #:use-module (oni home services xsession)
  #:use-module (oni home services compton)
  #:use-module (oni home services xbindkeys)
  #:use-module (oni home services zsh)
  #:use-module (oni home services herbstluftwm)
  #:use-module (oni home services polybar)
  #:use-module (oni home services kdeconnect)
  #:use-module (oni home services cmst)
  #:use-module (oni home services syncthing)
  #:use-module (oni home services unclutter)
  #:use-module (oni home services dunst)
  #:use-module (oni home services guile)
  #:use-module (oni packages hlwm-run-or-raise)
  #:use-module (oni packages pick-random-wallpaper))

(home-environment
 (packages (list (specification->package+output "glibc-locales")
                 (specification->package+output "font-fantasque-sans")
                 (specification->package+output "font-comic-neue")
                 hlwm-run-or-raise
                 pick-random-wallpaper))

 (services
  (list
   (simple-service 'some-useful-env-vars-service
                   home-environment-variables-service-type
                   `(("LESS" . "FXRSi")
                     ("MY_GUIX_CONFIGURED" . "1")
                     ("DOTNET_CLI_TELEMETRY_OPTOUT" . "1")
                     ("EDITOR" . "emacsclient")
                     ("CALIBRE_USE_DARK_PALETTE" . "1")
                     ("GUIX_LOCPATH" . "$HOME/.guix-home/profile/lib/locale")
                     ("XDG_DATA_DIRS" . "${XDG_DATA_DIRS}${XDG_DATA_DIRS:+:}/usr/local/share:/usr/share")))

   (service home-redshift-service-type
            (home-redshift-configuration
             (location-provider 'manual)
             (latitude 49.2127205)
             (longitude 122.9267927)))

   (service home-zsh-service-type
            (home-zsh-configuration
             (environment-variables
              '(("HISTFILE" . "$HOME/.zsh/histfile")
                ("HISTSIZE" . "1000")
                ("SAVEHIST" . "1000")))
             (zshrc
              (list
               (mixed-text-file
                "zshrc"
                "fpath=($HOME/.zsh/functions $fpath)\n"
                "autoload -U $HOME/.zsh/functions/*(:t)\n"
                "alias csi=\"rlwrap csi\"\n"
                "alias scsh=\"rlwrap scsh\"\n"
                "alias sbcl=\"rlwrap sbcl\"\n"
                "alias hc=herbstclient\n"
                "setopt SHARE_HISTORY\n"
                "setopt HIST_IGNORE_ALL_DUPS\n"
                "setopt PROMPT_SUBST\n"
                "zle -N x-copy-region-as-kill\n"
                "zle -N x-kill-region\n"
                "zle -N x-yank\n"
                "bindkey -e '^[w' x-copy-region-as-kill\n"
                "bindkey -e '^W' x-kill-region\n"
                "bindkey -e '^Y' x-yank\n"
                "autoload -Uz compinit\n"
                "compinit\n"
                "PROMPT=\"%T \\$(spwd) %B%(?.%F{2}.%F{1}[%?])>%b%f \"")))))

   ;; This has to be the first extension because it needs to be added to the
   ;; configuration last.
   (service home-zsh-syntax-highlighting-service-type)
   (service home-zsh-autosuggestions-service-type)

   (service home-rofi-service-type
            (home-rofi-configuration
             (config
              '((kb-cancel . "Escape,Control+g")
                (window-format . "{c}  {t}")))
             (theme
              '((* ((text-color . "#bfbfbf")
                    (background-color . "#3f4242")
                    (lightbg . "#5b6161")
                    (red . "#a85454")
                    (orange . "#faa41a")
                    (blue . "#1f2c3f")

                    (selected-normal-foreground . "@text-color")
                    (normal-foreground . "@text-color")
                    (alternate-normal-background . "@background-color")
                    (selected-urgent-foreground . "@text-color")
                    (urgent-foreground . "@text-color")
                    (alternate-urgent-background . "@background-color")
                    (active-foreground . "@text-color")
                    (selected-active-foreground . "@text-color")
                    (alternate-normal-foreground . "@text-color")
                    (alternate-active-background . "@blue")
                    (bordercolor . "@text-color")
                    (normal-background . "@background-color")
                    (selected-normal-background . "@blue")
                    (separatorcolor . "@orange")
                    (spacing . 2)
                    (urgent-background . "@red")
                    (alternate-urgent-foreground . "@text-color")
                    (selected-urgent-background . "@red")
                    (alternate-active-foreground . "@text-color")
                    (selected-active-background . "@blue")
                    (active-background . "@red")

                    (font . "Fantasque Sans Mono 14")))
                (window ((border . 0)
                         (text-color . "@text-color")
                         (background-color . "rgba(0, 0, 0, 0%)")
                         (padding . 5)
                         (text-color . "@bordercolor")
                         (background-color . "@background-color")))
                (mainbox ((border . 0)
                          (padding . 0)))
                (message ((border . "1px dash 0px 0px")
                          (text-color . "@separatorcolor")
                          (padding . "2px 0px 0px")))
                (textbox ((text-color . "@text-color")))
                (listview ((fixed-height . 0)
                           (border . "2px 0px 0px")
                           (padding . "2px 0px 0px")
                           (text-color . "@separatorcolor")))
                (element ((border . 0)
                          (children "element-icon" "element-text")
                          (spacing . "5px")))
                (element.normal.normal ((text-color . "@normal-foreground")
                                        (background-color . "@normal-background")))
                (element.normal.urgent ((text-color . "@urgent-foreground")
                                        (background-color . "@urgent-background")))
                (element.normal.active ((text-color . "@active-foreground")
                                        (background-color . "@active-background")))
                (element.selected.urgent ((text-color . "@selected-urgent-foreground")
                                          (background-color . "@selected-urgent-background")))
                (element.selected.active ((text-color . "@selected-active-foreground")
                                          (background-color . "@selected-active-foreground")))
                (element.alternate.normal ((text-color . "@alternate-normal-foreground")
                                           (background-color . "@alternate-normal-background")))
                (element.alternate.urgent ((text-color . "@alternate-urgent-foreground")
                                           (background-color . "@alternate-urgent-background")))
                (element.alternate.active ((text-color . "@alternate-active-foreground")
                                           (background-color . "@alternate-active-background")))
                (mode-switcher ((border . "1px dash 0px 0px")))
                (#{button selected}# ((text-color . "@selected-normal-foreground")
                                      (background-color . "@selected-normal-background")))
                (inputbar ((spacing . 0)
                           (border . "0px")
                           (children "prompt" "textbox-prompt-colon" "entry" "case-indicator")))
                (#{button normal}# ((text-color . "@text-color")))
                (text-prompt-color ((expand . #f)
                                    (str . ":")
                                    (margin . "0px 0.3em 0em 0em")
                                    (text-color . "@normal-foreground")))))))

   (service home-xmodmap-service-type
            (home-xmodmap-configuration
             (pointer '(3 2 1))
             (extra '("remove Mod5 = ISO_Level3_Shift"
                      "keycode 108 = Alt_L"
                      "add Mod1 = Alt_L"))))

   (service home-kitty-service-type
            (home-kitty-configuration
             (configuration
              '((font-family . "Fantasque Sans Mono")
                (bold-font . "Fantasque Sans Mono Bold")
                (italic-font . "Fantasque Sans Mono Italic")
                (bold-italic-font . "Fantasque Sans Mono Bold Italic")
                (font-size . 14)
                (symbol-map . "U+f002 Font Awesome 5 Free Solid")
                (cursor-shape . beam)
                (cursor-blink-interval . 0)
                (url-style . single)
                (open-url-with . firefox)
                (copy-on-select . #f)
                (enable-audio-bell . #f)
                (visual-bell-duration . 0)
                (window-padding-width . 11.25)
                (active-tab-font-style . normal)
                (editor . emacsclient)
                (allow-remote-control . #t)
                (enabled-layouts vertical stack tall fat grid horizontal)
                (cursor . "#969696")
                (url-color . "#a88654")
                (active-border-color . "#1f2c3f")
                (inactive-border-color . "#3d3d3d")
                (bell-border-color . "#3f1a1a")
                (active-tab-foreground . "#65a854")
                (active-tab-background . "#1f2c3f")
                (inactive-tab-foreground . "#65a854")
                (inactive-tab-background . "#3d3d3d")
                (foreground . "#bfbfbf")
                (background . "#222424")
                (selection-foreground . "#222424")
                (selection-background . "#7126a3f0f01f")
                (color0 . "#222222")
                (color8 . "#3d3d3d")
                (color1 . "#ca3c828e828e")
                (color9 . "#f01f71267126")
                (color2 . "#90e4ca3c828e")
                (color10 . "#8a8bf01f7126")
                (color3 . "#bbe6ca3c828e")
                (color11 . "#d6baf01f7126")
                (color4 . "#828e9f3aca3c")
                (color12 . "#7126a3f0f01f")
                (color5 . "#bbe6828eca3c")
                (color13 . "#d6ba7126f01f")
                (color6 . "#828eca3cca3c")
                (color14 . "#7126f01ff01f")
                (color7 . "#969696")
                (color15 . "#ededed")))))

   (service home-xsession-service-type
            (home-xsession-configuration
             (configuration
              (list
               (mixed-text-file
                "xsession"
                "xrdb -cpp m4 -merge \"${HOME}/.config/X11/Xresources\" -I\"${HOME}/.config/X11/Xresources.d\"\n"
                "xrandr --setprovideroutputsource modesetting NVIDIA-0\n"
                "xrandr --auto\n"
                "xrandr --dpi 96\n")))))

   (service home-picom-service-type
            (home-picom-configuration
             (config
              '((detect-transient . #t)
                (shadow . #t)
                (wintypes ((dnd ((shadow . #f)))
                           (dock ((shadow . #f)))))
                (shadow-radius . 10)
                (shadow-exclude ("name = 'mowedline'"
                                 "class_g = 'trayer'"
                                 "bounding_shaped"))))))

   (service home-xbindkeys-service-type
            (home-xbindkeys-configuration
             (keybindings
              '(((mod4 shift q) . "herbstclient quit")
                ((mod4 shift e) . "herbstclient reload")
                ((mod4 k) . "hersbtclient close")
                ((mod4 mod1 k) . "herbstclient remove")
                ((mod4 Return) . "herbstclient spawn kitty")
                ((mod4 t) . "herbstclient spawn hlwm-run-or-raise \"\\(URxct\\|Hyper\\|kitty\\)\" kitty")
                ((mod4 b) . "herbstclient spawn hlwm-run-or-raise \"\\(Conkeror\\|[Ff]irefox\\|Chromium\\|Next\\|qutebrowser\\)\" firefox")
                ((mod4 e) . "herbstclient spawn hlwm-run-or-raise Emacs emacsclient --create-frame")
                ((control mod1 l) . "herbstclient spawn i3lock --color=000000")
                ((mod4 x) . "herbstclient spawn hlwm-switch-tags")
                ((mod4 shift b) . "herbstclient shift left")
                ((mod4 shift n) . "herbstclient shift down")
                ((mod4 shift p) . "herbstclient shift up")
                ((mod4 shift f) . "herbstclient shift right")
                ((mod4 control b) . "herbstclient resize left +0.05")
                ((mod4 control n) . "herbstclient resize down +0.05")
                ((mod4 control p) . "herbstclient resize up +0.05")
                ((mod4 control f) . "herbstclient resize right +0.05")
                ((mod4 shift underscore) . "herbstclient split bottom 0.5")
                ((mod4 shift bar) . "herbstclient split right 0.5")
                ((mod4 period) . "herbstclient use_index +1 --skip-visible")
                ((mod4 comma) . "herbstclient use_index -1 --skip-visible")
                ((mod4 shift control f) . "herbstclient floating toggle")
                ((mod4 f) . "herbstclient cycle_layout 1 vertical max")
                ((mod4 m) . "herbstclient fullscreen toggle")
                ((mod4 p) . "herbstclient pseudotile toggle")
                ((mod4 space) . "herbstclient or , and . compare tags.focus.curframe_wcount = 2 . cycle_layout +1 vertical horizontal max vertical grid , cycle_layout +1")
                ((mod4 BackSpace) . "herbstclient cycle_monitor")
                ((mod4 u) . "herbstclient jumpto urgent")
                ((XF86AudioPlay) . "herbstclient spawn mpc toggle")
                ((XF86AudioNext) . "herbstclient spawn mpc next")
                ((XF86AudioPrev) . "herbstclient spawn mpc prev")
                ((mod4 c)
                 ("1" . "herbstclient move_index 0")
                 ("2" . "herbstclient move_index 1")
                 ("3" . "herbstclient move_index 2")
                 ("4" . "herbstclient move_index 3")
                 ("5" . "herbstclient move_index 4")
                 ("6" . "herbstclient move_index 5")
                 ("7" . "herbstclient move_index 6")
                 ("8" . "herbstclient move_index 7")
                 ("9" . "herbstclient move_index 8")
                 ("0" . "herbstclient move_index 9"))
                ((mod4 s)
                 ("f" . "flameshot full ~/pictures/screenshots/")
                 ("c" . "flameshot gui"))))))

   (service home-herbstluftwm-service-type
            (home-herbstluftwm-configuration
             (tags '(dev web game))
             (mouse-bindings
              '(("Mod4-Button1" . "move")
                ("Mod4-Button2" . "zoom")
                ("Mod4-Button3" . "resize")))
             (settings
              '((default_frame_layout . 2)
                (frame_border_active_color . "#3d3d3d")
                (frame_border_normal_color . "#222222")
                (frame_bg_normal_color . "#111111")
                (frame_bg_active_color . "#263f1f")
                (frame_border_width . 0)
                (window_border_width . 2)
                (window_border_inner_width . 0)
                (window_border_normal_color . "#222222")
                (window_border_active_color . "#1f3f3f")
                (window_border_inner_color . "#111111")
                (always_show_frame . 0)
                (frame_gap . 30)
                (window_gap . 30)
                (frame_padding . -30)
                (frame_bg_transparent . 1)
                (smart_window_surroundings . 0)
                (smart_frame_surroundings . 0)
                (mouse_recenter_gap . 0)
                (swap_monitors_to_get_tag . 0)
                (update_dragged_clients . 1)
                (tree_style . "╾│ ├└╼─┐")))
             (attributes
              '(((theme tiling reset) . 1)
                ((theme floating reset) . 1)))
             (rules
              '(("focus=on")
                ("class=Emacs" "tag=dev" "index=01" "switchtag=on" "hook=emacs")
                ("class~'URxvt|kitty'" "tag=dev" "index=1" "switchtag=on" "hook=urxvt")
                ("class~'Conkeror|[Ff]irefox|Chromium'" "tag=web" "index=0" "switchtag=on")
                ("class=Pinentry" "pseudotile=on")
                ("class=Alsaplayer" "pseudotile=on")
                ("class=Gcr-prompter" "pseudotile=on")
                ("class=Steam" "title='Steam Login'" "pseudotile=on")
                ("class=Steam" "title~'Steam - News .*'" "pseudotile=on")
                ("class=" "title=Steam" "pseudotile=on")
                ("class=xfreerdp" "floating=on" "tag=work" "index=0" "switchtag=on")
                ("windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)'" "pseudotile=on")
                ("windowtype='_NET_WM_WINDOW_TYPE_DIALOG'" "focus=on")
                ("windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)'" "manage=off")
                ("class=pinball.exe" "pseudotile=on")))
             (padding '(0 0 0 16 16))
             (layouts
              '((web clients max:0)
                (dev split horizontal:0.54:1 (clients max:0) (clients vertical:0))))
             (extra
              (list
               "set_monitors 1920x1080+0+0"
               "focus_edge left"
               "keybind Mod4-apostrophe spawn dunstctl close"
               "keybind Mod4-quotedbl spawn dunstctl close-all"
               "keybind Mod4-Control-apostrophe spawn dunstctl history-pop"
               "keybind Mod4-Mod1-apostrophe spawn dunstctl context"
               "spawn pick-random-wallpaper"))))

   (service home-polybar-service-type
            (home-polybar-configuration
             (bar "data")))

   (service home-kdeconnect-service-type)

   (service home-cmst-service-type)

   (service home-syncthing-service-type)

   (service home-unclutter-service-type
            (home-unclutter-configuration
             (package unclutter-xfixes)
             (exclude-root #t)))

   (service home-openssh-service-type
            (home-openssh-configuration
             (hosts (list (openssh-host
                           (name "ryuslash")
                           (host-name "ryuslash.org")
                           (user "slash")
                           (port 4511)
                           (extra-content "LocalForward 8090 localhost:8090
LocalForward 2812 localhost:2812"))
                          (openssh-host
                           (name "rincewind")
                           (host-name "192.168.1.135")
                           (port 4511))))))

   (service home-dunst-service-type
            (home-dunst-configuration
             (font "Fantasque Sans Mono 15")
             (markup 'full)
             (format "<u>%s</u>\\n\\n%b")
             (width '(0 600))
             (idle-threshold 120)
             (padding 15)
             (horizontal-padding 15)
             (separator-color 'auto)
             (dmenu "rofi -dmenu -p dunst:")
             (browser "firefox")
             (icon-path '("/usr/share/icons/gnome/24x24/status/"
                          "/usr/share/icons/gnome/24x24/devices/"
                          "/usr/share/icons/hicolor/24x24/apps/"))
             (frame-width 2)
             (frame-color "#3d3d3d")
             (max-icon-size 24)
             (corner-radius 10)
             (rules
              '(("urgency_low"
                 (background "#405c2e")
                 (foreground "#eeeeec")
                 (timeout 10))
                ("urgency_normal"
                 (background "#222224")
                 (foreground "#eeeeec")
                 (timeout 10))
                ("urgency_critical"
                 (background "#973732")
                 (foreground "#eeeeec")
                 (timeout 0))
                ("Emacs"
                 (appname "Emacs")
                 (background "#7f5ab6")
                 (foreground "#fafafa"))
                ("Metal Express Radio"
                 (appname "Metal Express Radio")
                 (background "#ef4136")
                 (foreground "#ffffff"))
                ("Syncthing"
                 (appname "Syncthing GTK")
                 (background "#337ab7")
                 (foreground "#ffffff"))
                ("Lollypop"
                 (appname "Lollypop")
                 (background "#fd3e75")
                 (foreground "#ffffff"))
                ("gPodder"
                 (appname "gPodder")
                 (background "#7f5785")
                 (foreground "#ffffff"))))))

   (service home-guile-service-type
            (home-guile-configuration
             (use-readline #t)
             (use-colorized #t))))))