diff options
author | Thorsten Wißmann <edu@thorsten-wissmann.de> | 2013-01-01 22:03:11 +0100 |
---|---|---|
committer | Thorsten Wißmann <edu@thorsten-wissmann.de> | 2013-01-01 22:03:11 +0100 |
commit | 0064d624f81b0917ab35d8ab07bc7e3eb3cf23d6 (patch) | |
tree | 8697d6cf2e8171cc42e186611a177b772bff9d34 /scripts | |
parent | 3a5ed75ccb1ea90c02de585529ea7ea5fbe65373 (diff) |
Fixup the geometry calculation q3terminal.sh
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/q3terminal.sh | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/scripts/q3terminal.sh b/scripts/q3terminal.sh index 31c6b360..f89796a0 100755 --- a/scripts/q3terminal.sh +++ b/scripts/q3terminal.sh @@ -19,6 +19,19 @@ hc() { herbstclient "$@" ; } +mrect=( $(hc monitor_rect -p "" ) ) +termwidth=$(((${mrect[2]}*8)/10)) +termheight=400 + +rect=( + $termwidth + $termheight + $((${mrect[0]}+(${mrect[2]}-termwidth)/2)) + $((${mrect[1]}-termheight)) +) + +y_line=${mrect[1]} + hc add scratchpad @@ -50,19 +63,6 @@ animate() { show() { - mrect=( $(hc monitor_rect -p "" ) ) - termwidth=$(((${mrect[2]}*8)/10)) - termheight=400 - - rect=( - $termwidth - $termheight - $((${mrect[0]}+(${mrect[2]}-termwidth)/2)) - $((${mrect[1]}-termheight)) - ) - - y_line=${mrect[1]} - hc lock hc raise_monitor $monitor hc focus_monitor $monitor |