Skip to content

Commit

Permalink
Merge pull request dylanaraps#94 from dylanaraps/windows
Browse files Browse the repository at this point in the history
windows: Fix file not found error.
  • Loading branch information
dylanaraps authored Aug 27, 2017
2 parents 7326f66 + 0ae2986 commit 12c52c4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pywal/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
import json
import os
import shutil
import subprocess


Expand Down Expand Up @@ -111,15 +112,15 @@ 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)


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)

0 comments on commit 12c52c4

Please sign in to comment.