Skip to content

Commit 201cca1

Browse files
committed
Service flag should be in $XDG_CONFIG_HOME
1 parent d0589c7 commit 201cca1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libinput-gestures-setup

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ DOCDIR="/usr/share/doc/$NAME"
1515
CNFDIR="/etc"
1616
HCFDIR="${XDG_CONFIG_HOME:-$HOME/.config}"
1717
AUTDIR="$HCFDIR/autostart"
18-
SVCFLG="$HOME/.$NAME-service"
18+
SVCFLG="$HCFDIR/$NAME-is-service"
1919

2020
usage() {
2121
echo "Usage:"
@@ -120,7 +120,8 @@ user_action() {
120120
echo "Systemd not available, can not run as service."
121121
exit 1
122122
fi
123-
touch $SVCFLG
123+
mkdir -p "$(dirname $SVCFLG)"
124+
echo "# This file created by \"$NAME-setup $cmd\" command." >$SVCFLG
124125
rm -fv $AUTDIR/$NAME.desktop
125126
elif [[ $cmd == desktop ]]; then
126127
rm -f $SVCFLG

0 commit comments

Comments
 (0)