Merge branch 'user/okmans/start-sway/ssh-agent' into 'master'

Pass the env variable SSH_AUTH_SOCK to all processes in the session

See merge request tile-os/tileos-settings-sway!5
This commit is contained in:
Aleksey Samoilov 2024-07-24 19:46:11 +00:00
commit ca95164088

View file

@ -47,9 +47,14 @@ if [ -d "${XDG_CONFIG_HOME:-$HOME/.config}/environment.d" ]; then
set +o allexport
fi
# Run Sway under ssh-agent
run_sway() {
exec systemd-cat -- /usr/bin/ssh-agent /usr/bin/sway $@
}
# Check if Nvidia driver installed, start Sway and send output to the journal
if [ -d /sys/module/nvidia ] && [ ! -d /sys/module/amdgpu ] && [ ! -d /sys/module/i915 ]; then
exec systemd-cat -- /usr/bin/sway --unsupported-gpu $@
run_sway --unsupported-gpu $@
else
exec systemd-cat -- /usr/bin/sway $@
run_sway
fi