add back default y offset of 1

found that a y offset of 0 causes problems in more than just bspwm (e.g.
pekwm when auto-showing)
long-opts
angelic-sedition 10 years ago
parent 2a938d9adf
commit c747573077

15
tdrop

@ -13,7 +13,7 @@ options:
-h height specify a height for a newly created term (default: 100%) -h height specify a height for a newly created term (default: 100%)
-w width specify a width for a newly created term (default: 45%) -w width specify a width for a newly created term (default: 45%)
-x pos specify x offset for a newly created term (default: 0) -x pos specify x offset for a newly created term (default: 0)
-y pos specify y offset for a newly created term (default: 0) -y pos specify y offset for a newly created term (default: 1, see BUGS in man)
-s name name for tmux or tmuxinator session (if not given, will not use tmux) -s name name for tmux or tmuxinator session (if not given, will not use tmux)
-n num num or extra text; only needed if want multiple dropdowns of same program (default: "") -n num num or extra text; only needed if want multiple dropdowns of same program (default: "")
-p cmd provide a pre command to float the window if necessary -p cmd provide a pre command to float the window if necessary
@ -40,7 +40,7 @@ See man page for more details.
width="100%" width="100%"
height="45%" height="45%"
xoff=0 xoff=0
yoff=0 yoff=1
float_pre="" float_pre=""
float_post="" float_post=""
oneshot_post="" oneshot_post=""
@ -57,8 +57,7 @@ do
h) height=$OPTARG;; h) height=$OPTARG;;
w) width=$OPTARG;; w) width=$OPTARG;;
x) xoff=$OPTARG;; x) xoff=$OPTARG;;
y) yoff=$OPTARG y) yoff=$OPTARG;;
user_set_yoff=true;;
s) session_name=$OPTARG;; s) session_name=$OPTARG;;
n) num=$OPTARG;; n) num=$OPTARG;;
p) float_pre=$OPTARG;; p) float_pre=$OPTARG;;
@ -74,8 +73,7 @@ do
height) height=$OPTARG;; height) height=$OPTARG;;
width) width=$OPTARG;; width) width=$OPTARG;;
x-offset) xoff=$OPTARG;; x-offset) xoff=$OPTARG;;
y-offset) yoff=$OPTARG y-offset) yoff=$OPTARG;;
user_set_yoff=true;;
session) session_name=$OPTARG;; session) session_name=$OPTARG;;
number) num=$OPTARG;; number) num=$OPTARG;;
pre-command) float_pre=$OPTARG;; pre-command) float_pre=$OPTARG;;
@ -97,11 +95,6 @@ wm_autodetect_settings() {
# floating or position saving setup # floating or position saving setup
if [[ $wm == bspwm ]]; then if [[ $wm == bspwm ]]; then
# change yoff only if not set by user
# deals with potential bug where window will be moved to middle
if ! $user_set_yoff; then
yoff=1
fi
float_pre() { float_pre() {
bspc rule -a "$1" -o floating=on bspc rule -a "$1" -o floating=on
} }

@ -28,7 +28,7 @@ Specify a width for a created window as a number or percentage. (default: 100%)
Specify the x position for a created window as a number or percentage. (default: 0) Specify the x position for a created window as a number or percentage. (default: 0)
.TP .TP
\fB\-y\fR, \fB \-\-y-offset\fR \fB\-y\fR, \fB \-\-y-offset\fR
Specify the y position for a created window as a number or percentage. (default: 0) Specify the y position for a created window as a number or percentage. (default: 1, see BUGS)
.TP .TP
\fB\-s\fR, \fB \-\-session\fR \fB\-s\fR, \fB \-\-session\fR
Specify a tmuxinator or tmux session name to start. An existing tmux session has highest precedence and will be connected to with '-d', detaching other attached clients. If a there is no tmuxinator session of the given name, a normal tmux session with the name will be created. If this option is not given, tmux will not be used. (default: none) Specify a tmuxinator or tmux session name to start. An existing tmux session has highest precedence and will be connected to with '-d', detaching other attached clients. If a there is no tmuxinator session of the given name, a normal tmux session with the name will be created. If this option is not given, tmux will not be used. (default: none)

Loading…
Cancel
Save