diff options
author | Matias Linares <matiaslina@openmailbox.org> | 2015-11-03 00:17:53 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@openmailbox.org> | 2015-11-03 00:17:53 -0300 |
commit | f852bfd75bec7e53febeb3e753fce5752b423d97 (patch) | |
tree | 8a6d843950435eb4ef756938863ed326b2faeec3 /herbstluftwm/bin | |
parent | 50787494e9dcbed9fa3caa96cba46a0c40d321d8 (diff) | |
download | dotfiles-f852bfd75bec7e53febeb3e753fce5752b423d97.tar.gz |
Update herbstluftwm
Diffstat (limited to 'herbstluftwm/bin')
-rwxr-xr-x | herbstluftwm/bin/dmenu_wrapper | 11 | ||||
-rwxr-xr-x | herbstluftwm/bin/mvrs.sh | 41 |
2 files changed, 52 insertions, 0 deletions
diff --git a/herbstluftwm/bin/dmenu_wrapper b/herbstluftwm/bin/dmenu_wrapper new file mode 100755 index 0000000..7d9dccf --- /dev/null +++ b/herbstluftwm/bin/dmenu_wrapper @@ -0,0 +1,11 @@ +#!/bin/bash + +# Wrapper around dmenu for some problems with the loading of the font. + +get_xresources() { + arr=( $(xrdb -q | grep $1 | head -1) ) + echo -n "${arr[@]:1}" +} + +dmenu_run -b -p $(hostname) -nb $(get_xresources background) -sb $(get_xresources color4) -sf $(get_xresources foreground) -fn "$(get_xresources face | sed 's/ /\\ /g')" + 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 |