Skip to content

Commit b6c7bb8

Browse files
committed
feat(hyde-config): A Go implementation of the parse.config.py
1 parent 12d113b commit b6c7bb8

File tree

6 files changed

+36
-2
lines changed

6 files changed

+36
-2
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[Unit]
2+
Description=HyDE Configuration Parser Service
3+
Documentation=https://github.com/HyDE-Project/hyde-config
4+
After=graphical-session.target
5+
PartOf=graphical-session.target
6+
7+
[Service]
8+
Type=simple
9+
ExecStart=%h/.local/lib/hyde/hyde-config
10+
Restart=on-failure
11+
RestartSec=5s
12+
Environment="DISPLAY=:0"
13+
14+
# Make sure the required directories exist
15+
ExecStartPre=/bin/mkdir -p %h/.config/hyde
16+
ExecStartPre=/bin/mkdir -p %h/.local/state/hyde
17+
18+
[Install]
19+
WantedBy=graphical-session.target
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[Unit]
2+
Description=Hyde IPC service for Hyprland
3+
PartOf=graphical-session.target
4+
After=graphical-session.target
5+
6+
[Service]
7+
ExecStart=%h/.local/bin/hyde-ipc
8+
Restart=on-failure
9+
RestartSec=5s
10+
11+
[Install]
12+
WantedBy=graphical-session.target
3.14 MB
Binary file not shown.

Configs/.local/lib/hyde/parse.config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def load_toml_file(toml_file):
3737

3838

3939
def parse_toml_to_env(toml_file, env_file=None, export=False):
40-
ignored_keys = ["$schema", "$SCHEMA", "hyprland", "hyprland-start", "hyprland-env"]
40+
ignored_keys = ["$schema", "$SCHEMA", "hyprland","hyprland-ipc","hyprland-start", "hyprland-env"]
4141

4242
toml_content = load_toml_file(toml_file)
4343
if toml_content is None:

Configs/.local/share/hyde/hyprland.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,9 @@ exec-once = $start.BATTERY_NOTIFY # battery notification
403403
exec-once = $start.IDLE_DAEMON # idle daemon
404404

405405
# hyde/config.toml is parsed and exported to the environment
406-
exec-once = $scrPath/parse.config.py --daemon --input $env.XDG_CONFIG_HOME/hyde/config.toml --env $env.XDG_STATE_HOME/hyde/config --hypr $env.XDG_STATE_HOME/hyde/hyprland.conf
406+
# exec-once = $scrPath/parse.config.py --daemon --input $env.XDG_CONFIG_HOME/hyde/config.toml --env $env.XDG_STATE_HOME/hyde/config --hypr $env.XDG_STATE_HOME/hyde/hyprland.conf
407+
exec-once = systemctl --user start hyde-config.service #! If this is not working try the command above!
408+
407409

408410
#? Rules can be added here as most of the configuration are dynamic
409411

Scripts/restore_cfg.psv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ P|${HOME}/.config/hyde|config.toml|hyprland
3333
P|${HOME}/.config/hypr|hyde.conf workflows.conf animations.conf windowrules.conf keybindings.conf userprefs.conf monitors.conf|hyprland
3434
P|${HOME}/.config/hypr|nvidia.conf|hyprland nvidia-utils
3535
P|${HOME}/.config/hypr/themes|theme.conf wallbash.conf colors.conf|hyprland
36+
S|${HOME}/.config/systemd|user|systemd
3637
P|${HOME}/.local/state/hyde|hyprland.conf|hyprland
3738

3839
S|${HOME}/.config/hypr|hyprland.conf|hyprland

0 commit comments

Comments
 (0)