add automatic settings for herbstluftwm to change the layout to

fullscreen for the dropdown
long-opts
angelic-sedition 10 years ago
parent 6f19422ab8
commit 975335ca0d

@ -50,7 +50,8 @@ If your terminal doesn't work with tdrop, feel free to make an issue.
The primary goal of tdrop is to "just work" with any window manager. The primary differences between how tdrop deals with different window managers is the strategy it takes for floating only the dropdown (as opposed to all instances of the class that the dropdown is) and how it deals with window managers that resize or move a window after mapping then unmapping it. There are three types of window managers as far as tdrop is concerned. The primary goal of tdrop is to "just work" with any window manager. The primary differences between how tdrop deals with different window managers is the strategy it takes for floating only the dropdown (as opposed to all instances of the class that the dropdown is) and how it deals with window managers that resize or move a window after mapping then unmapping it. There are three types of window managers as far as tdrop is concerned.
#### Tiling without Floating Support #### Tiling without Floating Support
If your window manager does not support floating, there's nothing to worry about. Binding a key to `tdrop <settings> term` should work. Options for resizing and movement that work only with floating window managers are not supported. If your window manager does not support floating, there's nothing to worry about. Binding a key to `tdrop <settings> term` should work. Options for resizing and movement that work only with floating window managers are not supported. One can, however, add post-map and post-unmap commands to do something like change the layout to fullscreen when showing a dropdown then revert the layout when hiding the dropdown. Automatic settings exist to do this for the following (use '-a'):
- herbstluftwm
#### Floating/Stacking #### Floating/Stacking
For floating window managers, tdrop should also generally "just work", but you will need to add the '-a' option. Many floating window managers will either center or resize a window when mapping then unmapping it. Tdrop provides for a `--post-commmand` to deal with this. '-a' will automatically determine the proper post command to use for your window manager if one exists. The '-a' option will also set things up so that window geometry/position will be properly restored on an `auto_show`. For floating window managers, tdrop should also generally "just work", but you will need to add the '-a' option. Many floating window managers will either center or resize a window when mapping then unmapping it. Tdrop provides for a `--post-commmand` to deal with this. '-a' will automatically determine the proper post command to use for your window manager if one exists. The '-a' option will also set things up so that window geometry/position will be properly restored on an `auto_show`.

11
tdrop

@ -110,6 +110,15 @@ wm_autodetect_settings() {
map_pre() { map_pre() {
bspc rule -a "$1" -o floating=on bspc rule -a "$1" -o floating=on
} }
# tiling window manager with no support for floating; can toggle fullscreen instead for the dropdown
elif [[ $wm == herbstluftwm ]]; then
map_post() {
herbstclient fullscreen on
echo "yes" > /tmp/tdrop/herb
}
unmap_post() {
herbstclient fullscreen off
}
# floating window managers that may both move and resize a window after unmapping then mapping it # floating window managers that may both move and resize a window after unmapping then mapping it
elif [[ $wm == Openbox ]]; then elif [[ $wm == Openbox ]]; then
# openbox will resize window to be slightly less than the width of the screen when mapping # openbox will resize window to be slightly less than the width of the screen when mapping
@ -180,6 +189,8 @@ map_post_command() {
unmap_post_command() { unmap_post_command() {
if [[ -n $unmap_post ]]; then if [[ -n $unmap_post ]]; then
eval "$unmap_post" eval "$unmap_post"
elif [[ -n $(type unmap_post) ]]; then
unmap_post
fi fi
} }

Loading…
Cancel
Save