From 588911b0a3d0fae8ec61fa5372acc29ae8fc8361 Mon Sep 17 00:00:00 2001 From: Jonas Strassel Date: Sat, 23 Oct 2021 19:13:08 +0200 Subject: [PATCH] feat: introduce variable to purge cliphist on logout --- community/sway/etc/sway/modes/shutdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/community/sway/etc/sway/modes/shutdown b/community/sway/etc/sway/modes/shutdown index 6cd221db1..1b70da7a3 100644 --- a/community/sway/etc/sway/modes/shutdown +++ b/community/sway/etc/sway/modes/shutdown @@ -14,7 +14,7 @@ mode --pango_markup $mode_shutdown { $bindsym l mode "default", exec $locking # logout - $bindsym e exec loginctl terminate-user $USER&; rm -f $HOME/.cache/cliphist/db + $bindsym e exec [ $purge_cliphist == 'true' ] && rm -f $HOME/.cache/cliphist/db || exit 0; loginctl terminate-user $USER # suspend $bindsym u mode "default", exec systemctl suspend @@ -23,10 +23,10 @@ mode --pango_markup $mode_shutdown { $bindsym h mode "default", exec systemctl hibernate # shutdown - $bindsym s exec systemctl poweroff&; rm -f $HOME/.cache/cliphist/db + $bindsym s exec [ $purge_cliphist == 'true' ] && rm -f $HOME/.cache/cliphist/db || exit 0; systemctl poweroff # reboot - $bindsym r exec systemctl reboot&; rm -f $HOME/.cache/cliphist/db + $bindsym r exec [ $purge_cliphist == 'true' ] && rm -f $HOME/.cache/cliphist/db || exit 0; systemctl reboot # Return to default mode. $bindsym Escape mode "default"