added mouse symbol to window indicator, made the music title truncate, made script that can handle changing monitors
parent
afb2ccea53
commit
fd6eab76a7
|
|
@ -22,7 +22,7 @@
|
||||||
(defwidget winsworks [monitor]
|
(defwidget winsworks [monitor]
|
||||||
(box :orientation "h" :space-evenly false :halign "start"
|
(box :orientation "h" :space-evenly false :halign "start"
|
||||||
(workspaceWidget :monitor monitor)
|
(workspaceWidget :monitor monitor)
|
||||||
(box :class "music" activewindow)
|
(box :class "music" {" ${activewindow}"})
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -75,8 +75,8 @@
|
||||||
(defwidget workspaces-old []
|
(defwidget workspaces-old []
|
||||||
(literal :content workspace-old))
|
(literal :content workspace-old))
|
||||||
|
|
||||||
(deflisten music :initial ""
|
(defpoll music :interval "0.5s"
|
||||||
"playerctl --follow metadata --format '{{ title }}' || true")
|
"scripts/playerget")
|
||||||
|
|
||||||
|
|
||||||
(defpoll activewindow :interval "0.5s"
|
(defpoll activewindow :interval "0.5s"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
trunc=32
|
||||||
|
sample=$(playerctl metadata --format '{{ title }} - {{ artist }}')
|
||||||
|
|
||||||
|
#echo ${sample}
|
||||||
|
|
||||||
|
if [ ${#sample} -gt $trunc ]; then
|
||||||
|
echo $sample | head -c $trunc | sed 's/$/.../'
|
||||||
|
else
|
||||||
|
if [ ${#sample} -ne 0 ]; then
|
||||||
|
echo ${sample}
|
||||||
|
else
|
||||||
|
echo None
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#hyprctl activewindow | grep title: | awk -F: '{print $2}' | head -c $trunc | sed 's/$/.../'
|
||||||
|
|
||||||
|
|
@ -1,3 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
/usr/bin/eww daemon
|
/usr/bin/eww daemon
|
||||||
/usr/bin/eww open bar --id primary --arg monitor=1
|
|
||||||
/usr/bin/eww open bar --id secondary --arg monitor=0
|
monitorsum=$(hyprctl monitors | grep ID | wc -l)
|
||||||
|
|
||||||
|
for i in $(seq 1 $monitorsum);
|
||||||
|
do
|
||||||
|
declare -i curmon=$i-1
|
||||||
|
/usr/bin/eww open bar --id bar$curmon --arg monitor=$curmon
|
||||||
|
done
|
||||||
|
|
||||||
|
#/usr/bin/eww open bar --id primary --arg monitor=1
|
||||||
|
#/usr/bin/eww open bar --id secondary --arg monitor=0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue