No support for notifications (yet) on windows

win_fixes
wattygetlood 2021-09-16 16:46:44 -04:00 committed by Tyler Goodlet
parent 68ed1164a1
commit 8fbd0cd067
1 changed files with 12 additions and 10 deletions

View File

@ -22,6 +22,7 @@ from contextlib import asynccontextmanager
from dataclasses import dataclass, field from dataclasses import dataclass, field
from functools import partial from functools import partial
from pprint import pformat from pprint import pformat
import platform
import time import time
from typing import Optional, Dict, Callable, Any from typing import Optional, Dict, Callable, Any
import uuid import uuid
@ -429,16 +430,17 @@ class OrderMode:
# TODO: make this not trash. # TODO: make this not trash.
# XXX: linux only for now # XXX: linux only for now
result = await trio.run_process( if platform.system() != "Windows":
[ result = await trio.run_process(
'notify-send', [
'-u', 'normal', 'notify-send',
'-t', '10000', '-u', 'normal',
'piker', '-t', '10000',
f'alert: {msg}', 'piker',
], f'alert: {msg}',
) ],
log.runtime(result) )
log.runtime(result)
def on_cancel( def on_cancel(
self, self,