chore(xmobar): truncated mpris2 output and updated scripts
This commit is contained in:
parent
10288c1356
commit
d83b2600ec
5 changed files with 19 additions and 7 deletions
|
@ -13,10 +13,10 @@ else
|
|||
fi
|
||||
|
||||
if [ "$temp" -ge "$temp2" ] ; then
|
||||
echo "<fc=#7C6F64><fn=6></fn></fc> <fc=#FB4934> $temp°C</fc>"
|
||||
echo "<fc=#D79921><fn=6></fn></fc> <fc=#FB4934> $temp°C</fc>"
|
||||
elif [ "$temp" -ge "$temp1" ] ; then
|
||||
echo "<fc=#7C6F64><fn=6></fn></fc> <fc=#FE8019> $temp°C</fc>"
|
||||
echo "<fc=#D79921><fn=6></fn></fc> <fc=#FE8019> $temp°C</fc>"
|
||||
else
|
||||
echo "<fc=#7C6F64><fn=6></fn></fc> <fc=#B8BB26> $temp°C</fc>"
|
||||
echo "<fc=#D79921><fn=6></fn></fc> <fc=#B8BB26> $temp°C</fc>"
|
||||
|
||||
fi
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
freespace=$(btrfs fi usage / | grep -Po 'Free \(estimated\):.*' | awk '{print $3}')
|
||||
echo "<fc=#7C6F64><fn=6></fn></fc> <fc=#B8BB26> $freespace</fc>"
|
||||
echo "<fc=#689D6A><fn=6></fn></fc> <fc=#B8BB26> $freespace</fc>"
|
||||
|
|
12
.config/xmobar/scripts/mpris2.sh
Executable file
12
.config/xmobar/scripts/mpris2.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Get the MPRIS information
|
||||
mpris_info=$(playerctl --player=playerctld metadata --format '{{ artist }} - {{ title }}')
|
||||
|
||||
# Truncate the output to 15 characters, adding trailing dots if needed
|
||||
truncated_info=$(printf '%.35s' "$mpris_info")
|
||||
if [ ${#mpris_info} -gt 35 ]; then
|
||||
truncated_info="${truncated_info}..."
|
||||
fi
|
||||
|
||||
echo "$truncated_info"
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
update_number=$(checkupdates | wc -l)
|
||||
echo "<fc=#7C6F64><fn=6> </fn></fc> <fc=#B8BB26>$update_number</fc>"
|
||||
echo "<fc=#458588><fn=6> </fn></fc> <fc=#B8BB26>$update_number</fc>"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue