forked from birdybirdonline/Linux-Arctis-7-Plus-ChatMix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharctis_manager_launcher.py
27 lines (21 loc) · 952 Bytes
/
arctis_manager_launcher.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import asyncio
import os
from dbus_next import Message, MessageType
from dbus_next.aio import MessageBus
# Desktop application to summon the daemon's windows
# Specially designed for non-system tray desktop environments like GNOME
async def main():
bus = await MessageBus().connect()
message = Message(
destination='name.giacomofurlan.ArctisManager',
path='/name/giacomofurlan/ArctisManager',
interface='name.giacomofurlan.ArctisManager',
member='ShowSettings',
)
response = await bus.call(message)
if response.message_type == MessageType.ERROR:
args = ['--app-name="Arctis Manager"', '--urgency=normal', '--expire-time=5000']
os.system(f'notify-send {' '.join(args)
} "Arctis Manager" "Arctis Manager service is not available. Please connect the device first and try opening the app again."')
if __name__ == '__main__':
asyncio.run(main())