aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.profile
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.profile')
-rw-r--r--dotfiles/.profile9
1 files changed, 6 insertions, 3 deletions
diff --git a/dotfiles/.profile b/dotfiles/.profile
index 7cfd00d..00fed07 100644
--- a/dotfiles/.profile
+++ b/dotfiles/.profile
@@ -44,9 +44,12 @@ eval "$(dircolors "$HOME/.config/dir_colors")"
# Start sway automatically upon login on tty1 or tty2
if [ -z $DISPLAY ] && [ $(tty) = /dev/tty1 ] || [ $(tty) = /dev/tty2 ]; then
- # DBUS variables (for Artix)
- export $(dbus-launch)
- exec sway -d 2> ~/.cache/sway.log 1> /dev/null && clear && exit
+ dbus-run-session sway
+ if [ $? = 0 ] && [ ! -e ~/.cache/dont-kill ]; then
+ killall -u $(whoami)
+ clear
+ exit
+ fi
mv ~/.cache/sway.log ~/.cache/sway-crash-$(date +"%Y-%m-%dT%H:%M").log
fi