You are not logged in.
I want it to show workspaces as web(1 workspace), term(2 workspace) and so on. I followed the wiki on polybar's github page. https://github.com/polybar/polybar/wiki/Module:-bspwm
I tried the script on the bottom of it. which resulted in:
ws-icon-0 = "1;<insert-icon-here>"
ws-icon-1 = "2;<insert-icon-here>"
ws-icon-2 = "3;<insert-icon-here>"
ws-icon-3 = "4;<insert-icon-here>"
ws-icon-4 = "5;<insert-icon-here>"
ws-icon-5 = "6;<insert-icon-here>"
ws-icon-6 = "7;<insert-icon-here>"
ws-icon-7 = "8;<insert-icon-here>"
ws-icon-8 = "9;<insert-icon-here>"
ws-icon-9 = "10;<insert-icon-here>"
My config file:
ws-icon-0 = "1;web"
ws-icon-1 = "2;term"
ws-icon-2 = "3;mail"
ws-icon-3 = "4;mus"
ws-icon-4 = "5;etc"
ws-icon-5 = "6;6"
ws-icon-6 = "7;7"
ws-icon-7 = "8;8"
ws-icon-8 = "9;9"
ws-icon-9 = "10;10"
What am i doing wrong and how to properly define it?
Last edited by WeebSpirit (2021-12-31 18:33:18)
Offline
I've tried so many different methods. None works, i tried defining them as I II etc, but it still doesn't work, i tried using "" and without them but it still not showing it how i want
Offline
At this point i don't even know what to do. I've tried everything
Offline
Instead of bumping you should provide more detailed information what you actually tried and what your expectations and the results were.
Begin with how you installed polybar.
From what I see, you shoud insert an icon instead of a word where <insert-icon-here> occurs. Did you install siji-git?
Offline
i did install siji-git, polybar was installed from aur. polybar-git package. Icon can be replaced with whatever u want it to dipslay afaik
Offline
What is displayed needs to be defined in bspwm's config file, usually .config/bspwm/bspwmrc, not in polybar's.
e.g.
bspc monitor -d Term geeqie fotoxx Browser V emacs mpv VIII IX X
Last edited by Stefan Husmann (2021-12-30 11:08:15)
Offline
You're wrong, when changing in bspwmrc, it changes how it should be defined, so its not "1;icon" but "web;icon"
Offline
This can be checked by executing the shell script on the bottom of poybar's wiki, bspwm module
Offline
This works for me in the section [module/bspwm] of polybar's config.ini file.
fuzzy-match = true
ws-icon-0 = Term;♚
ws-icon-1 = geeqie;♛
ws-icon-2 = fotoxx;♜
ws-icon-3 = Browser;♝
ws-icon-4 = emacs;♞
ws-icon-default = ♟
Offline
Still i have 1 2 3 but not icons, it doesn't say anything about unmatched characters
Offline
Please share your bspwm-config.
Offline
I copied from you #!/bin/zsh
pgrep -x sxhkd > /dev/null || sxhkd &
bspc monitor -d Term geeqie fotoxx Browser V emacs mpv VIII IX X
bspc config normal_border_color "#4b565c"
bspc config focused_border_color "#a7c080"
bspc config border_width 2
bspc config window_gap 11
bspc config split_ratio 0.52
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc rule -a Gimp desktop='^8' state=floating
bspc rule -a Zathura state=tiled
bspc rule -a Transmission desktop='^10' follow=on
bspc rule -a transmission-gtk desktop='^10' follow=on
And then polybar:
ws-icon-0 = Term;♚
ws-icon-1 = geeqie;♛
ws-icon-2 = fotoxx;♜
ws-icon-3 = Browser;♝
ws-icon-4 = V;a
ws-icon-5 = emacs;♞
ws-icon-default = ♟
Offline
Please use code tags for posting file contents or command line input here.
My example was an example, and pasting it into your config file as is makes no sense unless you want to run geeqie, fotoxx, emacs or mpv on your desktop.
Please post the complete polybar config. As written above the ws-icon stuff mus be written into the [module/bspwm] section.
Offline
bspwm:
#!/bin/zsh
pgrep -x sxhkd > /dev/null || sxhkd &
bspc monitor -d 1 2 3 4 5 6 7 8 9 10
bspc config normal_border_color "#4b565c"
bspc config focused_border_color "#a7c080"
bspc config border_width 2
bspc config window_gap 11
bspc config split_ratio 0.52
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc rule -a Gimp desktop='^8' state=floating
bspc rule -a Zathura state=tiled
bspc rule -a Transmission desktop='^10' follow=on
bspc rule -a transmission-gtk desktop='^10' follow=on
polybar:
[colors]
background = #2b3339
background-alt = #4b565c
foreground = #d3c6aa
foreground-alt = #d3c6aa
primary = #a7c080
secondary = #d3c6aa
alert = #e67e80
[bar/workspaces]
;monitor = ${env:MONITOR:HDMI-1}
width = 30%
height = 29
; offset-x = 1%
; offset-y = 1%
radius = 11
fixed-center = false
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #a7c080
border-size = 6
border-color = #00000000
padding-left = 0
padding-right = 0
module-margin-left = 1
module-margin-right = 2
font-0 = CaskaydiaCove Nerd Font:pixelsize=11;1
modules-left = bspwm
modules-center =
modules-right =
wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
scroll-up = bspwm-desknext
scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = normal
[module/bspwm]
type = internal/bspwm
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
label-occupied = %index%
label-occupied-padding = 2
label-urgent = %index%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
label-empty = %index%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 2
pin-workspaces = true
ws-icon-0 = "1;web"
ws-icon-1 = "2;term"
ws-icon-2 = "3;mail"
ws-icon-3 = "4;mus"
ws-icon-4 = "5;etc"
ws-icon-5 = "6;6"
ws-icon-6 = "7;7"
ws-icon-7 = "8;8"
ws-icon-8 = "9;9"
ws-icon-9 = "10;10"
; Separator in between workspaces
; label-separator = |
[bar/time]
;monitor = ${env:MONITOR:HDMI-1}
width = 5%
height = 29
offset-x = 49.5%
; offset-y = 1%
radius = 11
fixed-center = false
background = ${colors.background}
foreground = ${colors.foreground}
border-size = 6
border-color = #00000000
padding-left = 0
padding-right = 0
module-margin-left = 1
module-margin-right = 2
font-0 = CaskaydiaCove Nerd Font:pixelsize=11;1
modules-left =
modules-center = time
modules-right =
wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
scroll-up = bspwm-desknext
scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = normal
[module/time]
type = internal/date
interval = 5
date =
date-alt = "%Y-%d-%m"
time = %H:%M
time-alt = %H:%M:%S
format-prefix =
format-prefix-foreground = ${colors.foreground}
format-underline = #a7c080
label = %date% %time%
[bar/other]
;monitor = ${env:MONITOR:HDMI-1}
width = 20%
height = 29
offset-x = 80%
; offset-y = 1%
radius = 11
fixed-center = false
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #a7c080
border-size = 6
border-color = #00000000
padding-left = 0
padding-right = 0
module-margin-left = 1
module-margin-right = 2
font-0 = CaskaydiaCove Nerd Font:pixelsize=11;1
modules-left =
modules-center = pulseaudio battery
modules-right =
wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
scroll-up = bspwm-desknext
scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = normal
tray-position = right
tray-padding = 2
tray-background = #2b3339
[module/pulseaudio]
type = internal/pulseaudio
format-volume = <label-volume>
label-volume = 墳 %percentage%%
label-volume-foreground = ${root.foreground}
label-muted = ? muted
label-muted-foreground = #d3c6aa
bar-volume-width = 8
ar-volume-indicator-font = 2
bar-volume-fill-font = 2
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
format-discharging = <animation-discharging> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 =
ramp-capacity-1 =
ramp-capacity-2 =
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 =
animation-charging-1 =
animation-charging-2 =
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
animation-discharging-0 =
animation-discharging-1 =
animation-discharging-2 =
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 750
[module/battery]
type = internal/battery
; This is useful in case the battery never reports 100% charge
full-at = 100
; Use the following command to list batteries and adapters:
; $ ls -1 /sys/class/power_supply/
battery = BAT1
adapter = ACAD
; If an inotify event haven't been reported in this many
; seconds, manually poll for new values.
;
; Needed as a fallback for systems that don't report events
; on sysfs/procfs.
;
; Disable polling by setting the interval to 0.
;
; Default: 5
poll-interval = 5
; see "man date" for details on how to format the time string
; NOTE: if you want to use syntax tags here you need to use %%{...}
; Default: %H:%M:%S
time-format = %H:%M
; Available tags:
; <label-charging> (default)
; <bar-capacity>
; <ramp-capacity>
; <animation-charging>
format-charging = <animation-charging> <label-charging>
; Available tags:
; <label-discharging> (default)
; <bar-capacity>
; <ramp-capacity>
; <animation-discharging>
format-discharging = <ramp-capacity> <label-discharging>
; Available tags:
; <label-full> (default)
; <bar-capacity>
; <ramp-capacity>
;format-full = <ramp-capacity> <label-full>
; Available tokens:
; %percentage% (default) - is set to 100 if full-at is reached
; %percentage_raw%
; %time%
; %consumption% (shows current charge rate in watts)
label-charging = Charging %percentage%%
; Available tokens:
; %percentage% (default) - is set to 100 if full-at is reached
; %percentage_raw%
; %time%
; %consumption% (shows current discharge rate in watts)
label-discharging = Discharging %percentage%%
; Available tokens:
; %percentage% (default) - is set to 100 if full-at is reached
; %percentage_raw%
label-full = 100%
; Only applies if <ramp-capacity> is used
ramp-capacity-0 =
ramp-capacity-1 =
ramp-capacity-2 =
ramp-capacity-3 =
ramp-capacity-4 =
; Only applies if <bar-capacity> is used
bar-capacity-width = 10
; Only applies if <animation-charging> is used
animation-charging-0 =
animation-charging-1 =
animation-charging-2 =
animation-charging-3 =
animation-charging-4 =
; Framerate in milliseconds
animation-charging-framerate = 600
; Only applies if <animation-discharging> is used
animation-discharging-0 =
animation-discharging-1 =
animation-discharging-2 =
animation-discharging-3 =
animation-discharging-4 =
; Framerate in milliseconds
animation-discharging-framerate = 600
; vim:ft=dosini
[global/wm]
margin-top = -5
magin-bottom = 0
Last edited by WeebSpirit (2021-12-31 10:48:19)
Offline
as written before, put [module/bspwm] in front of the ws-icon -tuff
[module/bspwm]
ws-icon-0 = "1;web"
ws-icon-1 = "2;term"
ws-icon-2 = "3;mail"
ws-icon-3 = "4;mus"
ws-icon-4 = "5;etc"
ws-icon-5 = "6;6"
ws-icon-6 = "7;7"
ws-icon-7 = "8;8"
ws-icon-8 = "9;9"
ws-icon-9 = "10;10"
Offline
The %index% token in the bspwm module will always show the workspace index as a number. If you want it to actually use the mapping from ws-icon-*, use the %icon% token.
Offline
WeebSpirit, please edit your post and use [ code ] tags (not quote tags) when posting output. This makes the output easier to read and provides a scroll box for long output.
https://wiki.archlinux.org/title/Genera … s_and_code
https://bbs.archlinux.org/help.php#bbcode
Offline
Thank you! I spent so much time but appears that i only needed to replace %index% with %icon%
The %index% token in the bspwm module will always show the workspace index as a number. If you want it to actually use the mapping from ws-icon-*, use the %icon% token.
Offline