logo

dotfiles

My dotfiles, one branch per machine, rebased on base
commit: 331a96033d3c70525ca3f9e9b8400b3bb03320c5
parent: 181a32a87fb7a9452c979490ac7461a9f7148f8f
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue, 24 Mar 2020 16:00:06 +0100

bin/wl-run: base log file name on uptime

Diffstat:

M.local/bin/wl-run5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.local/bin/wl-run b/.local/bin/wl-run @@ -10,5 +10,8 @@ export MY_LOCKER=swaylock [ -z "$*" ] && ( echo "$0"': Nothing to execute, exiting…' 1>&2; exit 0 ) name="$(sed 's/[^a-z]//g' <<<$1)" +uptime="$(cut -d' ' -f1 /proc/uptime)" -"$@" >"${XDG_RUNTIME_DIR}"'/wl-run_'"$name"'_'"$$"'.log' 2>&1 +echo 'wl-run_'"$uptime"'_'"$name"'.log' >&2 + +"$@" 2>&1 | tee "${XDG_RUNTIME_DIR}"'/wl-run_'"$uptime"'_'"$name"'.log' 2>&1