mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-05 18:38:26 +02:00
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
0196cc323a | ||
![]() |
c8ca073875 | ||
![]() |
0e23aae082 | ||
![]() |
8086a56b7d | ||
![]() |
bb357f23e6 | ||
![]() |
bdf607e907 | ||
![]() |
b8eb341d62 | ||
![]() |
9060cffbff | ||
![]() |
08d8a90555 | ||
![]() |
d7ef767a18 | ||
![]() |
549e9c3a48 |
3
.gitattributes
vendored
Normal file
3
.gitattributes
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
*.py linguist-detectable=false
|
||||||
|
*.json liguist-detectable=false
|
||||||
|
*.c linguist-detectable=true
|
@@ -26,13 +26,13 @@ Kinto works for standard Windows, Apple and Chromebook keyboards. The following
|
|||||||
- systemd
|
- systemd
|
||||||
- x11
|
- x11
|
||||||
- IBus*
|
- IBus*
|
||||||
- Debian/Ubuntu based distro 16.04+
|
- Fedora/RHEL/Manjaro/Arch/Debian/Ubuntu based distro 16.04+
|
||||||
|
|
||||||
If you need kintox11 recompiled for your distro please let me know and I will add a binary for your distro if my binary fails.
|
If you need kintox11 recompiled for your distro please let me know and I will add a binary for your distro if my binary fails.
|
||||||
|
|
||||||
You can also attempt to compile kintox11.c on your system as well, but you will need to compile and install json-c first as its libraries will be required to compile and run the program.
|
You can also attempt to compile kintox11.c on your system as well, but you will need to compile and install json-c first as its libraries will be required to compile and run the program.
|
||||||
|
|
||||||
*IBUS is needed to support wordwise during browser app usage as the keymap will need to change slightly depending if the cursor/caret is on screen waiting for input. Setup.py will set it but you can manually set it as well or check your current Input Method.
|
*IBus is needed to support wordwise during browser app usage as the keymap will need to change slightly depending if the cursor/caret is on screen waiting for input. Setup.py will set it but you can manually set it as well or check your current Input Method.
|
||||||
|
|
||||||
To confirm navigate to your "Language Support" and set "Keyboard input method system:" to IBus for full word-wise support with web browsers.
|
To confirm navigate to your "Language Support" and set "Keyboard input method system:" to IBus for full word-wise support with web browsers.
|
||||||
|
|
||||||
@@ -450,7 +450,7 @@ I would just like to thank a few people here directly that have helped me tremen
|
|||||||
|
|
||||||
First off I'd like to thank the Stackoverflow and Stackexchange community. I have probably rubbed some mods the wrong way over there, but the people from the community in general are extremely helpful and gracious and without their contributions would have made this much more difficult. The person I'd like to thank most though from over there is Glen Whitney. Without his detailed explaining of how to rebind keys in xkb this would not have come together at all, as every other remapping solution were non-starters as complexity increases.
|
First off I'd like to thank the Stackoverflow and Stackexchange community. I have probably rubbed some mods the wrong way over there, but the people from the community in general are extremely helpful and gracious and without their contributions would have made this much more difficult. The person I'd like to thank most though from over there is Glen Whitney. Without his detailed explaining of how to rebind keys in xkb this would not have come together at all, as every other remapping solution were non-starters as complexity increases.
|
||||||
|
|
||||||
Secondarily I'd like to thank Christian Eriksson*, as he provided information that kept me up at night.. literally. Even after I implemented a similar bash script to one he had suggested I knew that fully implementing a c/c++ solution was where Kinto needed to head to and his explaination was better than I remember it being now that I have gone back to read it again. He also never provided a full implementation of a c/c++ solution - he did hit on the pain points pretty well of what one would need to do and watch out for. I am not sure where I got the first example code of implementing a based solution, but he definitely went over it well.
|
Secondarily I'd like to thank Christian Eriksson*, as he provided information that kept me up at night.. literally. Even after I implemented a similar bash script to one he had suggested I knew that fully implementing a c/c++ solution was where Kinto needed to head to and his explaination was better than I remember it being now that I have gone back to read it again. He also never provided a full implementation of a c/c++ solution - he did hit on the pain points pretty well of what one would need to do and watch out for. I am not sure where I got the first example code of implementing a c based solution, but he definitely went over it well.
|
||||||
|
|
||||||
|
|
||||||
Kui and his gist file** was really the c based solution that I found had the fewest issues to resolve to making it a reliable solution. It didn't account for all failures very well, aka BadWindow issues, but it made for a great foundation on which Kintox11 is built. I cannot thank him enough for putting it out there for others to work with.
|
Kui and his gist file** was really the c based solution that I found had the fewest issues to resolve to making it a reliable solution. It didn't account for all failures very well, aka BadWindow issues, but it made for a great foundation on which Kintox11 is built. I cannot thank him enough for putting it out there for others to work with.
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 2,
|
"id": 2,
|
||||||
"name":"Mac - hid driver",
|
"name":"Mac - hid driver (Recommended - Also supports Windows keyboards)",
|
||||||
"type":"mac",
|
"type":"mac",
|
||||||
"active": false,
|
"active": false,
|
||||||
"description":"Standard Mac Keyboards with Apple driver",
|
"description":"Standard Mac Keyboards with Apple driver",
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 3,
|
"id": 3,
|
||||||
"name":"Mac Only",
|
"name":"Mac Only (VMs & non-official Apple keyboards)",
|
||||||
"type":"mac",
|
"type":"mac",
|
||||||
"active": true,
|
"active": true,
|
||||||
"description":"Standard Mac Keyboards",
|
"description":"Standard Mac Keyboards",
|
||||||
|
@@ -4,8 +4,6 @@ systemctl --user stop keyswap >/dev/null 2>&1
|
|||||||
systemctl --user disable keyswap >/dev/null 2>&1
|
systemctl --user disable keyswap >/dev/null 2>&1
|
||||||
systemctl --user stop keyswap.timer >/dev/null 2>&1
|
systemctl --user stop keyswap.timer >/dev/null 2>&1
|
||||||
systemctl --user disable keyswap.timer >/dev/null 2>&1
|
systemctl --user disable keyswap.timer >/dev/null 2>&1
|
||||||
swapcmd="\/bin\/bash -c \"\/home\/`whoami`\/.config\/kinto\/xactive.sh carrots\""
|
|
||||||
swapstopcmd="\/bin\/bash \/home\/`whoami`\/.config\/kinto\/cleanup.sh"
|
|
||||||
mkdir -p ~/.config/systemd/user
|
mkdir -p ~/.config/systemd/user
|
||||||
mkdir -p ~/.config/autostart
|
mkdir -p ~/.config/autostart
|
||||||
cp ./system-config/keyswap.service ~/.config/systemd/user/keyswap.service
|
cp ./system-config/keyswap.service ~/.config/systemd/user/keyswap.service
|
||||||
@@ -16,6 +14,11 @@ cp ./system-config/caret_status.sh ~/.config/kinto/caret_status.sh
|
|||||||
cp ./system-config/cleanup.sh ~/.config/kinto/cleanup.sh
|
cp ./system-config/cleanup.sh ~/.config/kinto/cleanup.sh
|
||||||
cp ./system-config/.firefox-nw ~/.config/kinto/.firefox-nw
|
cp ./system-config/.firefox-nw ~/.config/kinto/.firefox-nw
|
||||||
sed -i "s/{username}/`whoami`/g" ~/.config/systemd/user/keyswap.service
|
sed -i "s/{username}/`whoami`/g" ~/.config/systemd/user/keyswap.service
|
||||||
|
sed -i "s/{displayid}/`echo "$DISPLAY"`/g" ~/.config/systemd/user/keyswap.service
|
||||||
|
if [ "${#DISPLAY}" -gt 2 ]
|
||||||
|
then
|
||||||
|
sed -i "s/#Environment/Environment/g" ~/.config/systemd/user/keyswap.service
|
||||||
|
fi
|
||||||
systemctl --user daemon-reload
|
systemctl --user daemon-reload
|
||||||
systemctl --user enable keyswap
|
systemctl --user enable keyswap
|
||||||
systemctl --user start keyswap
|
systemctl --user start keyswap
|
||||||
|
19
setup.py
19
setup.py
@@ -17,10 +17,10 @@ def cmdline(command):
|
|||||||
|
|
||||||
def requirements(pkgm):
|
def requirements(pkgm):
|
||||||
print(bcolors.CYELLOW + "You need to install some packages, " +run_pkg+ ", for Kinto to fully remap browsers during input focus.\n" + bcolors.ENDC)
|
print(bcolors.CYELLOW + "You need to install some packages, " +run_pkg+ ", for Kinto to fully remap browsers during input focus.\n" + bcolors.ENDC)
|
||||||
print("sudo apt-get install -y " + run_pkg + "\n")
|
print("sudo " + pkgm + " " + run_pkg + "\n")
|
||||||
run_install = yn_choice(bcolors.CYELLOW + "Would you like to run it now? (Will require sudo privileges.)\n" + bcolors.ENDC)
|
run_install = yn_choice(bcolors.CYELLOW + "Would you like to run it now? (Will require sudo privileges.)\n" + bcolors.ENDC)
|
||||||
if(run_install):
|
if(run_install):
|
||||||
os.system("sudo " + pkgm + " install -y " + run_pkg)
|
os.system("sudo " + pkgm + run_pkg)
|
||||||
print("\n")
|
print("\n")
|
||||||
|
|
||||||
def install_ibus():
|
def install_ibus():
|
||||||
@@ -33,7 +33,8 @@ def install_ibus():
|
|||||||
input("IBus has been set as the default Input Method.\nPress any key to exit and re-run after logoff & logon...")
|
input("IBus has been set as the default Input Method.\nPress any key to exit and re-run after logoff & logon...")
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
check_x11 = cmdline("env | grep -i x11").strip()
|
# check_x11 = cmdline("env | grep -i x11").strip()
|
||||||
|
check_x11 = cmdline("loginctl show-session \"$XDG_SESSION_ID\" -p Type | awk -F= '{print $2}'").strip()
|
||||||
|
|
||||||
if len(check_x11) == 0:
|
if len(check_x11) == 0:
|
||||||
print("You are not using x11, please logout and back in using x11/Xorg")
|
print("You are not using x11, please logout and back in using x11/Xorg")
|
||||||
@@ -41,10 +42,22 @@ if len(check_x11) == 0:
|
|||||||
|
|
||||||
check_xbind = cmdline("which xbindkeys 2>/dev/null").strip()
|
check_xbind = cmdline("which xbindkeys 2>/dev/null").strip()
|
||||||
check_xdotool = cmdline("which xdotool 2>/dev/null").strip()
|
check_xdotool = cmdline("which xdotool 2>/dev/null").strip()
|
||||||
|
|
||||||
pkgm = cmdline("which apt 2>/dev/null").strip()
|
pkgm = cmdline("which apt 2>/dev/null").strip()
|
||||||
|
|
||||||
if len(pkgm) == 0:
|
if len(pkgm) == 0:
|
||||||
pkgm = cmdline("which dnf 2>/dev/null").strip()
|
pkgm = cmdline("which dnf 2>/dev/null").strip()
|
||||||
|
if len(pkgm) > 0:
|
||||||
|
pkgm += " install -y "
|
||||||
|
else:
|
||||||
|
pkgm += " install -y "
|
||||||
|
|
||||||
|
if len(pkgm) == 0:
|
||||||
|
pkgm = cmdline("which pacman 2>/dev/null").strip()
|
||||||
|
if len(pkgm) > 0:
|
||||||
|
pkgm += " -S "
|
||||||
|
|
||||||
|
|
||||||
if len(pkgm) == 0:
|
if len(pkgm) == 0:
|
||||||
print("No supported package manager found. Exiting...")
|
print("No supported package manager found. Exiting...")
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
@@ -5,7 +5,8 @@ PartOf=graphical-session.target
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
Restart=always
|
Restart=always
|
||||||
#Environment=DISPLAY=:0.0
|
# eg DISPLAY=:0.0
|
||||||
|
#Environment=DISPLAY={displayid}
|
||||||
RestartSec=1
|
RestartSec=1
|
||||||
WorkingDirectory=/home/{username}/.config/kinto
|
WorkingDirectory=/home/{username}/.config/kinto
|
||||||
ExecStart=/bin/bash -c "/home/{username}/.config/kinto/xactive.sh carrots"
|
ExecStart=/bin/bash -c "/home/{username}/.config/kinto/xactive.sh carrots"
|
||||||
|
Reference in New Issue
Block a user