diff options
author | jao <jao@gnu.org> | 2022-01-23 01:02:20 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-01-23 01:02:20 +0000 |
commit | d936182a7578412bf4220d311192b07eff1eb872 (patch) | |
tree | 0458ca5bf5f3ee7c646c99fa24ac727e66ac980d | |
parent | a0a59cd24021e88e70a1a1052cd2a919660a6fa8 (diff) | |
download | xmobar-config-d936182a7578412bf4220d311192b07eff1eb872.tar.gz xmobar-config-d936182a7578412bf4220d311192b07eff1eb872.tar.bz2 |
using <hspace> rather than an icon for trayer
-rwxr-xr-x | bin/padding-width.sh | 6 | ||||
-rw-r--r-- | src/lib/Monitors.hs | 2 |
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 |