Files
Minimal-Debian-Desktop/themes/dark/home/.config/labwc/autostart
T
2026-11-17 09:28:47 +01:00

69 lines
2.5 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/sh
# labwc – Autostart (wird als Shell-Skript ausgeführt)
# GTK-, Icon- und Cursor-Werte über GSettings (dconf) setzen. Unter
# Wayland liest GTK diese Werte aus dconf; ~/.config/gtk-3.0/settings.ini
# wird ignoriert. Der Aufruf steht vor den Programmen, damit Waybar,
# Thunar und GTK-Apps von Anfang an das richtige Icon-Theme sehen.
if [ -x "$HOME/.local/bin/set-gtk-settings" ]; then
if [ -z "${DBUS_SESSION_BUS_ADDRESS:-}" ] && command -v dbus-run-session >/dev/null 2>&1; then
dbus-run-session -- "$HOME/.local/bin/set-gtk-settings" dark >/dev/null 2>&1 || true
else
"$HOME/.local/bin/set-gtk-settings" dark >/dev/null 2>&1 || true
fi
fi
# Hintergrundbild
if [ -f "$HOME/.local/share/backgrounds/labwc-dark.png" ]; then
swaybg -i "$HOME/.local/share/backgrounds/labwc-dark.png" -m fill >/dev/null 2>&1 &
else
swaybg -c '#1b1e20' >/dev/null 2>&1 &
fi
# Benachrichtigungen
mako >/dev/null 2>&1 &
# Taskleiste
waybar >/dev/null 2>&1 &
# PolicyKit-Agent (Passwortdialog für pkexec, z. B. gparted)
if [ -x /usr/libexec/xfce-polkit ]; then
/usr/libexec/xfce-polkit >/dev/null 2>&1 &
elif command -v xfce-polkit >/dev/null 2>&1; then
xfce-polkit >/dev/null 2>&1 &
elif command -v lxpolkit >/dev/null 2>&1; then
lxpolkit >/dev/null 2>&1 &
fi
# D-Bus-Aktivierungsumgebung aktuell halten (für GTK/Portal-Programme)
if command -v dbus-update-activation-environment >/dev/null 2>&1; then
dbus-update-activation-environment \
WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE \
>/dev/null 2>&1
fi
# KDE Connect (Indikator; kdeconnectd wird bei Bedarf per D-Bus gestartet)
if command -v kdeconnect-indicator >/dev/null 2>&1; then
kdeconnect-indicator >/dev/null 2>&1 &
fi
# Idle-Manager: nach 10 Min sperren, nach 15 Min Monitor aus,
# nach 30 Min Ruhezustand (Suspend). Laufende Medienwiedergabe
# über PipeWire verhindert die Aktionen.
#
# "resume" gehört jeweils direkt hinter den zugehörigen "timeout":
# Bei Aktivität wird der Monitor wieder eingeschaltet und wartende
# Aktionen werden abgebrochen. Ohne diese Zuordnung bliebe der
# Bildschirm nach dem Ausschalten schwarz.
if command -v swayidle >/dev/null 2>&1; then
swayidle -w \
timeout 600 'idle-action lock' resume 'idle-action cancel' \
timeout 900 'idle-action dpms-off' resume 'idle-action resume' \
timeout 1800 'idle-action suspend' resume 'idle-action resume' \
after-resume 'idle-action resume' \
before-sleep 'idle-action lock-now' \
lock 'idle-action lock-now' >/dev/null 2>&1 &
fi
exit 0