dotfiles/private_dot_emacs.d/org/exwm.org
2020-11-02 01:46:06 +01:00

2.9 KiB

EXVM

Moving workspace

Theoretically it's possible to move workspace N to monitor M, by binding \s-C-[0-9], like many people do in i3. All that needs to be done is that a suitable plist needs to be build:

  (setq exwm-randr-workspace-output-plist `(1 "HDMI-0" 2 "HDMI-1" 3 "HDMI-1"))

And then this function must be called for EXWM to pick up any changes made

  (exwm-randr-refresh)

Autostart

  (call-process-shell-command "xmodmap ~/.xmodmap &" nil 0)
  (call-process-shell-command "dunst &" nil 0)
  (call-process-shell-command "picom &" nil 0)
  (call-process-shell-command "/mnt/data3/Programs/bin/nextcloud &" nil 0)
  (call-process-shell-command "setxkbmap -layout us,sk variant ,qwerty -option grp:lalt_lshift_toggle &" nil 0)
  (when (string= (system-name) "heater")
    (call-process-shell-command "feh --bg-max /mnt/data3/Nextcloud/Multimedia/Wallpapers/0126.jpg" nil 0)))
;  (use-package exwm
;    :ensure t
;    :after hydra
;    :init
;    (require 'exwm-config)
;    (exwm-config-default)
;    (require 'exwm-randr)
;    (setq exwm-randr-workspace-output-plist '(1 "HDMI-0" 2 "HDMI-1"))
;    (add-hook 'exwm-randr-screen-change-hook
;	      (lambda ()
;		(start-process-shell-command
;		 "xrandr" nil "xrandr --output HDMI-1 --right-of HDMI-0 --auto")))
;
;    (setq exwm-input-global-keys
;	  `(([?\s-r] . exwm-reset)
;	    ([?\s-w] . exwm-workspace-switch)
;	    ,@(mapcar (lambda (i)
;			`(,(kbd (format "s-%d" i)) .
;			  (lambda ()
;			    (interactive)
;			    (exwm-workspace-switch-create ,i))))
;		      (number-sequence 0 9))
;	    ([?\s-\)] . (lambda () (interactive) (exwm-workspace-move-window 0)))
;	    ([?\s-!] . (lambda () (interactive) (exwm-workspace-move-window 1)))
;	    ([?\s-@] . (lambda () (interactive) (exwm-workspace-move-window 2)))
;	    ([?\s-#] . (lambda () (interactive) (exwm-workspace-move-window 3)))
;	    ([?\s-$] . (lambda () (interactive) (exwm-workspace-move-window 4)))
;	    ([?\s-%] . (lambda () (interactive) (exwm-workspace-move-window 5)))
;	    ([?\s-^] . (lambda () (interactive) (exwm-workspace-move-window 6)))
;	    ([?\s-&] . (lambda () (interactive) (exwm-workspace-move-window 7)))
;	    ([?\s-8] . (lambda () (interactive) (exwm-workspace-move-window 8)))
;	    ([?\s-*] . (lambda () (interactive) (exwm-workspace-move-window 9)))
;	    ([<print>] . (call-process-shell-command "screenshot select &" nil 0))
;	    ([?\s-d] . (lambda (command)
;			 (interactive (list (read-shell-command "$ ")))
;			 (start-process-shell-command command nil command))))
;    ;; Make focus follow mouse
;    (setq mouse-autoselect-window t
;	  focus-follows-mouse t)
;
;    <<autostart>>
;
;    (setq exwm-workspace-number 10)
;
;
;    (exwm-randr-enable))