barrier: move server config to XDG_CONFIG_HOME
This commit is contained in:
parent
4f5174063d
commit
0daba7236c
3 changed files with 6 additions and 5 deletions
|
@ -1,8 +1,10 @@
|
|||
#!/bin/zsh
|
||||
if [[ ! -e ${0:A:h}/server ]] then
|
||||
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 \`${0:A:h}/server\` containing the target server name
|
||||
Create \`${SERVER_FILE}\` containing the target server name
|
||||
ERROR
|
||||
exit 1
|
||||
fi
|
||||
|
@ -10,4 +12,4 @@ source ${0:A:h:h}/import-env.zsh
|
|||
import-env awesome || exit 1
|
||||
|
||||
exec 2>&1
|
||||
exec barrierc --no-daemon $(<${0:A:h}/server)
|
||||
exec barrierc --no-daemon $(<${SERVER_FILE})
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
gaminghorst
|
Loading…
Add table
Add a link
Reference in a new issue