dk window manager, dual monitor, separate polybar on each monitor:
workspace settings from dkrc, 5 workspaces assigned to each monitor:
# workspace settings
# ------------------------
# initialize 10 workspaces (1-10)
dkcmd set numws=10
# default workspace '_' values used when allocating new workspaces
# can be applied to all existing workspaces when passed 'apply' after ws=_
dkcmd set ws=_ apply layout=tile master=1 stack=3 msplit=0.55 ssplit=0.5 gap=0
dkcmd set ws=6 layout=tile pad left=4 right=4 top=4 bottom=4 gap=4
dkcmd set ws=7 layout=dwindle pad left=4 right=4 top=4 bottom=4 gap=4
dkcmd set ws=8 layout=spiral pad left=4 right=4 top=4 bottom=4 gap=4
dkcmd set ws=9 layout=float
# use grid layout, padding, and gaps on workspace 10
dkcmd set ws=10 layout=grid pad left=4 right=4 top=4 bottom=4 gap width=12
# use static workspaces (not default)
# dkcmd set static_ws=false
dkcmd set static_ws=true
# change workspace names
dkcmd set \
ws=1 name="1" \
ws=2 name="2" \
ws=3 name="3" \
ws=4 name="4" \
ws=5 name="5" \
ws=6 name="6" \
ws=7 name="7" \
ws=8 name="8" \
ws=9 name="9" \
ws=10 name="10"
# assign workspaces to monitors (requires static_ws=true)
mon1='HDMI1'
mon2='VGA1'
dkcmd set \
ws=1 mon=$mon1 \
ws=2 mon=$mon1 \
ws=3 mon=$mon1 \
ws=4 mon=$mon1 \
ws=5 mon=$mon1 \
ws=6 mon=$mon2 \
ws=7 mon=$mon2 \
ws=8 mon=$mon2 \
ws=9 mon=$mon2 \
ws=10 mon=$mon2
relevant parts of polybar:
configuration for two bars, each bar is given an unique name and inherits a different “master” file:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; dk
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[bar/dk-bar]
inherit = bar/master
modules-left = appmenu dk-workspaces dklayouts
modules-center = chronos
modules-right = coregraph ramgraph lan-network
; Position of the system tray window
; If empty or undefined, tray support will be disabled
; NOTE: A center aligned tray will cover center aligned modules
;
; Available positions:
; left
; center
; right
; none
;tray-position = right
; If true, the bar will not shift its
; contents when the tray changes
;tray-detached = false
; Tray icon max size
;tray-maxsize = 16
; Background color for the tray container
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
; By default the tray container will use the bar
; background color.
;tray-background = ${root.background}
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
tray-offset-x = 0
;tray-offset-y = 0
; Pad the sides of each tray icon
;tray-padding = 0
; Scale factor for tray clients
;tray-scale = 1.0
[bar/dkvga-bar]
inherit = bar/master-02
modules-left = appmenu dk-workspaces dklayouts
modules-center = chronos
modules-right = filesystem
; Position of the system tray window
; If empty or undefined, tray support will be disabled
; NOTE: A center aligned tray will cover center aligned modules
;
; Available positions:
; left
; center
; right
; none
;tray-position = right
; If true, the bar will not shift its
; contents when the tray changes
;tray-detached = false
; Tray icon max size
;tray-maxsize = 16
; Background color for the tray container
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
; By default the tray container will use the bar
; background color.
;tray-background = ${root.background}
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
tray-offset-x = 0
;tray-offset-y = 0
; Pad the sides of each tray icon
;tray-padding = 0
; Scale factor for tray clients
;tray-scale = 1.0
the only difference in the master files is the monitor to use:
[bar/master]
; Use either of the following command to list available outputs:
; If unspecified, the application will pick the first one it finds.
; $ polybar -m | cut -d ':' -f 1
; $ xrandr -q | grep " connected" | cut -d ' ' -f1
monitor = HDMI1
; Use the specified monitor as a fallback if the main one is not found.
monitor-fallback = HDMI1
; Require the monitor to be in connected state
; XRandR sometimes report my monitor as being disconnected (when in use)
monitor-strict = false
[bar/master-02]
; Use either of the following command to list available outputs:
; If unspecified, the application will pick the first one it finds.
; $ polybar -m | cut -d ':' -f 1
; $ xrandr -q | grep " connected" | cut -d ' ' -f1
monitor = VGA1
; Use the specified monitor as a fallback if the main one is not found.
monitor-fallback = VGA1
; Require the monitor to be in connected state
; XRandR sometimes report my monitor as being disconnected (when in use)
monitor-strict = false
similar to bspwm, a separate workspace module for dk:
[module/dk-workspaces]
type = internal/xworkspaces
pin-workspaces = true
enable-click = true
enable-scroll = false
format-padding = 0
icon-0 = 1;
icon-1 = 2;
icon-2 = 3;
icon-3 = 4;
icon-4 = 5;
icon-5 = 6;
icon-6 = 7;
icon-7 = 8;
icon-8 = 9;
icon-9 = 10;
icon-default =
format = <label-state>
label-active = " %name% "
label-active-foreground = ${colors.white}
label-active-background = ${colors.darkgray}
label-active-underline = ${colors.darkgray}
label-occupied = " %name% "
label-occupied-foreground = ${colors.gray}
lable-occupied-background = ${colors.background}
label-occupied-underline = ${colors.background}
label-urgent = " %name% "
label-urgent-foreground = ${colors.white}
label-urgent-background = ${colors.urgent}
label-urgent-underline = ${colors.urgent}
label-empty = " %name% "
label-empty-foreground = ${colors.dimgray}
label-empty-background = ${colors.background}
;label-empty-underline = ${colors.background}
Everything else is pretty much stock polybar modules.