From 5b5368193e255c2ea6594ab1d306b47e52f028c9 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Sun, 24 Dec 2023 02:37:31 -0500 Subject: [PATCH] Add logout script for river --- dot_config/wleave/layout | 2 +- dot_local/bin/executable_river-logout | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 dot_local/bin/executable_river-logout 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..a6655fb --- /dev/null +++ b/dot_local/bin/executable_river-logout @@ -0,0 +1,5 @@ +#!/bin/bash + +RIVER=`ps -C river` + +[[ $RIVER != "" ]] && riverctl spawn 'reset' && riverctl exit || echo "River is not running."