Commit Graph

111 Commits (914c535cdaec500605a90f05d15d8b171a649e0e)

Author SHA1 Message Date
noctuid 914c535cda Add class name translation for st (for bspwm)
Addresses #29.
8 years ago
noctuid cf7b1a3a22 Update manpage to mention multi-user support
Also make some minor quoting changes and silence shellcheck errors.
8 years ago
Kai Fartaczek 2564d7ff09 added multi-user support 8 years ago
noctuid e9e222f6fa Ignore disabled monitors for -m
Don't check monitors without dimensions in xrandr's output.
Addresses #26.
8 years ago
noctuid 45e9d72711 Fix support for gnome-terminal
Fixes #25.
8 years ago
noctuid 4661ea84af Drop support for prior versions of bspwm 8 years ago
noctuid c0f0c7fecc Reset position of bspwm dropdowns upon mapping
Newer versions of bspwm (0.9.1) occasionally the move a dropdown to the
center of the screen when remapping it. Fixes #23.
8 years ago
noctuid 2937b69f11 Move dropdown when it is open on another desktop
For most WMs (awesome is an exception), windows that are open on another
desktop are reported as unmapped which causes nothing to happen if a
tdrop command is run (unmapping/mapping don't work in this case). Moving
a dropdown to the current desktop is possible with xdotool though
(basically the same as wmctrl's -R). This is a temporary solution that
may be need to be refined in the future. A potential issue is whether
pre/post map hooks should be run in this case (e.g. rules should not be
added again for bspwm). This could be fixed later by actually unmapping
the window or by adding more specific hooks. Addresses #21.
8 years ago
noctuid 9609e25621 Fix pid handling in create_win_return_wid
- Simplify logic
- Properly handle both the case where a "special" program needs to be
  started and where it has already been started (did not actually work
  before because the first pgrep somehow stopped the second from working
  correctly)
- Add support for "chromium-browser"

Closes #20.
8 years ago
noctuid f028683a38 Add workaround for chrome
Classname may differ from command name (e.g. google-chrome vs.
google-chrome-stable).
9 years ago
noctuid 77992cf141 Add support for google chrome
Also fix support for chromium when it hasn't been previously started.
Addresses #20.
9 years ago
noctuid 9bc0deade7 Fix support for xfce4-terminal
Addresses #20.
9 years ago
noctuid 2aed1021c5 Add support for chromium
Fixes #20.
9 years ago
noctuid b66e7e661b Allow -x and -y to take a percentage or negative
With this, '-m' is no longer required for negative values to be used
with any of the geometry options (-w/-y/-x/-y). Also, tdrop no longer
relies on xdotool's ability to take percentages directly (for
windowsize). Fixes #19.
9 years ago
noctuid 4c53ab2892 Suppress more ignorable errors
The map_post commands that actually combine movement with mapping will
cause an error when first creating a dropdown since in this case the
window is already mapped. Addresses #17.
9 years ago
noctuid 70c78039cf Add a --map-hook flag
Addresses #17.
9 years ago
noctuid 13a658fde0 Add a --create-hook option that won't override -a
Addresses #17.
9 years ago
noctuid e1c2622301 Update to support bspwm 0.9.1
- Fix floating rules
- Fix is_floating (for auto_hide and auto_show)
- Fix for -m option
9 years ago
ShadowKyogre bb1f0b19e2 Add additional compiz check
Compiz Reloaded / Compiz 0.8.x reports itself with a lowercase compiz.
9 years ago
noctuid 39b71e4638 Merge branch 'patch/bugfix' of https://github.com/schoettl/tdrop into schoettl-patch/bugfix 9 years ago
Jakob Schöttl cacd3c50d1 Bugfix in help text: default values 9 years ago
noctuid 661eaa76ba Update shebang 9 years ago
noctuid f883f81e5a Don't output errors of non-existent files 9 years ago
noctuid 8cad7fb8eb Don't output xprop error messages
Ignore errors when checking for visibility. Addresses #14.
9 years ago
noctuid 9b4f0fe713 Add support for compiz
Addresses #14.
9 years ago
noctuid fb60bd6642 Add support for long options without =
Closes #12
9 years ago
noctuid 40917af009 Send error messages to STDERR 9 years ago
noctuid f4f58b66e9 Escape tmux session name
This will, for example, allow session names to have whitespace (not that
that's a good idea, but if the session name is quoted like -s "a b",
then the expected behavior is to get a session named "a b" not for tdrop
to fail).
9 years ago
noctuid 702f047b6b Error in the case of multiple positional arguments 9 years ago
noctuid b472eda261 Use shift to simplify check for positional argument 9 years ago
noctuid 7442bf9b31 Deal with short options in positinal arg check 9 years ago
noctuid dadac198e2 Merge pull request #11 from schoettl/temp
Small enhancements
9 years ago
noctuid bf606ca510 Merge branch 'master' of https://github.com/noctuid/tdrop 9 years ago
noctuid 5a57a20aab Remove useless line 9 years ago
noctuid 3350752978 Add basic option validation
Exit with an error message if
- A long option that requires an arg is specified without =
- No positional argument is given (for the program name or auto commands)
- A negative width or height is given without -m
- Numeric options do not have a number value
9 years ago
Jakob Schöttl 651404c5e3 Minor changes 9 years ago
noctuid a7a317d2ca Don't output xwininfo's errors for nonexistent WIDs 9 years ago
Jakob Schöttl 1b189759b9 Fix in documentation 9 years ago
noctuid 783cfc627a Merge branch 'wait' 9 years ago
noctuid c7b8ab343f Add support for urxvtd and terminix
Programs with a shared pid for all windows need to be treated
differently.
9 years ago
noctuid e07d993262 Get rid of sleep options
Determine the WID of a created window by checking the WID(s) associated
with the PID until one is viewable. This allows tdrop to reliably
determine the WID of the programs it starts and prevents capturing the
wrong window.

- Combine wid_create and term_create into one (which removes the need
  for the -W option)
- Remove differing sleep settings for various window managers
- Get rid of a loop to check if the WID has been found
9 years ago
Jakob Schöttl 8cf2d6cc6a Avoid glob expansion on rhs and linter warning! 9 years ago
Jakob Schöttl 0c63e94588 Minor refactoring
Should have exactly the same effect now.

In case of no options: one white space after a shell command don't change
anything.
9 years ago
Jakob Schöttl 21e8aa2522 Fixed long-option argument parsing
Arguments of long-options (e.g. --program-flags='--foo=bar') may contain
equal sign characters (=). Before this fix, these kind of options were
split up into "program-flags" and "--foo" removing the last part of the
argument. This was because only the first two colums from `awk -F= ...`
were used.

Now these kind of options will be split up correctly using Bash parameter
expansion: "program-flags" and "--foo=bar".

See man bash > Parameter Expansion for details.

Tested with:
sudo cp tdrop /usr/bin/tdrop
tdrop -W --program-flags='-e tmux --role=tdropwindow'   termite
tdrop -W              -f '-e tmux --role=tdropwindow'   termite
tdrop --normal-window -f '-e tmux --role=tdropwindow'   termite

It also works for boolen long-option flags without argument. In this
case both OPTION and OPTARG are set to the long-option name. Boolean
options don't use the OPTARG so it doesn't matter.
9 years ago
noctuid 8505a7bd97 Rename $term to $program 9 years ago
noctuid ef9e436252 Add initial support for terminix 9 years ago
noctuid f5c81e6acd Don't keep WIDs for windows that have been closed
Fixes a bug where the wrong window id could be used after creating a new
dropdown in the map_post_command or for set_geometry_for_monitor
9 years ago
noctuid 93b5947029 Make -m work on empty desktops for all WMs
When there is no active window, open the dropdown and use it to
determine the current monitor. This can result in delay before the
dropdown is resized. Closes #3.
9 years ago
noctuid 6b099f93a4 Add documentation of -m option to README and rename long opt 9 years ago
noctuid a5bd168ce4 For -m, only get monitor info when creating and remapping
Previously, if the dropdown was unmapped from another monitor and then
remapped on that monitor, the dropdown would not be resized since the
unmapping would change the stored "last_monitor".
9 years ago