siduck / dotfiles

dotfiles for my beautiful rices!
910 stars 75 forks source link

Polybar Setup with stock ubuntu? #18

Closed kaykhan closed 1 year ago

kaykhan commented 2 years ago

Is it possible to get your polybar theme setup with stock ubuntu 22, i dont use any window manager, other than ubuntu workspaces.

I setup the files/folders and ran polybar and i get a bunch of errors/warnings.

notice: Parsing config file: /home/kay/.config/polybar/config.ini
error: Invalid value for "bar/example.foreground", using default value (reason: "base07" is an invalid color value.)
notice: Loading module 'round-left' of type 'custom/text'
notice: Loading module 'bspwm' of type 'internal/bspwm'
error: Disabling module "bspwm" (reason: Could not find socket: /tmp/bspwm_1_0-socket)
notice: Loading module 'round-right' of type 'custom/text'
notice: Loading module 'empty-space' of type 'custom/text'
notice: Loading module 'round-left' of type 'custom/text'
notice: Loading module 'polywins' of type 'custom/script'
notice: Loading module 'round-right' of type 'custom/text'
notice: Loading module 'alsa' of type 'internal/alsa'
error: Invalid value for "module/alsa.format-muted-foreground", using default value (reason: "base07" is an invalid color value.)
error: Invalid value for "module/alsa.label-volume-foreground", using default value (reason: "base07" is an invalid color value.)
notice: Loading module 'round-left' of type 'custom/text'
notice: Loading module 'cpu' of type 'internal/cpu'
notice: Loading module 'round-right' of type 'custom/text'
error: Disabling module "updates" (reason: Missing section "module/updates")
notice: Loading module 'wlan' of type 'internal/network'
error: Disabling module "wlan" (reason: Invalid network interface "wlp2s0")
notice: Loading module 'mem' of type 'custom/script'
notice: Loading module 'xbacklight' of type 'internal/xbacklight'
error: module/xbacklight: Could not get data (err: XCB_NAME (15))
error: Disabling module "xbacklight" (reason: Not supported for "HDMI-0")
notice: Loading module 'round-left' of type 'custom/text'
notice: Loading module 'time' of type 'internal/date'
notice: Loading module 'round-right' of type 'custom/text'
notice: Loading module 'powermenu' of type 'custom/text'
notice: Loaded 15 modules
notice: Loaded font "JetBrainsMono Nerd Font:style=Bold:pixelsize=9" (name=DejaVu Sans, offset=3, file=/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf)
notice: Loaded font "JetBrainsMono Nerd Font:size=14" (name=DejaVu Sans, offset=4, file=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf)
notice: Loaded font "Material Design Icons:style=Bold:size=9" (name=DejaVu Sans, offset=3, file=/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf)
notice: Loaded font "unifont:fontformat=truetype:size=9" (name=Unifont, offset=3, file=/home/kay/.local/share/fonts/1unifont-14.0.04.ttf)
error: Failed to restack bar window
warn: Systray selection already managed (window=0x0600d04)
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character 󰚙 (U+f0699) in ' 󰚙 '
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+f85a) in '  '
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character 󰥔 (U+f0954) in '󰥔 11:05'
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+f011) in '   '
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character 󰚙 (U+f0699) in ' 󰚙 '
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+f85a) in '  '
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character 󰥔 (U+f0954) in '󰥔 11:05'
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+f011) in '   '
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character 󰚙 (U+f0699) in ' 󰚙 '
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+f85a) in '  '
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character 󰥔 (U+f0954) in '󰥔 11:05'
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+f011) in '   '
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character 󰚙 (U+f0699) in ' 󰚙 '
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+f85a) in '  '
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character 󰥔 (U+f0954) in '󰥔 11:05'
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+f011) in '   '
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character 󰚙 (U+f0699) in ' 󰚙 '
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+f85a) in '  '
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character 󰥔 (U+f0954) in '󰥔 11:05'
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+f011) in '   '
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character 󰚙 (U+f0699) in ' 󰚙 '
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+f85a) in '  '
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character 󰥔 (U+f0954) in '󰥔 11:05'
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+f011) in '   '
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character 󰚙 (U+f0699) in ' 󰚙 '
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+f85a) in '  '
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character 󰥔 (U+f0954) in '󰥔 11:05'
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+f011) in '   '

fonts:

/home/kay/.local/share/fonts/JetBrains Mono Regular Nerd Font Complete Mono.ttf /home/kay/.local/share/fonts/MaterialDesignIconsDesktop.ttf /home/kay/.local/share/fonts/unifont-14.0.04.ttf

siduck commented 2 years ago

hi, really sorry i totally forgot about this issue! I think you can remove the bspwm module in the config and replace it with xworkspaces module ( check polybar docs )

kaykhan commented 1 year ago

@siduck thanks, i finally got time to try this again and im still a little bit stuck.

This is what it looks like right now image

Not sure what im missing.

  1. xrdb -merge ~/.Xresources
  2. I have the fonts unifont, jetbrains and material icons

My polybar looks nothing like your fluxbox screenshot ( i can get the polybar-themes examples working but not your config)

notice: Parsing config file: /home/kay/.config/polybar/config.ini
notice: Loading module 'round-left' of type 'custom/text'
notice: Loading module 'workspaces' of type 'internal/xworkspaces'
notice: Loading module 'round-right' of type 'custom/text'
notice: Loading module 'volume' of type 'custom/script'
notice: Loading module 'battery' of type 'internal/battery'
error: Disabling module "battery" (reason: No suitable way to get current charge state)
notice: Loading module 'round-left' of type 'custom/text'
notice: Loading module 'cpu' of type 'internal/cpu'
notice: Loading module 'round-right' of type 'custom/text'
error: Disabling module "updates" (reason: Missing section "module/updates")
notice: Loading module 'wlan' of type 'internal/network'
error: Disabling module "wlan" (reason: Invalid network interface "wlp2s0")
notice: Loading module 'mem' of type 'custom/script'
notice: Loading module 'xbacklight' of type 'internal/xbacklight'
error: module/xbacklight: Could not get data (err: XCB_NAME (15))
error: Disabling module "xbacklight" (reason: Not supported for "XWAYLAND0")
notice: Loading module 'round-left' of type 'custom/text'
notice: Loading module 'time' of type 'internal/date'
notice: Loading module 'round-right' of type 'custom/text'
notice: Loading module 'powermenu' of type 'custom/text'
notice: Loaded 12 modules
notice: Loaded font "JetBrainsMono Nerd Font:style=Bold:pixelsize=9" (name=DejaVu Sans, offset=3, file=/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf)
notice: Loaded font "JetBrainsMono Nerd Font:size=14" (name=DejaVu Sans, offset=4, file=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf)
notice: Loaded font "Material Design Icons:style=Bold:size=9" (name=DejaVu Sans, offset=3, file=/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf)
notice: Loaded font "unifont:fontformat=truetype:size=9:antialias=true" (name=Unifont, offset=0, file=/home/kay/.fonts/unifont-14.0.04.ttf)
warn: Systray selection already managed (window=0x080095c)
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+f027) in '  63 '
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+f85a) in '  '
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character 󰥔 (U+f0954) in '󰥔 21:26'
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+f011) in '   '
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+f027) in '  63 '
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character  (U+f85a) in '  '
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+e0b6) in ''
warn: Dropping unmatched character 󰥔 (U+f0954) in '󰥔 21:26'
warn: Dropping unmatched character  (U+e0b4) in ''
warn: Dropping unmatched character  (U+f011) in '   '

Config.ini

;==========================================================
;
;
;   ██████╗  ██████╗ ██╗  ██╗   ██╗██████╗  █████╗ ██████╗
;   ██╔══██╗██╔═══██╗██║  ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
;   ██████╔╝██║   ██║██║   ╚████╔╝ ██████╔╝███████║██████╔╝
;   ██╔═══╝ ██║   ██║██║    ╚██╔╝  ██╔══██╗██╔══██║██╔══██╗
;   ██║     ╚██████╔╝███████╗██║   ██████╔╝██║  ██║██║  ██║
;   ╚═╝      ╚═════╝ ╚══════╝╚═╝   ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝
;
;
;   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:background}
foreground = ${xrdb:foreground}

color0 = ${xrdb:color0}
color1 = ${xrdb:color1}
color2 = ${xrdb:color2}
color3 = ${xrdb:color3}
color4 = ${xrdb:color4}
color5 = ${xrdb:color5}
color6 = ${xrdb:color6}
color7 = ${xrdb:color7}
color8 = ${xrdb:color8}
color9 = ${xrdb:color9}
color10 = ${xrdb:color10}
color11 = ${xrdb:color11}
color12 = ${xrdb:color12}
color13 = ${xrdb:color13}
color14 = ${xrdb:color14}
color15 = ${xrdb:color15}
dark-light = #272A2B 
active-light = #313435

[bar/example]
tray-position = right
monitor = XWAYLAND0
width =  100%
height = 18
padding-left =1
padding-right =0

background = ${colors.background}
foreground = ${colors.foreground}
bottom = false
border-top-size = 5
border-bottom-size = 5
border-top-color = ${colors.background}
border-bottom-color = ${colors.background}

line-size = 2

modules-left = round-left workspaces round-right 
modules-center =   
modules-right =  volume battery  round-left cpu round-right updates wlan mem xbacklight round-left time  round-right  powermenu

font-0 = JetBrainsMono Nerd Font:style=Bold:pixelsize=9;3
font-1 = JetBrainsMono Nerd Font:size=14;4
font-2 = Material Design Icons:style=Bold:size=9;3
font-3 = unifont:fontformat=truetype:size=9:antialias=true;

[module/round-left]
type = custom/text
content = %{T3}%{T-}
content-foreground = #282c34

