Commit Graph

161 Commits (master)

Author SHA1 Message Date
Jan Kužílek 5a85df2508 Replaced old wid-retrieving method with xtoolwait 4 years ago
Fox Kiester ffaf358bde
Fix shellcheck github action 4 years ago
Fox Kiester b7afed7b41
Give specific error when illegal opt is given 4 years ago
Fox Kiester 9c75b30212
Add timeout to wait for program window to appear
Also add error helper function and fix option validation.

Addresses #62. Prevents tdrop from spiking CPU forever if a program fails to
start.
4 years ago
Fox Kiester f4f0f34644
Add hide_all command
Fixes #60.
4 years ago
Fox Kiester 24d61bd266
Fix -a for emacsclient (set class as "emacs") 5 years ago
Fox Kiester 59c426dfc0
Remove unnecessary quotes 5 years ago
Fox Kiester 4926be8fcb
Allow specifying program flags after the program
This not working has caused a lot of confusion. Not only is -f not necessary,
but the implementation is worse than just allowing flags after the program.
Deprecate the -f flag. Stop evaling a string; build an array of program options
instead.

Addresses various issues: #6, #17, #52, etc.
5 years ago
Fox Kiester 2b1553090d
Fix shellcheck errors/warnings 5 years ago
Fox Kiester 5a44b827ad
Reindent 5 years ago
Fox Kiester c143104977
Suppress stderr when reading no_hide file 5 years ago
Fox Kiester 216070e29e
Improve performance
- Prefer builtins where possible
  - Use builtin math for percent_of_total
  - Use parameter expansion instead of awk where possible
  - Query specific property that want for xprop instead of using awk
- Avoid extra call to get_window_manager
- Use xrandr's --current flag (doesn't poll for hardware changes; ~0.01 second vs. 0.075 seconds on my comupter)
- Get current monitor name from bspc directly without parsing

Addresses #36.
5 years ago
Fox Kiester d74150f01f
Add support for Trinity's konsole (TDE)
Fixes #58.
5 years ago
Kamil Sołtysik 60435d240f
Pointer-based screen detection 5 years ago
Fox Kiester 183d983e4d
Explicitly use gawk and update dependency list
Fixes #49.
5 years ago
Fox Kiester 7eaa3b517d
Add support for qutebrowser
Fixes #56.
5 years ago
Fox Kiester 89d2e4ffce
Add workaround to support urxvt with tabbed plugin
Fixes #54.
5 years ago
Alexandr Priezzhev 198795c0d2
Fixes running Alacritty with the command shell argument 6 years ago
Fox Kiester 7d3192286a
Add initial support for emacsclient 6 years ago
Fox Kiester d91b1594b1
Add more broad urxvt name check for class inference
Addresses #47.
6 years ago
Fox Kiester fc2593f36e
Add initial discord support 6 years ago
noctuid 6c7336d84a Prevent matching multiple monitors
Fixes #44.
6 years ago
noctuid 3278f76f9e Silence more irrelevant errors/output 6 years ago
noctuid 8808dff04b Add -s support for lilyterm 6 years ago
noctuid 2ea52326bc Add -s support for LXTerminal
Also list related desktop environments for terminals.
6 years ago
noctuid 14a935ca24 Add support for -s for cool-retro-term 6 years ago
noctuid b1ba3b6129 Add -s support for qterminal 6 years ago
noctuid 498de5706e Fix -s for st and xst
Fixes #29.
6 years ago
noctuid ffef664678 Automatically use -d 0 0 with alacritty
Addresses #38.
6 years ago
noctuid 95d742acc0 Add -s support for kitty 6 years ago
noctuid 36995d1090 Fix geometry restoration for auto_show
Geometry restoration broke in 056edc6. Now width and height are also
explicitly restored.
6 years ago
noctuid 0facf21df7 Add tmuxifier support
Addresses #38.
6 years ago
noctuid c72d00af39 Fix case when dropdown open on other desktop for i3
Addresses #21 and #35.
7 years ago
noctuid 005e5bf547 Fix non-dropdown commands
These should not be checked as if they are programs.
7 years ago
noctuid b34232d299 Add --name flag
Closes #33.
7 years ago
noctuid 5373b5c31a Clarify the difference between classname and class 7 years ago
noctuid 0928e7d885 Minor whitespace fix 7 years ago
noctuid bc46d9dcab Add check to ensure a valid program 7 years ago
noctuid 37224947e5 Terminix is now tilix 7 years ago
noctuid 099a4149d6 Update readme for new hooks and convert to org 7 years ago
noctuid f6fb40b74d Fix geometry reset for post-float WMs
Addresses #31.
7 years ago
noctuid bbb6ee5e5f Add support for xiate
Fixes #31.
7 years ago
noctuid e2b1495996 Update manpage
- fix hook/command options in manpage
- add new flags to manpage
- stop escaping unnecessarily escaping "-"
- Remove description from program help text (have only in manpage)
- change --subtract-when-same to --no-subtract-when-same (no longer
  takes an arg); remove unnecessary relate if/elseif/else
- add "map" to the pre/post float command long options
- silence ignorable shellcheck warnings
- "=" is no longer required with long options, so remove that warning
7 years ago
noctuid 428ee7c738 Fix map/unmap hooks
- Fix variable naming (remove _hook)
- Other minor stylistic changes (e.g. quotes)
7 years ago
noctuid bc6a6eaf14 Add -s and -a support for alacritty
Closes #28
7 years ago
noctuid 850efe7212 Add -S and -i flags and update help text
The user now has complete control over everything -a alters.

All checks for the -a flags are now done in the helper functions.
"is_floating" is now always defined and will return 1 if the window is
not floating. Fix the float checks in mapping functions. Get rid of
separate "dec_fix_auto" variable.
7 years ago
noctuid 056edc6f56 Major updates
- Get rid of old method for -a; now mapping the window will always be
  combined with resetting its size and location; this may not be
  necessary, but in those cases, it won't cause any harm; this means
  that there is no reason to differentiate between window managers that
  move or resize windows as this possibility will always be taken into
  account
- Don't record last monitor and check to see whether a geometry change
  is necessary; just always fix the geometry (same reasoning as previous
  point; there is no significant overhead)
- Finish transition to new "hooks" (pre/post create/float/map/unmap)
- Make the naming of the hook variables consistent (pre/post first)
- Make wid and class global variables
- Add --wm and --class options (wm option may only be useful in limited
  circumstance since most settings are now very specific to their wm;
  this may change in the future or this setting may be useful in the
  possible case that a similar fork of a wm has a different name)
- Switch to org style headings

Still needs to be done:
- further testing
- documentation (help, readme, manpage)
7 years ago
noctuid 0dc7c2825b Rename some functions 7 years ago
noctuid ac0f811cab Fix tmux handling for urxvtc
Fixes #30.
7 years ago
noctuid e6e52dcf4d Silence complaints about wid file not existing
Addresses #29.
7 years ago