summaryrefslogtreecommitdiff
path: root/.config/doom/myExwm.el
blob: 77b08be03b8c61762ee793e05d53cb9bd3ff03bb (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
;;; myExwm.el -*- lexical-binding: t; -*-

(require 'exwm-randr)
(setq exwm-randr-workspace-monitor-plist '(0 "DisplayPort-2"
                                           1 "HDMI-A-0"))
(add-hook 'exwm-randr-screen-change-hook
          (lambda ()
            (start-process-shell-command
             "xrandr" nil "xrandr --output DisplayPort-0 --off --output DisplayPort-1 --off --output DisplayPort-2 --primary --mode 2560x1440 --pos 1920x0 --rotate normal --output HDMI-A-0 --mode 1920x1080 --pos 0x0 --rotate normal")))
(exwm-randr-enable)
(require 'exwm)
(require 'exwm-config)
(exwm-enable)
(require 'exwm-systemtray)
(exwm-systemtray-enable)
;;(exwm-mff-mode)
;;Essentials
(map! :desc "Change workspaces"  :n "s-e"     #'exwm-workspace-switch)
(map! :desc "Dmenu"              :n "s-<tab>" #'dmenu)
;;Volume
(require 'volume)
(map! :desc "VolumeIncrease"     :n "<XF86AudioRaiseVolume>" #'volume-raise-10)
(map! :desc "VolumeDecrease"     :n "<XF86AudioLowerVolume>" #'volume-lower-10)
;;Spotify

(map! :desc "Spotify play/pause" :n "s-p" #'spotify-playpause)
(map! :desc "Spotify next"       :n "s-n" #'spotify-next)
(map! :desc "Spotify previous"   :n "s-b" #'spotify-previous)

(define-key exwm-mode-map (kbd "C-c C-b") 'ibuffer)
(define-key exwm-mode-map (kbd "s-v") 'evil-window-vsplit)
(define-key exwm-mode-map (kbd "s-b") 'ibuffer)
(define-key exwm-mode-map (kbd "s-v") 'evil-window-vsplit)
(define-key exwm-mode-map (kbd "s-h") 'evil-window-left)
(define-key exwm-mode-map (kbd "s-l") 'evil-window-right)
(define-key exwm-mode-map (kbd "s-j") 'evil-window-down)
(define-key exwm-mode-map (kbd "s-k") 'evil-window-up)
(define-key exwm-mode-map (kbd "s-q") 'evil-window-delete)

(define-key exwm-mode-map (kbd "s-r") 'exwm-reset)

(define-key exwm-mode-map (kbd "s-N") '+workspace/new)

(define-key exwm-mode-map (kbd "s-1") '+workspace/switch-to-0)
(define-key exwm-mode-map (kbd "s-2") '+workspace/switch-to-1)
(define-key exwm-mode-map (kbd "s-3") '+workspace/switch-to-2)
(define-key exwm-mode-map (kbd "s-4") '+workspace/switch-to-3)

(define-key exwm-mode-map (kbd "s-<XF86AudioRaiseVolume>") 'volume-raise-10)
(define-key exwm-mode-map (kbd "s-<XF86AudioLowerVolume>") 'volume-lower-10)
(define-key exwm-mode-map (kbd "s-e") 'exwm-workspace-swap)

(define-key (current-global-map) (kbd "s-1") '+workspace/switch-to-0)
(define-key (current-global-map) (kbd "s-2") '+workspace/switch-to-1)
(define-key (current-global-map) (kbd "s-3") '+workspace/switch-to-2)
(define-key (current-global-map) (kbd "s-4") '+workspace/switch-to-3)

(define-key (current-global-map) (kbd "s-<XF86AudioRaiseVolume>") 'volume-raise-10)
(define-key (current-global-map) (kbd "s-<XF86AudioLowerVolume>") 'volume-lower-10)