summaryrefslogtreecommitdiff
path: root/pywal
diff options
context:
space:
mode:
authorDylan Araps <dylanaraps@users.noreply.github.com>2017-08-27 12:55:55 +1000
committerGitHub <noreply@github.com>2017-08-27 12:55:55 +1000
commit12c52c4b7d11ebaa3b68c47361b5128eace3c4e1 (patch)
treee8ba09efc723e14d3de227f710bab73d4af2bb30 /pywal
parent7326f6696cf848b61fe25f773c1eed37cead0b0b (diff)
parent0ae29869919b71bde977997d31cd101699cad525 (diff)
Merge pull request #94 from dylanaraps/windows
windows: Fix file not found error.
Diffstat (limited to 'pywal')
-rw-r--r--pywal/util.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pywal/util.py b/pywal/util.py
index 894c049..c609f71 100644
--- a/pywal/util.py
+++ b/pywal/util.py
@@ -3,6 +3,7 @@ Misc helper functions.
"""
import json
import os
+import shutil
import subprocess
@@ -111,7 +112,7 @@ def lighten_color(color, amount):
def disown(cmd):
"""Call a system command in the background,
disown it and hide it's output."""
- subprocess.Popen(["nohup", *cmd],
+ subprocess.Popen(cmd,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL)
@@ -119,7 +120,7 @@ def disown(cmd):
def msg(input_msg, notify):
"""Print to the terminal and display a libnotify
notification."""
- if notify:
+ if notify and shutil.which("notify"):
disown(["notify-send", input_msg])
print(input_msg)