From fa4a3d49f8a82d9700418d0eb11d1478bd484519 Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Thu, 18 Jan 2024 12:16:52 +0300 Subject: [PATCH] desktop: account for arch --- .emacs.d/desktop.el | 7 ++++++- Desktop.org | 18 +++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.emacs.d/desktop.el b/.emacs.d/desktop.el index 042637d..0f28374 100644 --- a/.emacs.d/desktop.el +++ b/.emacs.d/desktop.el @@ -31,6 +31,9 @@ :foreground (my/color-value 'yellow) :weight 'bold))) +(defun my/is-arch () + (file-exists-p "/etc/arch-release")) + (require 'windmove) (defun my/exwm-direction-exists-p (dir) @@ -583,7 +586,9 @@ _d_: Discord (my/exwm-run-polybar) (my/exwm-set-wallpaper) (my/exwm-run-shepherd) - (my/run-in-background "gpgconf --reload gpg-agent")) + (my/run-in-background "gpgconf --reload gpg-agent") + (when (my/is-arch) + (my/run-in-background "set_layout"))) (defun my/exwm-update-class () (exwm-workspace-rename-buffer (format "EXWM :: %s" exwm-class-name))) diff --git a/Desktop.org b/Desktop.org index f5cc0da..e6783cc 100644 --- a/Desktop.org +++ b/Desktop.org @@ -277,7 +277,7 @@ The GUI pinentry doesn't work too well with EXWM because of issues with popup wi #+begin_src emacs-lisp (use-package pinentry :straight t - ;; :after (exwm) + :after (exwm) :config (setenv "GPG_AGENT_INFO" nil) ;; use emacs pinentry (setq auth-source-debug t) @@ -291,10 +291,13 @@ The GUI pinentry doesn't work too well with EXWM because of issues with popup wi #+end_src #+NAME: find-pinentry -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no (executable-find "pinentry") #+end_src +#+RESULTS: find-pinentry +: /home/pavel/.guix-profile/bin/pinentry + #+begin_src conf-space :tangle ~/.gnupg/gpg-agent.conf :noweb yes default-cache-ttl 3600 max-cache-ttl 3600 @@ -315,6 +318,13 @@ Show the current workspace in the modeline. :foreground (my/color-value 'yellow) :weight 'bold))) #+end_src +*** Misc +Check if running Arch and not Guix. + +#+begin_src emacs-lisp +(defun my/is-arch () + (file-exists-p "/etc/arch-release")) +#+end_src ** Windows A bunch of functions related to managing windows in EXWM. @@ -1197,7 +1207,9 @@ And the EXWM config itself. (my/exwm-run-polybar) (my/exwm-set-wallpaper) (my/exwm-run-shepherd) - (my/run-in-background "gpgconf --reload gpg-agent")) + (my/run-in-background "gpgconf --reload gpg-agent") + (when (my/is-arch) + (my/run-in-background "set_layout"))) (defun my/exwm-update-class () (exwm-workspace-rename-buffer (format "EXWM :: %s" exwm-class-name)))