diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2022-10-04 18:40:31 +0200 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2022-10-04 18:40:31 +0200 |
commit | d4e4f1d4eaddee3c60a5bd963d82c1dcc0083ef5 (patch) | |
tree | ca69c6c998777743f8eb10c6f7a24879005876ff /Desktop.org | |
parent | 4e5222fdb85c0f77bcdfba2866e815cc6afe66da (diff) | |
download | dotfiles-d4e4f1d4eaddee3c60a5bd963d82c1dcc0083ef5.tar.gz dotfiles-d4e4f1d4eaddee3c60a5bd963d82c1dcc0083ef5.zip |
Clear dotfiles tree
Diffstat (limited to 'Desktop.org')
-rw-r--r-- | Desktop.org | 223 |
1 files changed, 223 insertions, 0 deletions
diff --git a/Desktop.org b/Desktop.org new file mode 100644 index 0000000..e50ef77 --- /dev/null +++ b/Desktop.org | |||
@@ -0,0 +1,223 @@ | |||
1 | #+title: EXW Configuration | ||
2 | #+author: jdlugosz963 | ||
3 | #+PROPERTY: header-args:emacs-lisp :tangle .config/emacs/exwm/desktop.el | ||
4 | |||
5 | |||
6 | * EXWM | ||
7 | ** Config | ||
8 | |||
9 | #+begin_src emacs-lisp | ||
10 | |||
11 | (defun jd/exwm-update-class () | ||
12 | (exwm-workspace-rename-buffer exwm-class-name)) | ||
13 | |||
14 | (defun jd-exwm/run-in-background (command) | ||
15 | (let ((command-parts (split-string command "[ ]+"))) | ||
16 | (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts))))) | ||
17 | |||
18 | (defun jd-exwm/exwm-init-hook () | ||
19 | (display-battery-mode t) | ||
20 | (display-time-mode t) | ||
21 | |||
22 | (jd-exwm/run-in-background "nm-applet") | ||
23 | (jd-exwm/run-in-background "pasystray") | ||
24 | (jd-exwm/run-in-background "blueman-applet")) | ||
25 | |||
26 | (defun jd-exwm/exwm-update-title () | ||
27 | (exwm-workspace-rename-buffer exwm-title)) | ||
28 | |||
29 | (defun jd-exwm/configure-window-by-class () | ||
30 | (interactive) | ||
31 | (pcase exwm-class-name | ||
32 | ("firefox" (exwm-workspace-move-window 2)) | ||
33 | ("qutebrowser" (exwm-workspace-move-window 2)) | ||
34 | ("discord" (exwm-workspace-move-window 5)) | ||
35 | ("obs" (exwm-workspace-move-window 5)) | ||
36 | ("Virt-manager" (exwm-workspace-move-window 4)))) | ||
37 | |||
38 | (use-package exwm | ||
39 | :config | ||
40 | (setq exwm-workspace-number 9) | ||
41 | |||
42 | (add-hook 'exwm-init-hook #'jd-exwm/exwm-init-hook) | ||
43 | (add-hook 'exwm-update-class-hook #'jd/exwm-update-class) | ||
44 | (add-hook 'exwm-update-title-hook #'jd-exwm/exwm-update-title) | ||
45 | (add-hook 'exwm-manage-finish-hook #'jd-exwm/configure-window-by-class) | ||
46 | |||
47 | (start-process-shell-command "xmodmap" nil "xmodmap ~/dotfiles/.Xmodmap") | ||
48 | (start-process-shell-command "nitrogen" nil "nitrogen --restore") | ||
49 | (start-process-shell-command "xinput" nil "xinput set-prop 11 336 1") | ||
50 | |||
51 | (require 'exwm-randr) | ||
52 | (exwm-randr-enable) | ||
53 | ;; (start-process-shell-command "xrandr" nil "xrandr --output DP-1-8 --primary --mode 1920x1080 --output eDP-1 --off") | ||
54 | |||
55 | (require 'exwm-systemtray) | ||
56 | (exwm-systemtray-enable) | ||
57 | |||
58 | (setq exwm-input-simulation-keys | ||
59 | '(([?\C-l] . [left]) | ||
60 | ([?\C-h] . [right]) | ||
61 | ([?\C-k] . [up]) | ||
62 | ([?\C-j] . [down]))) | ||
63 | |||
64 | (setq exwm-input-prefix-keys | ||
65 | '(?\C-x | ||
66 | ?\C-u | ||
67 | ?\C-h | ||
68 | ?\M-x | ||
69 | ?\M-` | ||
70 | ?\M-& | ||
71 | ?\M-: | ||
72 | ?\C-\M-j | ||
73 | ?\C-\ )) | ||
74 | |||
75 | (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key) | ||
76 | (exwm-input-set-key (kbd "s-p") 'counsel-linux-app) | ||
77 | |||
78 | (setq exwm-input-global-keys | ||
79 | `(([?\s-R] . exwm-reset) | ||
80 | |||
81 | |||
82 | ([?\s-r] . (lambda (command) | ||
83 | (interactive (list (read-shell-command "$ "))) | ||
84 | (start-process-shell-command command nil command))) | ||
85 | |||
86 | ([?\s-W] . exwm-workspace-move-window) | ||
87 | ([?\s-w] . exwm-workspace-switch) | ||
88 | |||
89 | ,@(mapcar (lambda (i) | ||
90 | `(,(kbd (format "s-%d" i)) . | ||
91 | (lambda () | ||
92 | (interactive) | ||
93 | (exwm-workspace-switch-create ,i)))) | ||
94 | (number-sequence 1 9)))) | ||
95 | |||
96 | (exwm-enable)) | ||
97 | |||
98 | #+end_src | ||
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 | ** Start emacs | ||
126 | |||
127 | #+begin_src sh :tangle ~/.config/emacs/exwm/start.sh | ||
128 | #!/bin/sh | ||
129 | |||
130 | picom & | ||
131 | |||
132 | xss-lock -- slock & | ||
133 | |||
134 | export VISUAL=emacsclient | ||
135 | export EDITOR="$VISUAL" | ||
136 | |||
137 | exec dbus-launch --exit-with-session emacs -mm --debug-init -l ~/.config/emacs/exwm/desktop.el | ||
138 | |||
139 | #+end_src | ||
140 | |||
141 | |||
142 | * Applications | ||
143 | ** Flatpak | ||
144 | |||
145 | *Applications to Install* | ||
146 | |||
147 | #+begin_src sh | ||
148 | |||
149 | flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo | ||
150 | flatpak install --user flathub com.spotify.Client | ||
151 | flatpak install --user flathub com.valvesoftware.Steam | ||
152 | flatpak install --user flathub com.microsoft.Teams | ||
153 | flatpak install --user flathub com.discordapp.Discord | ||
154 | |||
155 | #+end_src | ||
156 | |||
157 | *Guix Packages* | ||
158 | |||
159 | #+begin_src scheme :noweb-ref packages :noweb-sep "" | ||
160 | |||
161 | "flatpak" | ||
162 | |||
163 | #+end_src | ||
164 | |||
165 | ** Audio control | ||
166 | |||
167 | *Guix Packages* | ||
168 | |||
169 | #+begin_src scheme :noweb-ref packages :noweb-sep "" | ||
170 | |||
171 | "pulsemixer" | ||
172 | |||
173 | #+end_src | ||
174 | |||
175 | ** Bluetooth | ||
176 | |||
177 | *Guix Packages* | ||
178 | |||
179 | #+begin_src scheme :noweb-ref packages :noweb-sep "" | ||
180 | |||
181 | "blueman" | ||
182 | |||
183 | #+end_src | ||
184 | |||
185 | ** Xorg | ||
186 | |||
187 | *Xmodmap* | ||
188 | |||
189 | #+begin_src sh :tangle .Xmodmap | ||
190 | |||
191 | clear lock | ||
192 | keycode 0x42 = Escape | ||
193 | |||
194 | #+end_src | ||
195 | |||
196 | *Guix Packages* | ||
197 | |||
198 | #+begin_src scheme :noweb-ref packages :noweb-sep "" | ||
199 | |||
200 | "xev" | ||
201 | "xset" | ||
202 | "xrdb" | ||
203 | "xhost" | ||
204 | "xmodmap" | ||
205 | "setxkbmap" | ||
206 | "xrandr" | ||
207 | "arandr" | ||
208 | "xss-lock" | ||
209 | "libinput" | ||
210 | "xinput" | ||
211 | |||
212 | #+end_src | ||
213 | |||
214 | ** Desktop Profile | ||
215 | |||
216 | #+begin_src scheme :tangle .config/guix/manifests/desktop.scm :noweb yes | ||
217 | |||
218 | (specifications->manifest | ||
219 | '( | ||
220 | <<packages>> | ||
221 | )) | ||
222 | |||
223 | #+end_src | ||