summaryrefslogtreecommitdiff
path: root/ar/.local/bin/statusbar
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-02-17 22:19:16 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-02-17 22:19:16 +0900
commit1864770d606c4aa8b0af5e88dd41c21caab8e851 (patch)
tree888e82c9187b6833884d45d7e424c999ce5be93b /ar/.local/bin/statusbar
parentc58bfa168fed713821dd434632e8da4ac65df479 (diff)
updates
Diffstat (limited to 'ar/.local/bin/statusbar')
-rwxr-xr-xar/.local/bin/statusbar/sb-mpdup3
-rwxr-xr-xar/.local/bin/statusbar/sb-music3
2 files changed, 6 insertions, 0 deletions
diff --git a/ar/.local/bin/statusbar/sb-mpdup b/ar/.local/bin/statusbar/sb-mpdup
index 0732c88..dd49322 100755
--- a/ar/.local/bin/statusbar/sb-mpdup
+++ b/ar/.local/bin/statusbar/sb-mpdup
@@ -3,6 +3,9 @@
# This loop will update the mpd statusbar module whenever a command changes the
# music player's status. mpd must be running on X's start for this to work.
+MPD_HOST="${MPD_HOST:-/tmp/mpd_socket}"
+export MPD_HOST
+
while :; do
mpc idle >/dev/null || continue
kill -55 "$(pidof "${STATUSBAR:-dwmblocks}")" 2>/dev/null
diff --git a/ar/.local/bin/statusbar/sb-music b/ar/.local/bin/statusbar/sb-music
index d730116..5bcc209 100755
--- a/ar/.local/bin/statusbar/sb-music
+++ b/ar/.local/bin/statusbar/sb-music
@@ -1,5 +1,8 @@
#!/bin/bash
+MPD_HOST="${MPD_HOST:-/tmp/mpd_socket}"
+export MPD_HOST
+
truncate_string() {
input="$1"
max_length="$2"