mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-05 18:38:26 +02:00
- xkeysnail install improvements wip
This commit is contained in:
@@ -1,14 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if systemctl -q --user is-enabled keyswap.timer; then
|
if [ -f /home/{username}/.config/systemd/user/keyswap.timer ]; then
|
||||||
systemctl --user stop keyswap.timer
|
systemctl --user stop keyswap.timer >/dev/null 2>&1
|
||||||
systemctl --user disable keyswap.timer
|
systemctl --user disable keyswap.timer >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
if systemctl -q --user is-active keyswap; then
|
if [ -f /home/{username}/.config/systemd/user/keyswap.service ]; then
|
||||||
systemctl --user stop keyswap
|
systemctl --user stop keyswap >/dev/null 2>&1
|
||||||
fi
|
systemctl --user disable keyswap >/dev/null 2>&1
|
||||||
if systemctl -q --user is-enabled keyswap; then
|
|
||||||
systemctl --user disable keyswap
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# export DISPLAY={displayid};/usr/bin/xhost +SI:localuser:root
|
# export DISPLAY={displayid};/usr/bin/xhost +SI:localuser:root
|
||||||
|
@@ -3,6 +3,9 @@
|
|||||||
# set about:config?filter=ui.key.menuAccessKeyFocuses
|
# set about:config?filter=ui.key.menuAccessKeyFocuses
|
||||||
# to false for wordwise to work in Firefox
|
# to false for wordwise to work in Firefox
|
||||||
|
|
||||||
|
typeset -l distro
|
||||||
|
distro=$(awk -F= '$1=="NAME" { print $2 ;}' /etc/os-release)
|
||||||
|
|
||||||
function uninstall {
|
function uninstall {
|
||||||
typeset -l dename
|
typeset -l dename
|
||||||
dename=$(./system-config/dename.sh | cut -d " " -f1)
|
dename=$(./system-config/dename.sh | cut -d " " -f1)
|
||||||
@@ -102,7 +105,17 @@ if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1
|
|||||||
echo "Will need to install python3-pip..."
|
echo "Will need to install python3-pip..."
|
||||||
sudo ./system-config/unipkg.sh python3-pip
|
sudo ./system-config/unipkg.sh python3-pip
|
||||||
fi
|
fi
|
||||||
|
if ! [ -x "$(command -v python3-config)" ]; then
|
||||||
|
if [ "$distro" == "ubuntu" ] || [ "$distro" == "debian" ]; then
|
||||||
|
pydev="python3-dev"
|
||||||
|
elif [ "$distro" == "fedora" ]; then
|
||||||
|
pydev="python3-devel"
|
||||||
|
fi
|
||||||
|
if [ "$distro" == "gnome" ] || [ "$distro" == "fedora" ] || [ "$distro" == "debian" ]; then
|
||||||
|
echo "Will need to install $pydev..."
|
||||||
|
sudo ./system-config/unipkg.sh "$pydev"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
# echo "Transferring files..."
|
# echo "Transferring files..."
|
||||||
mkdir -p ~/.config/kinto
|
mkdir -p ~/.config/kinto
|
||||||
|
|
||||||
@@ -154,7 +167,18 @@ fi
|
|||||||
|
|
||||||
if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1 == "chromebook" ]]; then
|
if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1 == "chromebook" ]]; then
|
||||||
mv ./xkeysnail-config/kinto.py.new ~/.config/kinto/kinto.py
|
mv ./xkeysnail-config/kinto.py.new ~/.config/kinto/kinto.py
|
||||||
sudo mv ./xkeysnail-config/xkeysnail.service.new /etc/systemd/system/xkeysnail.service
|
# if [ "$distro" == "fedora" ];then
|
||||||
|
sudo rm /etc/systemd/system/xkeysnail.service
|
||||||
|
sudo mv ./xkeysnail-config/xkeysnail.service.new /usr/lib/systemd/system/xkeysnail.service
|
||||||
|
sudo chown -R root:root /usr/lib/systemd/system/xkeysnail.service
|
||||||
|
sudo chmod 644 /usr/lib/systemd/system/xkeysnail.service
|
||||||
|
sudo ln -s /usr/lib/systemd/system/xkeysnail.service /etc/systemd/system/xkeysnail.service
|
||||||
|
sudo ln -s /usr/lib/systemd/system/xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service
|
||||||
|
# else
|
||||||
|
# sudo mv ./xkeysnail-config/xkeysnail.service.new /etc/systemd/system/xkeysnail.service
|
||||||
|
# sudo chown -R root:root /etc/systemd/system/xkeysnail.service
|
||||||
|
# sudo chmod 644 /etc/systemd/system/xkeysnail.service
|
||||||
|
# fi
|
||||||
xhost +SI:localuser:root
|
xhost +SI:localuser:root
|
||||||
git clone --depth 1 https://github.com/rbreaves/xkeysnail.git
|
git clone --depth 1 https://github.com/rbreaves/xkeysnail.git
|
||||||
cd xkeysnail
|
cd xkeysnail
|
||||||
@@ -167,8 +191,13 @@ if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1
|
|||||||
fi
|
fi
|
||||||
git pull origin master
|
git pull origin master
|
||||||
sudo pip3 install --upgrade .
|
sudo pip3 install --upgrade .
|
||||||
sudo systemctl enable xkeysnail.service
|
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl --state=not-found --all | grep xkeysnail
|
||||||
|
if [ "$distro" == "fedora" ];then
|
||||||
|
systemctl enable xkeysnail.service
|
||||||
|
else
|
||||||
|
sudo systemctl enable xkeysnail.service
|
||||||
|
fi
|
||||||
sudo systemctl restart xkeysnail
|
sudo systemctl restart xkeysnail
|
||||||
|
|
||||||
echo -e "Adding xhost fix...\n"
|
echo -e "Adding xhost fix...\n"
|
||||||
@@ -219,4 +248,10 @@ else
|
|||||||
sudo rm /etc/sudoers.d/limitedadmins
|
sudo rm /etc/sudoers.d/limitedadmins
|
||||||
rm ~/.config/autostart/xkeysnail.desktop
|
rm ~/.config/autostart/xkeysnail.desktop
|
||||||
rm -rf ~/.config/kinto
|
rm -rf ~/.config/kinto
|
||||||
|
sudo rm /etc/systemd/system/xkeysnail.service
|
||||||
|
sudo rm /etc/systemd/system/graphical.target.wants/xkeysnail.service
|
||||||
|
sudo rm /usr/lib/systemd/system/xkeysnail.service
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl --state=not-found --all | grep xkeysnail
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
Reference in New Issue
Block a user