commit 153d69995aab15ada595b3a19af317cc393727ce parent b20e8ed4aec77fbcd66b8454f0eab119d6866422 Author: Ilia Bozhinov <ammen99@gmail.com> Date: Thu, 19 Mar 2020 21:54:20 +0100 start_wayfire: add a log file if XDG_RUNTIME_DIR is set Diffstat:
| M | start_wayfire.sh.in | | | 12 | +++++++++++- |
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/start_wayfire.sh.in b/start_wayfire.sh.in @@ -5,4 +5,14 @@ LD_LIBRARY_PATH=$LD_LIBRARY_PATH # path is needed for wf-shell clients PATH=$PATH -wayfire +if [ -d $XDG_RUNTIME_DIR ]; then + LOG_FILE = $XDG_RUNTIME_DIR/wayfire.log + if [ -f $LOG_FILE ]; then + cp $LOG_FILE $LOG_FILE.old + fi + + echo "Using log file: $LOG_FILE" + wayfire &> $LOG_FILE +else + wayfire +fi