mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-11 19:45:25 +03:00
feat(exwm): minor updates
This commit is contained in:
parent
867644c28e
commit
45a5439661
3 changed files with 13 additions and 11 deletions
|
|
@ -207,9 +207,8 @@ _=_: Balance "
|
||||||
(setq my/exwm-monitor-workspace '())
|
(setq my/exwm-monitor-workspace '())
|
||||||
|
|
||||||
(defun my/exwm-get-current-monitor ()
|
(defun my/exwm-get-current-monitor ()
|
||||||
(let* ((info (shell-command-to-string "xdotool getmouselocation --shell | head -n 1"))
|
(if (plist-get exwm-randr-workspace-monitor-plist exwm-workspace-current-index)
|
||||||
(coord (string-to-number (substring info 2))))
|
1 0))
|
||||||
(if (> coord 1920) 1 0)))
|
|
||||||
|
|
||||||
(defun my/exwm-update-current-monitor ()
|
(defun my/exwm-update-current-monitor ()
|
||||||
(setf (alist-get (my/exwm-get-current-monitor) my/exwm-monitor-workspace)
|
(setf (alist-get (my/exwm-get-current-monitor) my/exwm-monitor-workspace)
|
||||||
|
|
@ -223,8 +222,10 @@ _=_: Balance "
|
||||||
(other (seq-some
|
(other (seq-some
|
||||||
(lambda (m)
|
(lambda (m)
|
||||||
(and (not (= (car m) current)) (cdr m)))
|
(and (not (= (car m) current)) (cdr m)))
|
||||||
my/exwm-monitor-workspace)))
|
my/exwm-monitor-workspace))
|
||||||
(exwm-workspace-switch other)))
|
(focus-follows-mouse nil)
|
||||||
|
(mouse-autoselect-window nil))
|
||||||
|
;; (exwm-workspace-switch other)))
|
||||||
(setq exwm-input-prefix-keys
|
(setq exwm-input-prefix-keys
|
||||||
`(?\C-x
|
`(?\C-x
|
||||||
?\C-w
|
?\C-w
|
||||||
|
|
|
||||||
Binary file not shown.
13
Desktop.org
13
Desktop.org
|
|
@ -424,9 +424,8 @@ Store the information about which workspace is available on which monitor.
|
||||||
(setq my/exwm-monitor-workspace '())
|
(setq my/exwm-monitor-workspace '())
|
||||||
|
|
||||||
(defun my/exwm-get-current-monitor ()
|
(defun my/exwm-get-current-monitor ()
|
||||||
(let* ((info (shell-command-to-string "xdotool getmouselocation --shell | head -n 1"))
|
(if (plist-get exwm-randr-workspace-monitor-plist exwm-workspace-current-index)
|
||||||
(coord (string-to-number (substring info 2))))
|
1 0))
|
||||||
(if (> coord 1920) 1 0)))
|
|
||||||
|
|
||||||
(defun my/exwm-update-current-monitor ()
|
(defun my/exwm-update-current-monitor ()
|
||||||
(setf (alist-get (my/exwm-get-current-monitor) my/exwm-monitor-workspace)
|
(setf (alist-get (my/exwm-get-current-monitor) my/exwm-monitor-workspace)
|
||||||
|
|
@ -436,7 +435,7 @@ Store the information about which workspace is available on which monitor.
|
||||||
#'my/exwm-update-current-monitor)
|
#'my/exwm-update-current-monitor)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Switch to the opposite monitor.
|
Switch to the opposite monitor. For now, this works only for two monitors because I don't have more.
|
||||||
#+begin_src emacs-lisp :noweb-ref exwm-monitor-config :tangle no
|
#+begin_src emacs-lisp :noweb-ref exwm-monitor-config :tangle no
|
||||||
(defun my/exwm-switch-to-other-monitor ()
|
(defun my/exwm-switch-to-other-monitor ()
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
@ -444,8 +443,10 @@ Switch to the opposite monitor.
|
||||||
(other (seq-some
|
(other (seq-some
|
||||||
(lambda (m)
|
(lambda (m)
|
||||||
(and (not (= (car m) current)) (cdr m)))
|
(and (not (= (car m) current)) (cdr m)))
|
||||||
my/exwm-monitor-workspace)))
|
my/exwm-monitor-workspace))
|
||||||
(exwm-workspace-switch other)))
|
(focus-follows-mouse nil)
|
||||||
|
(mouse-autoselect-window nil))
|
||||||
|
;; (exwm-workspace-switch other)))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Switching buffers
|
** Switching buffers
|
||||||
A single perspective usually has only a handful of EXWM buffers, so here is a function to cycle them.
|
A single perspective usually has only a handful of EXWM buffers, so here is a function to cycle them.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue