Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- export reuse_gl_names=0
- # if $XDG_DATA_DIRS is not set, set it to the spec recommended value
- [ -z "$XDG_DATA_DIRS" ] && export XDG_DATA_DIRS="/usr/local/share:/usr/share"
- # path for wf-config and wlroots
- export LD_LIBRARY_PATH=/opt/wayfire/lib:$LD_LIBRARY_PATH
- # path is needed for wf-shell clients
- export PATH=/opt/wayfire/bin:$PATH
- # path to find .desktop files like wcm
- export XDG_DATA_DIRS=/opt/wayfire/share:$XDG_DATA_DIRS
- if [ -d "$XDG_DATA_HOME" ]; then
- DEFAULT_LOG_DIR=$XDG_DATA_HOME/wayfire
- else
- DEFAULT_LOG_DIR=$HOME/.local/share/wayfire
- fi
- mkdir -p $DEFAULT_LOG_DIR
- if [ $? != 0 ]; then
- echo "Could not create log directory $DEFAULT_LOG_DIR"
- echo "Using stdout as log"
- wayfire "$@"
- elif [ ! -z "$WAYLAND_DISPLAY" ] || [ ! -z "$DISPLAY" ]; then
- echo "Running nested, using stdout as log"
- wayfire "$@"
- else
- LOG_FILE=$DEFAULT_LOG_DIR/wayfire.log
- if [ -f $LOG_FILE ]; then
- cp $LOG_FILE $LOG_FILE.old
- fi
- echo "Using log file: $LOG_FILE"
- wayfire "$@" &> $LOG_FILE
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement