diff options
l---------[-rw-r--r--] | .stumpwm.d/colors.lisp | 21 | ||||
l---------[-rw-r--r--] | .stumpwm.d/commands.lisp | 61 | ||||
l---------[-rw-r--r--] | .stumpwm.d/init.lisp | 21 | ||||
l---------[-rw-r--r--] | .stumpwm.d/keybindings.lisp | 125 | ||||
l---------[-rw-r--r--] | .stumpwm.d/modeline.lisp | 46 | ||||
l---------[-rw-r--r--] | .stumpwm.d/theme.lisp | 65 | ||||
l---------[-rw-r--r--] | .stumpwm.d/utils.lisp | 28 |
7 files changed, 7 insertions, 360 deletions
diff --git a/.stumpwm.d/colors.lisp b/.stumpwm.d/colors.lisp index 9fa1cfd..dbd2dbc 100644..120000 --- a/.stumpwm.d/colors.lisp +++ b/.stumpwm.d/colors.lisp @@ -1,20 +1 @@ - -(defvar thanos-hope "#1c1d20") -(defvar thanos-hope-alt "#151619") -(defvar thanos-hope0 "#1B2229") -(defvar thanos-hope1 "#1c1f24") -(defvar thanos-hope2 "#202328") -(defvar thanos-hope3 "#23272e") -(defvar thanos-hope4 "#3f444a") -(defvar thanos-hope5 "#5B6268") -(defvar thanos-hope6 "#686b78") -(defvar thanos-hope7 "#9ca0a4") -(defvar thanos-hope8 "#DFDFDF") -(defvar thanos-hope-fg "#cbccd1") -(defvar thanos-hope-alt "#5B6268") - - -(defvar thanos-black-bg "#000000") -(defvar thanos-black-dim "#1e1e1e") -(defvar thanos-black-active "#535353") -(defvar thanos-black-inactive "#303030") +/gnu/store/3wp5npi1xy1cmyzx8j3cg24kssq4n8vb-home-dotfiles--stumpwm-d-colors-lisp
\ No newline at end of file diff --git a/.stumpwm.d/commands.lisp b/.stumpwm.d/commands.lisp index 1ad62a5..dc1a495 100644..120000 --- a/.stumpwm.d/commands.lisp +++ b/.stumpwm.d/commands.lisp @@ -1,60 +1 @@ - -(defmacro defnyxt-search (name search-url command) - `(stumpwm:defcommand ,(intern (concatenate 'string "nyxt-" name)) (query) - ((:string "Search: ")) - (stumpwm:run-shell-command - (concatenate 'string "nyxt -r -e '(" ,command "\"" ,search-url query "\"" ")'")))) - -(defvar duckduckgo "https://duckduckgo.com/?q=") -(defvar github "https://github.com/search?q=") - -(defnyxt-search "duck" duckduckgo "buffer-load") -(defnyxt-search "duck-newb" duckduckgo "set-url-new-buffer :url") -(defnyxt-search "http" "http://" "buffer-load") -(defnyxt-search "gh" github "buffer-load") - -;; Sly setup -(ql:quickload :slynk) - -(defcommand sly-start-server () () - "Start a slynk server for sly." - (sb-thread:make-thread (lambda () (slynk:create-server :dont-close t)))) - -(defcommand sly-stop-server () () - "Stop current slynk server for sly." - (sb-thread:make-thread (lambda () (slynk:stop-server 4005)))) - - -(defcommand firefox () () - "Run or raise Firefox." - (sb-thread:make-thread (lambda () (run-or-raise "firefox" '(:class "firefox") t nil)))) - -(defcommand delete-window-and-frame () () - "Delete the current frame with its window." - (delete-window) - (remove-split)) - -(defcommand hsplit-and-focus () () - "Create a new frame on the right and focus it." - (hsplit) - (move-focus :right)) - -(defcommand vsplit-and-focus () () - "Create a new frame below and move focus to it." - (vsplit) - (move-focus :down)) - -(defcommand term (&optional program) () - "Invoke a terminal, possibly with a @arg{program}." - (sb-thread:make-thread - (lambda () - (run-shell-command (if program - (format nil "kitty ~A" program) - "kitty"))))) - -(when *initializing* - (mapc #'run-shell-command - '("picom" - "transmission-daemon" - "xsetroot -cursor_name left_ptr")) - (thanos/set-wallpapers)) +/gnu/store/0mzi180himhrnjgc33n49slvs5vwb7rb-home-dotfiles--stumpwm-d-commands-lisp
\ No newline at end of file diff --git a/.stumpwm.d/init.lisp b/.stumpwm.d/init.lisp index ccbaf58..c98020a 100644..120000 --- a/.stumpwm.d/init.lisp +++ b/.stumpwm.d/init.lisp @@ -1,20 +1 @@ -(in-package :stumpwm) -(setf *default-package* :stumpwm) - -(when *initializing* - (grename "[ALPHA]") - (gnewbg "[BETA]") - (gnewbg-dynamic "[GAMMA]")) - -(clear-window-placement-rules) - -;; Utils -(load "~/.stumpwm.d/utils.lisp") -;; Theme -(load "~/.stumpwm.d/theme.lisp") -;; Commmands -(load "~/.stumpwm.d/commands.lisp") -;; Modeline -(load "~/.stumpwm.d/modeline.lisp") -;; Keybindings -(load "~/.stumpwm.d/keybindings.lisp") +/gnu/store/lj5nq45z9a616607c956cdf73jq0nvq0-home-dotfiles--stumpwm-d-init-lisp
\ No newline at end of file diff --git a/.stumpwm.d/keybindings.lisp b/.stumpwm.d/keybindings.lisp index 68e1655..26cf1e9 100644..120000 --- a/.stumpwm.d/keybindings.lisp +++ b/.stumpwm.d/keybindings.lisp @@ -1,124 +1 @@ -(in-package :stumpwm) - -(defcommand colon1 (&optional (initial "")) (:rest) - (let ((cmd (read-one-line (current-screen) ": " :initial-input initial))) - (when cmd - (eval-command cmd t)))) - -;; Flaoting window control -(setf *mouse-focus-policy* :click - *float-window-modifier* :SUPER) - -;; Float -(define-key *top-map* (kbd "s-f") "float-this") -(define-key *top-map* (kbd "s-F") "unfloat-this") - -(define-key *root-map* (kbd "C-r") "exec rofi -show drun -modi drun -show-icons") -(define-key *root-map* (kbd ",") "exec flameshot gui") -(define-key *root-map* (kbd "M-r") "restart-hard") -(define-key *root-map* (kbd "p") "exec emacsclient -e '(thanos/pass-launcher)'") -(define-key *root-map* (kbd "b") "windowlist") -(define-key *root-map* (kbd "d") "delete-window") -(define-key *root-map* (kbd "C-d") "remove") -;; Focus -(define-key *root-map* (kbd "C-f") "move-focus right") -(define-key *root-map* (kbd "C-b") "move-focus left") - -(defvar *thanos-buffers-map* - (let ((m (make-sparse-keymap))) - (define-key m (kbd "0") "delete-window-and-frame") - (define-key m (kbd "3") "hsplit-and-focus") - (define-key m (kbd "b") "windowlist") - m)) - -(define-key *root-map* (kbd "C-x") *thanos-buffers-map*) -(define-key *root-map* (kbd "s") "hsplit-and-focus") -(define-key *root-map* (kbd "w") "windowlist") -(define-key *root-map* (kbd "k") "delete-window-and-frame") -(define-key *root-map* (kbd "S") "vsplit") -(define-key *root-map* (kbd "b") "global-windowlist") - -(define-key *root-map* (kbd "e") "exec emacsclient -c") - -(define-key *root-map* (kbd "C-e") "exec emacs") - -;; Lock screen -(define-key *root-map* (kbd "C-l") "exec slock") - -(define-key *top-map* (kbd "F11") "fullscreen") -;; Audio -(define-key *top-map* (kbd "XF86AudioLowerVolume") "execa mixer sset Master 5%-") -(define-key *top-map* (kbd "XF86AudioRaiseVolume") "exec amixer sset Master 5%+") - -;; x220 specific -(define-key *top-map* (kbd "F1") "exec brightnessctl --device='intel_backlight' set 5%-") -(define-key *top-map* (kbd "F2") "exec brightnessctl --device='intel_backlight' set +5%") -(define-key *top-map* (kbd "F3") "exec ~/.scripts/keyboard-light-x220.sh") - -;; Next -(define-key *top-map* (kbd "s-n") "fnext") - -;;Groups - -;; Switch to group -;; Root map -(define-key *root-map* (kbd "1") "gselect 1") -(define-key *root-map* (kbd "2") "gselect 2") -(define-key *root-map* (kbd "3") "gselect 3") -(define-key *root-map* (kbd "4") "gselect 4") -(define-key *root-map* (kbd "5") "gselect 5") -(define-key *root-map* (kbd "0") "gselect") -;; Move winodw -(define-key *root-map* (kbd "M-1") "gmove 1") -(define-key *root-map* (kbd "M-2") "gmove 2") -(define-key *root-map* (kbd "M-3") "gmove 3") -(define-key *root-map* (kbd "M-4") "gmove 4") -(define-key *root-map* (kbd "M-5") "gmove 5") -(define-key *root-map* (kbd "M-0") "gmove") -;; Top map, using super -(define-key *top-map* (kbd "s-1") "gselect 1") -(define-key *top-map* (kbd "s-2") "gselect 2") -(define-key *top-map* (kbd "s-3") "gselect 3") -(define-key *top-map* (kbd "s-4") "gselect 4") -(define-key *top-map* (kbd "s-5") "gselect 5") -(define-key *top-map* (kbd "s-6") "gselect 6") -(define-key *top-map* (kbd "s-7") "gselect 7") -(define-key *top-map* (kbd "s-0") "gselect 5") -(define-key *top-map* (kbd "s-9") "gselect") -;; Move window to group -(define-key *top-map* (kbd "s-!") "gmove 1") -(define-key *top-map* (kbd "s-@") "gmove 2") -(define-key *top-map* (kbd "s-#") "gmove 3") -(define-key *top-map* (kbd "s-$") "gmove 4") -(define-key *top-map* (kbd "s-%") "gmove 5") -(define-key *top-map* (kbd "s-^") "gmove 6") -(define-key *top-map* (kbd "s-)") "gmove 5") -(define-key *top-map* (kbd "s-(") "gmove") - -(define-key *root-map* (kbd "C-w") "gselect") - -;; Focus -(define-key *root-map* (kbd "M-b") "move-window left") -(define-key *root-map* (kbd "M-f") "move-window right") -(define-key *root-map* (kbd "M-n") "move-window down") - -;; Split & Focus -(define-key *root-map* (kbd "s") "hsplit-and-focus") - -;; Groups -(define-key *groups-map* (kbd "g") "gselect") - -;; Nyxt -;; (defvar *nyxt-map* (make-sparse-keymap)) -;; (define-key *root-map* (kbd "s") *nyxt-map*) - -;; (define-key *nyxt-map* (kbd "M-d") "nyxt-duck-newb") -;; (define-key *nyxt-map* (kbd "h") "nyxt-http") -;; (define-key *nyxt-map* (kbd "d") "nyxt-duck") -;; (define-key *nyxt-map* (kbd "g") "nyxt-gh") - - - -;; Productivity -(load-module "productivity") -(define-key *top-map* (kbd "F7") "productivity-mode-toggle") +/gnu/store/3fkzgz8klcybdjqc30k267aw2lyyn8kz-home-dotfiles--stumpwm-d-keybindings-lisp
\ No newline at end of file diff --git a/.stumpwm.d/modeline.lisp b/.stumpwm.d/modeline.lisp index 308186f..be38179 100644..120000 --- a/.stumpwm.d/modeline.lisp +++ b/.stumpwm.d/modeline.lisp @@ -1,45 +1 @@ -;; Modeline configuration -(load "~/.stumpwm.d/colors.lisp") - -(setf *default-package* :stumpwm) - -(load-module "battery-portable") -;; (stumpwm:load-module "stumptray") -(load-module "mem") -(load-module "cpu") - -(setf *mode-line-timeout* 2) -(setf *group-format* "%t") -(setf *window-format* "%n: %30t") - -;; set modeline colors and highlight -(setf *mode-line-background-color* thanos-black-bg ;"#252B48" - *mode-line-foreground-color* thanos-hope-fg - *mode-line-border-color* thanos-black-bg - *mode-line-highlight-template* "«~A»" - mem::*mem-modeline-fmt* "%p" - cpu:*cpu-modeline-fmt* "%c") - -(setf *mode-line-border-color* thanos-black-bg - *mode-line-border-width* 2) - -(setf *time-modeline-string* "%a %d/%m/%Y | %H:%M") - -(setf stumpwm:*screen-mode-line-format* - (list "%g ^> %C " - '(:eval (string-trim '(#\Newline) - (stumpwm:run-shell-command - "echo $(($(cat /sys/class/thermal/thermal_zone0/temp) / 1000))C" t))) - "| RAM:%M| VOL:" - '(:eval (string-trim '(#\Newline) - (stumpwm:run-shell-command - "amixer get Master | awk '/Front Left:/ { print substr($5, 2, length($5)-2) }'" t))) - " | " - ;; Check when hermes(laptop) t display battery - (when (equal (asdf:hostname) "hermes") - "BAT:%B |") - "%d")) - - -(when stumpwm:*initializing* - (mode-line)) +/gnu/store/4garpamz8m6h8dnfy7m4p59zp0s5lyys-home-dotfiles--stumpwm-d-modeline-lisp
\ No newline at end of file diff --git a/.stumpwm.d/theme.lisp b/.stumpwm.d/theme.lisp index 55691db..7d51a75 100644..120000 --- a/.stumpwm.d/theme.lisp +++ b/.stumpwm.d/theme.lisp @@ -1,64 +1 @@ -;; Startup message - -(setf *startup-message* "Welcome back, Thanos") -(stumpwm:load-module "swm-gaps") -;; Colors -(stumpwm:load-module "ttf-fonts") -(load "~/.stumpwm.d/colors.lisp") - -(run-shell-command "~/.config/autostart/autostart.sh ") - -;; Wallpaper -(defun feh-set-wallpaper (wallpaper-name) - "Set wallpaper using feh" - (let ((wallpaper-dir "~/wallpapers/")) - (format t "Setting wallpaper: ~a~%" wallpaper-name) - (run-shell-command (format nil "feh --bg-scale ~a~a" wallpaper-dir wallpaper-name)))) - -(defun thanos/set-wallpapers () - "Set wallpapers depending on hostname." - (cond ((equal (asdf:hostname) "zeus") (feh-set-wallpaper "winter-dragons.jpg")) - ((equal (asdf:hostname) "hermes") (feh-set-wallpaper "cyberpunk-wallpaper2.jpg")))) - - -;; (when *initializing* -;; (thanos/set-wallpapers)) - -(setf *message-window-gravity* :center - *input-window-gravity* :center - *window-border-style* :thin - *mouse-focus-policy* :click - *float-window-modifier* :META - *transient-border-width* 2 - *normal-size-border-width* 2 - *message-window-padding* 10 - *message-window-y-padding* 10) - -(when *initializing* - (update-color-map (current-screen))) - - -(set-border-color thanos-black-bg) -(set-focus-color thanos-black-active) -(set-unfocus-color thanos-black-inactive) -(set-float-focus-color thanos-hope1) -(set-float-unfocus-color thanos-hope3) - -(set-fg-color thanos-hope-fg) -(set-bg-color thanos-black-bg) - -(setf swm-gaps:*head-gaps-size* 6 - swm-gaps:*inner-gaps-size* 6 - swm-gaps:*outer-gaps-size* 6) - -(when stumpwm:*initializing* - (swm-gaps:toggle-gaps-on)) - -;; (ql:quickload :clx-truetype) - -(stumpwm:set-font - `(,(make-instance 'xft:font - :family "JetBrains Mono" - :subfamily "Regular" - :size 12 - :antialias t))) +/gnu/store/82s7lvf8s6hpmqvxamqxf2yp2wi7xy18-home-dotfiles--stumpwm-d-theme-lisp
\ No newline at end of file diff --git a/.stumpwm.d/utils.lisp b/.stumpwm.d/utils.lisp index de820e3..616b237 100644..120000 --- a/.stumpwm.d/utils.lisp +++ b/.stumpwm.d/utils.lisp @@ -1,27 +1 @@ -(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" - (user-homedir-pathname)))) - (when (probe-file quicklisp-init) - (load quicklisp-init))) - -(in-package :stumpwm) - -(asdf:load-system :cffi) - -(setf *default-package* :stumpwm) -(set-module-dir "~/.stumpwm.d/modules") - -(stumpwm:load-module "notifications") -(stumpwm:load-module "productivity") -(stumpwm:load-module "kbd-layouts") -(stumpwm:load-module "mpd") -(stumpwm:load-module "pinentry") -(stumpwm:load-module "pass") -(stumpwm:load-module "swm-emacs") -(stumpwm:load-module "end-session") -(stumpwm:load-module "globalwindows") -(stumpwm:load-module "urgentwindows") - -(mpd:mpd-connect) - -(setf kbd-layouts:*caps-lock-behavior* :swapped) -(kbd-layouts:keyboard-layout-list "us" "gr" "bg -variant phonetic") +/gnu/store/svvyhs2qfbdh620dagm5c30bflk7jn35-home-dotfiles--stumpwm-d-utils-lisp
\ No newline at end of file |