diff --git a/polybar/config.ini b/polybar/config.ini index cce618b..1995dae 100644 --- a/polybar/config.ini +++ b/polybar/config.ini @@ -44,7 +44,7 @@ cursor-scroll = ns-resize background = ${colors.background} foreground = ${colors.foreground} - + ;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- ;; FONTS ;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- @@ -58,7 +58,7 @@ font-3 = Material:size=13;1 ;; BAR SETUP ;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- modules-left = left date left1 time left2 servers left3 -modules-center = center spotify center1 +modules-center = music modules-right = right dnd updates network bluetooth right1 volume right2 power right3 ;; Theres also dnd and mic modules that I don't use so much diff --git a/polybar/deco.ini b/polybar/deco.ini index 015b018..9550cd1 100644 --- a/polybar/deco.ini +++ b/polybar/deco.ini @@ -26,22 +26,6 @@ content-foreground = ${colors.modback} content = "%{T2}%{T-}" -;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- -;; CENTER -;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- -[module/center] -type = custom/text -content-background = ${colors.background} -content-foreground = ${colors.modback} -content = "%{T2}%{T-}" - -[module/center1] -type = custom/text -content-background = ${colors.background} -content-foreground = ${colors.modback} -content = "%{T2}%{T-}" - - ;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- ;; RIGHT ;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- diff --git a/polybar/scripts/dnd.sh b/polybar/scripts/dnd.sh old mode 100644 new mode 100755 diff --git a/polybar/scripts/music.sh b/polybar/scripts/music.sh new file mode 100755 index 0000000..dee263c --- /dev/null +++ b/polybar/scripts/music.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +player=$(playerctl -p %any,firefox status) +title=$(playerctl -p %any,firefox metadata --format '{{ title }}') +artist=$(playerctl -p %any,firefox metadata --format '{{ artist }}') + +if [ $player = "Playing" ] +then + if [ "$title" == "" ] + then + $title="Unknow title" + fi + if [ "$artist" == "" ] + then + $artist = "Unknow artist" + fi + echo "%{F#151515}%{T2}%{T- F-}%{B#151515}"$title", "$artist"%{B-}%{F#151515}%{T2}%{T- F-}" +#else +# echo "" +fi \ No newline at end of file diff --git a/polybar/scripts/toggle_dnd.sh b/polybar/scripts/toggle_dnd.sh old mode 100644 new mode 100755 diff --git a/polybar/scripts/update_check.sh b/polybar/scripts/update_check.sh old mode 100644 new mode 100755 diff --git a/polybar/user_modules.ini b/polybar/user_modules.ini index 738d7ec..8da018a 100644 --- a/polybar/user_modules.ini +++ b/polybar/user_modules.ini @@ -40,22 +40,17 @@ exec = ~/.config/polybar/scripts/server_status.sh ;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- -;; SPOTIFY +;; MUSIC ;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- -[module/spotify] +[module/music] type = custom/script interval = 1 -format =