changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > infra > home / .stumpwm.d/init.lisp

changeset 86: a86cb552d6df
parent: 8bd50ea9a546
child: 0e41a0a68353
author: Richard Westhaver <ellis@rwest.io>
date: Wed, 21 Aug 2024 20:29:13 -0400
permissions: -rw-r--r--
description: stumpwm utils
1 (require :stumpwm)
2 
3 (in-package :stumpwm)
4 
5 (stumpwm:set-prefix-key (kbd "s-SPC"))
6 
7 (defcommand load-std () ()
8  (ql:quickload :std))
9 
10 (defcommand load-prelude () ()
11  (ql:quickload :prelude))
12 
13 (defcommand load-core () ()
14  (ql:quickload :core))
15 
16 (defcommand load-user () ()
17  (ql:quickload :user))
18 
19 (setq *mouse-focus-policy* :sloppy
20  *float-window-modifier* :SUPER
21  *startup-message* "Greetings, stranger.")
22 
23 (set-module-dir "~/.stumpwm.d/contrib")
24 (init-load-path *module-dir*)
25 
26 (ql:quickload :clx-truetype)
27 (load-module "ttf-fonts")
28 (xft:cache-fonts)
29 (set-font (make-instance 'xft:font
30  :family "Mononoki Nerd Font"
31  :subfamily "Regular"
32  :size 12))
33 
34 (load-module "swm-golden-ratio")
35 (unless swm-golden-ratio:*golden-ratio-on*
36  (swm-golden-ratio:toggle-golden-ratio))
37 
38 (load-module "stumptray")
39 
40 (set-fg-color "#ffffff")
41 (set-bg-color "#000000")
42 (set-border-color "#7E5D90")
43 (set-focus-color "#170F14")
44 (set-unfocus-color "#232731")
45 (set-win-bg-color "#22272F")
46 (set-float-focus-color "#8ED3A1")
47 (set-float-unfocus-color "#232731")
48 
49 (setf *mode-line-background-color* "#161613")
50 (setf *mode-line-foreground-color* "#FFFFFF")
51 (setf *mode-line-border-color* "#28394c")
52 (setf *mode-line-position* :bottom)
53 
54 (setf *colors* (list "#010101" ; 0 black
55  "#BF616A" ; 1 red
56  "#A3BE8C" ; 2 green
57  "#EBCB8B" ; 3 yellow
58  "#5E81AC" ; 4 blue
59  "#9D5AAF" ; 5 magenta
60  "#8FBCBB" ; 6 cyan
61  "#FEFEFE")) ; 7 white
62 
63 (setf *window-format* "%m%n%s%c")
64 (setf *screen-mode-line-format* (list "[^B%n^b] %W^>%d"))
65 (set-normal-gravity :center)
66 (set-maxsize-gravity :center)
67 (set-transient-gravity :center)
68 (setf *time-modeline-string* "%a %b %e %k:%M")
69 
70 (setq *mode-line-timeout* 4)(
71 which-key-mode)
72 
73 (when *initializing*
74  (run-shell-command "sh ~/.fehbg")
75  (when (equal (machine-instance) "zor")
76  (run-shell-command "sh ~/.screenlayout/default.sh"))
77  (dolist (h (screen-heads (current-screen)))
78  (enable-mode-line (current-screen) h t)))
79 
80 (defcommand term (&optional program) ()
81  (sb-thread:make-thread
82  (lambda ()
83  (run-shell-command (if program
84  (format nil "alacritty ~A" program)
85  "alacritty")))))
86 
87 (defcommand blueberry () ()
88  (sb-thread:make-thread
89  (lambda ()
90  (run-shell-command "blueberry"))))
91 
92 (defcommand chromium () ()
93  (sb-thread:make-thread
94  (lambda ()
95  (run-shell-command "chromium"))))
96 
97 (defcommand emacsclient () ()
98  (run-shell-command "emacsclient -c -a="))
99 
100 (define-key *root-map* (kbd "c") "term")