Skip to content

Commit 885d85f

Browse files
authored
Update main_window.py
1 parent 09cd604 commit 885d85f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/main_window.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,18 @@ def __init__(self, *args, **kwargs):
197197
self.pBox.append(self.label_sorry)
198198

199199
if snap:
200+
plug = ["dot-config", "dot-local", "dot-themes", "dot-icons", "dot-fonts", "login-session-control"]
200201
# If plug is not connected, display error message
201-
if not os.path.exists(f"{DATA}/first-run"):
202+
result = subprocess.run(["snapctl", "is-connected", plug], stdout=subprocess.PIPE)
203+
204+
for plugs in plug:
205+
# If plug is not connected, display error message
206+
if result.returncode != 0:
207+
show_warning = True
208+
else:
209+
show_warning = False
210+
211+
if show_warning == True:
202212
self.set_child(self.pBox)
203213
self.headerbar.set_title_widget(None)
204214
self.pBox.set_margin_start(90)

0 commit comments

Comments
 (0)