-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.exwm-x
61 lines (54 loc) · 2.43 KB
/
.exwm-x
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
;;; -*- mode: Emacs-Lisp; lexical-binding: t; -*-
;;; .exwm-x --- Emacs X Window Manager (X) configuration
;;; Commentary:
;;; EXWN-X-specific settings for managing windows through Emacs.
;;; This file is supposed to be located in user's $HOME.
;;; Then ~/.xinitrc needs to end on this note =>
;;; `exec dbus-launch --exit-with-session emacs \
;;; --eval '(require (quote exwmx-loader))'`
;;; Code:
;;;; INITIALIZATION
(require 'exwm)
(require 'exwm-x)
(require 'exwmx-example)
;;;; FUNCTIONS
(defun exwmx-switch-to-5-workspace ()
(interactive)
(exwm-workspace-switch 4))
(defun exwmx-switch-to-6-workspace ()
(interactive)
(exwm-workspace-switch 5))
;;;; VARIABLES
(setq exwm-floating-border-width 2)
(setq exwm-floating-border-color "#3f3f3f")
(setq exwmx-terminal-emulator "urxvt")
(setq exwmx-pretty-name "ⅇx")
(setq exwm-workspace-number 6)
;;;; KEYBINDINGS
;; => workspaces
; FIXME: super-keybinds don't work when focused outside of emacs.
(exwmx-input-set-key (kbd "s-1") #'exwmx-switch-to-1-workspace)
(exwmx-input-set-key (kbd "s-2") #'exwmx-switch-to-2-workspace)
(exwmx-input-set-key (kbd "s-3") #'exwmx-switch-to-3-workspace)
(exwmx-input-set-key (kbd "s-4") #'exwmx-switch-to-4-workspace)
(exwmx-input-set-key (kbd "s-5") #'exwmx-switch-to-5-workspace)
(exwmx-input-set-key (kbd "C-t 5") #'exwmx-switch-to-5-workspace)
(exwmx-input-set-key (kbd "s-6") #'exwmx-switch-to-6-workspace)
(exwmx-input-set-key (kbd "C-t 6") #'exwmx-switch-to-6-workspace)
;; => window state
(exwmx-input-set-key (kbd "C-t C-f") #'exwmx-floating-toggle-floating)
(exwmx-input-set-key (kbd "s-f") #'exwmx-floating-toggle-floating)
(exwmx-input-set-key (kbd "C-t z") #'exwmx-floating-hide-all)
;; => applications
(exwmx-input-set-key (kbd "C-t f") #'exwmx:file-browser)
(exwmx-input-set-key (kbd "C-t w") #'exwmx:web-browser)
(exwmx-input-set-key (kbd "s-w") #'exwmx:web-browser)
(exwmx-input-set-key (kbd "C-t e") #'exwmx:emacs)
(exwmx-input-set-key (kbd "s-e") #'exwmx:emacs)
(exwmx-input-set-key (kbd "C-t t") #'exwmx:terminal)
(exwmx-input-set-key (kbd "s-t") #'exwmx:terminal) ;
(exwmx-input-set-key (kbd "C-t b") #'exwmx-switch-application)
(exwmx-input-set-key (kbd "s-b") #'exwmx-switch-application)
(exwmx-input-set-key (kbd "C-t p") #'exwmx-dmenu)
(exwmx-input-set-key (kbd "s-p") #'exwmx-dmenu)
;;; .exwm-x ends here