From 38a8f30367a71fcbc66b03b2e668a75a13e9877b Mon Sep 17 00:00:00 2001 From: Mathias Scheider Date: Sun, 1 Mar 2026 21:16:03 +0100 Subject: [PATCH] env robust und inkl. Wallpaper Path --- hypr/.config/hypr/env_template | 1 + hypr/.config/hypr/hyprland.conf | 3 ++- hypr/.config/hypr/scripts/ensure-env.sh | 9 +++++++++ hypr/.config/wpaperd/config.toml | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100755 hypr/.config/hypr/scripts/ensure-env.sh diff --git a/hypr/.config/hypr/env_template b/hypr/.config/hypr/env_template index 0ab5135..ab7d5b3 100644 --- a/hypr/.config/hypr/env_template +++ b/hypr/.config/hypr/env_template @@ -1,2 +1,3 @@ MONITOR_SETUP=".config/hypr/modules/monitor_setup_0_auto.conf" +env = HYPR_WALLPAPER_PATH,~/nextcloud/Photos/Wallpapers/ diff --git a/hypr/.config/hypr/hyprland.conf b/hypr/.config/hypr/hyprland.conf index ffa1c64..cb693c6 100755 --- a/hypr/.config/hypr/hyprland.conf +++ b/hypr/.config/hypr/hyprland.conf @@ -17,6 +17,7 @@ # source = ~/.config/hypr/myColors.conf + ################ ### MONITORS ### ################ @@ -27,7 +28,7 @@ enable_color_management = true # monitor=,preferred,auto,auto source = ~/.config/hypr/env -source = $MONITOR_SETUP +source = $HYPR_MONITOR_SETUP # source = ~/.config/hypr/modules/monitor_setup_buntes_monster.conf # unscale XWayland diff --git a/hypr/.config/hypr/scripts/ensure-env.sh b/hypr/.config/hypr/scripts/ensure-env.sh new file mode 100755 index 0000000..5f87743 --- /dev/null +++ b/hypr/.config/hypr/scripts/ensure-env.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + + +set -eu # Exit immediately if a command exits with a non-zero status, and treat unset variables as an error. + +if [ ! -f "hypr/.config/hypr/env" ]; then + cp "hypr/.config/hypr/env_template" "hypr/.config/hypr/env" + echo "Created hypr/.config/hypr/env from template." +fi diff --git a/hypr/.config/wpaperd/config.toml b/hypr/.config/wpaperd/config.toml index 0466634..5df5cc4 100755 --- a/hypr/.config/wpaperd/config.toml +++ b/hypr/.config/wpaperd/config.toml @@ -1,5 +1,5 @@ [default] -path = "/home/mathias/nextcloud/Photos/Wallpapers/" +path = $HYPR_WALLPAPER_PATH mode = "center" #recursive = true #sorting = "random"