diff options
| author | Nippy <nippy@rp1.hu> | 2026-06-26 21:43:27 +0200 |
|---|---|---|
| committer | Nippy <nippy@rp1.hu> | 2026-06-26 21:43:27 +0200 |
| commit | 0385a8c4fb0934e8cc48efa37996939b4d62eed8 (patch) | |
| tree | 938a7f9ed47ca88e05408c5774e243002e486a35 /raveos-hyprland-theme/raveos-session-init.sh | |
| parent | 99be3aa529e36d409ed9618be97eef1561b02190 (diff) | |
| download | RaveOS-PKGBUILD-0385a8c4fb0934e8cc48efa37996939b4d62eed8.tar.gz RaveOS-PKGBUILD-0385a8c4fb0934e8cc48efa37996939b4d62eed8.zip | |
hypr fix
Diffstat (limited to 'raveos-hyprland-theme/raveos-session-init.sh')
| -rw-r--r-- | raveos-hyprland-theme/raveos-session-init.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/raveos-hyprland-theme/raveos-session-init.sh b/raveos-hyprland-theme/raveos-session-init.sh new file mode 100644 index 0000000..891c905 --- /dev/null +++ b/raveos-hyprland-theme/raveos-session-init.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# raveos-session-init.sh +# ---------------------- +# Első login-kor beállítja a DMS session.json-ban a háttérképet. +# Csak egyszer fut (ha a wallpaperPath üres). + +_session_file="${HOME}/.local/state/DankMaterialShell/session.json" +_bg_file="${HOME}/.config/background.jpg" + +if [[ -f "${_bg_file}" ]]; then + if [[ ! -f "${_session_file}" ]]; then + mkdir -p "$(dirname "${_session_file}")" + printf '{\n "wallpaperPath": "%s"\n}\n' "${_bg_file}" > "${_session_file}" + elif ! grep -q '"wallpaperPath": "[^"]\+' "${_session_file}" 2>/dev/null; then + sed -i "s|\"wallpaperPath\": \"\"|\"wallpaperPath\": \"${_bg_file}\"|g" "${_session_file}" 2>/dev/null || true + fi +fi + +unset _session_file _bg_file |