summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmonitor-menu.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/monitor-menu.py b/monitor-menu.py
index ecd70a5..423faee 100755
--- a/monitor-menu.py
+++ b/monitor-menu.py
@@ -29,17 +29,22 @@ class MonitorMenu():
profile = self.profiles[int(profile_idx)]
# We build the command line starting from just "xrandr" and adding arguments.
- cmd = ['xrandr']
+ xrandr_cmd = ['xrandr']
+ feh_cmd = ['feh', '--bg-fill']
try:
- cmd.extend(profile['xrandr-opts'])
+ xrandr_cmd += profile['xrandr-opts']
except KeyError:
pass
for monitor in profile['monitors']:
- cmd.extend(monitor['xrandr-opts'])
+ xrandr_cmd.extend(monitor['xrandr-opts'])
- subprocess.run(cmd)
+ if monitor['background'] is not None:
+ feh_cmd.append(monitor['background']);
+
+ subprocess.run(xrandr_cmd)
+ subprocess.run(feh_cmd)
def main():