[module/round-right]
type = custom/text
content = %{T3}%{T-}
content-foreground = #282c34

[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 70

format = <ramp> <label>
format-warn = <ramp> <label-warn>
format-padding = 1
label = %temperature%
label-warn = %temperature%
ramp-0 =  "󰜗" 
ramp-font = 3
ramp-foreground = #a4ebf3

[module/workspaces]
type = internal/xworkspaces
pin-workspaces = true
enable-click = true
enable-scroll = true
format-padding = 0

icon-0 =  ; 
icon-1 =  ; 
icon-2 =  ; 
icon-3 =  ; 
icon-4 =  ; 

icon-default = 

format = <label-state>
format-background = #282c34
label-active = %name%
label-occupied = %name%
label-urgent = %icon%
label-empty = %name%

label-occupied-padding = 1
label-empty-padding = 1
label-urgent-padding = 1
label-active-padding = 1

label-active-foreground =  #d47d85
label-occupied-foreground = #a2a8b5
label-empty-foreground =  #6f737b

[module/alsa]
type = internal/alsa
format-volume = <label-volume> <bar-volume>
label-volume = " "  
label-volume-foreground = ${colors.foreground}
format-muted-foreground = ${colors.foreground}
label-muted = 󰚙

format-muted-padding = 1

bar-volume-width = 10
bar-volume-foreground-0 = #61afef
bar-volume-foreground-1 = #61afef
bar-volume-foreground-2 = #61afef
bar-volume-foreground-3 = #61afef
bar-volume-foreground-4 = #61afef
bar-volume-foreground-5 = #61afef
bar-volume-foreground-6 = #61afef
bar-volume-gradient = false
bar-volume-indicator = 
bar-volume-indicator-foreground = #61afef
bar-volume-indicator-font = 2
bar-volume-fill = ━ 
bar-volume-fill-foreground = #61afef
bar-volume-fill-font = 2
bar-volume-empty = ━
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground}
format-volume-padding = 2

[module/time]
type = internal/date
interval = 60
format = <label>
format-background = #282c34
format-foreground = #82868e
date = 󰥔 %H:%M%{F-}
time-alt = 󰃭 %a, %b %d%{F-}
label = %date%%time%

[module/mem]
type = custom/script
#exec = free -m | sed -n 's/^Mem:\s\+[0-9]\+\s\+\([0-9]\+\)\s.\+/\1/p'
format = <label>
format-prefix = "﬙ " 
label = %output% MB
label-padding = 1
format-prefix-foreground = #d19a66

[module/powermenu]
type = custom/text 
content =" " 
content-padding = 2
click-left = doas zzz &
content-foreground = #f25287

[module/wlan]
type = internal/network
interface = wlp2s0
interval = 3.0
format-connected =  <label-connected>
label-connected = "󰤪  " 
label-connected-foreground = #A3BE8C 

[module/battery]
type = internal/battery
battery = BAT1
adapter = AC0
full-at = 98

format-charging = <animation-charging> <label-charging>
label-charging = %percentage%%
format-charging-foreground = ${colors.color4}
format-charging-background = ${colors.background}

format-discharging = <ramp-capacity> <label-discharging>
label-discharging = %percentage%%
format-discharging-foreground = ${colors.foreground}
format-discharging-background = ${colors.background}

format-full-prefix = "  "
format-full-prefix-foreground = #A0E8A2
format-foreground = ${colors.color4}
format-background = ${colors.background}

label-discharging-foreground = ${colors.foreground}
ramp-capacity-foreground =  #A0E8A2  
label-charging-foreground = ${colors.foreground}

label-padding = 1

ramp-capacity-0 = "  " 
ramp-capacity-1 = "  " 
ramp-capacity-2 = "  " 
ramp-capacity-3 = "  " 
ramp-capacity-4 = "  "

animation-charging-0 = "  " 
animation-charging-1 = "  " 
animation-charging-2 = "  " 
animation-charging-3 = "  " 
animation-charging-4 = "  "

animation-charging-foreground = #DF8890
animation-charging-framerate = 750

format-charging-padding = 1
format-discharging-padding = 1

[module/volume]
type = custom/script
exec = amixer get Master | awk '$0~/%/{print $4}' | tr -d '[]'
format = <label>
internal = 5.0
label = %output% 
label-foreground = #BF616A
label-padding = 1

[module/xbacklight]
type = internal/xbacklight
format = <label>
format-prefix = "  "
label = %percentage%
format-prefix-foreground = #61afef
label-foreground =   #D8DEE9
format-padding = 1

[module/cpu]
type = internal/cpu
interval = 2.5

format-prefix ="  " 
format =  <label> 

label = CPU %percentage%%
format-background = #282c34
format-foreground = #989cff

[module/xwindow]
type = internal/xwindow
label = %title:0:30:...
siduck commented 1 year ago

no idea @kaykhan the icons should work