Loads of new keybinds for windows and frames, some apps too

Frames and windows get a lot of new keybinds, so do applications
This commit is contained in:
Lucien Cartier-Tilet 2021-07-25 10:57:35 +02:00
parent 7e260f579f
commit 736a314f83
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -6,20 +6,15 @@
(defvar browser (getenv "BROWSER")) (defvar browser (getenv "BROWSER"))
(defvar editor (getenv "EDITOR")) (defvar editor (getenv "EDITOR"))
(defvar *my-frames-float-keymap*
(let ((m (make-sparse-keymap)))
(define-key m (kbd "f") "float-this")
(define-key m (kbd "F") "unfloat-this")
(define-key m (kbd "C-f") "flatten-floats")
m))
(defvar *my-frames-management-keymap* (defvar *my-frames-management-keymap*
(let ((m (make-sparse-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 "c") "move-focus left")
(define-key m (kbd "t") "move-focus down") (define-key m (kbd "t") "move-focus down")
(define-key m (kbd "s") "move-focus up") (define-key m (kbd "s") "move-focus up")
@ -32,18 +27,70 @@
(define-key m (kbd "C-t") "exchange-direction down") (define-key m (kbd "C-t") "exchange-direction down")
(define-key m (kbd "C-s") "exchange-direction up") (define-key m (kbd "C-s") "exchange-direction up")
(define-key m (kbd "C-r") "exchange-direction right") (define-key m (kbd "C-r") "exchange-direction right")
(define-key m (kbd "n") "next")
(define-key m (kbd "p") "prev")
(define-key m (kbd "-") "hsplit")
(define-key m (kbd "/") "vsplit")
(define-key m (kbd "h") "hsplit")
(define-key m (kbd "v") "vsplit")
(define-key m (kbd "H") "hsplit-equally")
(define-key m (kbd "V") "vsplit-equally")
(define-key m (kbd ".") "iresize")
(define-key m (kbd "d") "remove-split")
(define-key m (kbd "D") "only")
(define-key m (kbd "e") "expose")
(define-key m (kbd "f") "fullscreen")
(define-key m (kbd "F") '*my-frames-float-keymap*)
(define-key m (kbd "i") "info")
(define-key m (kbd "I") "show-window-properties")
(define-key m (kbd "m") "meta")
(define-key m (kbd "o") "other-window")
(define-key m (kbd "q") "delete-window")
(define-key m (kbd "Q") "kill-window")
(define-key m (kbd "s") "sibling")
(define-key m (kbd "u") "next-urgent")
(define-key m (kbd "U") "unmaximize")
m)) m))
(defvar *my-applications-keymap* (defvar *my-applications-keymap*
(let ((m (make-sparse-keymap))) (let ((m (make-sparse-keymap)))
(define-key m (kbd "b") (concat "exec " browser)) (define-key m (kbd "b") (concat "exec " browser))
(define-key m (kbd "d") "exec lightcord")
(define-key m (kbd "e") (concat "exec " editor)) (define-key m (kbd "e") (concat "exec " editor))
(define-key m (kbd "E") "exec emacs")
(define-key m (kbd "g") "exec gimp") (define-key m (kbd "g") "exec gimp")
m))
(defvar *my-screenshot-keymap*
(let ((m (make-sparse-keymap)))
(define-key m (kbd "s") "exec scrot -e \"mv $f ~/Pictures/Screenshots\"")
(define-key m (kbd "S") "exec scrot -s -e \"mv $f ~/Pictures/Screenshots\"")
(define-key m (kbd "d") "exec scrot -d 3 -e \"mv $f ~/Pictures/Screenshots\"")
m))
(defvar *my-rofi-keymap*
(let ((m (make-sparse-keymap)))
(define-key m (kbd "a") "exec awiki")
(define-key m (kbd "r") "exec rofi --combi-modi drun,window --show combi")
(define-key m (kbd "s") "exec rofi --show ssh")
(define-key m (kbd "p") "exec rofi-pass -t")
(define-key m (kbd "P") "exec rofi-pass")
(define-key m (kbd "e") "exec rofi-emoji")
(define-key m (kbd "m") "exec rofi-mount")
(define-key m (kbd "u") "exec rofi-umount")
(define-key m (kbd "w") "exec wacom-setup")
(define-key m (kbd "y") "exec ytplay")
(define-key m (kbd "Y") "exec rofi-ytdl")
m)) m))
(define-key *top-map* (kbd "s-RET") "exec kitty") (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-a") '*my-applications-keymap*)
(define-key *top-map* (kbd "s-r") "reload") (define-key *top-map* (kbd "s-r") '*my-rofi-keymap*)
(define-key *top-map* (kbd "s-R") "reload")
(define-key *top-map* (kbd "s-s") '*my-screenshot-keymap*)
(define-key *root-map* (kbd "SPC") "exec kitty") (define-key *root-map* (kbd "SPC") "exec kitty")
(define-key *root-map* (kbd "b") "exec firefox") (define-key *root-map* (kbd "b") "exec firefox")