diff --git a/xkeysnail-config/gui/kinto-gui.py b/xkeysnail-config/gui/kinto-gui.py
index bd0aab4..5136833 100755
--- a/xkeysnail-config/gui/kinto-gui.py
+++ b/xkeysnail-config/gui/kinto-gui.py
@@ -5,6 +5,7 @@ gi.require_version('Gtk', '3.0')
gi.require_version('Vte', '2.91')
from gi.repository import Gtk,Gdk,GdkPixbuf
from gi.repository import Vte,GLib
+from shutil import which
from subprocess import Popen,PIPE,CalledProcessError
from distutils.util import strtobool
@@ -918,10 +919,14 @@ class MyWindow(Gtk.Window):
try:
if os.path.exists('/opt/sublime_text/sublime_text'):
Popen(['/opt/sublime_text/sublime_text',os.environ['HOME']+'/.config/kinto/kinto.py'])
- elif which(gedit) is not None:
+ elif which('gedit') is not None:
Popen(['gedit',os.environ['HOME']+'/.config/kinto/kinto.py'])
- elif which(mousepad) is not None:
+ elif which('mousepad') is not None:
Popen(['mousepad',os.environ['HOME']+'/.config/kinto/kinto.py'])
+ elif which('kate') is not None:
+ Popen(['kate',os.environ['HOME']+'/.config/kinto/kinto.py'])
+ elif which('kwrite') is not None:
+ Popen(['kwrite',os.environ['HOME']+'/.config/kinto/kinto.py'])
except CalledProcessError: # Notify user about error on running restart commands.
Popen(['notify-send','Kinto: Error could not open config file!'])
@@ -930,10 +935,14 @@ class MyWindow(Gtk.Window):
try:
if os.path.exists('/opt/sublime_text/sublime_text'):
Popen(['/opt/sublime_text/sublime_text','/lib/systemd/system/xkeysnail.service'])
- elif which(gedit) is not None:
+ elif which('gedit') is not None:
Popen(['gedit','/lib/systemd/system/xkeysnail.service'])
- elif which(mousepad) is not None:
+ elif which('mousepad') is not None:
Popen(['mousepad','/lib/systemd/system/xkeysnail.service'])
+ elif which('kate') is not None:
+ Popen(['kate','/lib/systemd/system/xkeysnail.service'])
+ elif which('kwrite') is not None:
+ Popen(['kwrite','/lib/systemd/system/xkeysnail.service'])
except CalledProcessError: # Notify user about error on running restart commands.
Popen(['notify-send','Kinto: Error could not open config file!'])
@@ -941,12 +950,16 @@ class MyWindow(Gtk.Window):
def setSysKB(self,button):
if self.ostype == "XFCE":
Popen(['xfce4-keyboard-settings'])
+ elif self.ostype == "KDE":
+ self.queryConfig('systemsettings >/dev/null 2>&1 || systemsettings5 >/dev/null 2>&1')
else:
Popen(['gnome-control-center','keyboard'])
def setRegion(self,button):
if self.ostype == "XFCE":
Popen(['gnome-language-selector'])
+ elif self.ostype == "KDE":
+ self.queryConfig('kcmshell4 kcm_translations >/dev/null 2>&1 || kcmshell5 kcm_translations >/dev/null 2>&1')
else:
Popen(['gnome-control-center','region'])
@@ -1221,7 +1234,8 @@ class SecondPage(Gtk.Box):
scroller.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.ALWAYS)
label_start = Gtk.Label()
- label_start.set_markup('Identifying your Keyboard...\n\nPress the 2nd key Left of the spacebar.')
+
+ label_start.set_markup('Identifying your Keyboard...\n\nPress the 2nd key Left of the spacebar.\n\nIf stuck here then unset Overlay (Super) key on your DE.')
label_start.set_alignment(0,0)
label_start.set_line_wrap(True)
vbox.add(label_start)
diff --git a/xkeysnail-config/trayapps/appindicator/kintotray.py b/xkeysnail-config/trayapps/appindicator/kintotray.py
index 4401106..2eeeb06 100755
--- a/xkeysnail-config/trayapps/appindicator/kintotray.py
+++ b/xkeysnail-config/trayapps/appindicator/kintotray.py
@@ -620,10 +620,14 @@ class Indicator():
try:
if os.path.exists('/opt/sublime_text/sublime_text'):
Popen(['/opt/sublime_text/sublime_text',os.environ['HOME']+'/.config/kinto/kinto.py'])
- elif which(gedit) is not None:
+ elif which('gedit') is not None:
Popen(['gedit',os.environ['HOME']+'/.config/kinto/kinto.py'])
- elif which(mousepad) is not None:
+ elif which('mousepad') is not None:
Popen(['mousepad',os.environ['HOME']+'/.config/kinto/kinto.py'])
+ elif which('kate') is not None:
+ Popen(['kate',os.environ['HOME']+'/.config/kinto/kinto.py'])
+ elif which('kwrite') is not None:
+ Popen(['kwrite',os.environ['HOME']+'/.config/kinto/kinto.py'])
except CalledProcessError: # Notify user about error on running restart commands.
Popen(['notify-send','Kinto: Error could not open config file!'])
@@ -632,10 +636,14 @@ class Indicator():
try:
if os.path.exists('/opt/sublime_text/sublime_text'):
Popen(['/opt/sublime_text/sublime_text','/lib/systemd/system/xkeysnail.service'])
- elif which(gedit) is not None:
+ elif which('gedit') is not None:
Popen(['gedit','/lib/systemd/system/xkeysnail.service'])
- elif which(mousepad) is not None:
+ elif which('mousepad') is not None:
Popen(['mousepad','/lib/systemd/system/xkeysnail.service'])
+ elif which('kate') is not None:
+ Popen(['kate','/lib/systemd/system/xkeysnail.service'])
+ elif which('kwrite') is not None:
+ Popen(['kwrite','/lib/systemd/system/xkeysnail.service'])
except CalledProcessError: # Notify user about error on running restart commands.
Popen(['notify-send','Kinto: Error could not open config file!'])
@@ -690,12 +698,16 @@ class Indicator():
def setSysKB(self,button):
if self.ostype == "XFCE":
Popen(['xfce4-keyboard-settings'])
+ elif self.ostype == "KDE":
+ self.queryConfig('systemsettings >/dev/null 2>&1 || systemsettings5 >/dev/null 2>&1')
else:
Popen(['gnome-control-center','keyboard'])
def setRegion(self,button):
if self.ostype == "XFCE":
Popen(['gnome-language-selector'])
+ elif self.ostype == "KDE":
+ self.queryConfig('kcmshell4 kcm_translations >/dev/null 2>&1 || kcmshell5 kcm_translations >/dev/null 2>&1')
else:
Popen(['gnome-control-center','region'])