Pokemon-Terminal/pokemonterminal/terminal/adapters/Tilix.py
2018-01-06 19:51:42 -05:00

22 lines
635 B
Python

import os
from . import TerminalProvider as _TProv
class Tilix(_TProv):
setting_key = "com.gexperts.Tilix.Settings"
setting_field = "background-image"
def is_compatible() -> bool:
return "TILIX_ID" in os.environ
def change_terminal(self, path: str):
command = 'gsettings set {} {} "{}"'
os.system(command.format(self.setting_key,
self.setting_field,
path))
def clear(self):
command = 'gsettings set {} {}'
os.system(command.format(self.setting_key,
self.setting_field))