Commit Graph

109 Commits (702f047b6bdcc33c0b2353f490104458a171c310)
 

Author SHA1 Message Date
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
noctuid da7bd94d3f Merge pull request #10 from schoettl/doc
Warn about potential undesired behavior from combining -f and -s
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
noctuid 6c9b0c65e3 Merge pull request #7 from schoettl/master
Fixed long-option argument parsing

Minor refactoring
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
noctuid 0a222a6ce0 Update bspwm is_floating command for new syntax
Bspc's query --tree command now outputs json. Maintain compatability
with old syntax as well.
9 years ago
noctuid e547e6fcd6 Maintain compatability with old bspc rule syntax 9 years ago
noctuid c194780856 Update bspwm map_pre command for new bspc syntax 9 years ago
noctuid 8d2559bc04 Fix broken path to license directory 9 years ago
noctuid 7cd3f033f0 Be explict and specify dest file with install (and not just dir) 9 years ago
noctuid 52e6cf1619 Don't delete mandir! 9 years ago
noctuid 26ef929e13 Fix rm in Makefile and install LICENSE 9 years ago
noctuid e96ed65782 Add uninstall section to Makefile and update vars 9 years ago
noctuid 777a7d41bb Use -n when "returning" from a function with echo 9 years ago
noctuid c23c30ef65 Split some longer lines 9 years ago
noctuid 5dfe993943 Differentiate local variables from global variables 9 years ago
noctuid 0d369bef73 Determine monitor in better way on bspwm and i3
Addresses #3

This ensures that -m will work even when the focused workspace on a
monitor is empty.
9 years ago
noctuid dbc3656da8 Fix man page typo 9 years ago
noctuid babc97500e Set wm var for automatic settings in single location
(wm_autoset_for_hide_show (but not wm_autoset_for_dropdown) was taking
advantage of the fact that wm had already been set in wm_autoset_for_all)
9 years ago
noctuid aefa230d63 Prevent monitor checking for auto_hide and auto_show (doesn't do
anything)
9 years ago
noctuid b21f9b8add Add -f option to specify options for the terminal or other program to
be created using

Addresses #6
9 years ago
noctuid 8eed440432 Add missing sleep flags to getopts 9 years ago
noctuid b7e786c440 Fix -m for WMs where xrandr will identify one monitor as "primary" 9 years ago
noctuid 14495af417 Update -m to also set xoff and yoff appropriately
This is apparently necessary for at least i3 when remapping a dropdown
and also for bspwm when first creating one (otherwise the dropdown will
be created at the absolute position xoff yoff even if it is not on the
current monitor).

Addresses #3
9 years ago
noctuid 6348276dbe Add multiple monitor support (automatic resizing and correct
width/height percentages)

Addresses #3
9 years ago
noctuid 08dc6a893f Update contact info and repo location 9 years ago
noctuid 6a122f80d0 Update references to old repo and contact info 9 years ago
noctuid 682ec14d1c Update repo location and contact info in pkgbuild 9 years ago
angelic-sedition b737354f22 Add support for Marco (MATE) 9 years ago
angelic-sedition 5cab6f4869 Add support for KWin (KDE) 9 years ago
angelic-sedition 10afc60fcf Add information on basic options to README and a few other minor changes 9 years ago