- Added support for Manjaro Gnome and KDE for xkeysnail

This commit is contained in:
Ben Reaves
2020-05-02 19:42:34 -05:00
parent af9036ec24
commit ae36d7f955
3 changed files with 18 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ elif pkgmgr="$( which dnf )" 2> /dev/null; then
$pkgmgr check-update; $pkgmgr install -y "$1"
elif pkgmgr="$( which pacman )" 2> /dev/null; then
echo "Arch-based"
$pkgmgr -Syy; yes | pkgmr -S "$1"
$pkgmgr -Syy;yes | $pkgmgr -S "$1"
else
echo "Package manager not found, please install $1" >&2
exit 1

View File

@@ -1,9 +1,19 @@
#!/bin/bash
# >/dev/null 2>&1
/usr/local/bin/xkeysnail --quiet --watch "$1" &
if [ -f /usr/local/bin/xkeysnail ];then
xkeyfullpath="/usr/local/bin/xkeysnail"
elif [ -f /usr/bin/xkeysnail ];then
xkeyfullpath="/usr/bin/xkeysnail"
else
xkeyfullpath=`which xkeysnail`
fi
"$xkeyfullpath" --quiet --watch "$1" &
inotifywait -m -e close_write,moved_to,create,modify /tmp/kinto/xkeysnail |
while read -r path; do
/usr/bin/killall xkeysnail
/usr/local/bin/xkeysnail --quiet --watch "$1" &
"$xkeyfullpath" --quiet --watch "$1" &
done

View File

@@ -116,6 +116,11 @@ if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1
sudo ./system-config/unipkg.sh "$pydev"
fi
fi
if ! [ -x "$(command -v xhost)" ]; then
if [ "$distro" == "\"manjaro linux\"" ]; then
sudo ./system-config/unipkg.sh xorg-xhost
fi
fi
# echo "Transferring files..."
mkdir -p ~/.config/kinto
@@ -170,10 +175,8 @@ if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1
# if [ "$distro" == "fedora" ];then
sudo rm /etc/systemd/system/xkeysnail.service
if [ -d /usr/lib/systemd/system ];then
echo "1"
xkeypath="/usr/lib/systemd/system/"
elif [ -d /lib/systemd/system ];then
echo "2"
xkeypath="/lib/systemd/system/"
fi
sudo mv ./xkeysnail-config/xkeysnail.service.new "$xkeypath"xkeysnail.service && echo "Service file added to "$xkeypath"xkeysnail.service"