From 7c861966182c88df2c23e85021185df06c7facea Mon Sep 17 00:00:00 2001 From: angelic-sedition Date: Tue, 17 Feb 2015 22:34:52 -0500 Subject: [PATCH] add support for gnome-terminal in combination with bspwm float pre command --- README.md | 1 + tdrop | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f490ba8..f2fb206 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ I will add examples and better instructions. For now, refer to the manpage. - URxvt - Xterm - Termite +- Gnome-terminal ### Window Managers 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. diff --git a/tdrop b/tdrop index cbf8166..3d04b0a 100755 --- a/tdrop +++ b/tdrop @@ -154,7 +154,12 @@ float_pre_command() { eval "$float_pre" # use automatically set function if exists elif [[ -n $(type float_pre) ]]; then - float_pre "$1" + # needed when creating oneshot rules for programs where cmd differs from actual class name + if [[ $1 == "gnome-terminal" ]]; then + float_pre "Gnome-terminal" + else + float_pre "$1" + fi fi }