From 2b62ae597cc6a4c213f7d4b54b112ff9c216dbaa Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Fri, 7 Apr 2023 23:02:33 +0200 Subject: Some changes... --- Desktop.org | 175 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 88 insertions(+), 87 deletions(-) (limited to 'Desktop.org') diff --git a/Desktop.org b/Desktop.org index e24607e..595e278 100644 --- a/Desktop.org +++ b/Desktop.org @@ -8,93 +8,92 @@ #+begin_src emacs-lisp - (defun jd/exwm-update-class () - (exwm-workspace-rename-buffer exwm-class-name)) - - (defun jd-exwm/run-in-background (command) - (let ((command-parts (split-string command "[ ]+"))) - (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts))))) - - (defun jd-exwm/restart-process (program-name) - (call-process "killall" nil nil nil program-name) - (jd-exwm/run-in-background program-name)) - - (defun jd-exwm/exwm-init-hook () - (jd-exwm/restart-process "polybar") - (jd-exwm/restart-process "nm-applet") - (jd-exwm/restart-process "redshift-gtk -l 54.37:18.6") - (jd-exwm/restart-process "blueman-applet") - (jd-exwm/restart-process "pasystray")) - - (defun jd-exwm/exwm-update-title () - (exwm-workspace-rename-buffer exwm-title)) - - (defun jd-exwm/configure-window-by-class () - (interactive) - (pcase exwm-class-name - ("firefox" (exwm-workspace-move-window 2)) - ("Brave" (exwm-workspace-move-window 2)) - ("qutebrowser" (exwm-workspace-move-window 2)) - ("discord" (exwm-workspace-move-window 5)) - ("obs" (exwm-workspace-move-window 5)) - ("Virt-manager" (exwm-workspace-move-window 4)))) - - (use-package exwm - :config - (setq exwm-workspace-number 10) - - (add-hook 'exwm-init-hook #'jd-exwm/exwm-init-hook) - (add-hook 'exwm-update-class-hook #'jd/exwm-update-class) - (add-hook 'exwm-update-title-hook #'jd-exwm/exwm-update-title) - (add-hook 'exwm-manage-finish-hook #'jd-exwm/configure-window-by-class) - - (start-process-shell-command "nitrogen" nil "nitrogen --restore") - (start-process-shell-command "xinput" nil "xinput set-prop 'ETPS/2 Elantech Touchpad' 'Synaptics Tap Action' 1 1 1 2 1") - (start-process-shell-command "xmodmap" nil "xmodmap ~/dotfiles/.Xmodmap") - - (require 'exwm-randr) - (setq exwm-randr-workspace-monitor-plist '(9 "eDP-1" 0 "eDP-1")) - (exwm-randr-enable) - - (setq exwm-input-simulation-keys - '(([?\C-b] . [left]) - ([?\C-f] . [right]) - ([?\C-p] . [up]) - ([?\C-n] . [down]))) - - (setq exwm-input-prefix-keys - '(?\C-x - ?\C-u - ?\C-h - ?\M-x - ?\M-` - ?\M-& - ?\M-: - ?\C-\M-j - ?\C-\ )) - - (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key) - (exwm-input-set-key (kbd "s-p") 'counsel-linux-app) - - (setq exwm-input-global-keys - `(([?\s-R] . exwm-reset) - - - ([?\s-r] . (lambda (command) - (interactive (list (read-shell-command "$ "))) - (start-process-shell-command command nil command))) - - ([?\s-W] . exwm-workspace-move-window) - ([?\s-w] . exwm-workspace-switch) - - ,@(mapcar (lambda (i) - `(,(kbd (format "s-%d" i)) . - (lambda () - (interactive) - (exwm-workspace-switch-create ,i)))) - (number-sequence 0 9)))) - - (exwm-enable)) + (defun jd/exwm-update-class () + (exwm-workspace-rename-buffer exwm-class-name)) + + (defun jd-exwm/run-in-background (command) + (let ((command-parts (split-string command "[ ]+"))) + (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts))))) + + (defun jd-exwm/restart-process (program-name) + (call-process "killall" nil nil nil program-name) + (jd-exwm/run-in-background program-name)) + + (defun jd-exwm/exwm-init-hook () + (jd-exwm/run-in-background "nitrogen --restore") + (start-process-shell-command "xinput" nil "xinput set-prop 'ETPS/2 Elantech Touchpad' 'Synaptics Tap Action' 1 1 1 2 1") + (start-process-shell-command "syndaemon" nil "syndaemon -i 0.8 -K -R -d") + + (jd-exwm/restart-process "polybar") + (jd-exwm/restart-process "nm-applet") + (jd-exwm/restart-process "redshift-gtk -l 54.37:18.6") + (jd-exwm/restart-process "blueman-applet")) + + (defun jd-exwm/exwm-update-title () + (exwm-workspace-rename-buffer exwm-title)) + + (defun jd-exwm/configure-window-by-class () + (interactive) + (pcase exwm-class-name + ("firefox" (exwm-workspace-move-window 2)) + ("Brave" (exwm-workspace-move-window 2)) + ("qutebrowser" (exwm-workspace-move-window 2)) + ("discord" (exwm-workspace-move-window 5)) + ("obs" (exwm-workspace-move-window 5)) + ("Virt-manager" (exwm-workspace-move-window 4)))) + + (use-package exwm + :config + (setq exwm-workspace-number 10) + + (add-hook 'exwm-init-hook #'jd-exwm/exwm-init-hook) + (add-hook 'exwm-update-class-hook #'jd/exwm-update-class) + (add-hook 'exwm-update-title-hook #'jd-exwm/exwm-update-title) + (add-hook 'exwm-manage-finish-hook #'jd-exwm/configure-window-by-class) + + (require 'exwm-randr) + (setq exwm-randr-workspace-monitor-plist '(9 "eDP-1" 0 "eDP-1")) + (exwm-randr-enable) + + (setq exwm-input-simulation-keys + '(([?\C-h] . [left]) + ([?\C-l] . [right]) + ([?\C-k] . [up]) + ([?\C-j] . [down]))) + + (setq exwm-input-prefix-keys + '(?\C-x + ?\C-u + ?\C-h + ?\M-x + ?\M-` + ?\M-& + ?\M-: + ?\C-\M-j + ?\C-\ )) + + (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key) + (exwm-input-set-key (kbd "s-p") 'counsel-linux-app) + + (setq exwm-input-global-keys + `(([?\s-R] . exwm-reset) + + + ([?\s-r] . (lambda (command) + (interactive (list (read-shell-command "$ "))) + (start-process-shell-command command nil command))) + + ([?\s-W] . exwm-workspace-move-window) + ([?\s-w] . exwm-workspace-switch) + + ,@(mapcar (lambda (i) + `(,(kbd (format "s-%d" i)) . + (lambda () + (interactive) + (exwm-workspace-switch-create ,i)))) + (number-sequence 0 9)))) + + (exwm-enable)) #+end_src ** Desktop mode @@ -173,6 +172,8 @@ export GTK_THEME="Adwaita:dark" export CALIBRE_USE_DARK_PALETTE=1 + gentoo-pipewire-launcher & + exec dbus-launch --exit-with-session emacs -mm --debug-init -l ~/.config/emacs/exwm/desktop.el #+end_src -- cgit v1.2.3