Add margin from bottom
This commit is contained in:
parent
52683ff330
commit
dbdfd43280
@ -32,7 +32,8 @@ fi
|
||||
get_usable_height() {
|
||||
local screen_height=$(xdpyinfo | awk '/dimensions/{print $2}' | grep -oE [[:digit:]]\+$)
|
||||
local panel_height=$(xdotool getwindowgeometry $(xdotool search --onlyvisible --class 'panel') | awk '/Geometry/{print $2}' | grep -oE [[:digit:]]\+$)
|
||||
echo $((screen_height - panel_height))
|
||||
local margin=26 # For window decoration subtract margin
|
||||
echo $((screen_height - panel_height - margin))
|
||||
}
|
||||
|
||||
# extract and set argument
|
||||
@ -95,10 +96,10 @@ esac
|
||||
currentWindow=$(xdotool getactivewindow)
|
||||
|
||||
# undo maximized
|
||||
wmctrl -ir $currentWindow -b remove,maximized_vert,maximized_horz
|
||||
wmctrl -ir "$currentWindow" -b remove,maximized_vert,maximized_horz
|
||||
|
||||
# resize window use 95% of height
|
||||
xdotool getactivewindow windowsize $WIDTH $(get_usable_height)
|
||||
# resize
|
||||
xdotool getactivewindow windowsize $WIDTH "$(get_usable_height)"
|
||||
|
||||
# move window to location steer clear of top
|
||||
xdotool getactivewindow windowmove $XPOS 0.1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user