diff options
author | Loek Le Blansch <l.leblansch@gmail.com> | 2020-06-21 22:05:17 +0200 |
---|---|---|
committer | Loek Le Blansch <l.leblansch@gmail.com> | 2020-06-21 22:05:17 +0200 |
commit | 47a4416df21412a9184a9b5045233260c1cb80bb (patch) | |
tree | bd5463ec7698868ab61d84a1ae0af1ebd4984ce8 /.config/polybar |
dots v2
Diffstat (limited to '.config/polybar')
-rw-r--r-- | .config/polybar/config.ini | 358 | ||||
-rw-r--r-- | .config/polybar/onstart.sh | 3 | ||||
-rwxr-xr-x | .config/polybar/player-mpris-simple.sh | 9 |
3 files changed, 370 insertions, 0 deletions
diff --git a/.config/polybar/config.ini b/.config/polybar/config.ini new file mode 100644 index 0000000..a24f161 --- /dev/null +++ b/.config/polybar/config.ini @@ -0,0 +1,358 @@ +[barsettings] +padding = 1.9 + +[global/wm] +margin-bottom = 50 +margin-top = 0 + +[bar/main] + +; tray-position = right +; tray-padding = ${barsettings.padding} +; tray-background = ${color.bg} +; tray-margin = 0 + +monitor = + +monitor-fallback = + +monitor-strict = false + +override-redirect = false + +bottom = false + +fixed-center = true + +width = 100% +height = 16 + +offset-x = 0 +offset-y = 0 + +background = ${color.alpha} + +foreground = ${color.fg} + +radius-top = 0.0 +radius-bottom = 0.0 + +padding = 0 + +module-margin-left = 0 +module-margin-right = 0 + +font-0 = "Scientifica:weight=regular:size=4;2" +font-1 = "Weather Icons:antialias=false:size=6;2" +font-2 = "Siji:size=8;2" +font-3 = "Material Design Icons:antialias=false:size=8;2" +font-4 = "Fira Code:size=10;2" + +modules-center = onstart time weather date alsa + +separator = + +spacing = 0 + +dim-value = 1.0 + +wm-name = + +locale = + +wm-restack = i3 + +enable-ipc = true + +click-left = +click-middle = +click-right = +scroll-up = +scroll-down = +double-click-left = +double-click-middle = +double-click-right = + +cursor-click = +cursor-scroll = + +[settings] +throttle-output = 5 +throttle-output-for = 10 + +throttle-input-for = 30 + +screenchange-reload = false + +compositing-background = source +compositing-foreground = over +compositing-overline = over +compositing-underline = over +compositing-border = over + +format-foreground = +format-background = +format-underline = +format-overline = +format-spacing = +format-padding = +format-margin = +format-offset = + +pseudo-transparency = false + +[color] + +bg = #141415 +fg = #c4c4c4 +fg-alt = #141415 + +alpha = #00000000 + +shade1 = #3F3330 +shade2 = #4C423E +shade3 = #59514C +shade4 = #66615A + +shade-fg = #c4c4c4 + +[module/alsa] +type = internal/alsa + +format-volume = <ramp-volume> <label-volume> +format-volume-background = ${color.shade4} +format-volume-foreground = ${color.shade-fg} +format-volume-padding = ${barsettings.padding} + +label-volume = %percentage%% + +format-muted-prefix = " " +format-muted-background = ${color.shade-fg} +format-muted-foreground = ${color.shade4} +format-muted-padding = ${barsettings.padding} +label-muted = "Muted" + +ramp-volume-0 = +ramp-volume-1 = +ramp-volume-2 = + +ramp-headphones-0 = +ramp-headphones-1 = + +[module/battery] +type = internal/battery + +full-at = 99 +battery = BAT1 +adapter = ACAD +poll-interval = 2 +time-format = %H:%M + +format-charging = <animation-charging> <label-charging> +format-charging-background = ${color.shade3} +format-charging-foreground = ${color.fg-alt} +format-charging-padding = ${barsettings.padding} + +format-discharging = <ramp-capacity> <label-discharging> +format-discharging-background = ${color.shade3} +format-discharging-foreground = ${color.fg-alt} +format-discharging-padding = ${barsettings.padding} + +format-full = <label-full> +format-full-background = ${color.shade3} +format-full-foreground = ${color.fg-alt} +format-full-padding = ${barsettings.padding} + +label-charging = %percentage%% +label-discharging = %percentage%% +label-full = 100% Charged + +ramp-capacity-0 = +ramp-capacity-1 = +ramp-capacity-2 = +ramp-capacity-3 = +ramp-capacity-4 = +ramp-capacity-5 = +ramp-capacity-6 = +ramp-capacity-7 = +ramp-capacity-8 = +ramp-capacity-9 = + +animation-charging-0 = +animation-charging-1 = +animation-charging-2 = +animation-charging-3 = + +animation-charging-framerate = 750 + +[module/cpu] +type = internal/cpu + +interval = 1 + +format = <label> +format-prefix = +format-background = ${color.bg} +format-foreground = ${color.shade2} +format-padding = ${barsettings.padding} + +label = " %percentage%%" + +[module/date] +type = internal/date +interval = 1.0 +time = %A, %B %d +format = <label> +format-background = ${color.shade3} +format-foreground = ${color.shade-fg} +format-padding = ${barsettings.padding} + +label = %time% + +[module/time] +type = internal/date +interval = 1.0 +time = %H:%M +format = <label> +format-background = ${color.shade1} +format-foreground = ${color.shade-fg} +format-padding = ${barsettings.padding} + +label = %time% + +[module/memory] +type = internal/memory + +interval = 3 + +format = <label> +format-prefix = +format-background = ${color.bg} +format-foreground = ${color.shade1} +format-padding = ${barsettings.padding} + +label = " %mb_used%" + +[module/packages] +type = custom/script +exec = echo " `pacman -Q | wc -l`" +format-padding = ${barsettings.padding} +interval = 60 +format-background = ${color.bg} +format-foreground = ${color.shade3} + +[module/player-mpris-simple] +type = custom/script +exec = ~/.config/polybar/player-mpris-simple.sh +interval = 3 +format-background = ${color.bg} +format-foreground = ${color.fg} +format-padding = ${barsettings.padding} +click-middle = playerctl previous & +click-right = playerctl next & +click-left = playerctl play-pause & + +[module/weather] +type = custom/script +exec = ~/.config/polybar-forecast/target/release/polybar-forecast +interval = 120 +exec-if = ping openweathermap.org -c 1 +label-font = 2 +format-background = ${color.shade2} +format-foreground = ${color.shade-fg} +format-padding = ${barsettings.padding} + +[module/whoami] +type = custom/script +exec = echo "$(whoami)@$(hostname)" +interval = 9999999 +label-font = 2 +format-background = ${color.shade1} +format-foreground = ${color.fg} +format-padding = ${barsettings.padding} + +[module/intip] +type = custom/script +exec = echo "$(ifconfig | grep -Po --color=never '(?<=inet addr:)(192\.\d+.\d+\.\d+)')" +interval = 9999999 +label-font = 2 +format-background = ${color.shade3} +format-foreground = ${color.fg-alt} +format-padding = ${barsettings.padding} +[module/extip] +type = custom/script +exec = echo "$(curl -s ifconfig.me)" +interval = 9999999 +label-font = 2 +format-background = ${color.shade3} +format-foreground = ${color.fg-alt} +format-padding = ${barsettings.padding} + +[module/network] +type = internal/network +interface = wlan0 + +interval = 1.0 +accumulate-stats = true +unknown-as-up = true + +format-connected = <ramp-signal> <label-connected> +format-connected-background = ${color.shade2} +format-connected-foreground = ${color.fg-alt} +format-connected-padding = ${barsettings.padding} + +format-disconnected = <label-disconnected> +format-disconnected-background = ${color.shade2} +format-disconnected-foreground = ${color.fg-alt} +format-disconnected-padding = ${barsettings.padding} + +label-connected = %essid% +label-disconnected = Disconnected + +ramp-signal-0 = +ramp-signal-1 = +ramp-signal-2 = +ramp-signal-3 = +ramp-signal-4 = + +; [module/i3] +; type = internal/xworkspaces + +; pin-workspaces = true + +; enable-click = true +; enable-scroll = true + +; format = <label-state> +; format-padding = 0 + +; label-monitor = %name% + +; label-active = %name% +; label-active-foreground = ${color.bg} +; label-active-background = ${color.shade5} + +; label-occupied = %icon% +; label-occupied-underline = ${color.bg} + +; label-urgent = %icon% +; label-urgent-foreground = ${color.fg} +; label-urgent-background = ${color.bg} + +; label-empty = %name% +; label-empty-background = ${color.bg} +; label-empty-foreground = ${color.fg} + +; label-active-padding = ${barsettings.padding} +; label-urgent-padding = ${barsettings.padding} +; label-occupied-padding = ${barsettings.padding} +; label-empty-padding = ${barsettings.padding} + +[module/onstart] +type = custom/script +exec = sh ~/.config/polybar/onstart.sh > /dev/null +interval = 999999999 +format-background = ${color.alpha} +format-foreground = #ff00ff +format-padding = 0 + diff --git a/.config/polybar/onstart.sh b/.config/polybar/onstart.sh new file mode 100644 index 0000000..033cec0 --- /dev/null +++ b/.config/polybar/onstart.sh @@ -0,0 +1,3 @@ +# Tray below bar :( +sleep 1 +xdo raise -n Polybar -n tray diff --git a/.config/polybar/player-mpris-simple.sh b/.config/polybar/player-mpris-simple.sh new file mode 100755 index 0000000..938ac21 --- /dev/null +++ b/.config/polybar/player-mpris-simple.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +player_status=$(playerctl status 2> /dev/null) + +if [ "$player_status" = "Playing" ] || [ "$player_status" = "Paused" ]; then + echo "$(playerctl metadata artist) - $(playerctl metadata title)" | awk -v len=60 '{ if (length($0) > len) print substr($0, 1, len-3) "..."; else print; }' +else + echo "" +fi |