changelog shortlog graph tags branches changeset file revisions annotate raw help

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

revision 94: 978ce75e54af
parent 93: 0e41a0a68353
child 95: f69061a590da
     1.1--- a/.stumpwm.d/init.lisp	Fri Aug 23 19:12:13 2024 -0400
     1.2+++ b/.stumpwm.d/init.lisp	Fri Aug 30 17:07:30 2024 -0400
     1.3@@ -4,6 +4,9 @@
     1.4 
     1.5 (stumpwm:set-prefix-key (kbd "s-SPC"))
     1.6 
     1.7+(ignore-errors
     1.8+ (ql:quickload '(:std :core :prelude :user)))
     1.9+
    1.10 (defcommand load-std () ()
    1.11   (ql:quickload :std))
    1.12 
    1.13@@ -14,7 +17,8 @@
    1.14   (ql:quickload :core))
    1.15 
    1.16 (defcommand load-user () ()
    1.17-  (ql:quickload :user))
    1.18+  (ql:quickload :user)
    1.19+  (in-package :user))
    1.20 
    1.21 (setq *mouse-focus-policy*    :sloppy
    1.22       *float-window-modifier* :SUPER
    1.23@@ -35,7 +39,20 @@
    1.24 (unless swm-golden-ratio:*golden-ratio-on*
    1.25   (swm-golden-ratio:toggle-golden-ratio))
    1.26 
    1.27-(load-module "stumptray")
    1.28+;; (load-module "stumptray")
    1.29+(load-module "cpu")
    1.30+(load-module "hostname")
    1.31+(load-module "mpd")
    1.32+(load-module "mem")
    1.33+(ql:quickload '(:cl-diskspace :cl-mount-info))
    1.34+(load-module "disk")
    1.35+(setq *mode-line-highlight-template* "«~A»")
    1.36+(setf *screen-mode-line-format* (list "[^B%n^b] %W^> %C | %M | %l | %D | %h | %d"))
    1.37+
    1.38+(ql:quickload :xml-emitter)
    1.39+(ql:quickload :dbus)
    1.40+(load-module "notify")
    1.41+(notify:notify-server-toggle)
    1.42 
    1.43 (set-fg-color "#ffffff")
    1.44 (set-bg-color "#000000")
    1.45@@ -61,22 +78,35 @@
    1.46                      "#FEFEFE"))    ; 7 white
    1.47 
    1.48 (setf *window-format* "%m%n%s%c")
    1.49-(setf *screen-mode-line-format* (list "[^B%n^b] %W^>%d"))
    1.50 (set-normal-gravity :center)
    1.51 (set-maxsize-gravity :center)
    1.52 (set-transient-gravity :center)
    1.53-(setf *time-modeline-string* "%a %b %e %k:%M")
    1.54+(setf *time-modeline-string* "%F %H:%M")
    1.55+(setf *group-format* "%t")
    1.56+(setq *mode-line-timeout* 4)
    1.57 
    1.58-(setq *mode-line-timeout* 4)(
    1.59-which-key-mode)
    1.60+(which-key-mode)
    1.61 
    1.62 (when *initializing*
    1.63+  (grename "*MAIN*")
    1.64+  (gnewbg "*ORG*")
    1.65+  (gnewbg "*MEDIA*")
    1.66+  (gnewbg "*SCRATCH*")
    1.67   (run-shell-command "sh ~/.fehbg")
    1.68   (when (equal (machine-instance) "zor")
    1.69     (run-shell-command "sh ~/.screenlayout/default.sh"))
    1.70   (dolist (h (screen-heads (current-screen)))
    1.71     (enable-mode-line (current-screen) h t)))
    1.72 
    1.73+(clear-window-placement-rules)
    1.74+
    1.75+(define-frame-preference "*MAIN*" (nil t t :class "Tiling"))
    1.76+(define-frame-preference "*ORG*" (nil t t :class "Tiling"))
    1.77+(define-frame-preference "*MEDIA*" (nil t t :class "Floating"))
    1.78+(define-frame-preference "*SCRATCH*" (nil t t :class "Tiling"))
    1.79+
    1.80+(setf *dynamic-group-master-split-ratio* 1/2)
    1.81+
    1.82 (defcommand term (&optional program) ()
    1.83   (sb-thread:make-thread
    1.84    (lambda ()
    1.85@@ -89,15 +119,26 @@
    1.86    (lambda ()
    1.87      (run-shell-command "blueberry"))))
    1.88 
    1.89+(defcommand firefox () ()
    1.90+  "Run or raise Firefox."
    1.91+  (sb-thread:make-thread
    1.92+   (lambda () (run-or-raise "firefox" '(:class "Firefox") t nil))))
    1.93+
    1.94 (defcommand chromium () ()
    1.95   (sb-thread:make-thread
    1.96    (lambda ()
    1.97-     (run-shell-command "chromium"))))
    1.98+     (run-or-raise "chromium" '(:class "Chromium") t nil))))
    1.99 
   1.100 (defcommand emacsclient () ()
   1.101   (run-shell-command "emacsclient -c -a="))
   1.102 
   1.103-(define-key *root-map* (kbd "c") "term")
   1.104+(defcommand homer () ()
   1.105+  (run-shell-command "homer"))
   1.106+
   1.107+(defcommand skel () ()
   1.108+  (run-shell-command "skel"))
   1.109+
   1.110+(define-key *root-map* (kbd "t") "term")
   1.111 (define-key *root-map* (kbd "e") "emacsclient")
   1.112 (define-key *root-map* (kbd "C-e") "emacs")
   1.113 (define-key *root-map* (kbd "s-w") "chromium")