(in-package :stumpwm) (which-key-mode) (setf *mouse-focus-policy* :click) ;; prefix key (set-prefix-key (kbd "C-t")) ;; prompt the user for an interactive command. The first arg is an ;; optional initial contents. (defcommand colon1 (&optional (initial "")) (:rest) (let ((cmd (read-one-line (current-screen) ": " :initial-input initial))) (when cmd (eval-command cmd t)))) (define-key *root-map* (kbd "`") "select-window-by-number 0") (define-key *root-map* (kbd "C-f") "fullscreen") ;; Run rofi (define-key *root-map* (kbd "C-r") "exec rofi -show drun") (define-key *root-map* (kbd "e") "exec emacsclient -c") ;; Browse somewhere (define-key *root-map* (kbd "b") "colon1 exec firefox http://www.") ;; Lock screen (define-key *root-map* (kbd "C-l") "exec xlock") ;; Audio (define-key *top-map* (kbd "XF86AudioLowerVolume") "exec amixer sset Master 5%-") (define-key *top-map* (kbd "XF86AudioRaiseVolume") "exec amixer sset Master 5%+") ;;Keyboard-light (define-key *top-map* (kbd "XF86Explorer") "exec brightnessctl --device='tpacpi::kbd_backlight' set +1") (define-key *top-map* (kbd "XF86LaunchA") "exec brightnessctl --device='tpacpi::kbd_backlight' set 1-") ;; Keyboard layout (define-key *top-map* (kbd "F1") "exec setxkbmap us") (define-key *top-map* (kbd "F2") "exec setxkbmap gr") ;;; Groups ;; Switch to group (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") ;; 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 7") ;; Focus (define-key *top-map* (kbd "s-b") "move-focus left") (define-key *top-map* (kbd "s-f") "move-focus right") (define-key *top-map* (kbd "s-n") "move-focus down")