diff --git a/README.md b/README.md index 20d8a18..16c0456 100644 --- a/README.md +++ b/README.md @@ -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. #### Tiling without Floating Support -If your window manager does not support floating, there's nothing to worry about. Binding a key to `tdrop 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 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 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`. diff --git a/tdrop b/tdrop index 3e25fc0..230577f 100755 --- a/tdrop +++ b/tdrop @@ -110,6 +110,15 @@ wm_autodetect_settings() { map_pre() { 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 elif [[ $wm == Openbox ]]; then # 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() { if [[ -n $unmap_post ]]; then eval "$unmap_post" + elif [[ -n $(type unmap_post) ]]; then + unmap_post fi }