fix polybar dir
This commit is contained in:
parent
ed7a6391a9
commit
6fd3335d60
214
desktop/configs/polybar/.config/polybar/config.ini
Executable file
214
desktop/configs/polybar/.config/polybar/config.ini
Executable file
@ -0,0 +1,214 @@
|
||||
[colors]
|
||||
foreground = #ffffff
|
||||
secondary = #5bb1b4
|
||||
alert = #A54242
|
||||
disabled = #707880
|
||||
|
||||
[settings]
|
||||
screenchange-reload = true
|
||||
pseudo-transparency = true
|
||||
|
||||
[bar/0]
|
||||
width = 100%
|
||||
height = 30pt
|
||||
radius = 20
|
||||
background = #99282c30
|
||||
foreground = ${colors.foreground}
|
||||
line-size = 3pt
|
||||
border-size = 5pt
|
||||
border-color = #00000000
|
||||
padding-left = 4
|
||||
padding-right = 4
|
||||
module-margin = 2
|
||||
separator = " // "
|
||||
separator-foreground = ${colors.disabled}
|
||||
font-0 = "Cartograph CF:size=13;2.5"
|
||||
font-1 = "Ubuntu Nerd Font:size=12;3"
|
||||
font-2 = "Ubuntu Nerd Font:size=12;3"
|
||||
font-3 = "Ubuntu Nerd Font:size=12;3"
|
||||
font-4 = "Ubuntu Nerd Font:size=12;3"
|
||||
font-5 = "Ubuntu Nerd Font:size=10;3"
|
||||
font-6 = "feather:size=14;4"
|
||||
modules-left = powermenu launcher battery volume
|
||||
modules-center = playerctl
|
||||
modules-right = date time wifi
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
enable-ipc = true
|
||||
|
||||
[module/volume]
|
||||
type = internal/pulseaudio
|
||||
format-volume = "<ramp-volume> <label-volume>"
|
||||
label-volume = "%percentage%%"
|
||||
label-muted = "%{F#5bb1b4}%{F-} 0%"
|
||||
|
||||
# The large number of ramps is used to have the mute icon only be displayed for 0% volume
|
||||
ramp-volume-0 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-1 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-2 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-3 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-4 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-5 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-6 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-7 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-8 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-9 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-10 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-11 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-12 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-13 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-14 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-15 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-16 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-17 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-18 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-19 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-20 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-21 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-22 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-23 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-24 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-25 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-26 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-27 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-28 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-29 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-30 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-31 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-32 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-33 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-34 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-35 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-36 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-37 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-38 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-39 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-40 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-41 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-42 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-43 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-44 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-45 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-46 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-47 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-48 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-49 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-50 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-51 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-52 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-53 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-54 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-55 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-56 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-57 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-58 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-59 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-60 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-61 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-62 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-63 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-64 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-65 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-66 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-67 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-68 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-69 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-70 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-71 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-72 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-73 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-74 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-75 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-76 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-77 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-78 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-79 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-80 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-81 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-82 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-83 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-84 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-85 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-86 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-87 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-88 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-89 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-90 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-91 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-92 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-93 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-94 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-95 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-96 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-97 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-98 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-99 = "%{F#5bb1b4}%{F-}"
|
||||
ramp-volume-100 = "%{F#5bb1b4}%{F-}"
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
label = "%{A1:gnome-system-monitor -p:}%{F#5bb1b4}%{F-} %percentage_used:2%%%{A}"
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 0.5
|
||||
label = "%{A1:gnome-system-monitor -r:}%{F#5bb1b4}%{F-} %percentage:2%%%{A}"
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1
|
||||
date = "%d-%m-%Y"
|
||||
time = "%H:%M:%S"
|
||||
label = "%{A1:thunderbird -calendar:}%{F#5bb1b4}%{F-} %date%%{A}"
|
||||
label-foreground = ${colors.secondary}
|
||||
|
||||
[module/time]
|
||||
type = internal/date
|
||||
interval = 1
|
||||
time = "%H:%M:%S"
|
||||
label = "%{F#5bb1b4}%{F-} %time%"
|
||||
|
||||
[module/cpu-temp]
|
||||
type = custom/script
|
||||
exec = echo "%{F#5bb1b4}%{F-} `sensors | grep -Po '(?<=Package id 0: \+)([0-9]{1,3})'`°C"
|
||||
interval = 2
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
full-at = 95
|
||||
battery = BAT0
|
||||
adapter = ADP1
|
||||
poll-interval = 1
|
||||
label-charging = "%{A1:gnome-control-center power:}%{F#5bb1b4}%{F-} %percentage%%%{A}"
|
||||
label-low = "%{A1:gnome-control-center power:}%{F#5bb1b4}%{F-} %percentage%%%{A}"
|
||||
label-discharging = "%{A1:gnome-control-center power:}%{F#5bb1b4}%{F-} %percentage%%%{A}"
|
||||
label-full = "%{A1:gnome-control-center power:}%{F#5bb1b4}%{F-} %percentage%%%{A}"
|
||||
|
||||
[module/playerctl]
|
||||
type = custom/script
|
||||
interval = 0.2
|
||||
exec = '/home/jab/.config/polybar/playerctl.sh' 2> /dev/null
|
||||
|
||||
[module/powermenu]
|
||||
type = custom/text
|
||||
content = "%{F#5bb1b4}%{F-}"
|
||||
click-left = '/home/jab/.config/rofi/powermenu/type-6/powermenu.sh'
|
||||
|
||||
[module/wifi]
|
||||
type = internal/network
|
||||
interface = wlan0
|
||||
format-connected = <label-connected>
|
||||
label-connected = "%{A1:alacritty --command nmtui:}%{F#5bb1b4}%{F-}%{A}"
|
||||
|
||||
[module/launcher]
|
||||
type = custom/text
|
||||
content = "%{F#5bb1b4}%{F-}"
|
||||
click-left = ~/.config/rofi/launchers/type-6/launcher.sh
|
||||
|
||||
[module/wireguard]
|
||||
type = custom/script
|
||||
exec = 'wireguard_selector.sh' polybar_icon
|
||||
interval = 2
|
||||
label = "%output%"
|
||||
click-left = 'wireguard_selector.sh' menu
|
101
desktop/configs/polybar/.config/polybar/everforest.ini
Normal file
101
desktop/configs/polybar/.config/polybar/everforest.ini
Normal file
@ -0,0 +1,101 @@
|
||||
[colors]
|
||||
background = #1e2326
|
||||
background-alt =
|
||||
foreground = #93b259
|
||||
primary = #a7c080
|
||||
secondary = #93b259
|
||||
alert = #394522
|
||||
disabled = #d3c6aa
|
||||
|
||||
[bar/bar0]
|
||||
width = 100%
|
||||
height = 20pt
|
||||
radius = 0
|
||||
tail = true
|
||||
monitor = ${env:MONITOR:fallback-value}
|
||||
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
line-size = 2.8pt
|
||||
|
||||
border-size = 0pt
|
||||
border-color = #00
|
||||
|
||||
padding-left = 1
|
||||
padding-right = 2
|
||||
|
||||
module-margin = 1
|
||||
|
||||
font-0 = CartographCF Nerd Font;2
|
||||
|
||||
modules-left = xworkspaces
|
||||
modules-right = tray xwindow pulseaudio
|
||||
modules-center = date
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
||||
offset-x = 0
|
||||
|
||||
offset-y = 0
|
||||
|
||||
enable-ipc = true
|
||||
|
||||
[module/tray]
|
||||
type = internal/tray
|
||||
|
||||
format-margin = 8px
|
||||
tray-spacing = 8px
|
||||
|
||||
[module/xworkspaces]
|
||||
type = internal/xworkspaces
|
||||
|
||||
label-active = %name%
|
||||
label-active-background = ${colors.background-alt}
|
||||
label-active-underline= ${colors.primary}
|
||||
label-active-padding = 1
|
||||
|
||||
label-occupied = %name%
|
||||
label-occupied-padding = 1
|
||||
|
||||
label-urgent = %name%
|
||||
label-urgent-background = ${colors.alert}
|
||||
label-urgent-padding = 1
|
||||
|
||||
label-empty = %name%
|
||||
label-empty-foreground = ${colors.disabled}
|
||||
label-empty-padding = 1
|
||||
|
||||
[module/xwindow]
|
||||
type = internal/xwindow
|
||||
label = %title:0:30:...%
|
||||
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
|
||||
format-volume-prefix = ""
|
||||
format-volume-prefix-foreground = ${colors.primary}
|
||||
format-volume = <label-volume>
|
||||
|
||||
label-volume = %percentage%%
|
||||
|
||||
label-muted = muted
|
||||
label-muted-foreground = ${colors.disabled}
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1
|
||||
|
||||
date = %R
|
||||
date-alt = %d-%m-%Y %H:%M:%S
|
||||
|
||||
label = %date%
|
||||
label-foreground = ${colors.primary}
|
||||
|
||||
[settings]
|
||||
screenchange-reload = true
|
||||
pseudo-transparency = true
|
||||
|
||||
; vim:ft=dosini
|
174
desktop/configs/polybar/.config/polybar/jabuxas.ini
Normal file
174
desktop/configs/polybar/.config/polybar/jabuxas.ini
Normal file
@ -0,0 +1,174 @@
|
||||
;==========================================================
|
||||
;
|
||||
;
|
||||
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
|
||||
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
|
||||
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
|
||||
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
|
||||
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
|
||||
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
|
||||
;
|
||||
;
|
||||
; To learn more about how to configure Polybar
|
||||
; go to https://github.com/polybar/polybar
|
||||
;
|
||||
; The README contains a lot of information
|
||||
;
|
||||
;==========================================================
|
||||
|
||||
[colors]
|
||||
background = #080808
|
||||
background-alt = #323437
|
||||
foreground = #bdbdbd
|
||||
primary = #79dac8
|
||||
secondary = #36c692
|
||||
alert = #ff5189
|
||||
disabled = #465a61
|
||||
|
||||
[bar/example]
|
||||
monitor = ${env:MONITOR:fallback-value}
|
||||
width = 100%
|
||||
height = 24pt
|
||||
radius = 6
|
||||
|
||||
; dpi = 96
|
||||
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
line-size = 3pt
|
||||
|
||||
border-size = 4pt
|
||||
border-color = #00000000
|
||||
|
||||
padding-left = 0
|
||||
padding-right = 1
|
||||
|
||||
module-margin = 1
|
||||
|
||||
separator = |
|
||||
separator-foreground = ${colors.disabled}
|
||||
|
||||
font-0 = monospace;2
|
||||
|
||||
modules-left = xworkspaces
|
||||
modules-center = xwindow
|
||||
modules-right = pulseaudio memory cpu eth date
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
||||
enable-ipc = true
|
||||
|
||||
tray-position = right
|
||||
|
||||
; wm-restack = generic
|
||||
; wm-restack = bspwm
|
||||
; wm-restack = i3
|
||||
|
||||
; override-redirect = true
|
||||
|
||||
[module/xworkspaces]
|
||||
type = internal/xworkspaces
|
||||
|
||||
label-active = %name%
|
||||
label-active-background = ${colors.background-alt}
|
||||
label-active-underline= ${colors.primary}
|
||||
label-active-padding = 1
|
||||
|
||||
label-occupied = %name%
|
||||
label-occupied-padding = 1
|
||||
|
||||
label-urgent = %name%
|
||||
label-urgent-background = ${colors.alert}
|
||||
label-urgent-padding = 1
|
||||
|
||||
label-empty = %name%
|
||||
label-empty-foreground = ${colors.disabled}
|
||||
label-empty-padding = 1
|
||||
|
||||
[module/xwindow]
|
||||
type = internal/xwindow
|
||||
label = %title:0:50:...%
|
||||
|
||||
[module/filesystem]
|
||||
type = internal/fs
|
||||
interval = 25
|
||||
|
||||
mount-0 = /
|
||||
|
||||
label-mounted = %{F#F0C674}%mountpoint%%{F-} %percentage_used%%
|
||||
|
||||
label-unmounted = %mountpoint% not mounted
|
||||
label-unmounted-foreground = ${colors.disabled}
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
|
||||
format-volume-prefix = "VOL "
|
||||
format-volume-prefix-foreground = ${colors.primary}
|
||||
format-volume = <label-volume>
|
||||
|
||||
label-volume = %percentage%%
|
||||
|
||||
label-muted = muted
|
||||
label-muted-foreground = ${colors.disabled}
|
||||
|
||||
[module/xkeyboard]
|
||||
type = internal/xkeyboard
|
||||
blacklist-0 = num lock
|
||||
|
||||
label-layout = %layout%
|
||||
label-layout-foreground = ${colors.primary}
|
||||
|
||||
label-indicator-padding = 2
|
||||
label-indicator-margin = 1
|
||||
label-indicator-foreground = ${colors.background}
|
||||
label-indicator-background = ${colors.secondary}
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
format-prefix = "RAM "
|
||||
format-prefix-foreground = ${colors.primary}
|
||||
label = %percentage_used:2%%
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
format-prefix = "CPU "
|
||||
format-prefix-foreground = ${colors.primary}
|
||||
label = %percentage:2%%
|
||||
|
||||
[network-base]
|
||||
type = internal/network
|
||||
interval = 5
|
||||
format-connected = <label-connected>
|
||||
format-disconnected = <label-disconnected>
|
||||
label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected
|
||||
|
||||
[module/wlan]
|
||||
inherit = network-base
|
||||
interface-type = wireless
|
||||
label-connected = %{F#F0C674}%ifname%%{F-} %essid% %local_ip%
|
||||
|
||||
[module/eth]
|
||||
inherit = network-base
|
||||
interface-type = wired
|
||||
label-connected = %{F#F0C674}%ifname%%{F-} %local_ip%
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1
|
||||
|
||||
date = %d-%m-%Y - %H:%M
|
||||
date-alt = %H:%M:%S
|
||||
|
||||
label = %date%
|
||||
label-foreground = ${colors.primary}
|
||||
|
||||
[settings]
|
||||
screenchange-reload = true
|
||||
pseudo-transparency = true
|
||||
|
||||
; vim:ft=dosini
|
14
desktop/configs/polybar/.config/polybar/launch.sh
Executable file
14
desktop/configs/polybar/.config/polybar/launch.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||
# Terminate already running bar instances
|
||||
pkill polybar
|
||||
# If all your bars have ipc enabled, you can also use
|
||||
# polybar-msg cmd quit
|
||||
|
||||
# Launch Polybar, using default config location ~/.config/polybar/config.ini
|
||||
MONITOR=HDMI-A-0 polybar -c "$SCRIPTPATH/everforest.ini" 3>&1 | tee -a /tmp/polybar.log & disown
|
||||
MONITOR=DisplayPort-1 polybar -c "$SCRIPTPATH/everforest.ini" 3>&1 | tee -a /tmp/polybar.log & disown
|
||||
MONITOR=DisplayPort-0 polybar -c "$SCRIPTPATH/everforest.ini" 3>&1 | tee -a /tmp/polybar.log & disown
|
||||
|
||||
echo "Polybar launched..."
|
39
desktop/configs/polybar/.config/polybar/playerctl.sh
Executable file
39
desktop/configs/polybar/.config/polybar/playerctl.sh
Executable file
@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# User Configuration
|
||||
#
|
||||
show_controls=yes
|
||||
icon_color=5bb1b4
|
||||
play_icon=""
|
||||
pause_icon=""
|
||||
player_icon=""
|
||||
|
||||
# Get song title
|
||||
title=$(playerctl metadata | grep -Po '(?<=title )([^\(]*)')
|
||||
|
||||
# Get song artist
|
||||
artist=$(playerctl metadata | grep -Po '(?<=:artist )[^,]*')
|
||||
|
||||
# Get play/paused status
|
||||
status=$(playerctl status)
|
||||
|
||||
# Set play_pause_icon to $play_icon or $pause_icon depending on player status
|
||||
if [ $status == "Paused" ]; then
|
||||
play_pause_icon=$play_icon
|
||||
else
|
||||
play_pause_icon=$pause_icon
|
||||
fi
|
||||
|
||||
# If title and artist are null, print an empty string so polybar hides the module
|
||||
if [ -z $title ] && [ -z $artist ]; then
|
||||
echo ""
|
||||
else
|
||||
# Print polybar widget string
|
||||
if [ $show_controls == "yes" ]; then
|
||||
echo "%{F#$icon_color}$player_icon%{F-} $(head -c 30 <<< $title) - $(head -c 20 <<< $artist) %{F#$icon_color}%{A1:playerctl previous:}%{A} %{A1:playerctl play-pause:}$play_pause_icon%{A} %{A1:playerctl next:}%{A}%{F-}"
|
||||
else
|
||||
echo "%{F#$icon_color}$player_icon%{F-} $(head -c 30 <<< $title) - $(head -c 20 <<< $artist)%{F-}"
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user