blob: d4ec2e5a99eea819aefc470e3856559c26d3076a (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
(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))))
;; 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%+")
;;; 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")
|