add current playing music to polybar

This commit is contained in:
Kopatz
2024-07-19 19:45:32 +02:00
parent 23ef026095
commit 190b82526a
5 changed files with 42 additions and 20 deletions

View File

@@ -33,7 +33,9 @@ tiling_drag modifier titlebar
# start a terminal
bindsym $mod+q exec kitty
bindsym $mod+e exec thunar
bindsym Print exec --no-startup-id maim --select | xclip -selection clipboard -t image/png
#bindsym Print exec --no-startup-id maim --select | xclip -selection clipboard -t image/png
bindsym Print exec --no-startup-id flameshot gui
# kill focused window
bindsym $mod+c kill
# lock with wallpaper
@@ -270,8 +272,8 @@ exec --no-startup-id nm-applet
# set lock timeout to 20 minutes
exec_always --no-startup-id xset dpms 0 0 1200 &
exec --no-startup-id xss-lock --transfer-sleep-lock -- ~/.config/i3/scripts/lock.sh
# prevent screen locking
exec --no-startup-id caffeine
# prevent screen locking, has xdg autostart
# exec --no-startup-id caffeine
# NetworkManager is the most popular way to manage wireless networks on Linux,

View File

@@ -0,0 +1,12 @@
#!/bin/sh
# hack nerd font required for icons
player_status=$(playerctl status 2> /dev/null)
if [ "$player_status" = "Playing" ]; then
echo "$(playerctl metadata artist) - $(playerctl metadata title)"
elif [ "$player_status" = "Paused" ]; then
echo "$(playerctl metadata artist) - $(playerctl metadata title)"
else
echo "" # nothing is playing
fi