[Emacs] Fix multi-monitor EXWM
Also change some buffer renaming for X windows Fix original repo of xelp, indicate fork used
This commit is contained in:
parent
7252623ada
commit
2f2a7aa674
@ -3142,7 +3142,8 @@ from Git.
|
|||||||
:straight (xelb :build t
|
:straight (xelb :build t
|
||||||
:type git
|
:type git
|
||||||
:host github
|
:host github
|
||||||
:repo "ch11ng/xelb"))
|
:repo "emacs-straiht/xelb"
|
||||||
|
:fork "ch11ng/xelb"))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Next is a function I’ve +stolen+ copied from Daviwil’s [[https://config.daviwil.com/desktop][desktop
|
Next is a function I’ve +stolen+ copied from Daviwil’s [[https://config.daviwil.com/desktop][desktop
|
||||||
@ -3171,29 +3172,25 @@ simply get the name of the current X window, I want Firefox and
|
|||||||
Qutebrowser to be prefixed with the name of the browser. Actually, all
|
Qutebrowser to be prefixed with the name of the browser. Actually, all
|
||||||
these will be renamed this way:
|
these will be renamed this way:
|
||||||
#+name: exwm-renamed-buffers-list
|
#+name: exwm-renamed-buffers-list
|
||||||
- Discord
|
- Kitty
|
||||||
- Firefox
|
|
||||||
- Qutebrowser
|
- Qutebrowser
|
||||||
|
|
||||||
#+name: exwm-gen-buffers-rename
|
#+name: exwm-gen-buffers-rename
|
||||||
#+headers: :exports none :tangle no
|
#+headers: :exports none :tangle no
|
||||||
#+begin_src emacs-lisp :var buffers=exwm-renamed-buffers-list :cache yes
|
#+begin_src emacs-lisp :var buffers=exwm-renamed-buffers-list :cache yes
|
||||||
(mapconcat (lambda (buffer)
|
(format "%s\n%S"
|
||||||
(let ((buffer-name (car buffer)))
|
(mapconcat (lambda (buffer)
|
||||||
(format "(\"%s\" %S)"
|
(let ((buffer-name (car buffer)))
|
||||||
(downcase buffer-name)
|
(format "(\"%s\" %S)"
|
||||||
`(exwm-workspace-rename-buffer (concat ,buffer-name
|
(downcase buffer-name)
|
||||||
" - "
|
`(exwm-workspace-rename-buffer (concat ,buffer-name
|
||||||
exwm-title)))))
|
" - "
|
||||||
buffers
|
exwm-title)))))
|
||||||
"\n")
|
buffers
|
||||||
|
"\n")
|
||||||
|
'(_otherwise (exwm-workspace-rename-buffer exwm-title)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+RESULTS[53d4805340ff070b477ea5d3725105c488ffb1fd]: exwm-gen-buffers-rename
|
|
||||||
: ("discord" (exwm-workspace-rename-buffer (concat "Discord - %s" exwm-title)))
|
|
||||||
: ("firefox" (exwm-workspace-rename-buffer (concat "Firefox - %s" exwm-title)))
|
|
||||||
: ("qutebrowser" (exwm-workspace-rename-buffer (concat "Qutebrowser - %s" exwm-title)))
|
|
||||||
|
|
||||||
#+name: exwm-buffers-name
|
#+name: exwm-buffers-name
|
||||||
#+begin_src emacs-lisp :tangle no
|
#+begin_src emacs-lisp :tangle no
|
||||||
(add-hook 'exwm-update-class-hook
|
(add-hook 'exwm-update-class-hook
|
||||||
@ -3202,8 +3199,7 @@ these will be renamed this way:
|
|||||||
(add-hook 'exwm-update-title-hook
|
(add-hook 'exwm-update-title-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(pcase exwm-class-name
|
(pcase exwm-class-name
|
||||||
<<exwm-gen-buffers-rename()>>
|
<<exwm-gen-buffers-rename()>>)))
|
||||||
)))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
As you can see below, in the ~:config~ section I added two advices and one
|
As you can see below, in the ~:config~ section I added two advices and one
|
||||||
@ -3360,8 +3356,10 @@ The complete configuration for the ~exwm~ package can be found below.
|
|||||||
(exwm-input-line-mode-passthrough t "Pass all keypresses to emacs in line mode.")
|
(exwm-input-line-mode-passthrough t "Pass all keypresses to emacs in line mode.")
|
||||||
:init
|
:init
|
||||||
(require 'exwm-config)
|
(require 'exwm-config)
|
||||||
(setq exwm-workspace-number 3)
|
(setq exwm-workspace-number 6)
|
||||||
:config
|
:config
|
||||||
|
<<exwm-randr>>
|
||||||
|
|
||||||
<<exwm-buffers-name>>
|
<<exwm-buffers-name>>
|
||||||
|
|
||||||
<<exwm-advices-evil>>
|
<<exwm-advices-evil>>
|
||||||
@ -3395,22 +3393,14 @@ The complete configuration for the ~exwm~ package can be found below.
|
|||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Packages-Configuration-EXWM-Multimonitor-support-l5pexz61aaj0
|
:CUSTOM_ID: Packages-Configuration-EXWM-Multimonitor-support-l5pexz61aaj0
|
||||||
:END:
|
:END:
|
||||||
#+begin_src emacs-lisp
|
#+name: exwm-randr
|
||||||
(use-package exwm-randr
|
#+begin_src emacs-lisp :tangle no
|
||||||
:after exwm
|
(require 'exwm-randr)
|
||||||
:straight (exwm-randr :build t
|
(exwm/run-in-background "xwallpaper --zoom \"${cat $HOME/.cache/wallpaper}\"")
|
||||||
:type git
|
(start-process-shell-command
|
||||||
:host github
|
"xrandr" nil "xrandr --output eDP1 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI1 --primary --mode 2560x1080 --pos 1920x0 --rotate normal --output VIRTUAL1 --off --output DP-1-0 --off --output DP-1-1 --off")
|
||||||
:repo "ch11ng/exwm"
|
(exwm-randr-enable)
|
||||||
:files ("exwm-randr.el"))
|
(setq exwm-randr-workspace-monitor-plist '(3 "eDP1"))
|
||||||
:config
|
|
||||||
(setq exwm-randr-workspace-monitor-plist '(0 "eDP-1"
|
|
||||||
1 "HDMI1"))
|
|
||||||
(add-hook 'exwm-randr-screen-change-hook
|
|
||||||
(lambda ()
|
|
||||||
(start-process-shell-command
|
|
||||||
"autorandr" nil "autorandr horizontal")))
|
|
||||||
(exwm-randr-enable))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Keybinds for a desktop environment
|
*** Keybinds for a desktop environment
|
||||||
|
Loading…
Reference in New Issue
Block a user