integrate home-manager config
This commit is contained in:
parent
a470338c43
commit
826a0e5525
45 changed files with 5308 additions and 1 deletions
18
home-manager/jwm/ptray/config.py
Normal file
18
home-manager/jwm/ptray/config.py
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue