[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
This commit is contained in:
parent
2f7931753e
commit
c514d965cb
1 changed files with 10 additions and 1 deletions
|
@ -2,6 +2,11 @@
|
||||||
|
|
||||||
"""Shows a widget for each connected screen and allows the user to enable/disable screens.
|
"""Shows a widget for each connected screen and allows the user to enable/disable screens.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
* xrandr.overwrite_i3config: If set to 'true', this module assembles a new i3 config
|
||||||
|
every time a screen is enabled or disabled by taking the file "~/.config/i3/config.template"
|
||||||
|
and appending a file "~/.config/i3/config.<screen name>" for every screen.
|
||||||
|
|
||||||
Requires the following executable:
|
Requires the following executable:
|
||||||
* xrandr
|
* xrandr
|
||||||
"""
|
"""
|
||||||
|
@ -52,7 +57,11 @@ class Module(bumblebee.engine.Module):
|
||||||
|
|
||||||
def _toggle(self, event):
|
def _toggle(self, event):
|
||||||
path = os.path.dirname(os.path.abspath(__file__))
|
path = os.path.dirname(os.path.abspath(__file__))
|
||||||
toggle_cmd = "{}/../../bin/toggle-display.sh".format(path)
|
|
||||||
|
if bumblebee.util.asbool(self.parameter("overwrite_i3config", False)) == True:
|
||||||
|
toggle_cmd = "{}/../../bin/toggle-display.sh".format(path)
|
||||||
|
else:
|
||||||
|
toggle_cmd = "xrandr"
|
||||||
|
|
||||||
widget = self.widget_by_id(event["instance"])
|
widget = self.widget_by_id(event["instance"])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue