use external config file for monitor & workspace configuration
parent
6fa17f0d53
commit
c61f8700fd
|
@ -15,14 +15,21 @@
|
|||
|
||||
;; setup desktops
|
||||
;; todo: handle no external display gracefully
|
||||
(bspc "wm" "-O" "HDMI-A-0" "DisplayPort-2")
|
||||
|
||||
(->> (range 1 10)
|
||||
;; read workspace configuration from config
|
||||
;; format should be like: eDP-1 1 2 3 4 .., HDMI-A-0 X
|
||||
;; where each monitor is defined on a separate line (no commas)
|
||||
(def workspace-config
|
||||
(->> (slurp "/home/schrofi/.screenlayout/default-workspaces")
|
||||
(str/split-lines)
|
||||
(map #(str/split % #" "))))
|
||||
|
||||
(doseq [config workspace-config]
|
||||
(let [[monitor & workspaces] config]
|
||||
(->> workspaces
|
||||
(map str)
|
||||
(concat ["monitor" "DisplayPort-2" "-d"])
|
||||
(apply bspc))
|
||||
|
||||
(bspc "monitor" "HDMI-A-0" "-d" "X")
|
||||
(concat ["monitor" monitor "-d"])
|
||||
(apply bspc))))
|
||||
|
||||
(config "border_width" "2")
|
||||
(config "window_gap" "12")
|
||||
|
|
Loading…
Reference in New Issue