Files
infra/dotfiles/desktop/.local/bin/start-hyprland-session
2026-04-10 13:32:03 +02:00

24 lines
557 B
Bash

#!/bin/sh
[ $# -gt 0 ] || set -- Hyprland
[ -r /etc/profile ] && . /etc/profile
[ -r "$HOME/.profile" ] && . "$HOME/.profile"
set -e
session_name=${1##*/}
export XDG_CURRENT_DESKTOP="$session_name"
export XDG_SESSION_DESKTOP="$session_name"
export XDG_SESSION_TYPE=wayland
export SSH_AUTH_SOCK="$HOME/.local/state/ssh-agent/socket"
exec dbus-run-session sh -eu -c '
umask 077
printf "%s\n" "$DBUS_SESSION_BUS_ADDRESS" > "$HOME/.dbus-session-bus-address"
gpgconf --launch gpg-agent
"$HOME/.local/bin/update-turnstile-env"
exec "$@"
' sh "$@"