output_logging_20240912T002337
This commit is contained in:
1 parent
cb1a0ca69d
commit
9eb6226619
3763 files changed
+307
-64993
No files matched your search
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
text=$(date +' %H:%M:%S | %d %a %Y ')
|
||||
tooltip=$(cal)
|
||||
tooltip=$(echo ${tooltip//$'\n'/\\\\n})
|
||||
|
||||
echo -e "{\"text\":\""$text"\", \"tooltip\":\""$tooltip"\"}}"
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
class=$(playerctl metadata --player=Deezer --format '{{lc(status)}}')
|
||||
icon=""
|
||||
|
||||
if [[ $class == "playing" ]]; then
|
||||
info=$(playerctl metadata --player=Deezer --format '{{title}} - {{artist}}')
|
||||
info=$(echo ${info//\"/\\\"}) # Escape quote with \"
|
||||
if [[ ${#info} -ge 33 ]]; then
|
||||
info=$(playerctl metadata --player=Deezer --format '{{title}}')
|
||||
info=$(echo ${info//\"/\\\"}) # Escape quote with \"
|
||||
fi
|
||||
if [[ ${#info} -ge 38 ]]; then
|
||||
info=$(echo $info | cut -c1-35)"..."
|
||||
fi
|
||||
tooltip=$(playerctl metadata --format "{{duration(position)}}/{{duration(mpris:length)}}")
|
||||
text=$info" "$icon
|
||||
tooltip="🜁 "$tooltip" 🜃"
|
||||
elif [[ $class == "paused" ]]; then
|
||||
text=" "$icon
|
||||
elif [[ $class == "stopped" ]]; then
|
||||
text=""
|
||||
fi
|
||||
|
||||
echo -e "{\"text\":\""$text"\", \"tooltip\":\""$tooltip"\"}, \"class\":\""$class"\"}"
|
||||
Reference in new issue
Block a user