add current playing music to polybar
This commit is contained in:
@@ -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,
|
||||
|
||||
12
.config/polybar/player-mpris-simple.sh
Executable file
12
.config/polybar/player-mpris-simple.sh
Executable 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
|
||||
Reference in New Issue
Block a user