summaryrefslogtreecommitdiff
path: root/.config/stumpwm/keybindings.lisp
blob: 12581d66c8863114994ab508b50cd22431515234 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

(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-")
<<<<<<< HEAD
=======

;; Keyboard layout
(define-key *top-map* (kbd "F1") "exec setxkbmap us")
(define-key *top-map* (kbd "F2") "exec setxkbmap gr")
>>>>>>> d570427 (stumpwm: For keys add gr and us layout switches)

;;; 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")