summaryrefslogtreecommitdiff
path: root/.stumpwm.d
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-05-13 08:42:44 +0300
committerThanos Apollo <[email protected]>2024-05-13 08:42:44 +0300
commit2e74d58a4f675b5301e69cae105503198d7ff846 (patch)
treee92cca5c6406898e9ac1eae08653d894c24e3acf /.stumpwm.d
parentb6d164b032b255767b04a73e8ac0e04b61991048 (diff)
parent5d6840de02f01c017cc1ce99238d6962331087da (diff)
Merge branch 'guix-config'
Diffstat (limited to '.stumpwm.d')
-rw-r--r--.stumpwm.d/colors.lisp20
-rw-r--r--.stumpwm.d/commands.lisp60
-rw-r--r--.stumpwm.d/init.lisp20
-rw-r--r--.stumpwm.d/keybindings.lisp124
-rw-r--r--.stumpwm.d/modeline.lisp45
m---------.stumpwm.d/modules0
-rw-r--r--.stumpwm.d/theme.lisp64
-rw-r--r--.stumpwm.d/utils.lisp27
8 files changed, 0 insertions, 360 deletions
diff --git a/.stumpwm.d/colors.lisp b/.stumpwm.d/colors.lisp
deleted file mode 100644
index 9fa1cfd..0000000
--- a/.stumpwm.d/colors.lisp
+++ /dev/null
@@ -1,20 +0,0 @@
-
-(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")
diff --git a/.stumpwm.d/commands.lisp b/.stumpwm.d/commands.lisp
deleted file mode 100644
index 1ad62a5..0000000
--- a/.stumpwm.d/commands.lisp
+++ /dev/null
@@ -1,60 +0,0 @@
-
-(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))
diff --git a/.stumpwm.d/init.lisp b/.stumpwm.d/init.lisp
deleted file mode 100644
index ccbaf58..0000000
--- a/.stumpwm.d/init.lisp
+++ /dev/null
@@ -1,20 +0,0 @@
-(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")
diff --git a/.stumpwm.d/keybindings.lisp b/.stumpwm.d/keybindings.lisp
deleted file mode 100644
index 68e1655..0000000
--- a/.stumpwm.d/keybindings.lisp
+++ /dev/null
@@ -1,124 +0,0 @@
-(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")
diff --git a/.stumpwm.d/modeline.lisp b/.stumpwm.d/modeline.lisp
deleted file mode 100644
index 308186f..0000000
--- a/.stumpwm.d/modeline.lisp
+++ /dev/null
@@ -1,45 +0,0 @@
-;; 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))
diff --git a/.stumpwm.d/modules b/.stumpwm.d/modules
deleted file mode 160000
-Subproject 472bdef0acaac8893c9c5a38d4319da86f10c87
diff --git a/.stumpwm.d/theme.lisp b/.stumpwm.d/theme.lisp
deleted file mode 100644
index 55691db..0000000
--- a/.stumpwm.d/theme.lisp
+++ /dev/null
@@ -1,64 +0,0 @@
-;; 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)))
diff --git a/.stumpwm.d/utils.lisp b/.stumpwm.d/utils.lisp
deleted file mode 100644
index de820e3..0000000
--- a/.stumpwm.d/utils.lisp
+++ /dev/null
@@ -1,27 +0,0 @@
-(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")