diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2017-07-21 11:19:17 +1000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2017-07-21 11:19:17 +1000 |
| commit | 3d1f11b1bd70b17567808849fd9eb3346599bb53 (patch) | |
| tree | 888ac4c6b6661bce618fd6a6a892433b89ef5712 /pywal/util.py | |
| parent | 950b7e892a98675616653bcabe405d9203691c6e (diff) | |
util: Add new msg function.
Diffstat (limited to 'pywal/util.py')
| -rw-r--r-- | pywal/util.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pywal/util.py b/pywal/util.py index 6c5b420..1030b60 100644 --- a/pywal/util.py +++ b/pywal/util.py @@ -98,3 +98,12 @@ def disown(*cmd): stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, preexec_fn=os.setpgrp) + + +def msg(input_msg, quiet): + """Print to the terminal and a libnotify + notification.""" + if not quiet: + disown("notify-send", input_msg) + + print(input_msg) |
