Autohide panel, Rotom menu icon, centred+blurred wallpapers, audio feedback everywhere, secrets status/add/set

- sounds.nix: per-app notifyrc overrides so app notifications, login/logout,
  lock/unlock, network, bluetooth, konsole, spectacle, etc. all play Portal 2 sounds
- dot sounds test|notify to audition the theme and the notification path
- 18 more Portal 2 events (36 total)
- fix-container-desktop-files: wrap PWA launchers written by Edge inside the
  etv distrobox so they start from the host menu
- dot secrets: file list (config/secret-files.txt), status, add, set; WireGuard opt-in

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013UzjWUxheYfqqjWGH7Ktmc
This commit is contained in:
Ziad ArafatandClaude Opus 5.5 committed 2026-10-30 15:01:08 -06:00
1 parent f5ead556b3
commit db20e3d8b2
9 files changed
+387 -39

No files matched your search

+110 -18
View File
@@ -250,14 +250,23 @@ bw_put_note() { # name, notes-file
bw_get_note() { bw_find "$1" | jq -r '.notes // empty'; }
SECRET_FILES="$DOTFILES_DIR/config/secret-files.txt"
# $HOME-relative paths currently matched by config/secret-files.txt.
secret_file_list() {
(cd "$HOME" && while read -r pat; do
[ -z "$pat" ] || [[ "$pat" == \#* ]] && continue
for f in $pat; do [ -f "$f" ] && echo "$f"; done
done <"$SECRET_FILES") | sort -u
}
secrets_push() {
bw_ready; bw sync >/dev/null
[ -s "$SECRETS_ENV" ] && bw_put_note "$BW_PREFIX/secrets.env" "$SECRETS_ENV"
for k in "$HOME"/.ssh/id_ed25519 "$HOME"/.ssh/id_rsa; do
[ -f "$k" ] && bw_put_note "$BW_PREFIX/ssh/$(basename "$k")" "$k"
[ -f "$k.pub" ] && bw_put_note "$BW_PREFIX/ssh/$(basename "$k").pub" "$k.pub"
done
if have nmcli; then
while read -r rel; do
bw_put_note "$BW_PREFIX/file/$rel" "$HOME/$rel"
done < <(secret_file_list)
if [ "${1:-}" = --wireguard ] && have nmcli; then
local tmp; tmp="$(mktemp -d)"
while IFS=: read -r name type; do
[ "$type" = wireguard ] || continue
@@ -273,14 +282,16 @@ secrets_pull() {
local v
v="$(bw_get_note "$BW_PREFIX/secrets.env")"
if [ -n "$v" ]; then (umask 077; printf '%s\n' "$v" >"$SECRETS_ENV"); ok "secrets.env"; fi
mkdir -p "$HOME/.ssh"; chmod 700 "$HOME/.ssh"
while read -r name; do
[ -n "$name" ] || continue
local f="$HOME/.ssh/${name##*/}"
local rel="${name#"$BW_PREFIX/file/"}" f
f="$HOME/$rel"
mkdir -p "$(dirname "$f")"
(umask 077; bw_get_note "$name" >"$f")
[[ "$f" == *.pub ]] && chmod 644 "$f"
ok "$f"
done < <(bw list items --search "$BW_PREFIX/ssh/" | jq -r '.[].name' | grep "^$BW_PREFIX/ssh/")
chmod 600 "$f"; [[ "$f" == *.pub ]] && chmod 644 "$f"
ok "~/$rel"
done < <(bw list items --search "$BW_PREFIX/file/" | jq -r '.[].name' | grep "^$BW_PREFIX/file/")
chmod 700 "$HOME/.ssh" 2>/dev/null || true
if [ "${1:-}" = --wireguard ] && have nmcli; then
while read -r name; do
[ -n "$name" ] || continue
@@ -293,6 +304,51 @@ secrets_pull() {
secrets_render
}
# What's in the vault vs on this machine.
secrets_status() {
bw_ready; bw sync >/dev/null
local items; items="$(bw list items --search "$BW_PREFIX/" | jq -c '[.[] | select(.name | startswith("'"$BW_PREFIX"'/")) | {name, notes, date: .revisionDate}]')"
echo "vault $(bw config server) — $(echo "$items" | jq length) dotfiles items"
local -A want=(["$BW_PREFIX/secrets.env"]="$SECRETS_ENV")
while read -r rel; do want["$BW_PREFIX/file/$rel"]="$HOME/$rel"; done < <(secret_file_list)
for name in "${!want[@]}"; do
local local_f="${want[$name]}" remote
remote="$(echo "$items" | jq -r --arg n "$name" '.[] | select(.name == $n) | .notes')"
if [ -z "$remote" ]; then warn "$name — only on this machine (dot secrets push)"
elif [ "$remote" = "$(cat "$local_f")" ]; then ok "$name"
else warn "$name — differs from vault (push to upload, pull to overwrite local)"; fi
done
echo "$items" | jq -r '.[].name' | while read -r name; do
[ -n "${want[$name]:-}" ] || echo " in vault only: $name"
done
}
secrets_add() { # file...
[ $# -gt 0 ] || die "usage: dot secrets add <file>..."
for f in "$@"; do
local abs; abs="$(readlink -f "$f")"
[[ "$abs" == "$HOME"/* ]] || die "$f is outside \$HOME"
local rel="${abs#"$HOME"/}"
grep -qxF "$rel" "$SECRET_FILES" || echo "$rel" >>"$SECRET_FILES"
bw_ready; bw_put_note "$BW_PREFIX/file/$rel" "$abs"
done
ok "listed in config/secret-files.txt (commit it)"
}
secrets_set() { # KEY [VALUE]
local key="${1:-}" val="${2:-}"
[[ "$key" =~ ^[A-Z_][A-Z0-9_]*$ ]] || die "usage: dot secrets set KEY [VALUE] (prompts if VALUE omitted)"
[ -n "$val" ] || { read -rsp "$key: " val; echo; }
touch "$SECRETS_ENV"; chmod 600 "$SECRETS_ENV"
local tmp; tmp="$(mktemp)"
grep -v "^$key=" "$SECRETS_ENV" >"$tmp" || true
printf '%s=%s\n' "$key" "$val" >>"$tmp"
install -m 600 "$tmp" "$SECRETS_ENV"; rm -f "$tmp"
ok "$key saved to secrets.env"
bw_ready; bw_put_note "$BW_PREFIX/secrets.env" "$SECRETS_ENV"
secrets_render
}
# Fill ${VAR} placeholders in MCP templates from secrets.env and merge them in.
secrets_render() {
[ -s "$SECRETS_ENV" ] || { warn "no $SECRETS_ENV (dot secrets pull)"; return; }
@@ -322,11 +378,15 @@ secrets_render() {
}
cmd_secrets() {
case "${1:-}" in
push) secrets_push ;;
pull) shift; secrets_pull "$@" ;;
local sub="${1:-}"; shift || true
case "$sub" in
push) secrets_push "$@" ;;
pull) secrets_pull "$@" ;;
status) secrets_status ;;
add) secrets_add "$@" ;;
set) secrets_set "$@" ;;
render) secrets_render ;;
*) die "usage: dot secrets push|pull [--wireguard]|render" ;;
*) die "usage: dot secrets status|push [--wireguard]|pull [--wireguard]|add FILE...|set KEY [VALUE]|render" ;;
esac
}
@@ -351,9 +411,41 @@ cmd_wallpapers() {
}
# ---------------------------------------------------------------- sounds
sound_output_info() {
have wpctl || return 0
local sink; sink="$(wpctl inspect @DEFAULT_AUDIO_SINK@ 2>/dev/null | sed -n 's/.*node.description = "\(.*\)"/\1/p' | head -1)"
local vol; vol="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ 2>/dev/null)"
echo "output: ${sink:-?} — ${vol:-?}"
[[ "$vol" == *MUTED* ]] && warn "default output is muted"
wpctl status 2>/dev/null | sed -n '/Sinks:/,/Sources:/p' | grep -E "MUTED|vol: 0\.00" | sed 's/^[ │*]*/ muted sink: /'
}
play_event() { # freedesktop sound name
if have canberra-gtk-play; then
canberra-gtk-play -i "$1" -d "dot sounds test" 2>/dev/null
else
local f; f="$(ls "$HOME/.local/share/sounds/portal2/stereo/$1".* 2>/dev/null | head -1)"
[ -n "$f" ] && { pw-play --media-role=Notification "$f" 2>/dev/null || paplay "$f"; }
fi
}
cmd_sounds() {
have build-sound-theme || die "build-sound-theme missing (full profile)"
build-sound-theme "$@"
case "${1:-build}" in
build)
have build-sound-theme || die "build-sound-theme missing (full profile)"
shift || true; build-sound-theme "$@" ;;
test)
# dot sounds test [event...] — plays each theme sound with its name
sound_output_info
local events=("${@:2}")
[ ${#events[@]} -gt 0 ] || mapfile -t events < <(ls "$HOME/.local/share/sounds/portal2/stereo" | sed 's/\.[^.]*$//' | sort)
for e in "${events[@]}"; do printf ' ♪ %s\n' "$e"; play_event "$e"; sleep 0.4; done ;;
notify)
# A real desktop notification, the same path Chrome/Telegram/etc. take.
sound_output_info
notify-send -a "dot sounds" "Aperture Science" "This was a triumph. (If you heard a ding, app notifications have sound.)" ;;
*) die "usage: dot sounds [build|test [event...]|notify]" ;;
esac
}
# ---------------------------------------------------------------- update / doctor
@@ -438,9 +530,9 @@ dot — portable dev environment
dot system [--netbird] sudo layer: distro packages, browser PWA policies, netbird, login shell
dot nix install Nix if missing
dot apps Flatpaks, mise tools, Claude Code
dot secrets push|pull|render Bitwarden-backed SSH keys, tokens, WireGuard
dot secrets status|push|pull|add|set|render Bitwarden-backed tokens, keys, files, WireGuard
dot wallpapers [--push] sort wallpapers into light/dark (or clone them)
dot sounds build the Portal 2 sound theme
dot sounds [build|test|notify] Portal 2 sound theme: build it, play every sound, or fire a test notification
dot boxes create distroboxes from distrobox.ini
dot doctor check what's installed
EOF
+5
View File
@@ -0,0 +1,5 @@
# Files (relative to $HOME, globs allowed) that `dot secrets push` stores in Bitwarden
# as secure notes "dotfiles/file/<path>" and `dot secrets pull` restores (mode 600).
# Add more with: dot secrets add <file>
.ssh/id_*
.pi/agent/auth.json
+129 -19
View File
@@ -1,23 +1,133 @@
{
"_comment": "freedesktop event -> Portal 2 VPK paths/globs, first match wins. Explore: build-sound-theme --list 'sound/ui/*'",
"events": {
"desktop-login": ["sound/ui/startup_02_01.wav", "sound/weapons/portalgun/portal_open1.wav"],
"desktop-logout": ["sound/weapons/portalgun/portal_fizzle_01.wav", "sound/weapons/portalgun/portal_close1.wav"],
"device-added": ["sound/weapons/portalgun/portal_open_blue_01.wav", "sound/weapons/portalgun/portalgun_shoot_blue1.wav"],
"device-removed": ["sound/weapons/portalgun/portal_open_red_01.wav", "sound/weapons/portalgun/portalgun_shoot_red1.wav"],
"dialog-error": ["sound/weapons/portalgun/portal_invalid_surface_01.wav", "sound/ui/menu_invalid.wav"],
"outcome-failure": ["sound/buttons/og_test_chamber_neg_01.wav", "sound/buttons/button_synth_negative_01.wav"],
"dialog-warning": ["sound/npc/turret_floor/turret_deploy_1.wav", "sound/npc/turret_floor/deploy.wav"],
"dialog-information": ["sound/ui/hint.wav", "sound/labs/ding_on.wav"],
"message-new-instant": ["sound/labs/ding_on.wav", "sound/ui/hint.wav"],
"message-new-email": ["sound/ambient/alarms/portal_elevator_chime.wav", "sound/labs/ding_on.wav"],
"complete": ["sound/buttons/og_test_chamber_pos_01.wav", "sound/buttons/button_synth_positive_01.wav"],
"outcome-success": ["sound/buttons/og_test_chamber_pos_01.wav", "sound/buttons/button_synth_positive_01.wav"],
"bell": ["sound/ui/buttonclick.wav"],
"audio-volume-change": ["sound/ui/p2_editor_click.wav", "sound/ui/buttonclick.wav"],
"trash-empty": ["sound/weapons/portalgun/portal_fizzle2.wav", "sound/*fizzle*"],
"power-plug": ["sound/player/portalgun_powerup1.wav", "sound/ui/nv_powerup.wav"],
"power-unplug": ["sound/buttons/og_button_up_01.wav", "sound/*power*down*"],
"battery-low": ["sound/ambient/alarms/klaxon1.wav", "sound/alarms/klaxon1.wav"]
"desktop-login": [
"sound/ui/startup_02_01.wav",
"sound/weapons/portalgun/portal_open1.wav"
],
"desktop-logout": [
"sound/weapons/portalgun/portal_fizzle_01.wav",
"sound/weapons/portalgun/portal_close1.wav"
],
"device-added": [
"sound/weapons/portalgun/portal_open_blue_01.wav",
"sound/weapons/portalgun/portalgun_shoot_blue1.wav"
],
"device-removed": [
"sound/weapons/portalgun/portal_open_red_01.wav",
"sound/weapons/portalgun/portalgun_shoot_red1.wav"
],
"dialog-error": [
"sound/weapons/portalgun/portal_invalid_surface_01.wav",
"sound/ui/menu_invalid.wav"
],
"outcome-failure": [
"sound/buttons/og_test_chamber_neg_01.wav",
"sound/buttons/button_synth_negative_01.wav"
],
"dialog-warning": [
"sound/npc/turret_floor/turret_deploy_1.wav",
"sound/npc/turret_floor/deploy.wav"
],
"dialog-information": [
"sound/ui/hint.wav",
"sound/labs/ding_on.wav"
],
"message-new-instant": [
"sound/labs/ding_on.wav"
],
"message-new-email": [
"sound/ambient/alarms/portal_elevator_chime.wav",
"sound/labs/ding_on.wav"
],
"complete": [
"sound/buttons/og_test_chamber_pos_01.wav",
"sound/buttons/button_synth_positive_01.wav"
],
"outcome-success": [
"sound/buttons/og_test_chamber_pos_01.wav",
"sound/buttons/button_synth_positive_01.wav"
],
"bell": [
"sound/ui/buttonclick.wav"
],
"audio-volume-change": [
"sound/ui/p2_editor_click.wav",
"sound/ui/buttonclick.wav"
],
"trash-empty": [
"sound/weapons/portalgun/portal_fizzle2.wav",
"sound/*fizzle*"
],
"power-plug": [
"sound/player/portalgun_powerup1.wav",
"sound/ui/nv_powerup.wav"
],
"power-unplug": [
"sound/buttons/og_button_up_01.wav",
"sound/*power*down*"
],
"battery-low": [
"sound/ambient/alarms/klaxon1.wav",
"sound/alarms/klaxon1.wav"
],
"dialog-error-serious": [
"sound/ambient/alarms/alarm1.wav"
],
"dialog-question": [
"sound/ui/p2_editor_select_start.wav",
"sound/ui/hint.wav"
],
"window-attention": [
"sound/ui/hint.wav"
],
"battery-caution": [
"sound/ambient/alarms/amb_container_alarm_01.wav",
"sound/ambient/alarms/klaxon1.wav"
],
"battery-full": [
"sound/buttons/button_synth_positive_01.wav"
],
"alarm-clock-elapsed": [
"sound/ambient/alarms/portal_elevator_chime.wav"
],
"screen-capture": [
"sound/physics/security_camera/physics_security_camera_impact_lg_01.wav"
],
"camera-shutter": [
"sound/physics/security_camera/physics_security_camera_impact_lg_01.wav"
],
"network-connectivity-established": [
"sound/ui/ui_coop_hud_activate_01.wav"
],
"network-connectivity-lost": [
"sound/ui/ui_coop_hud_deactivate_01.wav"
],
"service-login": [
"sound/weapons/portalgun/portal_open_blue_01.wav"
],
"service-logout": [
"sound/weapons/portalgun/portal_open_red_01.wav"
],
"desktop-screen-lock": [
"sound/plats/awake_chamber_door_close.wav",
"sound/doors/door_metal_medium_close1.wav"
],
"desktop-screen-unlock": [
"sound/labs/door_open_chime_01.wav",
"sound/plats/awake_chamber_door_open_quick.wav"
],
"bell-window-system": [
"sound/ui/p2_editor_blips_01.wav"
],
"completion-success": [
"sound/ui/p2_editor_click.wav"
],
"completion-fail": [
"sound/ui/menu_invalid.wav"
],
"completion-rotation": [
"sound/ui/p2_editor_tile_pick_01.wav"
]
}
}
}
+17
View File
@@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }:
let
link = config.dotfiles.link;
fixDesktopFiles = pkgs.writeShellScript "fix-container-desktop-files" (builtins.readFile ../../scripts/fix-container-desktop-files.sh);
vesktop = ".var/app/dev.vencord.Vesktop/config/vesktop";
in
lib.mkIf config.dotfiles.gui {
@@ -23,4 +24,20 @@ lib.mkIf config.dotfiles.gui {
".config/VSCodium/User/settings.json".source = link "config/vscodium/settings.json";
".config/zed/settings.json".source = link "config/zed/settings.json";
};
# Re-run whenever an app (e.g. Edge inside the etv distrobox) writes launchers.
systemd.user.paths.fix-container-desktop-files = {
Unit.Description = "Watch ~/.local/share/applications for container-only launchers";
Path.PathChanged = "${config.xdg.dataHome}/applications";
Install.WantedBy = [ "default.target" ];
};
systemd.user.services.fix-container-desktop-files = {
Unit.Description = "Wrap container-only launchers with distrobox-enter";
Service = {
Type = "oneshot";
ExecStart = "${fixDesktopFiles}";
Environment = "PATH=/usr/bin:/bin";
};
};
home.activation.fixContainerDesktopFiles = lib.hm.dag.entryAfter [ "writeBoundary" ] "${fixDesktopFiles} || true";
}
+1
View File
@@ -6,6 +6,7 @@
./konsole.nix
./daynight.nix
./apps.nix
./sounds.nix
];
# Every module above wraps its config in `lib.mkIf config.dotfiles.gui`.
}
+13 -1
View File
@@ -20,11 +20,22 @@ let
done
echo "qdbus: no host qdbus found" >&2; exit 127
'';
# Application-menu icon: Rotom's sprite, trimmed and upscaled nearest-neighbour so it stays pixel art.
rotomSprite = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/479.png";
hash = "sha256-zVIJA3CDrY1a+GrxmWJenNWfp3BOKWh01Ict8qCOmPo=";
};
rotomIcon = pkgs.runCommand "rotom-icon.png" { nativeBuildInputs = [ pkgs.imagemagick ]; } ''
magick ${rotomSprite} -trim +repage -filter point -resize 256x256 \
-background none -gravity center -extent 256x256 $out
'';
in
lib.mkIf config.dotfiles.gui {
home.packages = [ qdbus ];
xdg.dataFile = {
"dotfiles/rotom.png".source = rotomIcon;
"plasma/look-and-feel/dotfiles.nord.light".source = ../../config/plasma/look-and-feel/dotfiles.nord.light;
"plasma/look-and-feel/dotfiles.nord.dark".source = ../../config/plasma/look-and-feel/dotfiles.nord.dark;
};
@@ -40,9 +51,10 @@ lib.mkIf config.dotfiles.gui {
floating = true;
height = 50;
lengthMode = "fit";
hiding = "autohide";
widgets = [
{
kickoff.icon = if config.dotfiles.os == "steamos" then "distributor-logo-steamdeck" else "start-here-kde-symbolic";
kickoff.icon = "${config.xdg.dataHome}/dotfiles/rotom.png";
}
"org.kde.plasma.pager"
"org.kde.plasma.icontasks"
+88
View File
@@ -0,0 +1,88 @@
{ config, lib, ... }:
let
# KNotification reads per-user overrides from ~/.config/<app>.notifyrc. Groups are
# literally "[Event/<id>]"; plasma-manager treats "/" as nesting, hence "Event\\/".
# Sound names resolve through the active theme (portal2, see `dot sounds`),
# falling back to ocean/freedesktop for anything it doesn't define.
event = action: sound: { Action = action; Sound = sound; };
popupSound = event "Popup|Sound";
sound = event "Sound";
in
lib.mkIf config.dotfiles.gui {
programs.plasma.configFile = {
kdeglobals.Sounds.Theme = "portal2";
# Volume slider clicks play audio-volume-change.
plasmaparc.General.AudioFeedback = true;
"plasma_workspace.notifyrc" = {
# Every app notification that has no notifyrc of its own (Chrome, Telegram, Vesktop, notify-send...).
"Event\\/notification" = popupSound "message-new-instant";
"Event\\/startkde" = sound "desktop-login";
"Event\\/exitkde" = sound "desktop-logout";
"Event\\/applicationcrash" = popupSound "dialog-error-serious";
"Event\\/cancellogout" = popupSound "dialog-information";
"Event\\/messageCritical" = event "Sound|Taskbar" "dialog-error-serious";
"Event\\/messageQuestion" = event "Sound|Taskbar" "dialog-question";
"Event\\/messageboxQuestion" = event "Sound|Taskbar" "dialog-question";
"Event\\/Textcompletion: rotation" = sound "completion-rotation";
"Event\\/Textcompletion: no match" = sound "completion-fail";
"Event\\/Textcompletion: partial match" = sound "completion-success";
};
"ksmserver.notifyrc" = {
"Event\\/locked" = sound "desktop-screen-lock";
"Event\\/unlocked" = sound "desktop-screen-unlock";
};
"powerdevil.notifyrc"."Event\\/fullbattery" = popupSound "battery-full";
"devicenotifications.notifyrc"."Event\\/safelyRemovable" = popupSound "device-removed";
"networkmanagement.notifyrc" = {
"Event\\/ConnectionActivated" = popupSound "network-connectivity-established";
"Event\\/ConnectionDeactivated" = popupSound "network-connectivity-lost";
"Event\\/NoLongerConnected" = popupSound "network-connectivity-lost";
"Event\\/DeviceFailed" = popupSound "dialog-error";
"Event\\/FailedToActivateConnection" = popupSound "dialog-error";
"Event\\/FailedToGetSecrets" = popupSound "dialog-error";
"Event\\/CaptivePortal" = popupSound "dialog-warning";
"Event\\/LimitedConnectivity" = popupSound "dialog-warning";
};
"bluedevil.notifyrc" = {
"Event\\/SetupFinished" = popupSound "device-added";
"Event\\/ConnectionFailed" = popupSound "dialog-error";
"Event\\/Authorize" = popupSound "dialog-question";
"Event\\/RequestConfirmation" = popupSound "dialog-question";
"Event\\/RequestPin" = popupSound "dialog-question";
"Event\\/IncomingFile" = popupSound "message-new-instant";
};
"konsole.notifyrc" = {
"Event\\/BellVisible" = sound "bell-window-system";
"Event\\/BellInvisible" = popupSound "bell-window-system";
"Event\\/ProcessFinished" = popupSound "complete";
"Event\\/ProcessFinishedHidden" = popupSound "complete";
"Event\\/Prompt" = popupSound "window-attention";
"Event\\/PromptHidden" = popupSound "window-attention";
"Event\\/Activity" = popupSound "window-attention";
"Event\\/ActivityHidden" = popupSound "window-attention";
"Event\\/Silence" = popupSound "dialog-information";
"Event\\/SilenceHidden" = popupSound "dialog-information";
};
"spectacle.notifyrc" = {
"Event\\/newScreenshotSaved" = popupSound "screen-capture";
"Event\\/recordingSaved" = popupSound "complete";
"Event\\/ocrTextExtracted" = popupSound "complete";
};
# callReceived / missedCall / notification / textShareReceived keep your own Oxygen sounds.
"kdeconnect.notifyrc" = {
"Event\\/pingReceived" = popupSound "message-new-instant";
"Event\\/pairingRequest" = popupSound "dialog-question";
"Event\\/batteryLow" = popupSound "battery-caution";
};
"freespacenotifier.notifyrc"."Event\\/freespacenotif" = popupSound "dialog-warning";
"xdg-desktop-portal-kde.notifyrc" = {
# Audible heads-up when something starts watching or driving the screen.
"Event\\/remotedesktopstarted" = popupSound "dialog-warning";
"Event\\/inputcapturestarted" = popupSound "dialog-warning";
"Event\\/screencastfailure" = popupSound "dialog-error";
};
"printmanager.notifyrc"."Event\\/NewPrinterNotification" = popupSound "device-added";
};
}
+3 -1
View File
@@ -64,7 +64,9 @@ for (const id of activities()) {
d.writeConfig("SlidePaths", w.paths);
d.writeConfig("SlideInterval", w.interval);
d.writeConfig("SlideshowMode", "Random");
d.writeConfig("FillMode", 2);
// 6 = centred at original resolution; Blur fills the leftover space.
d.writeConfig("FillMode", 6);
d.writeConfig("Blur", true);
d.reloadConfig();
}
}
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Browsers inside distroboxes (e.g. Edge in `etv`) write PWA launchers into the
# shared ~/.local/share/applications with Exec paths that only exist inside the
# container. Prefix those with `distrobox-enter -n <box> --` so they work from
# the host menu. Mapping: binary path prefix -> container name.
set -euo pipefail
declare -A BOX=(
[/opt/microsoft/msedge/]=etv
)
dir="${XDG_DATA_HOME:-$HOME/.local/share}/applications"
shopt -s nullglob
for f in "$dir"/*.desktop; do
for prefix in "${!BOX[@]}"; do
# Only bare Exec lines (not already wrapped) whose binary is missing on the host.
if grep -q "^Exec=$prefix" "$f" && [ ! -e "$prefix" ]; then
sed -i "s|^Exec=$prefix|Exec=distrobox-enter -n ${BOX[$prefix]} -- $prefix|" "$f"
grep -q "^TryExec=$prefix" "$f" && sed -i "/^TryExec=/d" "$f"
echo "wrapped $(basename "$f") -> ${BOX[$prefix]}"
fi
done
done