-M cmd provide a post-unmap command; can be used for example with a window manager that doesn't support floating to turn fullscreen on when mapping a terminal then off when unmapping it
-M cmd provide a post-unmap command; can be used for example with a window manager that doesn't support floating to turn fullscreen on when mapping a terminal then off when unmapping it
-O cmd provide a one time command only for when a dropdown is created/initiated (useful for 'tdrop current')
-O cmd provide a one time command only for when a dropdown is created/initiated (useful for 'tdrop current')
-d XxY give decoration/border size to accurately save position; only applicable with auto_show; on applicable with a few window managers (e.g. blackbox)
-d XxY give decoration/border size to accurately save position; only applicable with auto_show; on applicable with a few window managers (e.g. blackbox)
-z use a different sleep time to wait for terminal to be created (advanced; see man page)
-Z use a different sleep time for -W program to be created (advanced; see man page)
-a automatically detect window manager and if settings exist for it, automatically set -p, -P, and -d values as necessary; this can have affect when used with a terminal or with auto_show or auto_hide (default: false)
-a automatically detect window manager and if settings exist for it, automatically set -p, -P, and -d values as necessary; this can have affect when used with a terminal or with auto_show or auto_hide (default: false)
-W the given program is not a terminal (or lacks an -e flag) (default: assume it IS a terminal)
-W the given program is not a terminal (or lacks an -e flag) (default: assume it IS a terminal)
--clear clear saved window id; useful accidentally make a window a dropdown (e.g. '$ tdrop --clear current')
--clear clear saved window id; useful accidentally make a window a dropdown (e.g. '$ tdrop --clear current')
@ -46,18 +48,23 @@ width="100%"
height="45%"
height="45%"
xoff=0
xoff=0
yoff=2
yoff=2
session_name=""
num=""
map_pre=""
map_pre=""
map_post=""
map_post=""
unmap_post=""
unmap_post=""
oneshot_post=""
oneshot_post=""
session_name=""
dec_fix=""
num=""
sleep_term_time=0.01
sleep_term_user_set=false
sleep_win_time=0.5
sleep_win_user_set=false
normal_window=false
normal_window=false
clearwid=false
clearwid=false
cancel_auto_show=true
cancel_auto_show=true
term=${*:0-1}
term=${*:0-1}
auto_detect_wm=false
auto_detect_wm=false
while getopts :h:w:x:y:s:n:p:P:M:O:d:-:Wa opt
while getopts :h:w:x:y:s:n:p:P:M:O:d:z:Z:-:Wa opt
do
do
case $opt in
case $opt in
h) height=$OPTARG;;
h) height=$OPTARG;;
@ -71,6 +78,10 @@ do
M) unmap_post=$OPTARG;;
M) unmap_post=$OPTARG;;
O) oneshot_post=$OPTARG;;
O) oneshot_post=$OPTARG;;
d) dec_fix=$OPTARG;;
d) dec_fix=$OPTARG;;
z) sleep_term_time=$OPTARG
sleep_term_user_set=true;;
Z) sleep_win_time=$OPTARG
sleep_win_user_set=true;;
W) normal_window=true;;
W) normal_window=true;;
a) auto_detect_wm=true;;
a) auto_detect_wm=true;;
-)
-)
@ -88,6 +99,10 @@ do
post-unmap) unmap_post=$OPTARG;;
post-unmap) unmap_post=$OPTARG;;
oneshot-post) oneshot_post=$OPTARG;;
oneshot-post) oneshot_post=$OPTARG;;
decoration-fix) dec_fix=$OPTARG;;
decoration-fix) dec_fix=$OPTARG;;
sleep-terminal) sleep_term_time=$OPTARG
sleep_term_user_set=true;;
sleep-window) sleep_win_time=$OPTARG
sleep_win_user_set=true;;
normal-window) normal_window=true;;
normal-window) normal_window=true;;
auto-detect-wm) auto_detect_wm=true;;
auto-detect-wm) auto_detect_wm=true;;
clear) clearwid=true;;
clear) clearwid=true;;
@ -127,7 +142,11 @@ wm_autoset_for_all() {
# awesome remembers size, but need to float and then set size first
# awesome remembers size, but need to float and then set size first
map_post_oneshot() {
map_post_oneshot() {
# need sleep time to wait for window be created or will float wrong one.. not sure if way to float by window id
# need sleep time to wait for window be created or will float wrong one.. not sure if way to float by window id
@ -51,6 +51,12 @@ Specify a post command to execute only when first creating or initiating a dropd
\fB\-d\fR, \fB \-\-decoration-fix\fR
\fB\-d\fR, \fB \-\-decoration-fix\fR
Specify a window decoration/border size in the form <x decoration size>x<y decoration size> to be taken into account when saving window position. This should not be necessary for most window managers and is only used with 'auto_show', e.g. 'tdrop -d 1x22 auto_show' for blackbox. (default: none)
Specify a window decoration/border size in the form <x decoration size>x<y decoration size> to be taken into account when saving window position. This should not be necessary for most window managers and is only used with 'auto_show', e.g. 'tdrop -d 1x22 auto_show' for blackbox. (default: none)
.TP
.TP
\fB\-z\fR, \fB \-\-sleep-terminal\fR
Specify an alternate sleep time to wait for a terminal emulator to be completed. Only use this option if tdrop ends up capturing a different window as the dropdown when you press a dropdown key. You probably won't need to change this, and if you do, please report it. I hope to remove the need for sleeping entirely in the future. (default: 0.1)
.TP
\fB\-Z\fR, \fB \-\-sleep-window\fR
Specify an alternate sleep time to wait for a window to be completed. This is for use with -W or for -a with tiling window managers that cannot pre-float the next instance of a window (e.g. awesome and i3 if no rule to always float a specific class). Only use this option if tdrop ends up capturing a different window as the dropdown when you press a dropdown key. You probably won't need to change this, and if you do, please report it. I hope to remove the need for sleeping entirely in the future. (default: 0.5)
.TP
\fB\-W\fR, \fB \-\-normal-window\fR
\fB\-W\fR, \fB \-\-normal-window\fR
Specifies that the program is not a terminal or does not have the '-e' flag; takes no argument. If using 'tdrop current', this option will have no effect either way. (default: false)
Specifies that the program is not a terminal or does not have the '-e' flag; takes no argument. If using 'tdrop current', this option will have no effect either way. (default: false)