diff --git a/install b/install index 0b3d92b..2108fd1 100755 --- a/install +++ b/install @@ -1,10 +1,12 @@ #!/bin/bash DIR=$(dirname $0) -PROGRAM=$HOME/.local/bin/comfortable-swipe +PROGRAM=/usr/local/bin/comfortable-swipe if [ -x "$(command -v $PROGRAM)" ]; then # stop any running comfortable-swipe if it exists $PROGRAM stop + # remove existing comfortable-swipe + rm $(which comfortable-swipe) fi #copy config file @@ -29,7 +31,7 @@ else fi fi echo "Installing..." -mkdir -p ~/.local/bin +# mkdir -p ~/.local/bin g++ -std=c++11 -O2 $DIR/src/comfortable-swipe.cpp -lxdo -o $PROGRAM || exec echo "Installation aborted" # toggle autostart twice to refresh any changes diff --git a/src/comfortable-swipe.cpp b/src/comfortable-swipe.cpp index af6ea25..20edbc3 100644 --- a/src/comfortable-swipe.cpp +++ b/src/comfortable-swipe.cpp @@ -31,7 +31,7 @@ along with this program. If not, see . #include #include #define cstr const string& -#define PROGRAM "$HOME/.local/bin/comfortable-swipe" +#define PROGRAM "/usr/local/bin/comfortable-swipe" using namespace std; extern "C" { diff --git a/uninstall b/uninstall index fd47646..487ead6 100644 --- a/uninstall +++ b/uninstall @@ -2,5 +2,6 @@ echo "Uninstalling..." rm ${XDG_CONFIG_HOME:-$HOME/.config}/autostart/comfortable-swipe.desktop 2> /dev/null comfortable-swipe stop 2> /dev/null -rm $HOME/.local/bin/comfortable-swipe 2> /dev/null +rm $HOME/.local/bin/comfortable-swipe 2> /dev/null # compat +rm /usr/local/bin/comfortable-swipe 2> /dev/null echo "Successfully uninstalled comfortable-swipe" \ No newline at end of file