diff options
Diffstat (limited to '.config/wmii-hg/workarounds.sh')
-rw-r--r-- | .config/wmii-hg/workarounds.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/.config/wmii-hg/workarounds.sh b/.config/wmii-hg/workarounds.sh index c0b6f31..66ea64c 100644 --- a/.config/wmii-hg/workarounds.sh +++ b/.config/wmii-hg/workarounds.sh @@ -40,3 +40,23 @@ systemd-notify() { printf -v n '%s\n' "${our_env[@]}" socat STDIO UNIX-SENDTO:"$NOTIFY_SOCKET" <<<"$n" } + +## +# Reposition Onboard in the correct location +# +# I think this is actually working around a +# WMII bug where it confuses the heights when +# there are multiple panels. +# +onboard-hack() { + local res=$(xdpyinfo|awk '/^\s*dimensions:/{print $2}') + [[ "$res" == *x* ]] || break + local file wid size + while read -r file; do + wid="${file%/props}" + wid="${wid##*/}" + size=$(xdotool getwindowgeometry 0x01000007|awk '/^\s*Geometry:/{print $2}') + [[ "$size" == *x* ]] || continue + xdotool windowmove "$wid" 0 "$(bc <<<"${res#*x}-${size#*x}")" + done < <(grep -l ^onboard: -- "$WMII_DIR"/client/*/props) +} |