From 56582f6a3e965d82e7e5253bf8cf2125c8d8efa7 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sat, 14 Sep 2024 15:42:45 +0200 Subject: Hyprland: Include environment in config --- .config/hypr/hyprland.conf.in | 1 + .config/hypr/macros.m4 | 12 ++++++++++++ 2 files changed, 13 insertions(+) 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 + ]) +]) -- cgit v1.2.3