From b1e6977914bfd6bbc8dbb8c83644ff741f3651ac Mon Sep 17 00:00:00 2001 From: angelic-sedition Date: Mon, 24 Aug 2015 16:35:54 -0400 Subject: [PATCH] Add support for Mutter (Gnome Shell) --- README.md | 1 + tdrop | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dc2adab..f717605 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,7 @@ If your window manager does not support floating, there's nothing to worry about 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`. That said, these are the floating window managers that currently have '-a' settings: +- mutter (gnome shell) - xfwm4 - metacity - openbox diff --git a/tdrop b/tdrop index efd9859..aa13666 100755 --- a/tdrop +++ b/tdrop @@ -171,7 +171,7 @@ wm_autoset_for_all() { } # floating WMs that need extra sleep time to wait for dropdown to spawn initially - elif [[ $wm == Fluxbox ]]; then + elif [[ $wm =~ ^(Fluxbox|Mutter|GNOME Shell)$ ]]; then if ! $sleep_term_user_set; then sleep_term_time=0.05 fi @@ -198,6 +198,9 @@ wm_autoset_for_hide_show() { # take borders into account elif [[ $wm == Blackbox ]]; then dec_fix_auto="1x22" + elif [[ $wm =~ ^(Mutter|GNOME Shell)$ ]]; then + dec_fix_auto="-10x-8" + subtract_when_same=false # NOTE: # pekwm, xfwm4, sawfish, openbox need subtract_when_same to be true (default) @@ -230,8 +233,9 @@ wm_autoset_for_dropdown() { xdotool windowmove "$1" "$xoff" "$yoff" windowsize "$1" "$width" "$height" } # floating window managers that may move a window after unmapping then mapping it - elif [[ $wm =~ ^(pekwm|Fluxbox|Blackbox|xfwm4|Metacity|FVWM|Sawfish|GoomwW|Mutter \(Muffin\))$ ]]; then + elif [[ $wm =~ ^(pekwm|Fluxbox|Blackbox|xfwm4|Metacity|FVWM|Sawfish|GoomwW|Mutter|GNOME Shell|Mutter \(Muffin\))$ ]]; then # most will center + # mutter/gnome shell will move to top centerish (just below panel on gnome shell) # xfwm4 will normally move to top left; metacity will move close to top left # sawfish just moves all over the place map_post() {