64 lines
2.5 KiB
Common Lisp
64 lines
2.5 KiB
Common Lisp
|
;;; set prefix
|
||
|
(in-package :stumpwm)
|
||
|
|
||
|
(set-prefix-key (kbd "s-SPC"))
|
||
|
|
||
|
(defvar browser (getenv "BROWSER"))
|
||
|
(defvar editor (getenv "EDITOR"))
|
||
|
|
||
|
(defvar *my-frames-management-keymap*
|
||
|
(let ((m (make-sparse-keymap)))
|
||
|
(define-key m (kbd ".") "iresize")
|
||
|
(define-key m (kbd "h") "hsplit")
|
||
|
(define-key m (kbd "v") "vsplit")
|
||
|
(define-key m (kbd "-") "hsplit")
|
||
|
(define-key m (kbd "/") "vsplit")
|
||
|
(define-key m (kbd "H") "hsplit-equally")
|
||
|
(define-key m (kbd "V") "vsplit-equally")
|
||
|
(define-key m (kbd "d") "remove-split")
|
||
|
(define-key m (kbd "D") "only")
|
||
|
(define-key m (kbd "e") "expose")
|
||
|
(define-key m (kbd "s") "sibling")
|
||
|
(define-key m (kbd "u") "next-urgent")
|
||
|
(define-key m (kbd "c") "move-focus left")
|
||
|
(define-key m (kbd "t") "move-focus down")
|
||
|
(define-key m (kbd "s") "move-focus up")
|
||
|
(define-key m (kbd "r") "move-focus right")
|
||
|
(define-key m (kbd "C") "move-window left")
|
||
|
(define-key m (kbd "T") "move-window down")
|
||
|
(define-key m (kbd "S") "move-window up")
|
||
|
(define-key m (kbd "R") "move-window right")
|
||
|
(define-key m (kbd "C-c") "exchange-direction left")
|
||
|
(define-key m (kbd "C-t") "exchange-direction down")
|
||
|
(define-key m (kbd "C-s") "exchange-direction up")
|
||
|
(define-key m (kbd "C-r") "exchange-direction right")
|
||
|
m))
|
||
|
|
||
|
(defvar *my-applications-keymap*
|
||
|
(let ((m (make-sparse-keymap)))
|
||
|
(define-key m (kbd "b") (concat "exec " browser))
|
||
|
(define-key m (kbd "e") (concat "exec " editor))
|
||
|
(define-key m (kbd "g") "exec gimp")
|
||
|
m))
|
||
|
|
||
|
(define-key *top-map* (kbd "s-RET") "exec kitty")
|
||
|
(define-key *top-map* (kbd "s-a") '*my-applications-keymap*)
|
||
|
(define-key *top-map* (kbd "s-r") "reload")
|
||
|
|
||
|
(define-key *root-map* (kbd "SPC") "exec kitty")
|
||
|
(define-key *root-map* (kbd "b") "exec firefox")
|
||
|
(define-key *root-map* (kbd "e") "exec emacsclient -c")
|
||
|
(define-key *root-map* (kbd "C-e") "exec emacs")
|
||
|
(define-key *root-map* (kbd "g") "exec gimp")
|
||
|
(define-key *root-map* (kbd "l") "exec plock")
|
||
|
(define-key *root-map* (kbd "n") "exec nemo")
|
||
|
(define-key *root-map* (kbd "w") '*my-frames-management-keymap*)
|
||
|
|
||
|
(define-interactive-keymap (iresize tile-group) (:on-enter #'setup-iresize
|
||
|
:on-exit #'resize-unhide
|
||
|
:abort-if #'abort-resize-p)
|
||
|
((kbd "c") "resize-direction left")
|
||
|
((kbd "t") "resize-direction down")
|
||
|
((kbd "s") "resize-direction up")
|
||
|
((kbd "r") "resize-direction right"))
|