-
-
Notifications
You must be signed in to change notification settings - Fork 717
Closed
Labels
Description
Checklist
- I have read the appropriate section in the contributing guidelines
- I believe this issue is a problem with polybar itself and not a misconfiguration on my part
- I have searched for other open and closed issues that may have already reported this problem
- I have checked the known issues page for this problem.
- I have followed the debugging guide to narrow down the problem to a minimal config.
Steps to reproduce
- Install polybar, either from source or from package manager.
- Launch it.
- The error message : "error: Uncaught exception, shutting down: stof"
This happened right after I upgrade my system packages, I believe that this is caused because Polybar doesn't support the new version of GCC. But I might be wrong. Every single modules have been disabled, I already tried to build from the source, yet the error still occurs. It looks like Polybar is having a problem with std::stof . But I am not experienced in C++, so I might be wrong.
Minimal config
# anokidev's dotfiles : Polybar.
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
;background = ${xrdb:color0:#222}
background = #222
background-alt = #444
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
foreground-alt = #555
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[bar/example]
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 25
radius = 0
line-color = #2a51bd
line-size = 2
border-color = #251db5
border-top = false
border-left = false
border-right = false
font-0 = MesloLGS NF:style=Regular:size=15;2
font-1 = MesloLGS NF:size=15:antialias=false;0
font-2 = MesloLGS NF:pixelsize=15
tray-position = none
tray-padding = 40
wm-restack = i3
top = true
cursor-click = pointer
cursor-scroll = ns-resize
module-padding = 40
[global/wm]
margin-top = 5
margin-bottom = 5
padding-left = 8
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
; Only show workspaces on the same output as the bar
;pin-workspaces = true
label-mode-padding = 1
label-mode-foreground = #fff
label-mode-background = ${colors.primary}
; focused = Active workspace on focused monitor
label-focused = %index%
label-focused-foreground = #fff
label-focused-background = #2a51bd
label-focused-padding = 1
; unfocused = Inactive workspace on any monitor
label-unfocused = %index%
label-unfocused-padding = 1
; visible = Active workspace on unfocused monitor
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %index%
label-urgent-background = ${colors.alert}
label-urgent-padding = 1
; Separator in between workspaces
;label-separator = |
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-background = #00577d
label-layout = "KL : %layout%"
label-indicator-padding = 2
label-indicator-margin = 1
label-padding = 1
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = " %{F#fff}%mountpoint%%{F-}: %percentage_used%% "
label-unmounted = %mountpoint% is not mounted.
format-prefix = " "
format-mounted-background = #0070a1
format-unmounted-foreground = ${colors.foreground-alt}
label-padding = 1
[module/spotify]
type = custom/script
interval = 1
format-prefix = " "
format = <label>
exec = python3 ~/.config/polybar/spotify.py
format-underline = #1db954
;control players (optional)
click-left = playerctl --player=spotify play-pause
click-right = playerctl --player=spotify next
click-middle = playerctl --player=spotify previous
[module/cpu]
type = internal/cpu
interval = 1
format-prefix = " "
format-foreground = #ffffff
format-background = #004b6e
format-warn-background = #ff0000
label-padding = 1
label = "CPU : %percentage-core1%% | %percentage-core2%%"
[module/memory]
type = internal/memory
interval = 1
format-prefix = " "
format-foreground = #ffffff
format-background = #004463
format-warn-foreground = #ff0000
label-padding = 1
label = "RAM : %percentage_used%%"
[module/temperature]
;https://github.com/jaagr/polybar/wiki/Module:-temperature
type = internal/temperature
; Thermal zone to use
; To list all the zone types, run
; $ for i in /sys/class/thermal/thermal_zone*; do echo "$i: $(<$i/type)"; done
; Default: 0
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
format-foreground = ${colors.foreground}
format-background = #052b42
format-prefix = " "
label = %temperature-c%
label-warn = %temperature-c%
format-warn-foreground = #c7254f
label-padding = 1
ramp-0 = " "
ramp-1 = " "
ramp-2 = " "
ramp-3 = " "
ramp-4 = " "
ramp-foreground =${colors.foreground}
[module/eth]
type = internal/network
interface = enp4s0
interval = 3.0
format = <label>
format-connected-background = #004f70
format-connected-prefix = " "
format-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
format-disconnected-background = #ff0000
format-padding = 2
label-connected = " Eth : ON "
label-disconnected = "Eth : OFF "
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
[module/wlan]
type = internal/network
interface = wlan0
interval = 3.0
format-connected = <ramp-signal> <label-connected>
format-connected-underline = #9f78e1
label-padding = 1
label-connected = %essid%
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-0 =
ramp-signal-1 =
ramp-signal-2 =
ramp-signal-3 =
ramp-signal-4 =
ramp-signal-foreground = ${colors.foreground-alt}
[module/pulseaudio]
type = internal/pulseaudio
format-volume = <label-volume> <bar-volume>
label-volume = VOL %percentage%%
label-volume-foreground = ${root.foreground}
label-muted = 🔇 muted
label-muted-foreground = #666
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/alsa]
type = internal/alsa
format-volume = <label-volume> <bar-volume>
label-volume = VOL
label-volume-foreground = ${root.foreground}
format-muted-prefix = " "
format-muted-foreground = ${colors.foreground-alt}
label-muted = sound muted
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/pulseaudio-control]
type = custom/script
tail = true
format-background = #00608a
label-padding = 1
label-foreground = ${colors.foreground}
# Icons mixed from Font Awesome 5 and Material Icons
# You can copy-paste your options for each possible action, which is more
# trouble-free but repetitive, or apply only the relevant ones (for example
# --sink-blacklist is only needed for next-sink).
exec = pulseaudio-control --icons-volume " , " --icon-muted " " listen
click-right = exec pavucontrol &
click-left = pulseaudio-control togmute
click-middle = pulseaudio-control --sink-blacklist "alsa_output.pci-0000_01_00.1.hdmi-stereo-extra2" next-sink
scroll-up = pulseaudio-control --volume-max 130 up
scroll-down = pulseaudio-control --volume-max 130 down
[module/battery]
type = internal/battery
battery = BAT0
adapter = AC
full-at = 98
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/powermenu]
type = custom/menu
expand-right = true
format-background = #003247
label-open = " ⏻ "
label-open-foreground = #ffffff
label-close = " cancel "
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
label-padding = 1
menu-0-0 = " Shutdown "
menu-0-0-exec = menu-open-2
menu-0-1 = " Reboot "
menu-0-1-exec = menu-open-1
menu-1-0 = " Yes "
menu-1-0-exec = reboot
menu-1-1 = " No "
menu-1-1-exec = menu-open-0
menu-2-0 = " Yes "
menu-2-0-exec = poweroff
menu-2-1 = " No "
menu-2-1-exec = menu-open-0
[module/xbacklight]
type = internal/xbacklight
format = <label> <bar>
label = BL
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #fff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/date]
type = internal/date
interval = 5
date = "%d-%m-%Y "
time = "%H:%M"
time-alt = "%H:%M"
format-prefix =
format-prefix-foreground = ${colors.foreground-alt}
format-background = #00405e
label = "%date%%time%"
label-padding = 1
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;pseudo-transparency = false
; vim:ft=dosini
Polybar log
notice: Parsing config file: /home/ratpipe/.config/polybar/config.ini
warn: No monitor specified, using "VGA-0"
* Loaded monitor VGA-0 (1440x900+0+0)
* Configured DPI = 96x96
error: Uncaught exception, shutting down: stof
* Waiting for spawned processes to end
* Reached end of application...
Expected behavior
Polybar launching without any issue.
Actual behavior
Polybar immediately crashed after launching it from CLI or from script files.
Window Manager and Version
i3-gaps 4.20.1
Linux Distribution
Manjaro Linux with kernel 5.15.38
Polybar version
polybar 3.6.3-45-g1ee11f7c
Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard
X extensions: +randr (+monitors) +composite +xkb +xrm +xcursor
Build type: Release
Compiler: /sbin/clang++
Compiler flags: -O3 -DNDEBUG -Wall -Wextra -Wpedantic -Wsuggest-override -Wno-error=parentheses-equality -Wno-zero-length-array
Linker flags: -Wall -Wextra -Wpedantic -Wsuggest-override -Wno-error=parentheses-equality -Wno-zero-length-array -Wall -Wextra -Wpedantic -Wsuggest-override -Wno-error=parentheses-equality -Wno-zero-length-array