Commit graph

11 commits

Author SHA1 Message Date
Tobias Witek
c514d965cb [modules/xrandr] Do not overwrite i3 config by default
Require user to explicitly enable overwriting of i3 config files before
starting to automatically assemble the i3 config from a template and a
set of display-related config files.

fixes #322
2018-11-09 16:48:00 +01:00
Frederic Junod
f46671a85f Use 'is None' instead of '== None' 2018-06-04 14:50:51 +02:00
Frederic Junod
5f20fa6134 Fix trailing-whitespace errors found by pylint 2017-10-17 18:59:26 +02:00
Tobias Witek
f0bacdecd8 [modules/xrandr] Fix a crash caused by Python3
Python3 does not have sys.maxint anymore, so replace it with
sys.maxsize, which is available in both Python2 and Python3.

fixes #59
2017-03-28 19:08:17 +02:00
Tobi-wan Kenobi
87714f12ee [modules/*] Add required executables/commandline tools to help output
fixes #39
2017-01-05 04:55:14 +01:00
Tobi-wan Kenobi
1d6ca352b9 [modules/xrandr] Re-enable xrandr module
Displays the connected screens and allows the user to enable/disable
them.

see #23
2016-12-11 12:23:33 +01:00
Tobi-wan Kenobi
a8a6c9bba2 [core] Refactor engine
This is going to be a bit more comprehensive than anticipated. In order
to cleanly refactor the core and the engine, basically start from
scratch with the implementation.

Goals:

* Test coverage
* Maintain backwards compatibility with module interface as much as
  possible (but still make modules easier to code)
* Simplicity

see #23
2016-12-03 20:38:54 +01:00
Tobi-wan Kenobi
2f3f171ca5 [core] Remove alias from module
Hide alias concept for modules in the engine. That way, the individual
modules never get to know about whether a module has been aliased or
not.

see #23
2016-12-02 18:53:34 +01:00
Tobi-wan Kenobi
e8b3dfb4ef [modules/xrandr] Add display on/off toggling
This one is a bit tricky:
* Clicking on an active xrandr output will disable it
* Clicking on a disabled xrandr output will enable it -> if
  it is a left-click, it will put it as the left-most display
  if it is a right-click, as the right-most display

Also, it will reload the i3 bars (using a script that allows
you to write custom pieces of an i3 configuration that is applied
conditionally depending on the screens you have).

It goes like this:
* Base config is in ~/.i3/config.template
* Output-specific config is in ~/.i3/config.<screen name>
* Output-specific config when other screens are also active is in
  ~/.i3/config.<screen>-<other-screens-in-alphabetic-order>

For instance:
$ ls ~/.i3
config.template
config.eDP1 -> will be applied to eDP1 (always)
config.VGA1-eDP1 -> will be applied to VGA1, if eDP1 is also active
config.VGA1 -> will be applied to VGA1 (if eDP1 is inactive)

fixes #19
2016-11-26 13:57:33 +01:00
Tobi-wan Kenobi
c095b89022 [modules/xrandr] Sort display widgets by position
Show display widgets from left to right according to their relative
xrandr position.

see #19
2016-11-26 08:46:16 +01:00
Tobi-wan Kenobi
4ea0cfae1e [modules/xrandr] Add module to show attached displays
This modules shows attached displays and their states (on or off).
Future versions of this module will order the icons by the relative
order of the screens (left-to-right) and will allow switching monitors
on and off.

see #19
2016-11-26 08:28:19 +01:00