summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xbin/padding-width.sh6
-rw-r--r--src/lib/Monitors.hs2
2 files changed, 7 insertions, 1 deletions
diff --git a/bin/padding-width.sh b/bin/padding-width.sh
new file mode 100755
index 0000000..b339391
--- /dev/null
+++ b/bin/padding-width.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+pname=${1:-panel}
+width=$(xprop -name $pname | grep 'program specified minimum size' | cut -d ' ' -f 5)
+
+echo "<hspace=${width:-0}/>"
diff --git a/src/lib/Monitors.hs b/src/lib/Monitors.hs
index 7d8ef7e..e61847a 100644
--- a/src/lib/Monitors.hs
+++ b/src/lib/Monitors.hs
@@ -235,4 +235,4 @@ tun0 = vpnMark "tun0"
laTime = DateZone "%H" "en_US" "US/Pacific" "laTime" 10
localTime = Date "%a %d %R" "datetime" 10
-trayPadding = Com "padding-icon.sh" [] "tray" 20
+trayPadding = Com "padding-width.sh" [] "tray" 20