From a9c933cbb13da183162bb2cbc21cba47eb3b6027 Mon Sep 17 00:00:00 2001 From: Nulo Date: Mon, 27 Dec 2021 10:37:48 -0300 Subject: [PATCH] zsh: logear river --- .zprofile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.zprofile b/.zprofile index 50c3f69..7fc0463 100755 --- a/.zprofile +++ b/.zprofile @@ -1,8 +1,10 @@ . ~/.profile -test ! "$REMOTE" \ -&& test "$(tty)" = /dev/tty1 \ -&& exec env \ - XDG_CURRENT_DESKTOP=river \ - XDG_SESSION_DESKTOP=river \ - dbus-run-session river +if ! "$REMOTE" && test "$(tty)" = /dev/tty1; then + mkdir -p "$HOME/.local/share/river" + log="$HOME/.local/share/river/$(date +%Y-%m-%d@%H:%M:%S).log" + exec env \ + XDG_CURRENT_DESKTOP=river \ + XDG_SESSION_DESKTOP=river \ + dbus-run-session river -log-level debug >"$log" 2>&1 +fi . ~/.zshrc