From f852bfd75bec7e53febeb3e753fce5752b423d97 Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Tue, 3 Nov 2015 00:17:53 -0300 Subject: Update herbstluftwm --- herbstluftwm/bin/mvrs.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 herbstluftwm/bin/mvrs.sh (limited to 'herbstluftwm/bin/mvrs.sh') diff --git a/herbstluftwm/bin/mvrs.sh b/herbstluftwm/bin/mvrs.sh new file mode 100755 index 0000000..65b5733 --- /dev/null +++ b/herbstluftwm/bin/mvrs.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# ./mvrs WINID X Y Width Height + +floating=$(herbstclient get_attr tags.focus.floating) + +if [[ x"$floating" == xfalse ]] +then + resizestep=0.02 + herbstclient resize $1 $2 +else + resizestep=15 + winid="$(herbstclient get_attr clients.focus.winid)" + + width=$(xwininfo -id "${winid}" | grep Width | awk '{print $2}') + height=$(xwininfo -id "${winid}" | grep Height | awk '{print $2}') + + case $1 in + left) + echo match left + width=$(($width - ${resizestep})) + ;; + right) + echo match right + width=$(($width + ${resizestep})) + ;; + up) + echo match up + height=$(($height - ${resizestep})) + ;; + down) + # Dunno, this is weird + resizestep=20 + height=$(($height + ${resizestep})) + ;; + esac + + + echo resizing to ${winid} $width $height + ~/.config/herbstluftwm/bin/mvrs ${winid} $width $height +fi -- cgit v1.2.3-70-g09d2