desktop: don't run exwm-randr-refresh unless asked

This commit is contained in:
Pavel Korytov 2025-11-06 07:57:41 +03:00
parent 96445d5c02
commit f10fb1a047
3 changed files with 10 additions and 8 deletions

View file

@ -7,7 +7,7 @@
"ffmpeg" "ffmpeg"
"krita" "krita"
"gimp" "gimp"
"libreoffice" "libreoffice-fresh"
"zathura-djvu" "zathura-djvu"
"zathura-pdf-mupdf" "zathura-pdf-mupdf"
"zathura-ps" "zathura-ps"

View file

@ -277,8 +277,8 @@ DIR is either 'left or 'right."
(cl-loop while (windmove-find-other-window opposite-dir) (cl-loop while (windmove-find-other-window opposite-dir)
do (windmove-do-window-select opposite-dir)))))) do (windmove-do-window-select opposite-dir))))))
(defun my/exwm-refresh-monitors () (defun my/exwm-refresh-monitors (&optional refresh)
(interactive) (interactive (list t))
(setq my/exwm-monitor-list (my/exwm-xrandr-monitor-list)) (setq my/exwm-monitor-list (my/exwm-xrandr-monitor-list))
(cl-loop for i from 0 to (1- exwm-workspace-number) (cl-loop for i from 0 to (1- exwm-workspace-number)
for monitor = (plist-get exwm-randr-workspace-monitor-plist for monitor = (plist-get exwm-randr-workspace-monitor-plist
@ -287,7 +287,8 @@ DIR is either 'left or 'right."
do do
(setf (plist-get exwm-randr-workspace-monitor-plist i) (setf (plist-get exwm-randr-workspace-monitor-plist i)
(car my/exwm-monitor-list))) (car my/exwm-monitor-list)))
(exwm-randr-refresh)) (when refresh
(exwm-randr-refresh)))
(use-package ivy-posframe (use-package ivy-posframe
:straight t :straight t

View file

@ -683,8 +683,8 @@ So here is my implementation of that. It always does =windmove-do-select-window=
*** Update the monitor list *** Update the monitor list
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun my/exwm-refresh-monitors () (defun my/exwm-refresh-monitors (&optional refresh)
(interactive) (interactive (list t))
(setq my/exwm-monitor-list (my/exwm-xrandr-monitor-list)) (setq my/exwm-monitor-list (my/exwm-xrandr-monitor-list))
(cl-loop for i from 0 to (1- exwm-workspace-number) (cl-loop for i from 0 to (1- exwm-workspace-number)
for monitor = (plist-get exwm-randr-workspace-monitor-plist 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 do
(setf (plist-get exwm-randr-workspace-monitor-plist i) (setf (plist-get exwm-randr-workspace-monitor-plist i)
(car my/exwm-monitor-list))) (car my/exwm-monitor-list)))
(exwm-randr-refresh)) (when refresh
(exwm-randr-refresh)))
#+end_src #+end_src
** Completions ** 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. 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 ** Office & Multimedia
| Category | Guix dependency | | Category | Guix dependency |
|----------+-----------------| |----------+-----------------|
| office | libreoffice | | office | libreoffice-fresh |
| office | gimp | | office | gimp |
| office | krita | | office | krita |
| office | ffmpeg | | office | ffmpeg |