Simplify i3 workspaces with polybar icons

This commit is contained in:
Marty Oehme 2019-12-02 21:14:39 +01:00
parent 8be1b224f9
commit 430b018e74
3 changed files with 23 additions and 11 deletions

View file

@ -101,8 +101,8 @@ bindsym $mod+g gaps inner current set 0; gaps outer current set 0; exec picom_to
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1:"
set $ws2 "2:"
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
@ -110,7 +110,7 @@ set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10:"
set $ws10 "10"
# switch to workspace
bindsym $mod+1 workspace $ws1
@ -206,7 +206,7 @@ exec_always --no-startup-id polybar-launch simple-top
# default workspaces for most used apps
# assign [class="^qutebrowser$"] → number 1
# spotify needs for_window, see https://i3wm.org/docs/userguide.html#assign_workspace
for_window [class="^spotify$"] number "10:"
for_window [class="^spotify$"] number 10
# autostart often used apps
# needs to be done like this to both automatically start the apps on correct workspace

View file

@ -19,11 +19,11 @@ wait_for_program() {
done
}
i3-msg "workspace number 2:"
i3-msg "workspace number 2"
alacritty &
wait_for_program
i3-msg "workspace number 10:"
i3-msg "workspace number 10"
spotify &
wait_for_program
@ -31,7 +31,7 @@ i3-msg "workspace number 9"
keybase &
wait_for_program
i3-msg "workspace number 1:"
i3-msg "workspace number 1"
qutebrowser &
wait_for_program

View file

@ -93,6 +93,18 @@ format = <label-state> <label-mode>
; removes numbers for workspaces which have distinct names / icons
strip-wsnumbers = true
ws-icon-0 = 1;
ws-icon-1 = 2;
ws-icon-2 = 3;3
ws-icon-3 = 4;4
ws-icon-4 = 5;5
ws-icon-5 = 6;6
ws-icon-6 = 7;7
ws-icon-7 = 8;8
ws-icon-8 = 9;
ws-icon-9 = 10;
ws-icon-default = ♟
; Available tokens:
; %name%
; %icon%
@ -100,22 +112,22 @@ strip-wsnumbers = true
; %output%
; Default: %icon% %name%
; unfocused = Inactive workspace on any monitor
label-unfocused = %name%
label-unfocused = %icon%
label-unfocused-padding = 4
label-unfocused-underline = ${colors.background-alt}
; focused = Active workspace on focused monitor
label-focused = %name%
label-focused = %icon%
label-focused-foreground = ${colors.foreground}
label-focused-background = ${colors.background-alt}
label-focused-underline = ${colors.primary}
label-focused-padding = ${self.label-unfocused-padding}
; visible = Active workspace on unfocused monitor
label-visible = %name%
label-visible = %icon%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-unfocused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %name%
label-urgent = %icon%
label-urgent-background = ${colors.alert}
label-urgent-padding = ${self.label-unfocused-padding}