feat(nixos): Fix EXWM multi-screen outputting
Pins a set amount of screens on each display corresponding to the key wells on my Kinesis :sun:
This commit is contained in:
		
							parent
							
								
									443e8ea995
								
							
						
					
					
						commit
						f50c4a9ec1
					
				
					 1 changed files with 11 additions and 0 deletions
				
			
		| 
						 | 
					@ -4,6 +4,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(require 's)
 | 
					(require 's)
 | 
				
			||||||
(require 'f)
 | 
					(require 'f)
 | 
				
			||||||
 | 
					(require 'dash)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defvar is-nixos
 | 
					(defvar is-nixos
 | 
				
			||||||
  (let ((os-f "/etc/os-release"))
 | 
					  (let ((os-f "/etc/os-release"))
 | 
				
			||||||
| 
						 | 
					@ -32,11 +33,17 @@
 | 
				
			||||||
  (interactive)
 | 
					  (interactive)
 | 
				
			||||||
  (shell-command "i3lock"))
 | 
					  (shell-command "i3lock"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(defun generate-randr-config ()
 | 
				
			||||||
 | 
					  (-flatten `(,(-map (lambda (n) (list n "DP2")) (number-sequence 1 5))
 | 
				
			||||||
 | 
					              (0 "eDP1")
 | 
				
			||||||
 | 
					              ,(-map (lambda (n) (list n "eDP1")) (number-sequence 6 9)))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(if is-nixos
 | 
					(if is-nixos
 | 
				
			||||||
    (progn
 | 
					    (progn
 | 
				
			||||||
      (message "Running on NixOS, configuring ExWM.")
 | 
					      (message "Running on NixOS, configuring ExWM.")
 | 
				
			||||||
      (require 'exwm)
 | 
					      (require 'exwm)
 | 
				
			||||||
      (require 'exwm-config)
 | 
					      (require 'exwm-config)
 | 
				
			||||||
 | 
					      (require 'exwm-randr)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      (fringe-mode 3)
 | 
					      (fringe-mode 3)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -85,6 +92,10 @@
 | 
				
			||||||
      ;; Show time in the mode line
 | 
					      ;; Show time in the mode line
 | 
				
			||||||
      (display-time-mode)
 | 
					      (display-time-mode)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      ;; Another attempt at xrandr configuration
 | 
				
			||||||
 | 
					      (setq exwm-randr-workspace-output-plist (generate-randr-config))
 | 
				
			||||||
 | 
					      (exwm-randr-enable)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      ;; Let buffers move seamlessly between workspaces
 | 
					      ;; Let buffers move seamlessly between workspaces
 | 
				
			||||||
      (setq exwm-workspace-show-all-buffers t)
 | 
					      (setq exwm-workspace-show-all-buffers t)
 | 
				
			||||||
      (setq exwm-layout-show-all-buffers t)))
 | 
					      (setq exwm-layout-show-all-buffers t)))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue