Die if python-i3ipc not found on sway; Config tooltips updated.

This commit is contained in:
piotr
2021-03-12 23:23:22 +01:00
parent a179152b03
commit df39adee20
2 changed files with 6 additions and 4 deletions

View File

@@ -3,9 +3,7 @@
import os
sway = False
if os.getenv('SWAYSOCK') is not None:
from i3ipc import Connection
i3 = Connection()
i3 = None
ipc_data = None

View File

@@ -42,7 +42,11 @@ from nwg_panel import common
sway = os.getenv('SWAYSOCK') is not None
if sway:
from i3ipc import Connection
try:
from i3ipc import Connection
except ModuleNotFoundError:
print("'python-i3ipc' package required on sway, terminating")
sys.exit(1)
common.i3 = Connection()
from nwg_panel.modules.sway_taskbar import SwayTaskbar