implementing home.file instead of xdg.config

This commit is contained in:
2026-03-01 18:34:28 +01:00
parent 0906a319c1
commit f684932797
3 changed files with 318 additions and 318 deletions
+308 -308
View File
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -1820,9 +1820,9 @@ in
SOCK="${XDG_RUNTIME_DIR}/hypr/${HYPRLAND_INSTANCE_SIGNATURE}/.socket2.sock"
[[ -S "$SOCK" ]] || { echo "Hyprland socket not found: $SOCK" >&2; exit 1; }
PICTURES_DIR="${1:-${picturesDir}}"
PICTURES_DIR="${1:-${picturesDir}}" # $1 = eerste argument, ${picturesDir} = default (Bash-variabele)
FIT_MODE="fill"
HYPR_DIR="${config.xdg.configHome}/hypr"
HYPR_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/hypr" # Gebruik $HOME als fallback
MAP_ROOT="${HYPR_DIR}/hyprpaper/config"
focused_monitor() {
@@ -1904,7 +1904,7 @@ in
#!/usr/bin/env bash
set -euo pipefail
HYPR_DIR="${config.xdg.configHome}/hypr"
HYPR_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/hypr"
MAP_ROOT="${HYPR_DIR}/hyprpaper/config"
usage() {
@@ -1923,7 +1923,7 @@ in
[[ -f "$cfg" ]] || touch "$cfg"
if [[ -z "$wp" ]]; then
wp="$(find "${config.home.homeDirectory}/.config/wallpapers/defaults" -type f 2>/dev/null | shuf -n 1 || true)"
wp="$(find "${XDG_CONFIG_HOME:-$HOME/.config}/wallpapers/defaults" -type f 2>/dev/null | shuf -n 1 || true)"
[[ -n "$wp" ]] || { echo "No wallpaper found (random). Provide a path as arg 3."; exit 1; }
fi
@@ -1932,7 +1932,7 @@ in
echo "${key}=" >> "$cfg"
fi
${pkgs.gnused}/bin/sed -i "s|^${key}=.*|${key}= ${wp}|g" "$cfg"
sed -i "s|^${key}=.*|${key}= ${wp}|g" "$cfg"
curws="$(hyprctl -j monitors | jq -r --arg m "$mon" '.[] | select(.name==$m) | .activeWorkspace.id' | head -n 1 || true)"
if [[ "$curws" == "$wsid" ]]; then
@@ -49,9 +49,9 @@ in
SOCK="${XDG_RUNTIME_DIR}/hypr/${HYPRLAND_INSTANCE_SIGNATURE}/.socket2.sock"
[[ -S "$SOCK" ]] || { echo "Hyprland socket not found: $SOCK" >&2; exit 1; }
PICTURES_DIR="${1:-${picturesDir}}"
PICTURES_DIR="${1:-${picturesDir}}" # $1 = eerste argument, ${picturesDir} = default (Bash-variabele)
FIT_MODE="fill"
HYPR_DIR="${config.xdg.configHome}/hypr"
HYPR_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/hypr" # Gebruik $HOME als fallback
MAP_ROOT="${HYPR_DIR}/hyprpaper/config"
focused_monitor() {
@@ -133,7 +133,7 @@ in
#!/usr/bin/env bash
set -euo pipefail
HYPR_DIR="${config.xdg.configHome}/hypr"
HYPR_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/hypr"
MAP_ROOT="${HYPR_DIR}/hyprpaper/config"
usage() {
@@ -152,7 +152,7 @@ in
[[ -f "$cfg" ]] || touch "$cfg"
if [[ -z "$wp" ]]; then
wp="$(find "${config.home.homeDirectory}/.config/wallpapers/defaults" -type f 2>/dev/null | shuf -n 1 || true)"
wp="$(find "${XDG_CONFIG_HOME:-$HOME/.config}/wallpapers/defaults" -type f 2>/dev/null | shuf -n 1 || true)"
[[ -n "$wp" ]] || { echo "No wallpaper found (random). Provide a path as arg 3."; exit 1; }
fi
@@ -161,7 +161,7 @@ in
echo "${key}=" >> "$cfg"
fi
${pkgs.gnused}/bin/sed -i "s|^${key}=.*|${key}= ${wp}|g" "$cfg"
sed -i "s|^${key}=.*|${key}= ${wp}|g" "$cfg"
curws="$(hyprctl -j monitors | jq -r --arg m "$mon" '.[] | select(.name==$m) | .activeWorkspace.id' | head -n 1 || true)"
if [[ "$curws" == "$wsid" ]]; then