runit-user-services/barrierc/run
2025-08-04 21:16:37 +02:00

15 lines
386 B
Bash
Executable file

#!/bin/zsh
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
SERVER_FILE=${XDG_CONFIG_HOME}/barrier/server
if [[ ! -e $SERVER_FILE ]] then
<<-ERROR
Service requires configuration!
Create \`${SERVER_FILE}\` containing the target server name
ERROR
exit 1
fi
source ${0:A:h:h}/import-env.zsh
import-env awesome || exit 1
exec 2>&1
exec barrierc --no-daemon $(<${SERVER_FILE})