Tdrop is in the AUR as =tdrop-git=. It can also be installed by cloning this repo and running ~sudo make install~. One can then bind a key to it (e.g. with sxhkd).
@ -46,7 +46,9 @@ alt + s
The positional argument should be the name of a program in =$PATH= (as opposed to the full path to a program) and should not contain any flags (see =-f= if you want to pass additional flags to the program when running it). It should always be the last argument.
** Basic Flags
=-s= / =--session= should only be used for supported terminals and if the user wants to start/attach to a tmux or tmuxinator session. =-a= /=--auto-detect-wm= can be specified to automatically set certain options (=-l=, =-L=, =-d=, and/or =-i=) based on the current window manager. These flags (whether automatically or manually set) may be necessary for tdrop to behave correctly (e.g. they are required for =-w= /=--width=, =-h=/ =--height=, =-x= /=--xoff=, and =-y= / =--yoff= to work correctly on tiling window managers). =-m= can be specified to automatically resize the dropdown based on the current monitor's size when percentages are used for =-w= and/or =-h=. See the manpage for further details about these flags.
=-w=/ =--width=, =-h= /=--height=, =-x=/ =--xoff=, and =-y= /=--yoff= can be used to set the window size/position.
=-s= / =--session= should only be used for supported terminals and if the user wants to start/attach to a tmux or tmuxinator session.
Tdrop has basic checks to print errors for malformed commands (e.g. to require one 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. For more information, see the [[#troubleshooting][Troubleshooting]] section.
@ -55,13 +57,11 @@ Long options can now be used with whitespace instead of requiring a ~=~ (i.e. =-
Old users please note that =-W|--normal-window=, =-z|--sleep-terminal=, and =-Z|--sleep-window= are no longer necessary and have been removed. Similarly, the old hook flags (=-p=, =-P=, =-M=, and =-O= as well as =--create-hook= and =--map-hook=) have been replaced with more specific and useful versions.
** Flicker
For some window managers that require a window to be repositioned after re-mapping it, some flicker may be noticeable. This flicker has been mostly fixed for some window managers (e.g. in the Gnome Shell and Cinnamon DEs) and improved for others. It is usually worse on tiling managers where the window must be re-floated every time it is mapped. The way around this is to use rules to either always have the class or name (see =--name=) floated or one-time rules to only float the next instance of a class. For example, since bspwm has oneshot rules and generally doesn't alter the size/position of a window, there isn't any movement flicker.
A more consistent workaround to improve visual flickering regardless of the window manager is to enable fade-in for the compositor. For compton this can be done by setting =fading = true;= and adjusting the =fade-delta= in the =~/.config/compton.conf= accordingly.
** Automatic Window Manager Detection (=-a=)
=-a= / =--auto-detect-wm= can be specified to automatically set certain options (=-l=, =-L=, =-d=, and/or =-i=) based on the current window manager. These flags (whether automatically or manually set) may be necessary for tdrop to behave correctly (e.g. they are required for =-w=, =-h=, =-x=, and =-y= to work correctly for tiling window managers with floating support). See the manpage for further details about these flags.
** Monitor Awareness
Using the =-m= / =--monitor-aware= flag will cause the geometry options to act with respect to the current monitor. This may be helpful for users of multiple monitors who don't want dropdowns spanning across monitors.
** Monitor Awareness (=-m=)
=-m= / =--monitor-aware= can be specified to automatically resize the dropdown based on the current monitor's size when percentages are used for =-w= and/or =-h=. This may be helpful for users of multiple monitors who don't want dropdowns spanning across monitors.
This is particularly useful when using a percentage or negative value with =-w=, =-h=, =-x=, and/or =-y=. For example, =-w -4= normally corresponds to a width 4 pixels less than 100% of the screen width (potentially the combined width of multiple monitors). With =-m=, the pixel values are calculated using the dimensions of the current monitor alone. Negative values may be useful when the window manager (possibly due to window decorations) causes a dropdown with =-w 100%= to go over the edge of the screen. The =-m= option will also automatically resize and/or reposition the dropdown when opening it on a different monitor when one or more of the geometry arguments are negative or percentages.
@ -69,6 +69,11 @@ Some window managers allow querying what the current monitor is (e.g. bspwm and
See the manpage for more information.
** Flicker
For some window managers that require a window to be repositioned after re-mapping it, some flicker may be noticeable. This flicker has been mostly fixed for some window managers (e.g. in the Gnome Shell and Cinnamon DEs) and improved for others. It is usually worse on tiling managers where the window must be re-floated every time it is mapped. The way around this is to use rules to either always have the class or name (see =--name=) floated or one-time rules to only float the next instance of a class. For example, since bspwm has oneshot rules and generally doesn't alter the size/position of a window, there isn't any movement flicker.
A more consistent workaround to improve visual flickering regardless of the window manager is to enable fade-in for the compositor. For compton this can be done by setting =fading = true;= and adjusting the =fade-delta= in the =~/.config/compton.conf= accordingly.
** Hooks
Tdrop provides hook flags that the user can specify to run commands at various stages during execution. These commands can make use of any global, internal tdrop variable, such as =$width=, =$height=, =$xoff=, =$yoff=, =$class=, and =$wid= (to prevent evaluation of these variables, the user can specify the hook command in single quotes). For example, to set a dropdown as always on top, the user could specify =-P 'wmctrl -i -r $wid -b add,above'=.