This method is more concise, doesn't require the checks the previous
method did, allows for both the --option=value and --option value
syntaxes, and still uses getopts. I'm not sure if there is some good
reason to not pre-parse the arguments in this way though.
Addresses #12
`-s` should only be used for supported terminals and if the user wants to start a tmux or tmuxinator session. `-a` should be used to set up WM specific rules (which are required for the --width, --height, --xoff, and --yoff flags to work properly; see below for supported WMs). Long options require using `--opt=<arg>` as opposed to leaving a space. Refer to `tdrop --help` and the manpage for more complete instructions.
`-s` should only be used for supported terminals and if the user wants to start a tmux or tmuxinator session. `-a` should be used to set up WM specific rules (which are required for the --width, --height, --xoff, and --yoff flags to work properly; see below for supported WMs). Refer to `tdrop --help` and the manpage for more complete instructions.
Tdrop has basic checks to print errors for malformed commands (for example if a long option is used without `=`). If a tdrop command does not work, please run it in a terminal or check `/tmp/tdrop/log` for error messages and consult the manpage before making an issue.
Tdrop has basic checks to print errors for malformed commands (for example to require the positional argument). If a tdrop command does not work, please run it in a terminal or check `/tmp/tdrop/log` for error messages and consult the manpage before making an issue.
@ -60,13 +60,13 @@ If there are available settings for the detected window manager for the -p, -P,
\fB\-m\fR, \fB \-\-monitor-aware\fR
\fB\-m\fR, \fB \-\-monitor-aware\fR
This option only applies for dropdowns (not auto-hiding and auto-showing). Specify that width and height percentages should be relative to the current monitor. If the monitor changes, this option will cause a dropdown to be resized to fit the given percentages. A negative argument is also allowed for '-w' and '-y' with this option (e.g. '-m -w -4') in which case the determined value will be that many pixels less than 100% of the screen size. This fixes the problem where 100% width may actually go over the screen due to window borders/decoration. Note that this option assumes xrandr is being used and requires xrandr to work. (default: false)
This option only applies for dropdowns (not auto-hiding and auto-showing). Specify that width and height percentages should be relative to the current monitor. If the monitor changes, this option will cause a dropdown to be resized to fit the given percentages. A negative argument is also allowed for '-w' and '-y' with this option (e.g. '-m -w -4') in which case the determined value will be that many pixels less than 100% of the screen size. This fixes the problem where 100% width may actually go over the screen due to window borders/decoration. Note that this option assumes xrandr is being used and requires xrandr to work. (default: false)
.TP
.TP
\fB \-\-clear\fR
\fB\-c\fR, \fB \-\-clear\fR
Used to clear a saved window id for the given program or 'current' instead of creating a dropdown; takes no argument.
Used to clear a saved window id for the given program or 'current' instead of creating a dropdown; takes no argument.
.TP
.TP
\fB \-\-no-cancel\fR
\fB\-C\fR, \fB \-\-no-cancel\fR
Specifies that manually re-showing an auto-hidden window with tdrop should not cancel an auto_show; takes no argument. See examples.
Specifies that manually re-showing an auto-hidden window with tdrop should not cancel an auto_show; takes no argument. See examples.
.TP
.TP
\fB \-\-help\fR
\fB\-H\fR, \fB \-\-help\fR
Print help that is less awesome than this manpage; takes no argument.
Print help that is less awesome than this manpage; takes no argument.