Commit Graph

29 Commits

Author SHA1 Message Date
Richard Grenville f1cd308cde compton-convgen: Misc: Clean up
compton-convgen: Misc: Clean up. The commit brings no change to the
functionality of the script.

 - Partially fix PEP 8 compliance:

   - Place imports on separate lines.

   - Replace leading tabs with 4 spaces.

   - Add docstrings to classes and functions.

   - Surround top-level function and class definitions with two blank
     lines.

   - Remove spaces around keyword arguments.

   - Move all statements to separate lines.

   - Break some long lines into several lines.

 - Remove trailing semicolons after statements.

 - CGError: Use functionality from the base class Exception to store the
   description, instead of the custom logic.

 - CGInternal: Remove, as it is unused.

 - Hide the internal function gen_invalid() and args_readfactors() by
   prefixing their names with an underscore.

 - Move the module-level command-line handling code to two new
   functions, _main() and _parse_args(), and only execute if running in
   the main scope.
2016-08-10 23:53:41 +08:00
Corax26 e4c0b8301d Fix compton-trans -c
The pipeline used to retrieve the WID of the active window returns a bad WID because xprop returns several hex numbers and ".*" in the sed regex is greedy. For instance, running "xprop -root -notype _NET_ACTIVE_WINDOW" gives me:
_NET_ACTIVE_WINDOW: window id # 0x1a0003d, 0x0
Filtering this output with the sed substitution then gives "0x0", since the first ".*" matches everything up to *the last* hex number.

The fix is simply to grep hex numbers instead of using a sed substitution, and then choose the first one.
2015-03-26 01:31:00 +01:00
Richard Grenville d717411687 Misc #177: Clarify the message about missing xwininfo/xprop
Clarify the message about missing xwininfo/xprop. (#177)
2014-02-25 22:13:43 +08:00
Richard Grenville 9a45338254 Misc: Small fix for regex in compton-trans 2013-05-11 08:13:06 +08:00
Richard Grenville 1cb6058732 Merge pull request #108 from chjj/compton_trans
compton-trans improvements
2013-05-10 16:58:20 -07:00
Christopher Jeffrey a9a3b015e1 compton-trans: ensure wid format. misc.
xwininfo falls back to cursor selection if the window ID is formatted
improperly.
2013-05-04 21:07:42 -05:00
Christopher Jeffrey 216441c7b0 compton-trans: add reset option. 2013-05-04 20:40:01 -05:00
Christopher Jeffrey 7c451c10f7 compton-trans: allow long option names. 2013-05-04 20:39:08 -05:00
Christopher Jeffrey b0db9f4f07 Revert "compton-trans: use getopt instead of getopts."
This reverts commit 80a3c80561.
2013-05-04 18:14:41 -05:00
Christopher Jeffrey 80a3c80561 compton-trans: use getopt instead of getopts. 2013-05-04 17:51:00 -05:00
Christopher Jeffrey c9bf88cc89 compton-trans: use a different workaround with getopts. 2013-05-04 17:50:31 -05:00
Christopher Jeffrey e6b973fe2f compton-trans: minor. consistency. 2013-05-04 16:54:18 -05:00
Christopher Jeffrey ad23872801 compton-trans: add a 'get' option. 2013-05-04 16:51:24 -05:00
Christopher Jeffrey 86b20e0a08 compton-trans: improve option parsing. 2013-05-04 16:20:18 -05:00
Christopher Jeffrey 25d31a1f5e compton-trans: cleanup. add remove-prop option. 2013-05-04 13:50:36 -05:00
Christopher Jeffrey 054d343622 compton-trans: more consistency. 2013-05-04 13:36:24 -05:00
Christopher Jeffrey 9a4d202f5d compton-trans: consistency, better bash practices, refactor. 2013-05-04 13:18:04 -05:00
Richard Grenville a3f6f4442b Improvement: Add predefined blur kernels
- Add a few predefined blur kernels, requested by jerri in #104.

- Add compton-convgen.py to generate blur kernels.
2013-04-29 22:42:46 +08:00
hasufell 85e561283e don't depend on bash, our script is POSIX anyway 2013-01-28 17:31:16 +01:00
Richard Grenville 62ea373ee5 Merge branch 'master' into richardgv-dev
Conflicts:
	bin/compton-trans
	man/compton-trans.1

- Add some explaination in README.md.

- Rename CMakeLists.txt to _CMakeLists.txt to avoid confusion.
2012-11-14 18:46:26 +08:00
Richard Grenville fd9c9ba38d Misc: compton-trans: Allow reading opacity from positional arguments
- compton-trans: Allow reading opacity value from positional arguments,
  like the version in master branch.

- compton-trans: Quit when meeting an unrecognized option.
2012-11-14 18:17:32 +08:00
Richard Grenville ce7f686f9e Misc: compton-trans: Performance optimization
Reduce abundant calls to xwininfo in compton-trans further. Helpful for
performance but you can't expect too much from a bash script anyway.
2012-11-11 13:02:14 +08:00
Richard Grenville 59d6979612 Bug fix: compton-trans -s does not work
My silly mistake. :-)
2012-11-09 00:03:22 +08:00
Christopher Jeffrey c883cdec3e compton-trans: add error handling. better option parsing. 2012-11-08 09:21:57 -06:00
Richard Grenville 08ca5b4d1e Bug fix #62: Rewrite a part of compton-trans
Rewrite a part of compton-trans in order to provide more friendly
error messages, to support window title that contains spaces, and to
limit the number of xwininfo calls to a constant. Not much tests are
done, and I don't know bash well, so bugs could very well exist.
2012-11-08 22:37:31 +08:00
Christopher Jeffrey 2a566e83a7 rename settrans to compton-trans, add manpage. 2012-06-23 17:39:49 -05:00
Christopher Jeffrey 84b7c3e65d minor settrans changes 2012-05-27 19:21:14 -05:00
Christopher Jeffrey d52f7a06db refactor settrans 2012-04-01 00:01:31 -05:00
Christopher Jeffrey 8f4eafaf79 reorganize tree 2012-02-27 05:22:33 -06:00