Use variables for screen identification

That way less has to be changed when using different screens.
This commit is contained in:
finga 2021-11-02 10:51:22 +01:00
parent 6803914a02
commit 97dcd23dca

View file

@ -197,6 +197,10 @@ new_float normal 1
client.focused #000000 #009900 #ffffff #ff0000 client.focused #000000 #009900 #ffffff #ff0000
client.unfocused #000000 #005500 #000000 #ff0000 client.unfocused #000000 #005500 #000000 #ff0000
# use variables for screens
set $screen0 "DP-1"
set $screen1 "HDMI-2"
# Start i3bar to display a workspace bar (plus the system information # Start i3bar to display a workspace bar (plus the system information
# i3status-rust finds out, if available) # i3status-rust finds out, if available)
bar { bar {
@ -207,7 +211,7 @@ bar {
workspace_buttons yes workspace_buttons yes
mode dock mode dock
modifier $mod modifier $mod
output DP-1 output $screen0
colors { colors {
statusline #00ff00 statusline #00ff00
@ -224,7 +228,7 @@ bar {
workspace_buttons yes workspace_buttons yes
mode dock mode dock
modifier $mod modifier $mod
output HDMI-2 output $screen1
colors { colors {
statusline #00ff00 statusline #00ff00
@ -234,14 +238,14 @@ bar {
} }
} }
workspace $ws1 output DP-1 workspace $ws1 output $screen0
workspace $ws2 output DP-1 workspace $ws2 output $screen0
workspace $ws3 output DP-1 workspace $ws3 output $screen0
workspace $ws4 output DP-1 workspace $ws4 output $screen0
workspace $ws5 output DP-1 workspace $ws5 output $screen0
workspace $ws10 output HDMI-2 workspace $ws10 output $screen1
workspace $ws6 output HDMI-2 workspace $ws9 output $screen1
workspace $ws7 output HDMI-2 workspace $ws8 output $screen1
workspace $ws8 output HDMI-2 workspace $ws7 output $screen1
workspace $ws9 output HDMI-2 workspace $ws6 output $screen1