summaryrefslogtreecommitdiffstats
path: root/EXWM.org
diff options
context:
space:
mode:
authorjdlugosz963 <jdlugosz963@gmail.com>2022-10-04 18:40:31 +0200
committerjdlugosz963 <jdlugosz963@gmail.com>2022-10-04 18:40:31 +0200
commitd4e4f1d4eaddee3c60a5bd963d82c1dcc0083ef5 (patch)
treeca69c6c998777743f8eb10c6f7a24879005876ff /EXWM.org
parent4e5222fdb85c0f77bcdfba2866e815cc6afe66da (diff)
downloaddotfiles-d4e4f1d4eaddee3c60a5bd963d82c1dcc0083ef5.tar.gz
dotfiles-d4e4f1d4eaddee3c60a5bd963d82c1dcc0083ef5.zip
Clear dotfiles tree
Diffstat (limited to 'EXWM.org')
-rw-r--r--EXWM.org149
1 files changed, 0 insertions, 149 deletions
diff --git a/EXWM.org b/EXWM.org
deleted file mode 100644
index 61f2534..0000000
--- a/EXWM.org
+++ /dev/null
@@ -1,149 +0,0 @@
1#+title: EXW Configuration
2#+author: jdlugosz963
3#+PROPERTY: header-args:emacs-lisp :tangle .config/emacs/exwm/desktop.el
4
5
6* EXWM
7
8#+begin_src emacs-lisp
9
10 (defun jd/exwm-update-class ()
11 (exwm-workspace-rename-buffer exwm-class-name))
12
13 (defun jd-exwm/run-in-background (command)
14 (let ((command-parts (split-string command "[ ]+")))
15 (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts)))))
16
17 (defun jd-exwm/exwm-init-hook ()
18 (display-battery-mode t)
19 (display-time-mode t)
20
21 (jd-exwm/run-in-background "nm-applet")
22 (jd-exwm/run-in-background "pasystray")
23 (jd-exwm/run-in-background "blueman-applet"))
24
25 (defun jd-exwm/exwm-update-title ()
26 (exwm-workspace-rename-buffer exwm-title))
27
28 (defun jd-exwm/configure-window-by-class ()
29 (interactive)
30 (pcase exwm-class-name
31 ("firefox" (exwm-workspace-move-window 2))
32 ("qutebrowser" (exwm-workspace-move-window 2))
33 ("discord" (exwm-workspace-move-window 5))
34 ("obs" (exwm-workspace-move-window 5))
35 ("Virt-manager" (exwm-workspace-move-window 4))))
36
37 (use-package exwm
38 :config
39 (setq exwm-workspace-number 9)
40
41 (add-hook 'exwm-init-hook #'jd-exwm/exwm-init-hook)
42 (add-hook 'exwm-update-class-hook #'jd/exwm-update-class)
43 (add-hook 'exwm-update-title-hook #'jd-exwm/exwm-update-title)
44 (add-hook 'exwm-manage-finish-hook #'jd-exwm/configure-window-by-class)
45
46 (start-process-shell-command "xmodmap" nil "xmodmap ~/.config/emacs/exwm/Xmodmap")
47 (start-process-shell-command "nitrogen" nil "nitrogen --restore")
48 (start-process-shell-command "xinput" nil "xinput set-prop 11 336 1")
49
50 (require 'exwm-randr)
51 (exwm-randr-enable)
52 ;; (start-process-shell-command "xrandr" nil "xrandr --output DP-1-8 --primary --mode 1920x1080 --output eDP-1 --off")
53
54 (require 'exwm-systemtray)
55 (exwm-systemtray-enable)
56
57 (setq exwm-input-simulation-keys
58 '(([?\C-l] . [left])
59 ([?\C-h] . [right])
60 ([?\C-k] . [up])
61 ([?\C-j] . [down])))
62
63 (setq exwm-input-prefix-keys
64 '(?\C-x
65 ?\C-u
66 ?\C-h
67 ?\M-x
68 ?\M-`
69 ?\M-&
70 ?\M-:
71 ?\C-\M-j
72 ?\C-\ ))
73
74 (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key)
75 (exwm-input-set-key (kbd "s-p") 'counsel-linux-app)
76
77 (setq exwm-input-global-keys
78 `(([?\s-R] . exwm-reset)
79
80
81 ([?\s-r] . (lambda (command)
82 (interactive (list (read-shell-command "$ ")))
83 (start-process-shell-command command nil command)))
84
85 ([?\s-W] . exwm-workspace-move-window)
86 ([?\s-w] . exwm-workspace-switch)
87
88 ,@(mapcar (lambda (i)
89 `(,(kbd (format "s-%d" i)) .
90 (lambda ()
91 (interactive)
92 (exwm-workspace-switch-create ,i))))
93 (number-sequence 1 9))))
94
95 (exwm-enable))
96
97#+end_src
98
99* Desktop mode
100
101#+begin_src emacs-lisp
102
103 (use-package desktop-environment
104 :after exwm
105 :config (desktop-environment-mode)
106 :custom
107 (desktop-environment-brightness-small-increment "2%+")
108 (desktop-environment-brightness-small-decrement "2%-")
109 (desktop-environment-brightness-normal-increment "5%+")
110 (desktop-environment-brightness-normal-decrement "5%-"))
111
112#+end_src
113
114* Transparency
115
116#+begin_src emacs-lisp
117
118 (set-frame-parameter (selected-frame) 'alpha '(95 . 95))
119 (add-to-list 'default-frame-alist `(alpha . (95 . 95)))
120 (set-frame-parameter (selected-frame) 'fullscreen 'maximized)
121 (add-to-list 'default-frame-alist '(fullscreen . maximized))
122
123#+end_src
124
125
126* Start emacs
127
128#+begin_src sh :tangle ~/.config/emacs/exwm/start.sh
129 #!/bin/sh
130
131 picom &
132
133 xss-lock -- slock &
134
135 export VISUAL=emacsclient
136 export EDITOR="$VISUAL"
137
138 exec dbus-launch --exit-with-session emacs -mm --debug-init -l ~/.config/emacs/exwm/desktop.el
139
140#+end_src
141
142* Xmodmap
143
144#+begin_src sh :tangle ~/.config/emacs/exwm/Xmodmap
145
146clear lock
147keycode 0x42 = Escape
148
149#+end_src