diff options
| author | Olivier Gayot <olivier.gayot@sigexec.com> | 2018-11-23 17:34:40 +0100 | 
|---|---|---|
| committer | Olivier Gayot <olivier.gayot@sigexec.com> | 2018-11-23 17:34:40 +0100 | 
| commit | 970b2e90d1fa6c0f2e23d7528e7bc0c0b1030a14 (patch) | |
| tree | 6b25fc0f8a5f6b73a1ffad3ca5579fba89d062ff | |
| parent | e7f50f2c77f51c6fea6b2fc419389eae75fd0ce0 (diff) | |
Honor the background property
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
| -rwxr-xr-x | monitor-menu.py | 13 | 
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(): | 
