Skip to content

Commit

Permalink
Closes #660, fixes incompatibility w/ Fedora 35 & 36
Browse files Browse the repository at this point in the history
  • Loading branch information
rbreaves committed May 14, 2022
1 parent f65e317 commit 346c79c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions xkeysnail_service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ if [[ $distro == 'kdeneon' ]]; then
kquitapp5 kglobalaccel && sleep 2s && kglobalaccel5 &
fi

if [[ $distro == 'fedora' ]]; then
if [[ $distro == 'fedora' ]] || [[ $distro == 'fedoralinux' ]]; then
if [[ $(gsettings get org.gnome.desktop.wm.keybindings show-desktop | grep "\[\]" | wc -l) == 1 ]];then
gsettings set org.gnome.desktop.wm.keybindings show-desktop "['<Super>d']"
else
Expand Down Expand Up @@ -500,7 +500,7 @@ if [[ $distro == "popos" ]]; then
perl -pi -e "\s{4}(# )(K.*)(# SL - .*popos.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1
fi

if [[ $distro == "fedora" ]]; then
if [[ $distro == 'fedora' ]] || [[ $distro == 'fedoralinux' ]]; then
perl -pi -e "\s{4}(# )(K.*)(# SL - .*fedora.*)/ \$2\$3/g" ./linux/kinto.py.new >/dev/null 2>&1
sed -i "s#{sudo}##g" ./linux/xkeysnail.service.new
selinuxuser=system_u
Expand Down Expand Up @@ -575,7 +575,7 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
exit 0
fi
sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/limitedadmins.new
if [[ $distro == "fedora" ]]; then
if [[ $distro == 'fedora' ]] || [[ $distro == 'fedoralinux' ]]; then
echo "Changing SELinux context"
sudo chcon -v --user=$selinuxuser --type=$selinuxtype "$xkeypath"xkeysnail.service
fi
Expand All @@ -587,7 +587,7 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
sed -i "s#{xkeysnail}#`which xkeysnail`#g" ./linux/xkeysnail.service.new
sudo mv ./linux/xkeysnail.service.new "$xkeypath"xkeysnail.service && echo "Service file added to "$xkeypath"xkeysnail.service"

if [[ $distro == "fedora" ]]; then
if [[ $distro == 'fedora' ]] || [[ $distro == 'fedoralinux' ]]; then
sudo cp "$xkeypath"xkeysnail.service /etc/systemd/system/xkeysnail.service && echo "Copied service file to system..." || echo "Failed to create copy..."
sudo cp "$xkeypath"xkeysnail.service /etc/systemd/system/graphical.target.wants/xkeysnail.service && echo "Copied service file to system for graphical target..." || echo "Failed to create copy for graphical target..."
sudo chown -R root:root /etc/systemd/system/xkeysnail.service && echo "Ownership set for root..." || echo "Failed to set ownership..."
Expand Down

0 comments on commit 346c79c

Please sign in to comment.