From f10fb1a047f6a083030e192ad83792417bd355b6 Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Thu, 6 Nov 2025 07:57:41 +0300 Subject: [PATCH] desktop: don't run exwm-randr-refresh unless asked --- .config/guix/manifests/office.scm | 2 +- .emacs.d/desktop.el | 7 ++++--- Desktop.org | 9 +++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.config/guix/manifests/office.scm b/.config/guix/manifests/office.scm index 7734bf7..07ea1c2 100644 --- a/.config/guix/manifests/office.scm +++ b/.config/guix/manifests/office.scm @@ -7,7 +7,7 @@ "ffmpeg" "krita" "gimp" - "libreoffice" + "libreoffice-fresh" "zathura-djvu" "zathura-pdf-mupdf" "zathura-ps" diff --git a/.emacs.d/desktop.el b/.emacs.d/desktop.el index e020fe0..892821b 100644 --- a/.emacs.d/desktop.el +++ b/.emacs.d/desktop.el @@ -277,8 +277,8 @@ DIR is either 'left or 'right." (cl-loop while (windmove-find-other-window opposite-dir) do (windmove-do-window-select opposite-dir)))))) -(defun my/exwm-refresh-monitors () - (interactive) +(defun my/exwm-refresh-monitors (&optional refresh) + (interactive (list t)) (setq my/exwm-monitor-list (my/exwm-xrandr-monitor-list)) (cl-loop for i from 0 to (1- exwm-workspace-number) for monitor = (plist-get exwm-randr-workspace-monitor-plist @@ -287,7 +287,8 @@ DIR is either 'left or 'right." do (setf (plist-get exwm-randr-workspace-monitor-plist i) (car my/exwm-monitor-list))) - (exwm-randr-refresh)) + (when refresh + (exwm-randr-refresh))) (use-package ivy-posframe :straight t diff --git a/Desktop.org b/Desktop.org index c7f1a57..1849b2b 100644 --- a/Desktop.org +++ b/Desktop.org @@ -683,8 +683,8 @@ So here is my implementation of that. It always does =windmove-do-select-window= *** Update the monitor list #+begin_src emacs-lisp -(defun my/exwm-refresh-monitors () - (interactive) +(defun my/exwm-refresh-monitors (&optional refresh) + (interactive (list t)) (setq my/exwm-monitor-list (my/exwm-xrandr-monitor-list)) (cl-loop for i from 0 to (1- exwm-workspace-number) for monitor = (plist-get exwm-randr-workspace-monitor-plist @@ -693,7 +693,8 @@ So here is my implementation of that. It always does =windmove-do-select-window= do (setf (plist-get exwm-randr-workspace-monitor-plist i) (car my/exwm-monitor-list))) - (exwm-randr-refresh)) + (when refresh + (exwm-randr-refresh))) #+end_src ** Completions Setting up some completion interfaces that fit particularly well to use with EXWM. While rofi also works, I want to use Emacs functionality wherever possible to have one completion interface everywhere. @@ -4215,7 +4216,7 @@ This section generates manifests for various desktop software that I'm using. ** Office & Multimedia | Category | Guix dependency | |----------+-----------------| -| office | libreoffice | +| office | libreoffice-fresh | | office | gimp | | office | krita | | office | ffmpeg |