From 5c3e83d24cd72580d39963799c671411e6666be4 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 24 Aug 2023 16:37:20 +0300 Subject: stumpwm: fix for new setup --- stumpwm.org | 45 +++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/stumpwm.org b/stumpwm.org index 32df483..ccdcd72 100644 --- a/stumpwm.org +++ b/stumpwm.org @@ -3,12 +3,9 @@ #+PROPERTY: header-args :tangle ~/.stumpwm.d/init.lisp :mkdirp yes #+auto_tangle: t #+STARTUP: overview + * Load Modules #+begin_src lisp - - (setf is-zeus (equal (asdf:hostname) "zeus")) - (setf is-hermes (equal (asdf:hostname) "hermes")) - (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))) (when (probe-file quicklisp-init) @@ -24,9 +21,8 @@ (load-module "mpd") (load-module "stump-backlight") (load-module "urgentwindows") - (when is-zeus - (load-module "pinentry")) - + (load-module "pinentry") + (load-module "swm-gaps") (mpd:mpd-connect) #+end_src * Setup slynk @@ -34,11 +30,11 @@ (ql:quickload :slynk) - (stumpwm:defcommand sly-start-server () () + (stumpwm:defcommand sly-start-server () "Start a slynk server for sly." (sb-thread:make-thread (lambda () (slynk:create-server :dont-close t)))) - (stumpwm:defcommand sly-stop-server () () + (stumpwm:defcommand sly-stop-server () "Stop current slynk server for sly." (sb-thread:make-thread (lambda () (slynk:stop-server 4005)))) @@ -53,8 +49,9 @@ (format t "Setting wallpaper: ~a~%" wallpaper-name) (run-shell-command (format nil "feh --bg-scale ~a~a" wallpaper-dir wallpaper-name)))) - (cond (is-zeus (feh-set-wallpaper "eris-chocolates.jpg")) - (is-hermes (feh-set-wallpaper "library-old-house.jpg"))) + (cond ((equal (asdf:hostname) "zeus") (feh-set-wallpaper "eris-chocolates.jpg")) + ((equal (asdf:hostname) "hermes") (feh-set-wallpaper "library-old-house.jpg"))) + (when *initializing* (stumpwm:run-shell-command @@ -187,24 +184,24 @@ (when *initializing* (update-color-map (current-screen))) - (load-module "swm-gaps") - (setf swm-gaps:*head-gaps-size* 0 - swm-gaps:*inner-gaps-size* 2 - swm-gaps:*outer-gaps-size* 4) - - (when *initializing* - (swm-gaps:toggle-gaps)) - (set-border-color thanos-hope) (set-focus-color thanos-hope) (set-unfocus-color thanos-hope-alt) - (set-float-focus-color thanos-hope1 -) + (set-float-focus-color thanos-hope1) (set-float-unfocus-color thanos-hope3) (set-fg-color thanos-hope-fg) (set-bg-color thanos-hope-alt) #+end_src +** Gaps +#+begin_src emacs-lisp + (setf swm-gaps:*head-gaps-size* 5 + swm-gaps:*inner-gaps-size* 5 + swm-gaps:*outer-gaps-size* 5) + + (when *initializing* + (swm-gaps:toggle-gaps-on)) +#+end_src ** Fonts #+begin_src lisp (ql:quickload :clx-truetype) @@ -261,7 +258,7 @@ (stumpwm:run-shell-command "pamixer --get-volume" t))) "% | " ;; Check when hermes(laptop) t display battery - (when is-hermes + (when (equal (asdf:hostname) "hermes") "BAT:%B |") "%d")) @@ -286,8 +283,8 @@ ;; Run rofi (define-key *root-map* (kbd "C-r") "exec emacsclient -e '(thanos/app-launcher\)'") (define-key *root-map* (kbd ",") "exec flameshot gui") - (define-key *root-map* (kbd "C-R") "restart-soft") - (define-key *root-map* (kbd "M-r") "restart-hard") + (define-key *root-map* (kbd "C-R") "restart-hard") + (define-key *root-map* (kbd "M-r") "restart-soft") (define-key *root-map* (kbd "p") "exec emacsclient -e '(thanos/pass-launcher)'") (define-key *root-map* (kbd "f") "float-this") (define-key *root-map* (kbd "b") "windowlist") -- cgit v1.2.3