diff options
| author | Dylan Araps <dylanaraps@users.noreply.github.com> | 2017-08-03 14:56:08 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-03 14:56:08 +1000 |
| commit | a0a840d5a92acf2b26916f7e4a976ee3aec05628 (patch) | |
| tree | f7e7c1c28d826477814312bcfac1bd5ecafc53e7 | |
| parent | 8a0b380eb548766e30c6e6d1818bbcbbef84c19a (diff) | |
| parent | 282605376dc017cfe8a7d562e4a7e3f78bcb63f1 (diff) | |
Merge pull request #72 from aeikenberry/master
Fixes reload wallpaper weirdness and adds -e option
| -rw-r--r-- | pywal/__main__.py | 7 | ||||
| -rw-r--r-- | pywal/wallpaper.py | 2 | ||||
| -rwxr-xr-x | tests/test_sequences.py | 5 |
3 files changed, 12 insertions, 2 deletions
diff --git a/pywal/__main__.py b/pywal/__main__.py index 460d77b..dbca515 100644 --- a/pywal/__main__.py +++ b/pywal/__main__.py @@ -65,6 +65,9 @@ def get_args(args): arg.add_argument("-v", action="store_true", help="Print \"wal\" version.") + arg.add_argument("-e", action="store_true", + help="Skip Reloading Environment gtk/xrdb/i3/polybar") + return arg.parse_args(args) @@ -114,7 +117,9 @@ def process_args(args): wallpaper.change(colors_plain["wallpaper"]) export.every(colors_plain) - reload.env() + + if not args.e: + reload.env() if args.o: util.disown([args.o]) diff --git a/pywal/wallpaper.py b/pywal/wallpaper.py index dae0f24..f1ce1dd 100644 --- a/pywal/wallpaper.py +++ b/pywal/wallpaper.py @@ -90,7 +90,7 @@ def set_mac_wallpaper(img): # macOS caches wallpapers and if a wallpaper is set that shares # the filename with a cached wallpaper, the cached wallpaper is # used instead. - util.disown(["killall", "Dock"]) + subprocess.call(["killall", "Dock"]) def change(img): diff --git a/tests/test_sequences.py b/tests/test_sequences.py index dd69e62..66f4084 100755 --- a/tests/test_sequences.py +++ b/tests/test_sequences.py @@ -29,6 +29,11 @@ class Testsequences(unittest.TestCase): result = sequences.set_color(11, COLORS["colors"]["color0"]) self.assertEqual(result, "\033]4;11;#1F211E\007") + def test_set_iterm_tab_color(self): + """> Create iterm tab color sequences""" + result = sequences.set_iterm_tab_color(COLORS["special"]["background"]) + self.assertEqual(len(result), 3) + if __name__ == "__main__": unittest.main() |
