diff --git a/.config/xmobar/scripts/cpu_temp.sh b/.config/xmobar/scripts/cpu_temp.sh
index 81522d4..3f445b8 100755
--- a/.config/xmobar/scripts/cpu_temp.sh
+++ b/.config/xmobar/scripts/cpu_temp.sh
@@ -13,10 +13,10 @@ else
fi
if [ "$temp" -ge "$temp2" ] ; then
- echo " $temp°C"
+ echo " $temp°C"
elif [ "$temp" -ge "$temp1" ] ; then
- echo " $temp°C"
+ echo " $temp°C"
else
- echo " $temp°C"
+ echo " $temp°C"
fi
diff --git a/.config/xmobar/scripts/disk.sh b/.config/xmobar/scripts/disk.sh
index dba295b..e2f3ed4 100755
--- a/.config/xmobar/scripts/disk.sh
+++ b/.config/xmobar/scripts/disk.sh
@@ -1,3 +1,3 @@
#!/bin/sh
freespace=$(btrfs fi usage / | grep -Po 'Free \(estimated\):.*' | awk '{print $3}')
-echo " $freespace"
+echo " $freespace"
diff --git a/.config/xmobar/scripts/mpris2.sh b/.config/xmobar/scripts/mpris2.sh
new file mode 100755
index 0000000..90d7c9c
--- /dev/null
+++ b/.config/xmobar/scripts/mpris2.sh
@@ -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"
diff --git a/.config/xmobar/scripts/updates.sh b/.config/xmobar/scripts/updates.sh
index 3af2a8f..8bd01e1 100755
--- a/.config/xmobar/scripts/updates.sh
+++ b/.config/xmobar/scripts/updates.sh
@@ -1,4 +1,4 @@
#!/bin/bash
update_number=$(checkupdates | wc -l)
-echo " $update_number"
+echo " $update_number"
diff --git a/.config/xmobar/xmobarrc b/.config/xmobar/xmobarrc
index d942a4c..142ba17 100644
--- a/.config/xmobar/xmobarrc
+++ b/.config/xmobar/xmobarrc
@@ -19,8 +19,8 @@ Config {font = "Ubuntu bold 10"
, commands = [
Run XMonadLog
, Run Date "%a, %d %b %H:%M" "date" 10
- , Run Mpris2 "playerctld" ["-t", " - "] 10
- , Run Memory ["-t"," %"] 50
+ , Run Com "/home/afonso/.config/xmobar/scripts/mpris2.sh" [] "mpris2" 10
+ , Run Memory ["-t"," %"] 50
, Run Com "/home/afonso/.config/xmobar/scripts/disk.sh" [] "disk" 100
, Run Com "/home/afonso/.config/xmobar/scripts/cpu_temp.sh" [] "cpu" 50
, Run Com "/home/afonso/.config/xmobar/scripts/battery.sh" [] "battery" 50