mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-05 18:38:26 +02:00
XFCE super key install conflict resolved. Improved launcher detection/remapping.
This commit is contained in:
@@ -27,7 +27,7 @@ start() {
|
|||||||
# Restart the service
|
# Restart the service
|
||||||
stop() {
|
stop() {
|
||||||
echo -n "Stopping Kinto (xkeynsail)" | logger
|
echo -n "Stopping Kinto (xkeynsail)" | logger
|
||||||
pgrep 'xkeysnail' | xargs -r -n1 sudo kill
|
pgrep 'bin\xkeysnail' | xargs -r -n1 sudo kill
|
||||||
### Now, delete the lock file ###
|
### Now, delete the lock file ###
|
||||||
rm -f /var/lock/subsys/kinto
|
rm -f /var/lock/subsys/kinto
|
||||||
echo
|
echo
|
||||||
@@ -46,7 +46,7 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
restart|reload|condrestart)
|
restart|reload|condrestart)
|
||||||
stop
|
stop
|
||||||
sleep 2
|
sleep 5
|
||||||
start
|
start
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@@ -225,6 +225,9 @@ fi
|
|||||||
sudo systemctl stop xkeysnail >/dev/null 2>&1
|
sudo systemctl stop xkeysnail >/dev/null 2>&1
|
||||||
sudo systemctl disable xkeysnail >/dev/null 2>&1
|
sudo systemctl disable xkeysnail >/dev/null 2>&1
|
||||||
sudo pkill -f bin/xkeysnail >/dev/null 2>&1
|
sudo pkill -f bin/xkeysnail >/dev/null 2>&1
|
||||||
|
sudo pkill -f kinto-gui.py >/dev/null 2>&1
|
||||||
|
sudo pkill -f kintotray.py >/dev/null 2>&1
|
||||||
|
ps aux | awk '/[s]h -c while/ {print $2}' | xargs -r -n1 sudo kill
|
||||||
sudo pkill -f "is-active xkeysnail" >/dev/null 2>&1
|
sudo pkill -f "is-active xkeysnail" >/dev/null 2>&1
|
||||||
|
|
||||||
if [ "$distro" == "manjarolinux" ]; then
|
if [ "$distro" == "manjarolinux" ]; then
|
||||||
@@ -255,14 +258,29 @@ if [[ $dename == 'gnome' || $dename == 'budgie' ]];then
|
|||||||
gsettings set org.gnome.mutter overlay-key ''
|
gsettings set org.gnome.mutter overlay-key ''
|
||||||
fi
|
fi
|
||||||
elif [[ $dename == 'xfce' ]];then
|
elif [[ $dename == 'xfce' ]];then
|
||||||
# xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/Super_L" --reset
|
|
||||||
launcher=$(cat ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml | grep 'name="Super_L"' | sed 's:.*="::')
|
launcher=$(cat ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml | grep 'name="Super_L"' | sed 's:.*="::')
|
||||||
nlauncher=${launcher::-3}
|
# echo "${#launcher}"
|
||||||
# Replace Alt-F1 help file w/ whisker menu alternative hotkey
|
if [[ "${#launcher}" -eq 0 ]]; then
|
||||||
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Alt>F1" --reset
|
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/Super_L" --create --type string --set "xfce4-popup-whiskermenu"
|
||||||
# Clear Alt-F3 App Finder for sublime text global replace
|
echo "Resetting Super_L, please wait..."
|
||||||
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Alt>F3" --reset
|
sleep 6
|
||||||
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Alt>F1" --create --type string --set "$nlauncher" && echo "$nlauncher has been set to Alt-F1 for Cmd-Space to work."
|
launcher=$(cat ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml | grep 'name="Super_L"' | sed 's:.*="::')
|
||||||
|
if [[ "${#launcher}" -gt 0 ]]; then
|
||||||
|
echo "Success."
|
||||||
|
else
|
||||||
|
echo "Failed. Skipping setup of Cmd-Space."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ "${#launcher}" -gt 0 ]]; then
|
||||||
|
nlauncher=${launcher::-3}
|
||||||
|
# Replace Alt-F1 help file w/ whisker menu alternative hotkey
|
||||||
|
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Alt>F1" --reset
|
||||||
|
# Clear Alt-F3 App Finder for sublime text global replace
|
||||||
|
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Alt>F3" --reset
|
||||||
|
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Alt>F1" --create --type string --set "$nlauncher" && echo "$nlauncher has been set to Alt-F1 for Cmd-Space to work."
|
||||||
|
# Unset Super_L to avoid issues during setup, will re-apply at the end
|
||||||
|
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/Super_L" --reset
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if ls /etc/apt/sources.list.d/system76* 1> /dev/null 2>&1; then
|
# if ls /etc/apt/sources.list.d/system76* 1> /dev/null 2>&1; then
|
||||||
@@ -530,6 +548,7 @@ if [[ $dename == "xfce" ]] && ls /etc/apt/sources.list.d/enso* 1> /dev/null 2>&1
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
||||||
|
|
||||||
mv ./linux/kinto.py.new ~/.config/kinto/kinto.py
|
mv ./linux/kinto.py.new ~/.config/kinto/kinto.py
|
||||||
# if [ "$distro" == "fedora" ];then
|
# if [ "$distro" == "fedora" ];then
|
||||||
if [ ! "$sysv" -eq 0 ];then
|
if [ ! "$sysv" -eq 0 ];then
|
||||||
@@ -586,7 +605,8 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
|||||||
# echo "Using sysvinit..."
|
# echo "Using sysvinit..."
|
||||||
echo ""
|
echo ""
|
||||||
sudo cp ./linux/kinto-service.sh /etc/init.d/kinto
|
sudo cp ./linux/kinto-service.sh /etc/init.d/kinto
|
||||||
sudo -E /etc/init.d/kinto stop &
|
sudo -E /etc/init.d/kinto stop
|
||||||
|
mv /tmp/kinto.log /tmp/kinto.log.bak
|
||||||
fi
|
fi
|
||||||
# sudo systemctl --state=not-found --all | grep xkeysnail
|
# sudo systemctl --state=not-found --all | grep xkeysnail
|
||||||
# if [ "$distro" == "fedora" ];then
|
# if [ "$distro" == "fedora" ];then
|
||||||
@@ -628,6 +648,24 @@ if ! [[ $1 == "5" || $1 == "uninstall" || $1 == "Uninstall" ]]; then
|
|||||||
echo -e "~/.config/kinto/gui/kinto-gui.py\n"
|
echo -e "~/.config/kinto/gui/kinto-gui.py\n"
|
||||||
echo -e "You can then either \e]8;;https://google.com\a\e[1m\e[36mG\033[0;91mo\033[0;93mo\e[1m\e[36mg\e[1m\e[32ml\033[0;91me\e[0m\e]8;;\a what dependencies you may be missing\nor \e]8;;https://github.com/rbreaves/kinto/issues/new\?assignees=rbreaves&labels=bug&template=bug_report.md&title=\aopen an issue ticket.\e]8;;\a\n"
|
echo -e "You can then either \e]8;;https://google.com\a\e[1m\e[36mG\033[0;91mo\033[0;93mo\e[1m\e[36mg\e[1m\e[32ml\033[0;91me\e[0m\e]8;;\a what dependencies you may be missing\nor \e]8;;https://github.com/rbreaves/kinto/issues/new\?assignees=rbreaves&labels=bug&template=bug_report.md&title=\aopen an issue ticket.\e]8;;\a\n"
|
||||||
|
|
||||||
|
echo -e "\033[0;91mAfter the installer completes press Any key to re-apply your overlay (Super key) menu launcher.\e[0m\n"
|
||||||
|
|
||||||
|
if [[ $dename == 'gnome' || $dename == 'budgie' ]];then
|
||||||
|
echo "GNOME: gsettings set org.gnome.mutter overlay-key 'super'"
|
||||||
|
elif [[ $dename == 'xfce' ]];then
|
||||||
|
echo "XFCE: xfconf-query --channel xfce4-keyboard-shortcuts --property \"/commands/custom/Super_L\" --create --type string --set \"$nlauncher\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
read -n 1 -s -r -p ""
|
||||||
|
|
||||||
|
if [[ $dename == 'gnome' || $dename == 'budgie' ]];then
|
||||||
|
gsettings set org.gnome.mutter overlay-key 'super'
|
||||||
|
elif [[ $dename == 'xfce' ]];then
|
||||||
|
echo -e "\nSetting xfce4 launcher $nlauncher back to Super_L."
|
||||||
|
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/Super_L" --create --type string --set "$nlauncher" && echo "Success."
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ "$distro" == "manjarolinux" ]; then
|
if [ "$distro" == "manjarolinux" ]; then
|
||||||
echo "If you are using Manjaro and see an error about 'GLIBC_2.xx not found' appears then please update your system."
|
echo "If you are using Manjaro and see an error about 'GLIBC_2.xx not found' appears then please update your system."
|
||||||
echo "sudo pacman -Syu"
|
echo "sudo pacman -Syu"
|
||||||
|
Reference in New Issue
Block a user