Skip to content

Commit

Permalink
Add kinto configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
indrekj committed Apr 11, 2020
1 parent 07790c1 commit ce522fc
Show file tree
Hide file tree
Showing 16 changed files with 540 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .config/kinto/.firefox-nw
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#"xte 'keydown Control_L' 'key bracketleft' 'keyup Control_L'"
"xdotool key --delay 0 --clearmodifiers Control_L+bracketleft"
Home + Release

#"xte 'keydown Control_R' 'key bracketright' 'keyup Control_R'"
"xdotool key --delay 0 --clearmodifiers Control_L+bracketright"
End + Release
10 changes: 10 additions & 0 deletions .config/kinto/caret_status.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

mkdir -p /tmp/kinto

IBUSADD=$(cat ~/.config/ibus/bus/`ls ~/.config/ibus/bus -1rt | tail -n1` | awk -F'IBUS_ADDRESS=' '{print $2}' | xargs)
dbus-monitor --address $IBUSADD "path='/org/freedesktop/IBus/Panel',interface='org.freedesktop.IBus.Panel',member='FocusOut'" 2> /dev/null | grep --line-buffered -o -P '(?<=object path \"/org/freedesktop/IBus/InputContext_).*(?=[\"])' |
while read ln
do
printf '%s\n' "$ln" > /tmp/kinto/caret
done
6 changes: 6 additions & 0 deletions .config/kinto/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

setxkbmap -option
# force command to run silently and report true
killall xbindkeys > /dev/null 2>&1 || :
# rm /tmp/kinto/caret
Binary file added .config/kinto/kintox11
Binary file not shown.
124 changes: 124 additions & 0 deletions .config/kinto/user_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"config": [
{
"name": "gui",
"run": "xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
"run_onInput": "",
"run_offInput": "killall xbindkeys > /dev/null 2>&1",
"symbols": "",
"types": "",
"de": [
2
],
"appnames": [
""
]
},
{
"name": "term",
"run": "xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
"run_onInput": "",
"run_offInput": "killall xbindkeys > /dev/null 2>&1",
"symbols": "",
"types": "",
"de": [
2
],
"appnames": [
"Gnome-terminal",
"konsole",
"io.elementary.terminal",
"terminator",
"sakura",
"guake",
"tilda",
"xterm",
"eterm",
"kitty"
]
},
{
"name": "firefox",
"run": "xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
"run_onInput": "killall xbindkeys > /dev/null 2>&1",
"run_offInput": "killall xbindkeys > /dev/null 2>&1;xbindkeys -f $HOME/.config/kinto/.firefox-nw",
"symbols": "",
"types": "",
"de": [
2
],
"appnames": [
"Firefox"
]
},
{
"name": "chrome",
"run": "xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui.chrome $DISPLAY 2>&1 | grep -v XF86FullScreen",
"run_onInput": "xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY",
"run_offInput": "xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui.chrome $DISPLAY",
"symbols": "",
"types": "",
"de": [
2
],
"appnames": [
"Chromium",
"Chromium-browser",
"Google-chrome",
"Epiphany"
]
}
],
"init": [
1
],
"detypes": [
"gnome2",
"gnome3",
"kde4",
"kde5",
"xfce",
"i3wm"
],
"de": [
{
"id": 1,
"type": [
"gnome3"
],
"active": false,
"intent": "init",
"name": "gnome-init",
"description": "Gnome - Remove Superkey Overlay keybinding to Activities Overview",
"run": "gsettings set org.gnome.mutter overlay-key ''",
"run_term": "",
"run_gui": ""
},
{
"id": 2,
"type": [
"gnome3"
],
"active": false,
"intent": "gui_term",
"name": "Gnome Activities Overview",
"description": "Cmd+Space activates Activities Overview",
"run": "",
"run_term": "gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Control><Shift>Space']\"",
"run_gui": "gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Ctrl>Space']\""
},
{
"id": 3,
"type": [
"kde5"
],
"active": true,
"intent": "init",
"name": "kde-init",
"description": "KDE Plasma 5 - Removes Superkey Overlay from the Launcher Menu",
"run": "kwriteconfig5 --file ~/.config/kwinrc --group ModifierOnlyShortcuts --key Meta \"\";qdbus org.kde.KWin /KWin reconfigure",
"run_term": "",
"run_gui": ""
}
]
}
4 changes: 4 additions & 0 deletions .config/kinto/xactive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

