summaryrefslogtreecommitdiff
path: root/.config/hypr
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-09-14 15:42:45 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-09-14 15:42:45 +0200
commit56582f6a3e965d82e7e5253bf8cf2125c8d8efa7 (patch)
tree5efe30d2b7a4a8cc206f71fa74504c7088b0b017 /.config/hypr
parent010345ca23d057ebb5a02499e9db0dc9f5269e2b (diff)
Hyprland: Include environment in config
Diffstat (limited to '.config/hypr')
-rw-r--r--.config/hypr/hyprland.conf.in1
-rw-r--r--.config/hypr/macros.m412
2 files changed, 13 insertions, 0 deletions
diff --git a/.config/hypr/hyprland.conf.in b/.config/hypr/hyprland.conf.in
index 9af2fe6..9aa6258 100644
--- a/.config/hypr/hyprland.conf.in
+++ b/.config/hypr/hyprland.conf.in
@@ -1,3 +1,4 @@
+__setup_env
exec-once = lux -S 50
# exec-once = ewd && ewctl $XDG_PICTURES_DIR/bg.jxl
exec-once = wbg $XDG_PICTURES_DIR/bg.png
diff --git a/.config/hypr/macros.m4 b/.config/hypr/macros.m4
index 2e084d6..98e1eff 100644
--- a/.config/hypr/macros.m4
+++ b/.config/hypr/macros.m4
@@ -22,3 +22,15 @@ define(__subbind, [
__bindX(,,$@)
bind = , $1, submap, reset
])
+
+define(__setup_env, [
+ esyscmd([
+ sed -E '
+ /^export/!d
+ /`/d
+ s/^export ([A-Z0-9a-z_]+)="(.*)"/env = \1, \2/
+ s/^export ([A-Z0-9a-z_]+)=\x27(.*)\x27/env = \1, \2/
+ s/^export ([A-Z0-9a-z_]+)=(.*)/env = \1, \2/
+ ' ~/.bashrc
+ ])
+])