diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2023-04-07 23:02:33 +0200 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2023-04-07 23:02:33 +0200 |
commit | 2b62ae597cc6a4c213f7d4b54b112ff9c216dbaa (patch) | |
tree | 4f6367dabb969d37154cadecb61c066c82f3b2ce /Desktop.org | |
parent | 117c11fbee5b9684aa360bb0fd0321d6cadfb1aa (diff) | |
download | dotfiles-2b62ae597cc6a4c213f7d4b54b112ff9c216dbaa.tar.gz dotfiles-2b62ae597cc6a4c213f7d4b54b112ff9c216dbaa.zip |
Some changes...
Diffstat (limited to 'Desktop.org')
-rw-r--r-- | Desktop.org | 175 |
1 files changed, 88 insertions, 87 deletions
diff --git a/Desktop.org b/Desktop.org index e24607e..595e278 100644 --- a/Desktop.org +++ b/Desktop.org | |||
@@ -8,93 +8,92 @@ | |||
8 | 8 | ||
9 | #+begin_src emacs-lisp | 9 | #+begin_src emacs-lisp |
10 | 10 | ||
11 | (defun jd/exwm-update-class () | 11 | (defun jd/exwm-update-class () |
12 | (exwm-workspace-rename-buffer exwm-class-name)) | 12 | (exwm-workspace-rename-buffer exwm-class-name)) |
13 | 13 | ||
14 | (defun jd-exwm/run-in-background (command) | 14 | (defun jd-exwm/run-in-background (command) |
15 | (let ((command-parts (split-string command "[ ]+"))) | 15 | (let ((command-parts (split-string command "[ ]+"))) |
16 | (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts))))) | 16 | (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts))))) |
17 | 17 | ||
18 | (defun jd-exwm/restart-process (program-name) | 18 | (defun jd-exwm/restart-process (program-name) |
19 | (call-process "killall" nil nil nil program-name) | 19 | (call-process "killall" nil nil nil program-name) |
20 | (jd-exwm/run-in-background program-name)) | 20 | (jd-exwm/run-in-background program-name)) |
21 | 21 | ||
22 | (defun jd-exwm/exwm-init-hook () | 22 | (defun jd-exwm/exwm-init-hook () |
23 | (jd-exwm/restart-process "polybar") | 23 | (jd-exwm/run-in-background "nitrogen --restore") |
24 | (jd-exwm/restart-process "nm-applet") | 24 | (start-process-shell-command "xinput" nil "xinput set-prop 'ETPS/2 Elantech Touchpad' 'Synaptics Tap Action' 1 1 1 2 1") |
25 | (jd-exwm/restart-process "redshift-gtk -l 54.37:18.6") | 25 | (start-process-shell-command "syndaemon" nil "syndaemon -i 0.8 -K -R -d") |
26 | (jd-exwm/restart-process "blueman-applet") | 26 | |
27 | (jd-exwm/restart-process "pasystray")) | 27 | (jd-exwm/restart-process "polybar") |
28 | 28 | (jd-exwm/restart-process "nm-applet") | |
29 | (defun jd-exwm/exwm-update-title () | 29 | (jd-exwm/restart-process "redshift-gtk -l 54.37:18.6") |
30 | (exwm-workspace-rename-buffer exwm-title)) | 30 | (jd-exwm/restart-process "blueman-applet")) |
31 | 31 | ||
32 | (defun jd-exwm/configure-window-by-class () | 32 | (defun jd-exwm/exwm-update-title () |
33 | (interactive) | 33 | (exwm-workspace-rename-buffer exwm-title)) |
34 | (pcase exwm-class-name | 34 | |
35 | ("firefox" (exwm-workspace-move-window 2)) | 35 | (defun jd-exwm/configure-window-by-class () |
36 | ("Brave" (exwm-workspace-move-window 2)) | 36 | (interactive) |
37 | ("qutebrowser" (exwm-workspace-move-window 2)) | 37 | (pcase exwm-class-name |
38 | ("discord" (exwm-workspace-move-window 5)) | 38 | ("firefox" (exwm-workspace-move-window 2)) |
39 | ("obs" (exwm-workspace-move-window 5)) | 39 | ("Brave" (exwm-workspace-move-window 2)) |
40 | ("Virt-manager" (exwm-workspace-move-window 4)))) | 40 | ("qutebrowser" (exwm-workspace-move-window 2)) |
41 | 41 | ("discord" (exwm-workspace-move-window 5)) | |
42 | (use-package exwm | 42 | ("obs" (exwm-workspace-move-window 5)) |
43 | :config | 43 | ("Virt-manager" (exwm-workspace-move-window 4)))) |
44 | (setq exwm-workspace-number 10) | 44 | |
45 | 45 | (use-package exwm | |
46 | (add-hook 'exwm-init-hook #'jd-exwm/exwm-init-hook) | 46 | :config |
47 | (add-hook 'exwm-update-class-hook #'jd/exwm-update-class) | 47 | (setq exwm-workspace-number 10) |
48 | (add-hook 'exwm-update-title-hook #'jd-exwm/exwm-update-title) | 48 | |
49 | (add-hook 'exwm-manage-finish-hook #'jd-exwm/configure-window-by-class) | 49 | (add-hook 'exwm-init-hook #'jd-exwm/exwm-init-hook) |
50 | 50 | (add-hook 'exwm-update-class-hook #'jd/exwm-update-class) | |
51 | (start-process-shell-command "nitrogen" nil "nitrogen --restore") | 51 | (add-hook 'exwm-update-title-hook #'jd-exwm/exwm-update-title) |
52 | (start-process-shell-command "xinput" nil "xinput set-prop 'ETPS/2 Elantech Touchpad' 'Synaptics Tap Action' 1 1 1 2 1") | 52 | (add-hook 'exwm-manage-finish-hook #'jd-exwm/configure-window-by-class) |
53 | (start-process-shell-command "xmodmap" nil "xmodmap ~/dotfiles/.Xmodmap") | 53 | |
54 | 54 | (require 'exwm-randr) | |
55 | (require 'exwm-randr) | 55 | (setq exwm-randr-workspace-monitor-plist '(9 "eDP-1" 0 "eDP-1")) |
56 | (setq exwm-randr-workspace-monitor-plist '(9 "eDP-1" 0 "eDP-1")) | 56 | (exwm-randr-enable) |
57 | (exwm-randr-enable) | 57 | |
58 | 58 | (setq exwm-input-simulation-keys | |
59 | (setq exwm-input-simulation-keys | 59 | '(([?\C-h] . [left]) |
60 | '(([?\C-b] . [left]) | 60 | ([?\C-l] . [right]) |
61 | ([?\C-f] . [right]) | 61 | ([?\C-k] . [up]) |
62 | ([?\C-p] . [up]) | 62 | ([?\C-j] . [down]))) |
63 | ([?\C-n] . [down]))) | 63 | |
64 | 64 | (setq exwm-input-prefix-keys | |
65 | (setq exwm-input-prefix-keys | 65 | '(?\C-x |
66 | '(?\C-x | 66 | ?\C-u |
67 | ?\C-u | 67 | ?\C-h |
68 | ?\C-h | 68 | ?\M-x |
69 | ?\M-x | 69 | ?\M-` |
70 | ?\M-` | 70 | ?\M-& |
71 | ?\M-& | 71 | ?\M-: |
72 | ?\M-: | 72 | ?\C-\M-j |
73 | ?\C-\M-j | 73 | ?\C-\ )) |
74 | ?\C-\ )) | 74 | |
75 | 75 | (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key) | |
76 | (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key) | 76 | (exwm-input-set-key (kbd "s-p") 'counsel-linux-app) |
77 | (exwm-input-set-key (kbd "s-p") 'counsel-linux-app) | 77 | |
78 | 78 | (setq exwm-input-global-keys | |
79 | (setq exwm-input-global-keys | 79 | `(([?\s-R] . exwm-reset) |
80 | `(([?\s-R] . exwm-reset) | 80 | |
81 | 81 | ||
82 | 82 | ([?\s-r] . (lambda (command) | |
83 | ([?\s-r] . (lambda (command) | 83 | (interactive (list (read-shell-command "$ "))) |
84 | (interactive (list (read-shell-command "$ "))) | 84 | (start-process-shell-command command nil command))) |
85 | (start-process-shell-command command nil command))) | 85 | |
86 | 86 | ([?\s-W] . exwm-workspace-move-window) | |
87 | ([?\s-W] . exwm-workspace-move-window) | 87 | ([?\s-w] . exwm-workspace-switch) |
88 | ([?\s-w] . exwm-workspace-switch) | 88 | |
89 | 89 | ,@(mapcar (lambda (i) | |
90 | ,@(mapcar (lambda (i) | 90 | `(,(kbd (format "s-%d" i)) . |
91 | `(,(kbd (format "s-%d" i)) . | 91 | (lambda () |
92 | (lambda () | 92 | (interactive) |
93 | (interactive) | 93 | (exwm-workspace-switch-create ,i)))) |
94 | (exwm-workspace-switch-create ,i)))) | 94 | (number-sequence 0 9)))) |
95 | (number-sequence 0 9)))) | 95 | |
96 | 96 | (exwm-enable)) | |
97 | (exwm-enable)) | ||
98 | 97 | ||
99 | #+end_src | 98 | #+end_src |
100 | ** Desktop mode | 99 | ** Desktop mode |
@@ -173,6 +172,8 @@ | |||
173 | export GTK_THEME="Adwaita:dark" | 172 | export GTK_THEME="Adwaita:dark" |
174 | export CALIBRE_USE_DARK_PALETTE=1 | 173 | export CALIBRE_USE_DARK_PALETTE=1 |
175 | 174 | ||
175 | gentoo-pipewire-launcher & | ||
176 | |||
176 | exec dbus-launch --exit-with-session emacs -mm --debug-init -l ~/.config/emacs/exwm/desktop.el | 177 | exec dbus-launch --exit-with-session emacs -mm --debug-init -l ~/.config/emacs/exwm/desktop.el |
177 | 178 | ||
178 | #+end_src | 179 | #+end_src |