diff options
author | Mario Forzanini <mf@marioforzanini.com> | 2023-07-13 22:53:20 +0200 |
---|---|---|
committer | Mario Forzanini <mf@marioforzanini.com> | 2023-07-13 22:53:20 +0200 |
commit | 6d020206c94ddd53da06b668349bc862314cf88f (patch) | |
tree | 0f995c541092b732f3aee53c6213682727f1dd9a | |
parent | 8efe9230ce23fbde60dde6f85788b7f677004459 (diff) |
-rw-r--r-- | init.lisp | 52 | ||||
-rw-r--r-- | setup.lisp | 18 | ||||
-rwxr-xr-x[-rw-r--r--] | xsession | 20 |
3 files changed, 32 insertions, 58 deletions
@@ -1,5 +1,5 @@ (in-package :stumpwm) -(load "~/.stumpwm.d/setup") +(ignore-errors (load "~/.stumpwm.d/setup")) ;;; Variables @@ -13,47 +13,29 @@ (defparameter +bookmark-file+ "~/.local/share/bookmarks") -(load "~/.stumpwm.d/commands") +(ignore-errors (load "~/.stumpwm.d/commands")) (setf *mouse-focus-policy* :click *top-level-error-action* :message *input-window-gravity* :center - *message-window-gravity* :center - app-menu:*app-menu* - '(("Firefox" "firefox") - ("Brave" "brave") - ("NYXT" "nyxt") - ("Gajim" "gajim") - ("Tor Browser" "torbrowser-launcher") - ("Krita" "krita") - ("Gimp" "gimp") - ("Xournal++" "xournalpp") - ("Pcmanfm" "pcmanfm") - ("Arandr" "arandr") - ("Powertop" "pkexec st -e powertop") - ("TLP" "tlpui") - ("KeepassXC" "keepassxc") - ("Ario" "ario") - ("Transmission" "transmission-gtk")) - end-session:*end-session-menu* - (list (list "Logout" #'end-session:logout) - (list "Shutdown" #'end-session:shutdown-computer) - (list "Restart" #'end-session:restart-computer) - (list "Suspend" #'end-session:suspend-computer) - (list "Lock" #'lock-computer)) - *input-refine-candidates-fn* 'stumpwm-prescient:refine-input) + *message-window-gravity* :center) ;;; Init (when *initializing* (xft:cache-fonts) - (set-font - (make-instance 'xft:font :family "FantasqueSansMono Nerd Font" :subfamily "Regular" :size 14 :antialias t)) (dolist (group *groups*) (gnew group)) (gnext) (gkill) - (gnext)) + (gnext) + (uiop:run-program "~/.stumpwm.d/xsession") + (setf *mode-line-background-color* "white" + *mode-line-foreground-color* "black" + *screen-mode-line-format* (list "[^B%n^b] %W |" '(:eval (run-shell-command "date +'%d/%m/%Y %H:%M'" t))) + stumptray:*tray-viwin-background* "#ffffff") + (mode-line) + (stumptray:stumptray)) ;;; Frame preferences @@ -61,6 +43,7 @@ (0 t t :create t :class "Emacs")) (define-frame-preference "browser" (0 t t :create t :class "firefox") + (0 t t :create t :class "Chromium") (0 t t :create t :class "Nyxt") (0 t t :create t :class "Brave")) (define-frame-preference "media" @@ -98,7 +81,6 @@ ("C-M-f" . "M-f") ("C-s" . "C-f") ("C-k" . ("C-S-End" "C-x"))))) - ;;; Keybindings (set-prefix-key (kbd "M-z")) @@ -127,19 +109,20 @@ For example: ("s-e" . "gselect other") ("s-j" . "fnext") ("s-k" . "fprev") + ("s-m" . "run-shell-command icedove") ("s-n" . "pull-hidden-next") ("s-o" . "gselect browser") ("s-p" . "pull-hidden-previous") ("s-q" . "delete") - ("s-r" . "show-menu") + ("s-r" . "launcher-command") ("s-u" . "gselect media") - ("s-w" . "run-shell-command brave") + ("s-w" . "run-shell-command chromium") ("s-A" . "gmove emacs") ("s-O" . "gmove browser") ("s-E" . "gmove other") ("s-R" . "launcher-command") ("s-U" . "gmove media") - ("s-SPC" . "run-shell-command st") + ("s-RET" . "run-shell-command st -e tmux a") ("s-BackSpace" . "powermenu") ("XF86AudioRaiseVolume" . "volume-up") ("XF86AudioLowerVolume" . "volume-down") @@ -152,7 +135,7 @@ For example: ("2" . "vsplit") ("b" . "pull-from-windowlist") ("e" . "run-shell-command emacsclient -c") - ("M-b" . "bookmarks" ) + ("M-b" . "bookmarks") ("M-c" . "powermenu") ("M-e" . "run-shell-command emacsclient -c") ("M-h" . "move-window left") @@ -160,4 +143,5 @@ For example: ("M-k" . "move-window up") ("M-l" . "move-window right") ("M-p" . "pass-copy-menu") + ("M-t" . "run-shell-command otpmenu") ("M-r" . "launcher-command"))) @@ -1,33 +1,23 @@ (in-package :stumpwm) +(setf *module-dir* "~/.stumpwm.d/modules/") +(init-load-path *module-dir*) + #-quicklisp (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))) (when (probe-file quicklisp-init) (load quicklisp-init))) -(ql:quickload :alexandria) (ql:quickload :bordeaux-threads) (ql:quickload :str) (ql:quickload :clx-truetype) -(ql:quickload :stumpwm-prescient) (ql:quickload :xembed) (ql:quickload :slynk) -(defun install-from-git (repo &key (forge "https://github.com")) - (declare (type string repo)) - (let* ((qldir "~/quicklisp/local-projects") - (target-dir - (format nil "~a/~a" - qldir - (second (str:split #\/ repo))))) - (unless (uiop:directory-exists-p target-dir) - (uiop:chdir qldir) - (uiop:run-program (format nil "git clone ~a/~a" (string-trim "/" forge) repo))))) - -(install-from-git "landakram/stumpwm-prescient") (load-module "app-menu") (load-module "end-session") (load-module "pass") (load-module "stump-volume-control") (load-module "ttf-fonts") +(load-module "stumptray") @@ -1,18 +1,18 @@ #!/bin/sh try() { - pgrep -q $1 || $@ 2> $HOME/.local/share/xsession.log & +pgrep $1 >/dev/null || $@ & 2>> $HOME/.local/share/dwm.log } - +hsetroot -solid dimgray try picom try dunst -try polybar try blueman-applet try pasystray -try xfce4-power-manager try nm-applet -hsetroot -solid dimgray - -setxkbmap -layout us -variant dvorak -option ctrl:nocaps -systemctl --user start mpd & -systemctl --user start plasma-polkit-agent & -systemctl --user start emacs & +try mpd +try cbatticon BAT0 +try cbatticon BAT1 +try xsettingsd +try tmux new-session -d +try setxkbmap -option compose:ralt +try emacs --daemon +xrdb -merge $HOME/.Xresources |