Compare commits

...

2 Commits

Author SHA1 Message Date
Amir Alexander Abdelbaki 08c3097a70 feat(wallpaper): sync selected wallpaper to hyprlock per monitor
wallpaper-picker now calls write_hyprlock_state() on apply, writing
per-monitor background blocks to ~/.config/hypr/hyprlock-backgrounds.conf.
hyprlock.conf sources that file instead of a hardcoded background block,
with a committed default for first-boot.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 21:54:19 +02:00
Amir Alexander Abdelbaki da0d318022 feat(mail): install w3m and write mailcap for HTML email rendering
Adds w3m to the install list and appends the text/html mailcap entry
so alot renders HTML emails as plain text via w3m -dump.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 16:07:54 +02:00
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
}
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
}
# per-monitor backgrounds written by ~/.config/scripts/wallpaper-picker
source = ~/.config/hypr/hyprlock-backgrounds.conf
input-field {
monitor =

View File

@ -7,6 +7,7 @@ set -u
VERBOSE=0
DIR=""
STATE_FILE="${HOME}/.config/wallpaper.conf"
HYPRLOCK_BG_FILE="${HOME}/.config/hypr/hyprlock-backgrounds.conf"
FIT_MODE="cover"
while [[ $# -gt 0 ]]; do
@ -14,6 +15,7 @@ while [[ $# -gt 0 ]]; do
-v|--verbose) VERBOSE=1 ;;
--fit) shift; FIT_MODE="$1" ;;
--state) shift; STATE_FILE="$1" ;;
--hyprlock-bg) shift; HYPRLOCK_BG_FILE="$1" ;;
*) DIR="$1" ;;
esac
shift
@ -178,6 +180,21 @@ write_state() {
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() {
local path="$1"
local out rc
@ -216,6 +233,7 @@ apply() {
done
write_state
write_hyprlock_state
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
}
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
}
# per-monitor backgrounds written by ~/.config/scripts/wallpaper-picker
source = ~/.config/hypr/hyprlock-backgrounds.conf
input-field {
monitor =

View File

@ -7,6 +7,7 @@ set -u
VERBOSE=0
DIR=""
STATE_FILE="${HOME}/.config/wallpaper.conf"
HYPRLOCK_BG_FILE="${HOME}/.config/hypr/hyprlock-backgrounds.conf"
FIT_MODE="cover"
while [[ $# -gt 0 ]]; do
@ -14,6 +15,7 @@ while [[ $# -gt 0 ]]; do
-v|--verbose) VERBOSE=1 ;;
--fit) shift; FIT_MODE="$1" ;;
--state) shift; STATE_FILE="$1" ;;
--hyprlock-bg) shift; HYPRLOCK_BG_FILE="$1" ;;
*) DIR="$1" ;;
esac
shift
@ -178,6 +180,21 @@ write_state() {
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() {
local path="$1"
local out rc
@ -216,6 +233,7 @@ apply() {
done
write_state
write_hyprlock_state
return 0
}

View File

@ -2,8 +2,8 @@
set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing mail stack (isync, msmtp, notmuch, alot)..."
sudo pacman -S --noconfirm --needed isync msmtp notmuch alot
log "Installing mail stack (isync, msmtp, notmuch, alot, w3m)..."
sudo pacman -S --noconfirm --needed isync msmtp notmuch alot w3m
# ── Credentials ───────────────────────────────────────────────────────────────
read -rp "Full name : " FULL_NAME
@ -110,6 +110,11 @@ with open(path, 'w') as f:
f.write(text)
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 ───────────────────────────────────────────
log "Installing mbsync systemd user timer (every 5 min)..."
mkdir -p ~/.config/systemd/user