integrate home-manager config

This commit is contained in:
jaina heartles 2024-07-21 22:36:29 -07:00
parent a470338c43
commit 826a0e5525
45 changed files with 5308 additions and 1 deletions

View file

@ -0,0 +1,18 @@
import os
import json
CONFIG_FILE = os.path.join(os.getenv('XDG_CONFIG_HOME'), 'ptray', 'config.json')
DESKTOP = os.getenv('XDG_CURRENT_DESKTOP')
if DESKTOP == 'i3' or DESKTOP == 'sway':
STATE_DIR = '{}.{}'.format(os.getenv('I3SOCK'), 'ptray')
elif DESKTOP == "hyprland":
STATE_DIR = '{}/{}.ptray'.format(os.getenv("XDG_RUNTIME_DIR"), os.getenv("HYPRLAND_INSTANCE_SIGNATURE"))
else:
raise ValueError('Unsupported value of XDG_CURRENT_DESKTOP: {}'.format(DESKTOP))
def read_config(path=CONFIG_FILE):
with open(path, 'r') as f:
config = json.load(f)
return config