diff --git a/dot_bash_profile.tmpl b/dot_bash_profile.tmpl index 78e18ee..2e686c6 100644 --- a/dot_bash_profile.tmpl +++ b/dot_bash_profile.tmpl @@ -75,4 +75,4 @@ export XAUTHORITY="${XDG_RUNTIME_DIR}/Xauthority" [[ -f ~/.bashrc ]] && . ~/.bashrc # start river -[[ -z "${DISPLAY}" && "${XDG_VTNR}" -eq 1 ]] && exec dbus-run-session river +[[ -z $DISPLAY && $(tty) = "/dev/tty1" ]] && exec dbus-run-session river diff --git a/dot_config/wleave/layout b/dot_config/wleave/layout index 922b5a4..61fa2fd 100644 --- a/dot_config/wleave/layout +++ b/dot_config/wleave/layout @@ -12,7 +12,7 @@ } { "label" : "logout", - "action" : "loginctl terminate-user $USER", + "action" : "${HOME}/.local/bin/river-logout", "text" : "Logout", "keybind" : "e" } diff --git a/dot_local/bin/executable_river-logout b/dot_local/bin/executable_river-logout new file mode 100644 index 0000000..b3480bc --- /dev/null +++ b/dot_local/bin/executable_river-logout @@ -0,0 +1,5 @@ +#!/bin/bash + +RIVER=`ps -C river | awk '/river/'` + +[[ $RIVER != "" ]] && riverctl spawn 'reset' && riverctl exit || echo "River is not running."