diff --git a/barrierc/run b/barrierc/run index c536d0a..786ed39 100755 --- a/barrierc/run +++ b/barrierc/run @@ -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}) diff --git a/barrierc/server b/barrierc/server deleted file mode 100644 index 84fe995..0000000 --- a/barrierc/server +++ /dev/null @@ -1 +0,0 @@ -gaminghorst diff --git a/barriers/run b/barriers/run index 7a496ae..0a37a48 100755 --- a/barriers/run +++ b/barriers/run @@ -1,5 +1,5 @@ #!/bin/zsh -source ${0:a:h:h}/import-env.zsh +source ${0:A:h:h}/import-env.zsh import-env awesome || exit 1 exec 2>&1 diff --git a/brscan-skey/log/run b/brscan-skey/log/run new file mode 120000 index 0000000..a6e7493 --- /dev/null +++ b/brscan-skey/log/run @@ -0,0 +1 @@ +../../log \ No newline at end of file diff --git a/brscan-skey/log/supervise b/brscan-skey/log/supervise new file mode 120000 index 0000000..9f9e368 --- /dev/null +++ b/brscan-skey/log/supervise @@ -0,0 +1 @@ +/run/user/1000/supervise.brscan-skey-log \ No newline at end of file diff --git a/brscan-skey/run b/brscan-skey/run new file mode 100755 index 0000000..c014179 --- /dev/null +++ b/brscan-skey/run @@ -0,0 +1,4 @@ +#!/bin/zsh +export PATH=${PATH}:$HOME/.local/bin:/opt/brother/scanner/brscan-skey +exec 2>&1 +exec /opt/brother/scanner/brscan-skey/brscan-skey-exe diff --git a/brscan-skey/supervise b/brscan-skey/supervise new file mode 120000 index 0000000..c05c510 --- /dev/null +++ b/brscan-skey/supervise @@ -0,0 +1 @@ +/run/user/1000/supervise.brscan-skey \ No newline at end of file diff --git a/kdeconnect/run b/kdeconnect/run index 064d34d..9f90e98 100755 --- a/kdeconnect/run +++ b/kdeconnect/run @@ -1,9 +1,5 @@ -#!/bin/sh -if ! pgrep -x awesome; then - sleep 2 - exit 1 -fi -export DISPLAY=:0 - +#!/bin/zsh +source ${0:a:h:h}/import-env.zsh +import-env awesome || exit 1 exec 2>&1 exec kdeconnect-indicator