init
This commit is contained in:
15
dev/enable.py
Executable file
15
dev/enable.py
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
# Trägt eine Extension-UUID in die aktiven GNOME-Extensions ein, falls sie fehlt: dev/enable.py <uuid>
|
||||
import ast
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
uuid = sys.argv[1]
|
||||
raw = subprocess.check_output(['gsettings', 'get', 'org.gnome.shell', 'enabled-extensions']).decode().strip()
|
||||
enabled = ast.literal_eval(raw.replace('@as ', ''))
|
||||
if uuid in enabled:
|
||||
print(f'{uuid} ist schon aktiviert.')
|
||||
else:
|
||||
enabled.append(uuid)
|
||||
subprocess.check_call(['gsettings', 'set', 'org.gnome.shell', 'enabled-extensions', str(enabled)])
|
||||
print(f'{uuid} aktiviert.')
|
||||
Reference in New Issue
Block a user