./caret_status.sh &
./kintox11
7 changes: 7 additions & 0 deletions .xkb/keymap/kbd.mac.gui
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete+mac_gui(addmac_levels)" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us+ee:2+us:3+inet(evdev)+altwin(ctrl_alt_win)+mac_gui(mac_levelssym)+mac_gui(caps_escape)" };
xkb_geometry { include "pc(pc105)" };
};
7 changes: 7 additions & 0 deletions .xkb/keymap/kbd.mac.gui.chrome
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete+mac_gui(addmac_levels)" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us+ee:2+us:3+inet(evdev)+altwin(ctrl_alt_win)+mac_gui(mac_chrome)+mac_gui(caps_escape)" };
xkb_geometry { include "pc(pc105)" };
};
7 changes: 7 additions & 0 deletions .xkb/keymap/kbd.mac.gui.nw
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete+mac_gui(addmac_levels)" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us+ee:2+us:3+inet(evdev)+altwin(ctrl_alt_win)" };
xkb_geometry { include "pc(pc105)" };
};
7 changes: 7 additions & 0 deletions .xkb/keymap/kbd.mac.term
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete+mac_term(addmac_levels)" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us+ee:2+us:3+inet(evdev)+altwin(swap_alt_win)+mac_term(mac_win)+mac_term(mac_global)+mac_gui(caps_escape)" };
xkb_geometry { include "pc(pc105)" };
};
5 changes: 5 additions & 0 deletions .xkb/symbols/chromebook
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
partial modifier_keys
xkb_symbols "swap_lalt_lctrl" {
replace key <LALT> { [ Control_L, Control_L ] };
replace key <LCTL> { [ Alt_L, Meta_L ] };
};
144 changes: 144 additions & 0 deletions .xkb/symbols/mac_gui
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
hidden partial modifier_keys
xkb_symbols "swapescape" {
key <CAPS> { [ Escape ] };
key <ESC> { [ Caps_Lock ] };
};
hidden partial modifier_keys
xkb_symbols "caps_escape" {
key <CAPS> { [ Escape ] };
};
hidden partial modifier_keys
xkb_symbols "caps_shiftlock" {
replace key <CAPS> { [ Shift_Lock ] };
modifier_map Shift { Shift_Lock };
};
hidden partial modifier_keys
xkb_symbols "caps_none" {
key <CAPS> { [ VoidSymbol ] };
};
default partial xkb_symbols "mac_levelssym" {
// LEFT to Begin Line or Beginning of word
replace key <LEFT> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [ Left, Left, NoSymbol,NoSymbol,Left ],
actions[Group1]= [
NoAction(),
RedirectKey(key=<LEFT>,modifiers=Control,clearmods=Mod1),
RedirectKey(key=<HOME>,clearmods=Control),
RedirectKey(key=<HOME>,modifiers=Shift,clearmods=Control+Mod1),
RedirectKey(key=<LEFT>,modifiers=Shift+Control,clearmods=Mod1)
]
};
// Right to End of Line or end of word
replace key <RGHT> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [ Right, Right, NoSymbol, NoSymbol,Right ],
actions[Group1]= [
NoAction(),
RedirectKey(key=<RGHT>,modifiers=Control,clearmods=Mod1),
RedirectKey(key=<END>,clearmods=Control),
RedirectKey(key=<END>,modifiers=Shift,clearmods=Control+Mod1),
RedirectKey(key=<RGHT>,modifiers=Shift+Control,clearmods=Mod1)
]
};
// Up to Mac Home
replace key <UP> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Up,
Up,
NoSymbol
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<HOME>)
]
};
// Down to Mac End
replace key <DOWN> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Down,
Down,
NoSymbol
],
actions[Group1]= [
NoAction(),
NoAction(),
RedirectKey(key=<END>)
]
};
// Alt BKSP to DELETE
replace key <BKSP> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
BackSpace,
BackSpace,
NoSymbol
],
actions[Group1]= [
NoAction(),
RedirectKey(key=<DELE>,clearmods=Mod1),
NoAction()
]
};
// // Full Print Screen
// // GalliumOS
// replace key <AE03> {
// type[Group1]= "ONE_LEVEL_CTRL",
// symbols[Group1]= [ 3, 3, 3, F5 ],
// actions[Group1]= [ NoAction(), NoAction(), NoAction(), RedirectKey(key=<FK05>,clearmods=Shift) ]
// };
// // Region Print Screen
// // GalliumOS
// replace key <AE04> {
// type[Group1]= "ONE_LEVEL_CTRL",
// symbols[Group1]= [ 4, 4, 4, F5 ],
// actions[Group1]= [ NoAction(), NoAction(), NoAction(), RedirectKey(key=<FK05>) ]
// };
// // Full Print Screen
// // Standard Ubuntu
// replace key <AE03> {
// type[Group1]= "ONE_LEVEL_CTRL",
// symbols[Group1]= [ 3, 3, 3, F5 ],
// actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<PRSC>,clearmods=Shift+Control) ]
// };
// // Region Print Screen
// // Standard Ubuntu
// replace key <AE04> {
// type[Group1]= "ONE_LEVEL_CTRL",
// symbols[Group1]= [ 4, 4, 4, F5 ],
// actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<PRSC>,clearmods=Control) ]
// };
};
partial xkb_symbols "mac_chrome" {
// Back Button
replace key <LEFT> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Left,
Left,
Left
],
actions[Group1]= [
NoAction(),
RedirectKey(key=<UP>),
RedirectKey(key=<LEFT>,modifiers=Mod1,clearmods=Control)
]
};
// Forwards Button
replace key <RGHT> {
type[Group1]= "ONE_LEVEL_CTRL",
symbols[Group1]= [
Right,
Right,
Right
],
actions[Group1]= [
NoAction(),
RedirectKey(key=<DOWN>),
RedirectKey(key=<RGHT>,modifiers=Mod1,clearmods=Control)
]
};
};
Loading

0 comments on commit ce522fc

Please sign in to comment.