Amir Alexander Abdelbaki 2026-05-31 22:16:10 +02:00
commit 831826f4dd
7 changed files with 71 additions and 24 deletions

View File

@ -0,0 +1,12 @@
# default — overwritten by ~/.config/scripts/wallpaper-picker
background {
monitor =
path = ~/Pictures/background.jpg
blur_size = 6
blur_passes = 2
noise = 0.015
contrast = 1.25
brightness = 0.85
vibrancy = 0.2
vibrancy_darkness = 0.1
}

View File

@ -12,17 +12,8 @@ auth {
fingerprint:enabled = true fingerprint:enabled = true
} }
background { # per-monitor backgrounds written by ~/.config/scripts/wallpaper-picker
monitor = source = ~/.config/hypr/hyprlock-backgrounds.conf
path = ~/Pictures/background.jpg
blur_size = 6
blur_passes = 2
noise = 0.015
contrast = 1.25
brightness = 0.85
vibrancy = 0.2
vibrancy_darkness = 0.1
}
input-field { input-field {
monitor = monitor =

View File

@ -7,6 +7,7 @@ set -u
VERBOSE=0 VERBOSE=0
DIR="" DIR=""
STATE_FILE="${HOME}/.config/wallpaper.conf" STATE_FILE="${HOME}/.config/wallpaper.conf"
HYPRLOCK_BG_FILE="${HOME}/.config/hypr/hyprlock-backgrounds.conf"
FIT_MODE="cover" FIT_MODE="cover"
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
@ -14,6 +15,7 @@ while [[ $# -gt 0 ]]; do
-v|--verbose) VERBOSE=1 ;; -v|--verbose) VERBOSE=1 ;;
--fit) shift; FIT_MODE="$1" ;; --fit) shift; FIT_MODE="$1" ;;
--state) shift; STATE_FILE="$1" ;; --state) shift; STATE_FILE="$1" ;;
--hyprlock-bg) shift; HYPRLOCK_BG_FILE="$1" ;;
*) DIR="$1" ;; *) DIR="$1" ;;
esac esac
shift shift
@ -178,6 +180,21 @@ write_state() {
vlog "wrote $STATE_FILE" vlog "wrote $STATE_FILE"
} }
write_hyprlock_state() {
local mon path tmp
tmp=$(mktemp "${HYPRLOCK_BG_FILE}.XXXXXX") || return 1
{
printf '# generated by wallpaper-picker — do not edit by hand\n'
for mon in "${MONITORS[@]}"; do
path="${CURRENT[$mon]:-}"
[[ -z "$path" ]] && continue
printf 'background {\n monitor = %s\n path = %s\n blur_size = 6\n blur_passes = 2\n noise = 0.015\n contrast = 1.25\n brightness = 0.85\n vibrancy = 0.2\n vibrancy_darkness = 0.1\n}\n' \
"$mon" "$path"
done
} > "$tmp" && mv -f "$tmp" "$HYPRLOCK_BG_FILE"
vlog "wrote $HYPRLOCK_BG_FILE"
}
apply() { apply() {
local path="$1" local path="$1"
local out rc local out rc
@ -216,6 +233,7 @@ apply() {
done done
write_state write_state
write_hyprlock_state
return 0 return 0
} }

View File

@ -0,0 +1,12 @@
# default — overwritten by ~/.config/scripts/wallpaper-picker
background {
monitor =
path = ~/Pictures/background.jpg
blur_size = 6
blur_passes = 2
noise = 0.015
contrast = 1.25
brightness = 0.85
vibrancy = 0.2
vibrancy_darkness = 0.1
}

View File

@ -12,17 +12,8 @@ auth {
fingerprint:enabled = true fingerprint:enabled = true
} }
background { # per-monitor backgrounds written by ~/.config/scripts/wallpaper-picker
monitor = source = ~/.config/hypr/hyprlock-backgrounds.conf
path = ~/Pictures/background.jpg
blur_size = 6
blur_passes = 2
noise = 0.015
contrast = 1.25
brightness = 0.85
vibrancy = 0.2
vibrancy_darkness = 0.1
}
input-field { input-field {
monitor = monitor =

View File

@ -7,6 +7,7 @@ set -u
VERBOSE=0 VERBOSE=0
DIR="" DIR=""
STATE_FILE="${HOME}/.config/wallpaper.conf" STATE_FILE="${HOME}/.config/wallpaper.conf"
HYPRLOCK_BG_FILE="${HOME}/.config/hypr/hyprlock-backgrounds.conf"
FIT_MODE="cover" FIT_MODE="cover"
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
@ -14,6 +15,7 @@ while [[ $# -gt 0 ]]; do
-v|--verbose) VERBOSE=1 ;; -v|--verbose) VERBOSE=1 ;;
--fit) shift; FIT_MODE="$1" ;; --fit) shift; FIT_MODE="$1" ;;
--state) shift; STATE_FILE="$1" ;; --state) shift; STATE_FILE="$1" ;;
--hyprlock-bg) shift; HYPRLOCK_BG_FILE="$1" ;;
*) DIR="$1" ;; *) DIR="$1" ;;
esac esac
shift shift
@ -178,6 +180,21 @@ write_state() {
vlog "wrote $STATE_FILE" vlog "wrote $STATE_FILE"
} }
write_hyprlock_state() {
local mon path tmp
tmp=$(mktemp "${HYPRLOCK_BG_FILE}.XXXXXX") || return 1
{
printf '# generated by wallpaper-picker — do not edit by hand\n'
for mon in "${MONITORS[@]}"; do
path="${CURRENT[$mon]:-}"
[[ -z "$path" ]] && continue
printf 'background {\n monitor = %s\n path = %s\n blur_size = 6\n blur_passes = 2\n noise = 0.015\n contrast = 1.25\n brightness = 0.85\n vibrancy = 0.2\n vibrancy_darkness = 0.1\n}\n' \
"$mon" "$path"
done
} > "$tmp" && mv -f "$tmp" "$HYPRLOCK_BG_FILE"
vlog "wrote $HYPRLOCK_BG_FILE"
}
apply() { apply() {
local path="$1" local path="$1"
local out rc local out rc
@ -216,6 +233,7 @@ apply() {
done done
write_state write_state
write_hyprlock_state
return 0 return 0
} }

View File

@ -2,8 +2,8 @@
set -euo pipefail set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh" source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing mail stack (isync, msmtp, notmuch, alot)..." log "Installing mail stack (isync, msmtp, notmuch, alot, w3m)..."
sudo pacman -S --noconfirm --needed isync msmtp notmuch alot sudo pacman -S --noconfirm --needed isync msmtp notmuch alot w3m
# ── Credentials ─────────────────────────────────────────────────────────────── # ── Credentials ───────────────────────────────────────────────────────────────
read -rp "Full name : " FULL_NAME read -rp "Full name : " FULL_NAME
@ -110,6 +110,11 @@ with open(path, 'w') as f:
f.write(text) f.write(text)
PYEOF PYEOF
# ── mailcap (HTML email rendering via w3m) ────────────────────────────────────
log "Writing ~/.mailcap..."
grep -qxF "text/html; w3m -dump -o document_charset=%{charset} '%s'; nametemplate=%s.html; copiousoutput" ~/.mailcap 2>/dev/null \
|| echo "text/html; w3m -dump -o document_charset=%{charset} '%s'; nametemplate=%s.html; copiousoutput" >> ~/.mailcap
# ── systemd timer for periodic sync ─────────────────────────────────────────── # ── systemd timer for periodic sync ───────────────────────────────────────────
log "Installing mbsync systemd user timer (every 5 min)..." log "Installing mbsync systemd user timer (every 5 min)..."
mkdir -p ~/.config/systemd/user mkdir -p ~/.config/systemd/user