mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-05 18:38:26 +02:00
Compare commits
74 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
eb5e77ffd6 | ||
![]() |
8ae3d3b792 | ||
![]() |
e36fa9216b | ||
![]() |
58d3273f3d | ||
![]() |
0f6cfb95cc | ||
![]() |
d2e5f25c8d | ||
![]() |
6529d3b909 | ||
![]() |
eeb87d3434 | ||
![]() |
fe8b0a2027 | ||
![]() |
4be9043f10 | ||
![]() |
65df97e8bf | ||
![]() |
9f3b4b0072 | ||
![]() |
e35e92fdbd | ||
![]() |
9c87cb2774 | ||
![]() |
3bd45bc627 | ||
![]() |
3b9ce890dc | ||
![]() |
a6688ffc44 | ||
![]() |
94128f7dbf | ||
![]() |
9a451bd93c | ||
![]() |
3dd930d1e5 | ||
![]() |
462ceb578c | ||
![]() |
b958668853 | ||
![]() |
1ae333f0ed | ||
![]() |
0baf62a261 | ||
![]() |
f35f75bd30 | ||
![]() |
e34ff1c86e | ||
![]() |
89500c97c6 | ||
![]() |
d9225a73ef | ||
![]() |
5f75f66852 | ||
![]() |
a144a47836 | ||
![]() |
00cfd67996 | ||
![]() |
703f6131d4 | ||
![]() |
b1851316de | ||
![]() |
812d2a4bcd | ||
![]() |
daaa1fd352 | ||
![]() |
47037d9619 | ||
![]() |
ce31232015 | ||
![]() |
c6605c68cf | ||
![]() |
557ba01eac | ||
![]() |
21bfb6faae | ||
![]() |
b904235653 | ||
![]() |
1d59d8d643 | ||
![]() |
df9b8d974e | ||
![]() |
4078094e33 | ||
![]() |
c8ab5eb4ba | ||
![]() |
2c1fb05920 | ||
![]() |
48b3d3f7bd | ||
![]() |
68a2d95b72 | ||
![]() |
89beeb427b | ||
![]() |
d45b8e29dc | ||
![]() |
7cb14dfbf3 | ||
![]() |
19381a5528 | ||
![]() |
4a9ced9478 | ||
![]() |
51e86149bc | ||
![]() |
f9647a5476 | ||
![]() |
92b4315da7 | ||
![]() |
5003d6fa9b | ||
![]() |
4140a06d53 | ||
![]() |
3cf480d724 | ||
![]() |
2a467f2a26 | ||
![]() |
d695c3f734 | ||
![]() |
8c2c53cdcd | ||
![]() |
0f064360a4 | ||
![]() |
998c9bdf28 | ||
![]() |
393f45d1d3 | ||
![]() |
e8a8c0ed56 | ||
![]() |
c4db31bdf0 | ||
![]() |
c6292ee34a | ||
![]() |
470541d5f8 | ||
![]() |
5152c0ee6e | ||
![]() |
9b97bd9ea6 | ||
![]() |
3f4b5241eb | ||
![]() |
324e4d83c6 | ||
![]() |
eb49a4859f |
@@ -1,9 +1,58 @@
|
|||||||
|
// Template
|
||||||
|
//
|
||||||
|
// ONE_LEVEL_CTRL
|
||||||
|
// Base
|
||||||
|
// Shift
|
||||||
|
// Alt
|
||||||
|
// Shift Alt
|
||||||
|
// Control
|
||||||
|
// Shift Control
|
||||||
|
// Super
|
||||||
|
// Shift Super
|
||||||
|
// Control Alt
|
||||||
|
// Super Control
|
||||||
|
// Super Alt
|
||||||
|
// Super Control Alt
|
||||||
|
//
|
||||||
|
// replace key <KEY> {
|
||||||
|
// type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
// symbols[Group1]= [
|
||||||
|
// Base,
|
||||||
|
// Alt,
|
||||||
|
// Shift Alt,
|
||||||
|
// Control,
|
||||||
|
// Shift Control,
|
||||||
|
// Super,
|
||||||
|
// Shift Super,
|
||||||
|
// Control Alt,
|
||||||
|
// Super Control",
|
||||||
|
// Super Alt,
|
||||||
|
// Super Control Alt
|
||||||
|
// ],
|
||||||
|
// actions[Group1]= [
|
||||||
|
// NoAction(),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Mod1),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Mod1+Shift),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Control),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Control+Shift),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Super),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Super+Shift),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Control+Alt),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Super+Control),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Super+Mod1),
|
||||||
|
// RedirectKey(key=<KEY>,modifiers=NewMod,clearmods=Control+Mod1)
|
||||||
|
// ]
|
||||||
|
// };
|
||||||
hidden partial modifier_keys
|
hidden partial modifier_keys
|
||||||
xkb_symbols "swapescape" {
|
xkb_symbols "swapescape" {
|
||||||
key <CAPS> { [ Escape ] };
|
key <CAPS> { [ Escape ] };
|
||||||
key <ESC> { [ Caps_Lock ] };
|
key <ESC> { [ Caps_Lock ] };
|
||||||
};
|
};
|
||||||
hidden partial modifier_keys
|
hidden partial modifier_keys
|
||||||
|
xkb_symbols "caps_escape" {
|
||||||
|
key <CAPS> { [ Escape ] };
|
||||||
|
};
|
||||||
|
hidden partial modifier_keys
|
||||||
xkb_symbols "caps_shiftlock" {
|
xkb_symbols "caps_shiftlock" {
|
||||||
replace key <CAPS> { [ Shift_Lock ] };
|
replace key <CAPS> { [ Shift_Lock ] };
|
||||||
modifier_map Shift { Shift_Lock };
|
modifier_map Shift { Shift_Lock };
|
||||||
@@ -13,71 +62,394 @@ xkb_symbols "caps_none" {
|
|||||||
key <CAPS> { [ VoidSymbol ] };
|
key <CAPS> { [ VoidSymbol ] };
|
||||||
};
|
};
|
||||||
default partial xkb_symbols "mac_levelssym" {
|
default partial xkb_symbols "mac_levelssym" {
|
||||||
// LEFT to Begin Line or Beginning of word
|
// // Minimize window Cmd + H = Alt + F9
|
||||||
replace key <LEFT> {
|
// // 2 caveats
|
||||||
type[Group1]= "ONE_LEVEL_CTRL",
|
// // 1 Cmd + H may not pass through on VMs
|
||||||
symbols[Group1]= [ Left, Left, NoSymbol,NoSymbol,Left ],
|
// // 2 may cause conflicts with apps
|
||||||
actions[Group1]= [
|
// replace key <AC06> {
|
||||||
NoAction(),
|
// type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
RedirectKey(key=<LEFT>,modifiers=Control,clearmods=Mod1),
|
// symbols[Group1]= [
|
||||||
RedirectKey(key=<HOME>,clearmods=Control),
|
// h,
|
||||||
RedirectKey(key=<HOME>,modifiers=Shift,clearmods=Control+Mod1),
|
// H,
|
||||||
RedirectKey(key=<LEFT>,modifiers=Shift+Control,clearmods=Mod1)
|
// h,
|
||||||
]
|
// H,
|
||||||
};
|
// h
|
||||||
// Right to End of Line or end of word
|
// ],
|
||||||
replace key <RGHT> {
|
// actions[Group1]= [
|
||||||
type[Group1]= "ONE_LEVEL_CTRL",
|
// NoAction(),
|
||||||
symbols[Group1]= [ Right, Right, NoSymbol, NoSymbol,Right ],
|
// NoAction(),
|
||||||
actions[Group1]= [
|
// NoAction(),
|
||||||
NoAction(),
|
// NoAction(),
|
||||||
RedirectKey(key=<RGHT>,modifiers=Control,clearmods=Mod1),
|
// RedirectKey(key=<AC06>,modifiers=Super,clearmods=Control)
|
||||||
RedirectKey(key=<END>,clearmods=Control),
|
// ]
|
||||||
RedirectKey(key=<END>,modifiers=Shift,clearmods=Control+Mod1),
|
// };
|
||||||
RedirectKey(key=<RGHT>,modifiers=Shift+Control,clearmods=Mod1)
|
// Maximize Window Ctrl + Cmd + F = Alt+F10
|
||||||
]
|
// Also maps Option + Cmd + F to Control+H for Replace - Sublime
|
||||||
};
|
// AD03=e,E
|
||||||
// Up to Mac Home
|
// AC01=a,A
|
||||||
replace key <UP> {
|
// Ctrl + A - Beginning of Line
|
||||||
type[Group1]= "ONE_LEVEL_CTRL",
|
replace key <AC01> {
|
||||||
|
type[Group1]= "ONE_LEVEL_SUPER",
|
||||||
symbols[Group1]= [
|
symbols[Group1]= [
|
||||||
Up,
|
// Base
|
||||||
Up,
|
a,
|
||||||
|
// Shift
|
||||||
|
A,
|
||||||
|
// Super
|
||||||
|
NoSymbol,
|
||||||
|
// Shift Super
|
||||||
NoSymbol
|
NoSymbol
|
||||||
],
|
],
|
||||||
actions[Group1]= [
|
actions[Group1]= [
|
||||||
NoAction(),
|
NoAction(),
|
||||||
NoAction(),
|
NoAction(),
|
||||||
RedirectKey(key=<HOME>)
|
RedirectKey(key=<HOME>,clearmods=Super),
|
||||||
|
RedirectKey(key=<HOME>,clearmods=Super)
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
// Ctrl + E - End of Line
|
||||||
|
replace key <AD03> {
|
||||||
|
type[Group1]= "ONE_LEVEL_SUPER",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
e,
|
||||||
|
// Shift
|
||||||
|
E,
|
||||||
|
// Super
|
||||||
|
NoSymbol,
|
||||||
|
// Shift Super
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<END>,clearmods=Super),
|
||||||
|
RedirectKey(key=<END>,clearmods=Super)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
replace key <AC04> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
f,
|
||||||
|
// Shift
|
||||||
|
F,
|
||||||
|
// Alt
|
||||||
|
f,
|
||||||
|
// Shift Alt
|
||||||
|
F,
|
||||||
|
// Control
|
||||||
|
f,
|
||||||
|
// Shift Control
|
||||||
|
F,
|
||||||
|
// Super
|
||||||
|
f,
|
||||||
|
// Shift Super
|
||||||
|
F,
|
||||||
|
// Control Alt
|
||||||
|
h
|
||||||
|
// Super Control
|
||||||
|
// ,F10 // Default maximize
|
||||||
|
// // Nothing // KDE maximize
|
||||||
|
// Super Alt
|
||||||
|
// Super Control Alt
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
// Base
|
||||||
|
NoAction(),
|
||||||
|
// Shift
|
||||||
|
NoAction(),
|
||||||
|
// Alt
|
||||||
|
NoAction(),
|
||||||
|
// Shift Alt
|
||||||
|
NoAction(),
|
||||||
|
// Control
|
||||||
|
NoAction(),
|
||||||
|
// Shift Control
|
||||||
|
NoAction(),
|
||||||
|
// Super
|
||||||
|
NoAction(),
|
||||||
|
// Shift Super
|
||||||
|
NoAction(),
|
||||||
|
// Control Alt
|
||||||
|
RedirectKey(key=<AC06>,clearmods=Mod1)
|
||||||
|
// Super Control - Fullscreen
|
||||||
|
// ,RedirectKey(key=<FK10>,modifiers=Mod1,clearmods=Super+Control) // Default maximize
|
||||||
|
// // Nothing // KDE maximize
|
||||||
|
// Super Alt
|
||||||
|
// Super Control Alt
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Close App Cmd + Q = Alt + F4
|
||||||
|
replace key <AD01> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
q,
|
||||||
|
// Shift
|
||||||
|
Q,
|
||||||
|
// Alt
|
||||||
|
q,
|
||||||
|
// Shift Alt
|
||||||
|
Q,
|
||||||
|
// Control
|
||||||
|
F4
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
// Base
|
||||||
|
NoAction(),
|
||||||
|
// Shift
|
||||||
|
NoAction(),
|
||||||
|
// Alt
|
||||||
|
NoAction(),
|
||||||
|
// Shift Alt
|
||||||
|
NoAction(),
|
||||||
|
// Control
|
||||||
|
RedirectKey(key=<FK04>,modifiers=Mod1,clearmods=Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Show Desktop Cmd + F3 = Super + D
|
||||||
|
replace key <FK03> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
F3,
|
||||||
|
// Shift
|
||||||
|
F3,
|
||||||
|
// Alt
|
||||||
|
F3,
|
||||||
|
// Shift Alt
|
||||||
|
F3,
|
||||||
|
// Control
|
||||||
|
d
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<AC03>,modifiers=Super,clearmods=Control)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Fix the G key for Sublime Text
|
||||||
|
replace key <AC05> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
g,
|
||||||
|
// Shift
|
||||||
|
G,
|
||||||
|
// Alt
|
||||||
|
g,
|
||||||
|
// Shift Alt
|
||||||
|
G,
|
||||||
|
// Control
|
||||||
|
g,
|
||||||
|
// Shift Control
|
||||||
|
G,
|
||||||
|
// Super
|
||||||
|
NoSymbol,
|
||||||
|
// Shift Super
|
||||||
|
NoSymbol,
|
||||||
|
// Control Alt
|
||||||
|
g,
|
||||||
|
// Super Control
|
||||||
|
g,
|
||||||
|
// Super Alt
|
||||||
|
g,
|
||||||
|
// Super Control Alt
|
||||||
|
g
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
// Pass G Normally
|
||||||
|
RedirectKey(key=<AC05>),
|
||||||
|
RedirectKey(key=<AC05>),
|
||||||
|
// Find Next
|
||||||
|
RedirectKey(key=<FK03>,clearmods=Control),
|
||||||
|
// Find Previous
|
||||||
|
RedirectKey(key=<FK03>,clearmods=Control),
|
||||||
|
// Sublime Goto Line
|
||||||
|
RedirectKey(key=<AC05>,modifiers=Control,clearmods=Super),
|
||||||
|
NoAction(),
|
||||||
|
// Sublime Quick Find
|
||||||
|
RedirectKey(key=<FK03>,clearmods=Mod1),
|
||||||
|
// Sublime Select All Matches
|
||||||
|
RedirectKey(key=<FK03>,modifiers=Mod1,clearmods=Super+Control),
|
||||||
|
NoAction(),
|
||||||
|
NoAction()
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// LEFT to Begin Line or Beginning of word
|
||||||
|
replace key <LEFT> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
Left,
|
||||||
|
// Shift
|
||||||
|
Left,
|
||||||
|
// Alt
|
||||||
|
Left,
|
||||||
|
// Shift Alt
|
||||||
|
Left,
|
||||||
|
// Control
|
||||||
|
NoSymbol,
|
||||||
|
// Shift Control
|
||||||
|
NoSymbol,
|
||||||
|
// Super
|
||||||
|
Left
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
// Base
|
||||||
|
NoAction(),
|
||||||
|
// Shift
|
||||||
|
NoAction(),
|
||||||
|
// Alt - Wordwise
|
||||||
|
RedirectKey(key=<LEFT>,mods=Control,clearmods=Mod1),
|
||||||
|
// Shift Alt
|
||||||
|
RedirectKey(key=<LEFT>,mods=Control,clearmods=Mod1),
|
||||||
|
// Control
|
||||||
|
RedirectKey(key=<HOME>,clearmods=Control),
|
||||||
|
// Shift Control
|
||||||
|
RedirectKey(key=<HOME>,clearmods=Control),
|
||||||
|
// Super - Change workspace
|
||||||
|
NoAction()
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
// Right to End of Line or end of word
|
||||||
|
replace key <RGHT> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
Right,
|
||||||
|
// Shift
|
||||||
|
Right,
|
||||||
|
// Alt
|
||||||
|
Right,
|
||||||
|
// Shift Alt
|
||||||
|
Right,
|
||||||
|
// Control
|
||||||
|
NoSymbol,
|
||||||
|
// Shift Control
|
||||||
|
NoSymbol,
|
||||||
|
// Super
|
||||||
|
Right
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
// Base
|
||||||
|
NoAction(),
|
||||||
|
// Shift
|
||||||
|
NoAction(),
|
||||||
|
// Alt - Wordwise
|
||||||
|
RedirectKey(key=<RGHT>,mods=Control,clearmods=Mod1),
|
||||||
|
// Shift Alt
|
||||||
|
RedirectKey(key=<RGHT>,mods=Control,clearmods=Mod1),
|
||||||
|
// Control
|
||||||
|
RedirectKey(key=<END>,clearmods=Control),
|
||||||
|
// Shift Control
|
||||||
|
RedirectKey(key=<END>,clearmods=Control),
|
||||||
|
// Super - Change workspace
|
||||||
|
NoAction()
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
//Up to Mac Home
|
||||||
|
replace key <UP> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
|
Up,
|
||||||
|
// Shift
|
||||||
|
Up,
|
||||||
|
// Alt
|
||||||
|
Up,
|
||||||
|
// Shift Alt
|
||||||
|
Up,
|
||||||
|
// Control
|
||||||
|
NoSymbol,
|
||||||
|
// Shift Control
|
||||||
|
NoSymbol,
|
||||||
|
// Super
|
||||||
|
Up,
|
||||||
|
// Shift Super
|
||||||
|
Up
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
// Base
|
||||||
|
NoAction(),
|
||||||
|
// Shift
|
||||||
|
NoAction(),
|
||||||
|
// Alt - Wordwise
|
||||||
|
RedirectKey(key=<UP>,clearmods=Mod1),
|
||||||
|
// Shift Alt
|
||||||
|
// RedirectKey(key=<UP>), // Chromebook multicursor
|
||||||
|
RedirectKey(key=<UP>,clearmods=Mod1), // Default multicursor
|
||||||
|
// Control
|
||||||
|
RedirectKey(key=<HOME>),
|
||||||
|
// Shift Control
|
||||||
|
RedirectKey(key=<HOME>),
|
||||||
|
// Super - Wordwise - Sublime?
|
||||||
|
RedirectKey(key=<PGUP>,clearmods=Super),
|
||||||
|
// Shift Super
|
||||||
|
RedirectKey(key=<UP>,modifiers=Mod1,clearmods=Super)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
// Down to Mac End
|
// Down to Mac End
|
||||||
replace key <DOWN> {
|
replace key <DOWN> {
|
||||||
type[Group1]= "ONE_LEVEL_CTRL",
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
symbols[Group1]= [
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
Down,
|
Down,
|
||||||
|
// Shift
|
||||||
Down,
|
Down,
|
||||||
NoSymbol
|
// Alt
|
||||||
|
Down,
|
||||||
|
// Shift Alt
|
||||||
|
Down,
|
||||||
|
// Control
|
||||||
|
NoSymbol,
|
||||||
|
// Shift Control
|
||||||
|
NoSymbol,
|
||||||
|
// Super
|
||||||
|
Down,
|
||||||
|
// Shift Super
|
||||||
|
Down
|
||||||
],
|
],
|
||||||
actions[Group1]= [
|
actions[Group1]= [
|
||||||
|
// Base
|
||||||
NoAction(),
|
NoAction(),
|
||||||
|
// Shift
|
||||||
NoAction(),
|
NoAction(),
|
||||||
RedirectKey(key=<END>)
|
// Alt - Wordwise
|
||||||
|
RedirectKey(key=<DOWN>,clearmods=Mod1),
|
||||||
|
// Shift Alt
|
||||||
|
RedirectKey(key=<DOWN>,clearmods=Mod1),
|
||||||
|
// Control
|
||||||
|
RedirectKey(key=<END>),
|
||||||
|
// Shift Control
|
||||||
|
RedirectKey(key=<END>),
|
||||||
|
// Super - Wordwise - Sublime?
|
||||||
|
RedirectKey(key=<PGDN>,clearmods=Super),
|
||||||
|
// Shift Super
|
||||||
|
RedirectKey(key=<DOWN>,modifiers=Mod1,clearmods=Super)
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
// Alt BKSP to DELETE
|
// Alt BKSP to DELETE
|
||||||
replace key <BKSP> {
|
replace key <BKSP> {
|
||||||
type[Group1]= "ONE_LEVEL_CTRL",
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
symbols[Group1]= [
|
symbols[Group1]= [
|
||||||
BackSpace,
|
BackSpace,
|
||||||
BackSpace,
|
BackSpace,
|
||||||
NoSymbol
|
BackSpace
|
||||||
],
|
],
|
||||||
actions[Group1]= [
|
actions[Group1]= [
|
||||||
NoAction(),
|
NoAction(),
|
||||||
RedirectKey(key=<DELE>,clearmods=Mod1),
|
NoAction(),
|
||||||
NoAction()
|
RedirectKey(key=<DELE>,clearmods=Mod1)
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
// // Full Print Screen
|
// // Full Print Screen
|
||||||
// // GalliumOS
|
// // GalliumOS
|
||||||
@@ -108,6 +480,252 @@ default partial xkb_symbols "mac_levelssym" {
|
|||||||
// actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<PRSC>,clearmods=Control) ]
|
// actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<PRSC>,clearmods=Control) ]
|
||||||
// };
|
// };
|
||||||
};
|
};
|
||||||
|
partial xkb_symbols "mac_appcycle_chromebook" {
|
||||||
|
// Cycle App and In App Tab Switching
|
||||||
|
replace key <TAB> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Tab,
|
||||||
|
Tab,
|
||||||
|
Tab,
|
||||||
|
Tab,
|
||||||
|
backslash,
|
||||||
|
backslash,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
// Alt
|
||||||
|
Redirect(key=<TAB>,mods=Control,clearmods=Mod1),
|
||||||
|
// Alt + Shift
|
||||||
|
Redirect(key=<TAB>,mods=Control,clearmods=Mod1),
|
||||||
|
// Control
|
||||||
|
Redirect(key=<BKSL>),
|
||||||
|
// Control+Shift
|
||||||
|
Redirect(key=<BKSL>),
|
||||||
|
// Super
|
||||||
|
NoAction(),
|
||||||
|
// Super + Shift
|
||||||
|
NoAction()
|
||||||
|
]
|
||||||
|
};
|
||||||
|
};
|
||||||
|
partial xkb_symbols "mac_appcycle" {
|
||||||
|
// Cycle App and In App Tab Switching
|
||||||
|
key <FK13> { [ F13 ] };
|
||||||
|
key <FK14> { [ F14 ] };
|
||||||
|
replace key <TAB> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CMD",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Tab,
|
||||||
|
Tab,
|
||||||
|
F14,
|
||||||
|
F13,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
// Base
|
||||||
|
NoAction(),
|
||||||
|
// Shift
|
||||||
|
NoAction(),
|
||||||
|
// Control + Shift
|
||||||
|
Redirect(key=<FK14>),
|
||||||
|
// Control
|
||||||
|
Redirect(key=<FK13>),
|
||||||
|
// Super
|
||||||
|
Redirect(key=<TAB>,mods=Control,clearmods=Mod4+Super),
|
||||||
|
// Super + Shift
|
||||||
|
Redirect(key=<TAB>,mods=Control,clearmods=Mod4+Super)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
};
|
||||||
|
partial xkb_symbols "mac_browsers_chromebook" {
|
||||||
|
// Cycle App and In App Tab Switching
|
||||||
|
replace key <TAB> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Tab,
|
||||||
|
Tab,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol,
|
||||||
|
backslash,
|
||||||
|
backslash,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
// Alt
|
||||||
|
Redirect(key=<PGDN>,mods=Control,clearmods=Mod1),
|
||||||
|
// Alt + Shift
|
||||||
|
Redirect(key=<PGUP>,mods=Control,clearmods=Mod1+Shift),
|
||||||
|
// Control
|
||||||
|
Redirect(key=<BKSL>),
|
||||||
|
// Control+Shift
|
||||||
|
Redirect(key=<BKSL>),
|
||||||
|
// Super
|
||||||
|
NoAction(),
|
||||||
|
// Super + Shift
|
||||||
|
NoAction()
|
||||||
|
]
|
||||||
|
};
|
||||||
|
//Up to Mac Home
|
||||||
|
replace key <UP> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Up,
|
||||||
|
Up,
|
||||||
|
Up,
|
||||||
|
Up,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol,
|
||||||
|
Up
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
// Wordwise
|
||||||
|
RedirectKey(key=<UP>,clearmods=Mod1),
|
||||||
|
RedirectKey(key=<UP>,clearmods=Mod1),
|
||||||
|
RedirectKey(key=<HOME>),
|
||||||
|
RedirectKey(key=<HOME>),
|
||||||
|
// Wordwise - Sublime?
|
||||||
|
RedirectKey(key=<PGUP>,clearmods=Super),
|
||||||
|
RedirectKey(key=<UP>,modifiers=Mod1,clearmods=Super)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Down to Mac End
|
||||||
|
replace key <DOWN> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Down,
|
||||||
|
Down,
|
||||||
|
Down,
|
||||||
|
Down,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol,
|
||||||
|
Down
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
// Wordwise
|
||||||
|
RedirectKey(key=<DOWN>,clearmods=Mod1),
|
||||||
|
RedirectKey(key=<DOWN>,clearmods=Mod1),
|
||||||
|
RedirectKey(key=<END>),
|
||||||
|
RedirectKey(key=<END>),
|
||||||
|
// Wordwise - Sublime?
|
||||||
|
RedirectKey(key=<PGDN>,clearmods=Super),
|
||||||
|
RedirectKey(key=<DOWN>,modifiers=Mod1,clearmods=Super)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Alt BKSP to DELETE
|
||||||
|
replace key <BKSP> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
BackSpace,
|
||||||
|
BackSpace,
|
||||||
|
BackSpace
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<DELE>,clearmods=Mod1)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
};
|
||||||
|
partial xkb_symbols "mac_browsers" {
|
||||||
|
// Cycle App and In App Tab Switching
|
||||||
|
key <FK13> { [ F13 ] };
|
||||||
|
key <FK14> { [ F14 ] };
|
||||||
|
replace key <TAB> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CMD",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Tab,
|
||||||
|
Tab,
|
||||||
|
F14,
|
||||||
|
F13,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
Redirect(key=<FK14>),
|
||||||
|
Redirect(key=<FK13>),
|
||||||
|
Redirect(key=<PGDN>,mods=Control,clearmods=Mod4+Super),
|
||||||
|
Redirect(key=<PGUP>,mods=Control,clearmods=Mod4+Super+Shift)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
//Up to Mac Home
|
||||||
|
replace key <UP> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Up,
|
||||||
|
Up,
|
||||||
|
Up,
|
||||||
|
Up,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol,
|
||||||
|
Up
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
// Wordwise
|
||||||
|
RedirectKey(key=<UP>,clearmods=Mod1),
|
||||||
|
RedirectKey(key=<UP>,clearmods=Mod1),
|
||||||
|
RedirectKey(key=<HOME>),
|
||||||
|
RedirectKey(key=<HOME>),
|
||||||
|
// Wordwise - Sublime?
|
||||||
|
RedirectKey(key=<PGUP>,clearmods=Super),
|
||||||
|
RedirectKey(key=<UP>,modifiers=Mod1,clearmods=Super)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Down to Mac End
|
||||||
|
replace key <DOWN> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Down,
|
||||||
|
Down,
|
||||||
|
Down,
|
||||||
|
Down,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol,
|
||||||
|
Down
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
// Wordwise
|
||||||
|
RedirectKey(key=<DOWN>,clearmods=Mod1),
|
||||||
|
RedirectKey(key=<DOWN>,clearmods=Mod1),
|
||||||
|
RedirectKey(key=<END>),
|
||||||
|
RedirectKey(key=<END>),
|
||||||
|
// Wordwise - Sublime?
|
||||||
|
RedirectKey(key=<PGDN>,clearmods=Super),
|
||||||
|
RedirectKey(key=<DOWN>,modifiers=Mod1,clearmods=Super)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
// Alt BKSP to DELETE
|
||||||
|
replace key <BKSP> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
BackSpace,
|
||||||
|
BackSpace,
|
||||||
|
BackSpace
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<DELE>,clearmods=Mod1)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
};
|
||||||
partial xkb_symbols "mac_chrome" {
|
partial xkb_symbols "mac_chrome" {
|
||||||
// Back Button
|
// Back Button
|
||||||
replace key <LEFT> {
|
replace key <LEFT> {
|
||||||
@@ -115,11 +733,20 @@ partial xkb_symbols "mac_chrome" {
|
|||||||
symbols[Group1]= [
|
symbols[Group1]= [
|
||||||
Left,
|
Left,
|
||||||
Left,
|
Left,
|
||||||
|
NoSymbol,
|
||||||
|
NoSymbol,
|
||||||
Left
|
Left
|
||||||
],
|
],
|
||||||
actions[Group1]= [
|
actions[Group1]= [
|
||||||
|
// Base
|
||||||
NoAction(),
|
NoAction(),
|
||||||
RedirectKey(key=<UP>),
|
// Shift
|
||||||
|
NoAction(),
|
||||||
|
// Alt
|
||||||
|
RedirectKey(key=<FK18>),
|
||||||
|
// Alt
|
||||||
|
RedirectKey(key=<FK18>),
|
||||||
|
// Control
|
||||||
RedirectKey(key=<LEFT>,modifiers=Mod1,clearmods=Control)
|
RedirectKey(key=<LEFT>,modifiers=Mod1,clearmods=Control)
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@@ -127,13 +754,27 @@ partial xkb_symbols "mac_chrome" {
|
|||||||
replace key <RGHT> {
|
replace key <RGHT> {
|
||||||
type[Group1]= "ONE_LEVEL_CTRL",
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
symbols[Group1]= [
|
symbols[Group1]= [
|
||||||
|
// Base
|
||||||
Right,
|
Right,
|
||||||
|
// Shift
|
||||||
Right,
|
Right,
|
||||||
|
// Alt
|
||||||
|
NoSymbol,
|
||||||
|
// Shift Alt
|
||||||
|
NoSymbol,
|
||||||
|
// Control
|
||||||
Right
|
Right
|
||||||
],
|
],
|
||||||
actions[Group1]= [
|
actions[Group1]= [
|
||||||
|
// Base
|
||||||
NoAction(),
|
NoAction(),
|
||||||
RedirectKey(key=<DOWN>),
|
// Shift
|
||||||
|
NoAction(),
|
||||||
|
// Alt
|
||||||
|
RedirectKey(key=<FK18>),
|
||||||
|
// Shift Alt
|
||||||
|
RedirectKey(key=<FK18>),
|
||||||
|
// Control
|
||||||
RedirectKey(key=<RGHT>,modifiers=Mod1,clearmods=Control)
|
RedirectKey(key=<RGHT>,modifiers=Mod1,clearmods=Control)
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
@@ -27,19 +27,110 @@ partial xkb_symbols "mac_win" {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
partial xkb_symbols "mac_global" {
|
partial xkb_symbols "mac_global" {
|
||||||
|
// // Minimize Window Cmd + H = Alt+F9
|
||||||
|
// replace key <AC06> {
|
||||||
|
// type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
// symbols[Group1]= [
|
||||||
|
// h,
|
||||||
|
// H,
|
||||||
|
// H
|
||||||
|
// ],
|
||||||
|
// actions[Group1]= [
|
||||||
|
// NoAction(),
|
||||||
|
// NoAction(),
|
||||||
|
// RedirectKey(key=<AC06>,modifiers=Super,clearmods=Control+Shift)
|
||||||
|
// ]
|
||||||
|
// };
|
||||||
|
|
||||||
|
//
|
||||||
|
// Some sort of glitch occurs on shifting F while this segment is active
|
||||||
|
// it is like the Control key is being held down when it isn't.
|
||||||
|
//
|
||||||
|
// // Maximize Window Ctrl + Cmd + F = Alt+F10
|
||||||
|
// replace key <AC04> {
|
||||||
|
// type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
// symbols[Group1]= [
|
||||||
|
// f,
|
||||||
|
// F,
|
||||||
|
// F
|
||||||
|
// ],
|
||||||
|
// actions[Group1]= [
|
||||||
|
// // Base
|
||||||
|
// NoAction(),
|
||||||
|
// // Shift
|
||||||
|
// NoAction(),
|
||||||
|
// // Ctrl + Shift
|
||||||
|
// RedirectKey(key=<FK10>,modifiers=Mod1,clearmods=Control+Shift)
|
||||||
|
// ]
|
||||||
|
// };
|
||||||
|
|
||||||
|
// Close App Cmd + Q = Alt + F4
|
||||||
|
replace key <AD01> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
q,
|
||||||
|
Q,
|
||||||
|
F4
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<FK04>,modifiers=Mod1,clearmods=Control+Shift)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
// Show Desktop Cmd + F3 = Super + D
|
||||||
|
replace key <FK03> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [
|
||||||
|
F3,
|
||||||
|
F3,
|
||||||
|
D
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
RedirectKey(key=<AC03>,modifiers=Super,clearmods=Control+Shift)
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
// Cycle App and In App Tab Switching
|
||||||
|
key <FK13> { [ F13 ] };
|
||||||
|
key <FK14> { [ F14 ] };
|
||||||
|
|
||||||
|
replace key <TAB> {
|
||||||
|
type[Group1]= "ONE_LEVEL_CMD",
|
||||||
|
symbols[Group1]= [
|
||||||
|
Tab,
|
||||||
|
Tab,
|
||||||
|
// F13 // Default cmdtab
|
||||||
|
// F14 // KDE cmdtab
|
||||||
|
// Right // Elementary ecmdtab
|
||||||
|
],
|
||||||
|
actions[Group1]= [
|
||||||
|
NoAction(),
|
||||||
|
NoAction(),
|
||||||
|
// Redirect(key=<FK13>) // Default cmdtab
|
||||||
|
// Redirect(key=<FK14>) // KDE cmdtab
|
||||||
|
// Redirect(key=<RGHT>,mods=Control+Shift,clearmods=Mod4+Super) // Elementary cmdtab
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
// Page Up
|
// Page Up
|
||||||
replace key <UP> {
|
replace key <UP> {
|
||||||
type[Group1]= "ONE_LEVEL_CTRL",
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
symbols[Group1]= [
|
symbols[Group1]= [
|
||||||
Up,
|
Up,
|
||||||
Up,
|
Up,
|
||||||
NoSymbol ],
|
NoSymbol
|
||||||
|
],
|
||||||
actions[Group1]= [
|
actions[Group1]= [
|
||||||
NoAction(),
|
NoAction(),
|
||||||
NoAction(),
|
NoAction(),
|
||||||
RedirectKey(key=<PGUP>,clearmods=Shift+Control)
|
RedirectKey(key=<PGUP>,clearmods=Shift+Control)
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
// Page Down
|
// Page Down
|
||||||
replace key <DOWN> {
|
replace key <DOWN> {
|
||||||
type[Group1]= "ONE_LEVEL_CTRL",
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
@@ -56,36 +147,40 @@ partial xkb_symbols "mac_global" {
|
|||||||
};
|
};
|
||||||
// HOME
|
// HOME
|
||||||
replace key <LEFT> {
|
replace key <LEFT> {
|
||||||
type[Group1]= "ONE_LEVEL_CTRL",
|
type[Group1]= "ONE_LEVEL_CMD",
|
||||||
symbols[Group1]= [
|
symbols[Group1]= [
|
||||||
Left,
|
Left,
|
||||||
Left,
|
Left,
|
||||||
NoSymbol
|
NoSymbol,
|
||||||
|
Left
|
||||||
],
|
],
|
||||||
actions[Group1]= [
|
actions[Group1]= [
|
||||||
NoAction(),
|
NoAction(),
|
||||||
NoAction(),
|
NoAction(),
|
||||||
RedirectKey(key=<HOME>,clearmods=Shift+Control)
|
RedirectKey(key=<HOME>,clearmods=Shift+Control),
|
||||||
|
RedirectKey(key=<LEFT>,mods=Super,clearmods=Control)
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
// END
|
// END
|
||||||
replace key <RGHT> {
|
replace key <RGHT> {
|
||||||
type[Group1]= "ONE_LEVEL_CTRL",
|
type[Group1]= "ONE_LEVEL_CMD",
|
||||||
symbols[Group1]= [
|
symbols[Group1]= [
|
||||||
Right,
|
Right,
|
||||||
Right,
|
Right,
|
||||||
NoSymbol
|
NoSymbol,
|
||||||
|
Right
|
||||||
],
|
],
|
||||||
actions[Group1]= [
|
actions[Group1]= [
|
||||||
NoAction(),
|
NoAction(),
|
||||||
NoAction(),
|
NoAction(),
|
||||||
RedirectKey(key=<END>,clearmods=Shift+Control)
|
RedirectKey(key=<END>,clearmods=Shift+Control),
|
||||||
|
RedirectKey(key=<RGHT>,mods=Super,clearmods=Control)
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
// Full Print Screen
|
// Full Print Screen
|
||||||
// Standard Ubuntu
|
// Standard Ubuntu
|
||||||
replace key <AE03> {
|
replace key <AE03> {
|
||||||
type[Group1]= "ONE_LEVEL_CTRL",
|
type[Group1]= "ONE_LEVEL_CMD",
|
||||||
symbols[Group1]= [
|
symbols[Group1]= [
|
||||||
3,
|
3,
|
||||||
numbersign,
|
numbersign,
|
||||||
@@ -100,7 +195,7 @@ partial xkb_symbols "mac_global" {
|
|||||||
// Region Print Screen
|
// Region Print Screen
|
||||||
// Standard Ubuntu
|
// Standard Ubuntu
|
||||||
replace key <AE04> {
|
replace key <AE04> {
|
||||||
type[Group1]= "ONE_LEVEL_CTRL",
|
type[Group1]= "ONE_LEVEL_CMD",
|
||||||
symbols[Group1]= [
|
symbols[Group1]= [
|
||||||
4,
|
4,
|
||||||
dollar,
|
dollar,
|
||||||
|
@@ -1,15 +1,53 @@
|
|||||||
default partial xkb_types "addmac_levels" {
|
default partial xkb_types "addmac_levels" {
|
||||||
|
Virtual_modifiers Super;
|
||||||
type "ONE_LEVEL_CTRL" {
|
type "ONE_LEVEL_CTRL" {
|
||||||
modifiers= Mod1+Control+Shift;
|
modifiers = Shift+Mod1+Super+Control;
|
||||||
map[Mod1]= Level2;
|
map[Shift] = Level2;
|
||||||
map[Control]= Level3;
|
map[Mod1] = Level3;
|
||||||
map[Mod1+Control]= Level3;
|
map[Shift+Mod1] = Level4;
|
||||||
map[Shift+Control]= Level4;
|
map[Control] = Level5;
|
||||||
map[Shift+Mod1] = Level5;
|
map[Shift+Control] = Level6;
|
||||||
level_name[Level1]= "Base";
|
map[Super] = Level7;
|
||||||
level_name[Level2]= "Alt";
|
map[Shift+Super] = Level8;
|
||||||
level_name[Level3]= "Control";
|
map[Mod1+Control] = 9;
|
||||||
level_name[Level4]= "Shift with Control";
|
map[Super+Control] = 10;
|
||||||
level_name[Level5] = "Shift Alt";
|
map[Super+Mod1] = 11;
|
||||||
|
map[Super+Mod1+Control] = 12;
|
||||||
|
level_name[Level1] = "Base";
|
||||||
|
level_name[Level2] = "Shift";
|
||||||
|
level_name[Level3] = "Alt";
|
||||||
|
level_name[Level4] = "Shift Alt";
|
||||||
|
level_name[Level5] = "Control";
|
||||||
|
level_name[Level6] = "Shift Control";
|
||||||
|
level_name[Level7] = "Super";
|
||||||
|
level_name[Level8] = "Shift Super";
|
||||||
|
level_name[9] = "Control Alt";
|
||||||
|
level_name[10] = "Super Control";
|
||||||
|
level_name[11] = "Super Alt";
|
||||||
|
level_name[12] = "Super Control Alt";
|
||||||
|
};
|
||||||
|
type "ONE_LEVEL_CMD" {
|
||||||
|
modifiers = Shift+Control+Super;
|
||||||
|
map[Shift] = Level2;
|
||||||
|
map[Shift+Control] = Level3;
|
||||||
|
map[Control] = Level4;
|
||||||
|
map[Super] = Level5;
|
||||||
|
map[Shift+Super] = Level6;
|
||||||
|
level_name[Level1] = "Base";
|
||||||
|
level_name[Level2] = "Shift";
|
||||||
|
level_name[Level3] = "Control Shift";
|
||||||
|
level_name[Level4] = "Control";
|
||||||
|
level_name[Level5] = "Super";
|
||||||
|
level_name[Level6] = "Super Shift";
|
||||||
|
};
|
||||||
|
type "ONE_LEVEL_SUPER" {
|
||||||
|
modifiers = Shift+Super;
|
||||||
|
map[Shift] = Level2;
|
||||||
|
map[Super] = Level3;
|
||||||
|
map[Shift+Super] = Level4;
|
||||||
|
level_name[Level1] = "Base";
|
||||||
|
level_name[Level2] = "Shift";
|
||||||
|
level_name[Level3] = "Super";
|
||||||
|
level_name[Level4] = "Super Shift";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@@ -1,10 +1,53 @@
|
|||||||
default partial xkb_types "addmac_levels" {
|
default partial xkb_types "addmac_levels" {
|
||||||
|
Virtual_modifiers Super;
|
||||||
type "ONE_LEVEL_CTRL" {
|
type "ONE_LEVEL_CTRL" {
|
||||||
modifiers= Shift+Control;
|
modifiers = Shift+Mod1+Super+Control;
|
||||||
map[Shift]= Level2;
|
map[Shift] = Level2;
|
||||||
map[Shift+Control]= Level3;
|
map[Shift+Control] = Level3;
|
||||||
level_name[Level1]= "Base";
|
// map[Mod1] = Level4;
|
||||||
level_name[Level2]= "Alt";
|
map[Shift+Mod1] = Level5;
|
||||||
level_name[Level3]= "With Control";
|
map[Control] = Level6;
|
||||||
|
map[Super] = Level7;
|
||||||
|
map[Shift+Super] = Level8;
|
||||||
|
map[Mod1+Control] = 9;
|
||||||
|
map[Super+Control] = 10;
|
||||||
|
map[Super+Mod1] = 11;
|
||||||
|
map[Super+Mod1+Control] = 12;
|
||||||
|
level_name[Level1] = "Base";
|
||||||
|
level_name[Level2] = "Shift";
|
||||||
|
level_name[Level3] = "Shift Control";
|
||||||
|
// level_name[Level4] = "Alt";
|
||||||
|
level_name[Level5] = "Shift Alt";
|
||||||
|
level_name[Level6] = "Control";
|
||||||
|
level_name[Level7] = "Super";
|
||||||
|
level_name[Level8] = "Shift Super";
|
||||||
|
level_name[9] = "Control Alt";
|
||||||
|
level_name[10] = "Super Control";
|
||||||
|
level_name[11] = "Super Alt";
|
||||||
|
level_name[12] = "Super Control Alt";
|
||||||
|
};
|
||||||
|
type "ONE_LEVEL_CMD" {
|
||||||
|
modifiers = Shift+Control+Super;
|
||||||
|
map[Shift] = Level2;
|
||||||
|
map[Shift+Control] = Level3;
|
||||||
|
map[Control] = Level4;
|
||||||
|
map[Super] = Level5;
|
||||||
|
map[Shift+Super] = Level6;
|
||||||
|
level_name[Level1] = "Base";
|
||||||
|
level_name[Level2] = "Shift";
|
||||||
|
level_name[Level3] = "Control Shift";
|
||||||
|
level_name[Level4] = "Control";
|
||||||
|
level_name[Level5] = "Super";
|
||||||
|
level_name[Level6] = "Super Shift";
|
||||||
|
};
|
||||||
|
type "ONE_LEVEL_SUPER" {
|
||||||
|
modifiers = Shift+Super;
|
||||||
|
map[Shift] = Level2;
|
||||||
|
map[Super] = Level3;
|
||||||
|
map[Shift+Super] = Level4;
|
||||||
|
level_name[Level1] = "Base";
|
||||||
|
level_name[Level2] = "Shift";
|
||||||
|
level_name[Level3] = "Super";
|
||||||
|
level_name[Level4] = "Super Shift";
|
||||||
};
|
};
|
||||||
};
|
};
|
@@ -11,7 +11,7 @@
|
|||||||
"description":"Standard Windows 104 Keyboards",
|
"description":"Standard Windows 104 Keyboards",
|
||||||
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
"xkb_symbols_gui":"+altwin(ctrl_alt_win)+mac_gui(mac_levelssym)",
|
"xkb_symbols_gui":"+altwin(ctrl_alt_win)+mac_gui(mac_levelssym)+mac_gui(mac_appcycle)",
|
||||||
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term(mac_win)+mac_term(mac_global)",
|
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term(mac_win)+mac_term(mac_global)",
|
||||||
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
||||||
"xkb_types_term":"+mac_term(addmac_levels)"
|
"xkb_types_term":"+mac_term(addmac_levels)"
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
"description":"Standard Mac Keyboards with Apple driver",
|
"description":"Standard Mac Keyboards with Apple driver",
|
||||||
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
"xkb_symbols_gui":"+altwin(ctrl_alt_win)+mac_gui(mac_levelssym)",
|
"xkb_symbols_gui":"+altwin(ctrl_alt_win)+mac_gui(mac_levelssym)+mac_gui(mac_appcycle)",
|
||||||
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term(mac_win)+mac_term(mac_global)",
|
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term(mac_win)+mac_term(mac_global)",
|
||||||
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
||||||
"xkb_types_term":"+mac_term(addmac_levels)",
|
"xkb_types_term":"+mac_term(addmac_levels)",
|
||||||
@@ -38,47 +38,47 @@
|
|||||||
"description":"Standard Mac Keyboards",
|
"description":"Standard Mac Keyboards",
|
||||||
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
"xkb_symbols_gui":"+ctrl(swap_lwin_lctl)+ctrl(swap_rwin_rctl)+mac_gui(mac_levelssym)",
|
"xkb_symbols_gui":"+ctrl(swap_lwin_lctl)+ctrl(swap_rwin_rctl)+mac_gui(mac_levelssym)+mac_gui(mac_appcycle)",
|
||||||
"xkb_symbols_term":"+altwin(alt_super_win)+mac_term(mac_apple)+mac_term(mac_global)",
|
"xkb_symbols_term":"+altwin(alt_super_win)+mac_term(mac_apple)+mac_term(mac_global)",
|
||||||
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
||||||
"xkb_types_term":"+mac_term(addmac_levels)"
|
"xkb_types_term":"+mac_term(addmac_levels)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 4,
|
"id": 4,
|
||||||
"name":"Chromebook",
|
"name":"Chromebook (xfce)",
|
||||||
"type":"chromebook",
|
"type":"chromebook",
|
||||||
"active": false,
|
"active": false,
|
||||||
"description":"Standard Chromebook Keyboards",
|
"description":"Standard Chromebook Keyboards",
|
||||||
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
"xkb_symbols_gui":"+chromebook(swap_lalt_lctrl)+mac_gui(mac_levelssym)",
|
"xkb_symbols_gui":"+chromebook(swap_lalt_lctrl)+mac_gui(mac_levelssym)+mac_gui(mac_appcycle_chromebook)",
|
||||||
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term_chromebook(mac_levelssym)",
|
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term_chromebook(mac_levelssym)",
|
||||||
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
||||||
"xkb_types_term":"+mac_term(addmac_levels)"
|
"xkb_types_term":"+mac_term(addmac_levels)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 5,
|
"id": 5,
|
||||||
"name":"Chromebook - Windows",
|
"name":"Chromebook (xfce) - Windows",
|
||||||
"type":"chromebook",
|
"type":"chromebook",
|
||||||
"active": false,
|
"active": false,
|
||||||
"description":"Chromebook with Windows 104 Keyboard",
|
"description":"Chromebook with Windows 104 Keyboard",
|
||||||
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen; setxkbmap -device $usbid -option altwin:ctrl_alt_win",
|
"gui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen; setxkbmap -device $usbid -option altwin:ctrl_alt_win",
|
||||||
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
"fallbackgui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
"fallbackgui":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
"xkb_symbols_gui":"+chromebook(swap_lalt_lctrl)+mac_gui(mac_levelssym)",
|
"xkb_symbols_gui":"+chromebook(swap_lalt_lctrl)+mac_gui(mac_levelssym)+mac_gui(mac_appcycle_chromebook)",
|
||||||
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term_chromebook(mac_levelssym)",
|
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term_chromebook(mac_levelssym)",
|
||||||
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
||||||
"xkb_types_term":"+mac_term(addmac_levels)"
|
"xkb_types_term":"+mac_term(addmac_levels)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 6,
|
"id": 6,
|
||||||
"name":"Chromebook - Mac",
|
"name":"Chromebook (xfce) - Mac",
|
||||||
"type":"chromebook",
|
"type":"chromebook",
|
||||||
"active": false,
|
"active": false,
|
||||||
"description":"Chromebook with Mac Keyboard",
|
"description":"Chromebook with Mac Keyboard",
|
||||||
"gui":"setxkbmap -option ctrl:swap_lwin_lctl; xkbcomp -w0 -i $internalid -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
"gui":"setxkbmap -option;setxkbmap -option ctrl:swap_lwin_lctl; xkbcomp -w0 -i $internalid -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
"term":"xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
"term":"setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen",
|
||||||
"xkb_symbols_gui":"+chromebook(swap_lalt_lctrl)+mac_gui(mac_levelssym)",
|
"xkb_symbols_gui":"+chromebook(swap_lalt_lctrl)+mac_gui(mac_levelssym)+mac_gui(mac_appcycle_chromebook)",
|
||||||
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term_chromebook(mac_levelssym)",
|
"xkb_symbols_term":"+altwin(swap_alt_win)+mac_term_chromebook(mac_levelssym)",
|
||||||
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
"xkb_types_gui":"+mac_gui(addmac_levels)",
|
||||||
"xkb_types_term":"+mac_term(addmac_levels)"
|
"xkb_types_term":"+mac_term(addmac_levels)"
|
||||||
|
@@ -23,4 +23,4 @@ sed -i "s/#Environment/Environment/g" ~/.config/systemd/user/keyswap.service
|
|||||||
systemctl --user daemon-reload
|
systemctl --user daemon-reload
|
||||||
sed -i "s/ExecStart=/ExecStart=${swapcmd}/g" ~/.config/systemd/user/keyswap.service
|
sed -i "s/ExecStart=/ExecStart=${swapcmd}/g" ~/.config/systemd/user/keyswap.service
|
||||||
systemctl --user enable keyswap.timer
|
systemctl --user enable keyswap.timer
|
||||||
systemctl --user start keyswap.timer
|
systemctl --user start keyswap
|
||||||
|
Binary file not shown.
@@ -2,4 +2,4 @@ CFLAGS=-g $(shell pkg-config --cflags json-c xmu)
|
|||||||
LDFLAGS=-g $(shell pkg-config --libs json-c xmu)
|
LDFLAGS=-g $(shell pkg-config --libs json-c xmu)
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(CC) kintox11.c $(CFLAGS) $(LDFLAGS) -lm -o kintox11
|
$(CC) kintox11.c $(CFLAGS) $(LDFLAGS) -lm -lpthread -o kintox11
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#define _GNU_SOURCE 1
|
#define _GNU_SOURCE 1
|
||||||
|
#include <pthread.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@@ -27,59 +28,54 @@
|
|||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#elif _POSIX_C_SOURCE >= 199309L
|
||||||
|
#include <time.h> // for nanosleep
|
||||||
|
#else
|
||||||
|
#include <unistd.h> // for usleep
|
||||||
|
#endif
|
||||||
|
|
||||||
char * append(char * string1, char * string2)
|
const char *eventNames[34] = {"None","KeyPress","KeyRelease","ButtonPress","ButtonRelease","MotionNotify","EnterNotify","LeaveNotify","FocusIn","FocusOut","KeymapNotify","Expose","GraphicsExpose","NoExpose","VisibilityNotify","CreateNotify","DestroyNotify","UnmapNotify","MapNotify","MapRequest","ReparentNotify","ConfigureNotify","ConfigureRequest","ResizeRequest","CirculateNotify","CirculateRequest","PropertyNotify","SelectionClear","SelectionRequest","SelectionNotify","ColormapNotify","ClientMessage","MappingNotify"};
|
||||||
{
|
|
||||||
char * result = NULL;
|
#define NUM_THREADS 2
|
||||||
asprintf(&result, "%s,%s", string1, string2);
|
typedef struct threadArgs * ThreadArgs;
|
||||||
return result;
|
struct threadArgs{
|
||||||
}
|
char *run_onInput;
|
||||||
|
char *run_offInput;
|
||||||
|
};
|
||||||
|
|
||||||
long long timeInMilliseconds(void) {
|
long long timeInMilliseconds(void) {
|
||||||
struct timeval tv;
|
|
||||||
|
|
||||||
gettimeofday(&tv,NULL);
|
|
||||||
return (((long long)tv.tv_sec)*1000)+(tv.tv_usec/1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int wait_fd(int fd, double seconds)
|
|
||||||
{
|
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
fd_set in_fds;
|
|
||||||
FD_ZERO(&in_fds);
|
gettimeofday(&tv,NULL);
|
||||||
FD_SET(fd, &in_fds);
|
return (((long long)tv.tv_sec)*1000)+(tv.tv_usec/1000);
|
||||||
tv.tv_sec = trunc(seconds);
|
|
||||||
tv.tv_usec = (seconds - trunc(seconds))*1000000;
|
|
||||||
return select(fd+1, &in_fds, 0, 0, &tv);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int XNextEventTimeout(Display *d, XEvent *e, double seconds, long long event_ts, int last_event, long long *event_ts_ptr, int *last_event_ptr)
|
bool debug;
|
||||||
{
|
bool input_check = 0;
|
||||||
if (XPending(d) || wait_fd(ConnectionNumber(d),seconds)) {
|
long long int event_ts;
|
||||||
while (1) {
|
int last_event;
|
||||||
XNextEvent(d, e);
|
|
||||||
|
|
||||||
long long int new_ts = timeInMilliseconds();
|
Display* d;
|
||||||
|
Window w;
|
||||||
|
XEvent e;
|
||||||
|
|
||||||
// Make sure window dragging or resizing is not occuring
|
// cross-platform sleep function
|
||||||
if(!(e->type == ConfigureNotify && (e->type == last_event) && timeInMilliseconds()-event_ts < 419)){
|
void sleep_ms(int milliseconds) {
|
||||||
*event_ts_ptr = new_ts;
|
#ifdef WIN32
|
||||||
*last_event_ptr = e->type;
|
Sleep(milliseconds);
|
||||||
break;
|
#elif _POSIX_C_SOURCE >= 199309L
|
||||||
}
|
struct timespec ts;
|
||||||
*event_ts_ptr = new_ts;
|
ts.tv_sec = milliseconds / 1000;
|
||||||
*last_event_ptr = e->type;
|
ts.tv_nsec = (milliseconds % 1000) * 1000000;
|
||||||
}
|
nanosleep(&ts, NULL);
|
||||||
return 0;
|
#else
|
||||||
} else {
|
usleep(milliseconds * 1000);
|
||||||
return 1;
|
#endif
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool xerror = False;
|
char *trimwhitespace(char *str){
|
||||||
|
|
||||||
char *trimwhitespace(char *str)
|
|
||||||
{
|
|
||||||
char *end;
|
char *end;
|
||||||
// Trim leading space
|
// Trim leading space
|
||||||
while(isspace((unsigned char)*str)) str++;
|
while(isspace((unsigned char)*str)) str++;
|
||||||
@@ -93,8 +89,7 @@ char *trimwhitespace(char *str)
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
int check_caret()
|
int check_caret(){
|
||||||
{
|
|
||||||
int caretint;
|
int caretint;
|
||||||
char * fpname;
|
char * fpname;
|
||||||
fpname = malloc(sizeof(char)*20);
|
fpname = malloc(sizeof(char)*20);
|
||||||
@@ -124,8 +119,85 @@ int check_caret()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int in_int(int a[],int size,int item)
|
void *inputToggle(void *argStruct) {
|
||||||
{
|
ThreadArgs args = argStruct;
|
||||||
|
|
||||||
|
char * onInput;
|
||||||
|
char * offInput;
|
||||||
|
onInput = malloc(sizeof(char)*400);
|
||||||
|
offInput = malloc(sizeof(char)*400);
|
||||||
|
onInput = args->run_onInput;
|
||||||
|
offInput = args->run_offInput;
|
||||||
|
|
||||||
|
Bool ran_onInput = 0;
|
||||||
|
|
||||||
|
while(input_check){
|
||||||
|
if(check_caret() && ran_onInput == 0){
|
||||||
|
if(debug == true){
|
||||||
|
printf("run_onInput: %s\n",onInput);
|
||||||
|
}
|
||||||
|
system(onInput);
|
||||||
|
ran_onInput = 1;
|
||||||
|
}
|
||||||
|
else if(!check_caret() && ran_onInput == 1){
|
||||||
|
if(debug == true){
|
||||||
|
printf("run_offInput: %s\n",offInput);
|
||||||
|
}
|
||||||
|
system(offInput);
|
||||||
|
ran_onInput = 0;
|
||||||
|
}
|
||||||
|
sleep_ms(100);
|
||||||
|
}
|
||||||
|
pthread_exit(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
void *nextPlease(void *threadid) {
|
||||||
|
long tid;
|
||||||
|
tid = (long)threadid;
|
||||||
|
|
||||||
|
// printf("Next Please Thread ID, %ld\n", tid);
|
||||||
|
|
||||||
|
// Reference http://www.rahul.net/kenton/xproto/xevents_errors.html
|
||||||
|
// event type 17 - DestroyNotify
|
||||||
|
// event type 18 - UnmapNotify
|
||||||
|
// event type 22 - ConfigureNotify
|
||||||
|
// Dismiss the following events by initiating another XNextEvent
|
||||||
|
XNextEvent(d, &e);
|
||||||
|
while(e.type != ConfigureNotify || (e.type == ConfigureNotify && last_event == ConfigureNotify && timeInMilliseconds()-event_ts < 419)){
|
||||||
|
XNextEvent(d, &e);
|
||||||
|
}
|
||||||
|
// Unset input thread
|
||||||
|
input_check = 0;
|
||||||
|
last_event = e.type;
|
||||||
|
|
||||||
|
if(debug == true){
|
||||||
|
printf(" event: %s %d\n",eventNames[e.type-1],e.type);
|
||||||
|
printf(" duration: %lldms\n",timeInMilliseconds()-event_ts);
|
||||||
|
}
|
||||||
|
event_ts = timeInMilliseconds();
|
||||||
|
|
||||||
|
pthread_exit(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
char * append(char * string1, char * string2){
|
||||||
|
char * result = NULL;
|
||||||
|
asprintf(&result, "%s,%s", string1, string2);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int wait_fd(int fd, double seconds){
|
||||||
|
struct timeval tv;
|
||||||
|
fd_set in_fds;
|
||||||
|
FD_ZERO(&in_fds);
|
||||||
|
FD_SET(fd, &in_fds);
|
||||||
|
tv.tv_sec = trunc(seconds);
|
||||||
|
tv.tv_usec = (seconds - trunc(seconds))*1000000;
|
||||||
|
return select(fd+1, &in_fds, 0, 0, &tv);
|
||||||
|
}
|
||||||
|
|
||||||
|
Bool xerror = False;
|
||||||
|
|
||||||
|
int in_int(int a[],int size,int item){
|
||||||
int i,pos=-1;
|
int i,pos=-1;
|
||||||
for(i=0;i< size;i++)
|
for(i=0;i< size;i++)
|
||||||
{
|
{
|
||||||
@@ -148,8 +220,7 @@ int in(const char **arr, int len, char *target) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int strcicmp(char const *a, char const *b)
|
int strcicmp(char const *a, char const *b){
|
||||||
{
|
|
||||||
for (;; a++, b++) {
|
for (;; a++, b++) {
|
||||||
int d = tolower((unsigned char)*a) - tolower((unsigned char)*b);
|
int d = tolower((unsigned char)*a) - tolower((unsigned char)*b);
|
||||||
if (d != 0 || !*a)
|
if (d != 0 || !*a)
|
||||||
@@ -308,7 +379,7 @@ const char * str_window_class(Display* d, Window w, char *prior_app ){
|
|||||||
|
|
||||||
int main(int argc, char *argv[]){
|
int main(int argc, char *argv[]){
|
||||||
|
|
||||||
bool debug;
|
XInitThreads();
|
||||||
|
|
||||||
if(argc < 2){
|
if(argc < 2){
|
||||||
debug = false;
|
debug = false;
|
||||||
@@ -318,42 +389,6 @@ int main(int argc, char *argv[]){
|
|||||||
printf("Running in debug mode\n");
|
printf("Running in debug mode\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *eventNames[34];
|
|
||||||
eventNames[0] = "None";
|
|
||||||
eventNames[1] = "KeyPress";
|
|
||||||
eventNames[2] = "KeyRelease";
|
|
||||||
eventNames[3] = "ButtonPress";
|
|
||||||
eventNames[4] = "ButtonRelease";
|
|
||||||
eventNames[5] = "MotionNotify";
|
|
||||||
eventNames[6] = "EnterNotify";
|
|
||||||
eventNames[7] = "LeaveNotify";
|
|
||||||
eventNames[8] = "FocusIn";
|
|
||||||
eventNames[9] = "FocusOut";
|
|
||||||
eventNames[10] = "KeymapNotify";
|
|
||||||
eventNames[11] = "Expose";
|
|
||||||
eventNames[12] = "GraphicsExpose";
|
|
||||||
eventNames[13] = "NoExpose";
|
|
||||||
eventNames[14] = "VisibilityNotify";
|
|
||||||
eventNames[15] = "CreateNotify";
|
|
||||||
eventNames[16] = "DestroyNotify";
|
|
||||||
eventNames[17] = "UnmapNotify";
|
|
||||||
eventNames[18] = "MapNotify";
|
|
||||||
eventNames[19] = "MapRequest";
|
|
||||||
eventNames[20] = "ReparentNotify";
|
|
||||||
eventNames[21] = "ConfigureNotify";
|
|
||||||
eventNames[22] = "ConfigureRequest";
|
|
||||||
eventNames[23] = "ResizeRequest";
|
|
||||||
eventNames[25] = "CirculateNotify";
|
|
||||||
eventNames[26] = "CirculateRequest";
|
|
||||||
eventNames[27] = "PropertyNotify";
|
|
||||||
eventNames[28] = "SelectionClear";
|
|
||||||
eventNames[29] = "SelectionRequest";
|
|
||||||
eventNames[30] = "SelectionNotify";
|
|
||||||
eventNames[31] = "ColormapNotify";
|
|
||||||
eventNames[32] = "ClientMessage";
|
|
||||||
eventNames[33] = "MappingNotify";
|
|
||||||
|
|
||||||
|
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
char buffer[10240];
|
char buffer[10240];
|
||||||
struct json_object *parsed_json, *config, *config_obj,
|
struct json_object *parsed_json, *config, *config_obj,
|
||||||
@@ -491,8 +526,6 @@ int main(int argc, char *argv[]){
|
|||||||
system(de_run_array[de_id_idx]);
|
system(de_run_array[de_id_idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Display* d;
|
|
||||||
Window w;
|
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
// for XmbTextPropertyToTextList
|
// for XmbTextPropertyToTextList
|
||||||
@@ -533,9 +566,8 @@ int main(int argc, char *argv[]){
|
|||||||
printf("First window name: %s \n\n",str_window_class(d, w,prior_app));
|
printf("First window name: %s \n\n",str_window_class(d, w,prior_app));
|
||||||
|
|
||||||
int breakouter;
|
int breakouter;
|
||||||
int last_event=0;
|
last_event=0;
|
||||||
Bool ran_onInput = 0;
|
event_ts = timeInMilliseconds();
|
||||||
long long int event_ts = timeInMilliseconds();
|
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
@@ -574,15 +606,21 @@ int main(int argc, char *argv[]){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strcicmp(prior_category, current_category) != 0){
|
if(strcicmp(prior_category, current_category) != 0){
|
||||||
|
// printf("prior: %s, current: %s\n",prior_category,current_category);
|
||||||
|
// printf("%d,%d,%d,%d\n",strcicmp(prior_category, "gui"),strcicmp(current_category, "firefox"),strcicmp(current_category, "gui"),strcicmp(prior_category, "firefox"));
|
||||||
|
// printf("%d,%d\n",(strcicmp(prior_category, "gui") != 0 && strcicmp(prior_category, "firefox") != 0),(strcicmp(current_category, "gui") != 0 && strcicmp(current_category, "firefox") != 0));
|
||||||
printf("%s: %s\n",current_category,current_app);
|
printf("%s: %s\n",current_category,current_app);
|
||||||
if(debug == true){
|
// Make sure we're not switching between 2 GUI keymaps
|
||||||
printf("run: %s\n",run_array[category_idx]);
|
// Firefox & Standard GUI apps
|
||||||
|
// strcicmp returns 0 for matches, <>0 for non-match
|
||||||
|
if((strcicmp(prior_category, "gui") != 0 && strcicmp(prior_category, "firefox") != 0) || (strcicmp(current_category, "gui") != 0 && strcicmp(current_category, "firefox") != 0)){
|
||||||
|
if(debug == true){
|
||||||
|
printf("run: %s\n",run_array[category_idx]);
|
||||||
|
}
|
||||||
|
system(run_array[category_idx]);
|
||||||
}
|
}
|
||||||
system(run_array[category_idx]);
|
|
||||||
strcpy(run_normal,run_array[category_idx]);
|
strcpy(run_normal,run_array[category_idx]);
|
||||||
ran_onInput = 0;
|
|
||||||
strcpy(run_onInput,run_oninput_array[category_idx]);
|
strcpy(run_onInput,run_oninput_array[category_idx]);
|
||||||
strcpy(run_offInput,run_offinput_array[category_idx]);
|
strcpy(run_offInput,run_offinput_array[category_idx]);
|
||||||
system(run_offInput);
|
system(run_offInput);
|
||||||
@@ -614,51 +652,35 @@ int main(int argc, char *argv[]){
|
|||||||
strcpy(prior_app,current_app);
|
strcpy(prior_app,current_app);
|
||||||
strcpy(prior_category,current_category);
|
strcpy(prior_category,current_category);
|
||||||
|
|
||||||
// printf("run_onInput: %ld\n",strlen(run_onInput));
|
|
||||||
XEvent e;
|
|
||||||
if(strlen(run_onInput) > 0){
|
if(strlen(run_onInput) > 0){
|
||||||
while(XNextEventTimeout(d, &e, .5, event_ts, last_event, &event_ts, &last_event)){
|
input_check = 1;
|
||||||
if(check_caret() && ran_onInput == 0){
|
|
||||||
if(debug == true){
|
|
||||||
printf("run_onInput: %s\n",run_onInput);
|
|
||||||
}
|
|
||||||
system(run_onInput);
|
|
||||||
ran_onInput = 1;
|
|
||||||
}
|
|
||||||
else if(!check_caret() && ran_onInput == 1){
|
|
||||||
if(debug == true){
|
|
||||||
printf("run_offInput: %s\n",run_offInput);
|
|
||||||
}
|
|
||||||
system(run_offInput);
|
|
||||||
ran_onInput = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
while (1) {
|
input_check = 0;
|
||||||
XNextEvent(d, &e);
|
|
||||||
// Make sure window dragging or resizing is not occuring
|
|
||||||
if(!(e.type == ConfigureNotify && (e.type == last_event) && timeInMilliseconds()-event_ts < 300)){
|
|
||||||
if(debug == true){
|
|
||||||
printf(" event: %s %d\n",eventNames[e.type-1],e.type);
|
|
||||||
printf(" duration: %lldms\n",timeInMilliseconds()-event_ts);
|
|
||||||
}
|
|
||||||
event_ts = timeInMilliseconds();
|
|
||||||
last_event = e.type;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
event_ts = timeInMilliseconds();
|
|
||||||
last_event = e.type;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference http://www.rahul.net/kenton/xproto/xevents_errors.html
|
pthread_t threads[NUM_THREADS];
|
||||||
// event type 17 - DestroyNotify
|
int rc;
|
||||||
// event type 18 - UnmapNotify
|
int i;
|
||||||
// event type 22 - ConfigureNotify
|
ThreadArgs args = (ThreadArgs)malloc(sizeof(struct threadArgs));
|
||||||
// Dismiss the following events by initiating another XNextEvent
|
args->run_onInput = run_onInput;
|
||||||
while(e.type != ConfigureNotify){
|
args->run_offInput = run_offInput;
|
||||||
XNextEvent(d, &e);
|
for( i = 0; i < NUM_THREADS; i++ ) {
|
||||||
|
|
||||||
|
if(i==0){
|
||||||
|
rc = pthread_create(&threads[i], NULL, inputToggle, args);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
rc = pthread_create(&threads[i], NULL, nextPlease, (void *)&i);
|
||||||
|
}
|
||||||
|
if (rc) {
|
||||||
|
printf("Error:unable to create thread, %d\n", rc);
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// wait for threads to close before continuing
|
||||||
|
for (int i = 0; i < NUM_THREADS; i++) {
|
||||||
|
pthread_join(threads[i], NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
w = get_focus_window(d, e.type, eventNames[e.type-1], current_app, debug);
|
w = get_focus_window(d, e.type, eventNames[e.type-1], current_app, debug);
|
||||||
|
75
references/shortcuts
Normal file
75
references/shortcuts
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
# GalliumOS Notes
|
||||||
|
|
||||||
|
xfconf-query -c xfce4-keyboard-shortcuts -lv | grep "show_desktop_key\|cycle_windows_key\|cycle_reverse_windows_key\|close_window_key\|maximize_window_key\|xfce4-popup-whiskermenu\|move_window_next_workspace_key\|move_window_prev_workspace_key\|hide" | grep -v "default\|<Alt>m"
|
||||||
|
|
||||||
|
# Show Desktop
|
||||||
|
xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Super>d" --create --type string --set "show_desktop_key"
|
||||||
|
|
||||||
|
# Undo show desktop
|
||||||
|
xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Super>d" --reset
|
||||||
|
|
||||||
|
# GUI Alt Tab - Window Switching
|
||||||
|
xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Alt><Shift>Tab" --set "cycle_reverse_windows_key"
|
||||||
|
xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Alt>Tab" --set "cycle_windows_key"
|
||||||
|
|
||||||
|
# Term Alt Tab - Window Switching
|
||||||
|
xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Alt><Shift>Tab" --set "cycle_windows_key"
|
||||||
|
xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Alt>Tab" --set "cycle_reverse_windows_key"
|
||||||
|
|
||||||
|
# Hide/minimize Window
|
||||||
|
xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Super>h" --create --type string --set "hide_window_key"
|
||||||
|
|
||||||
|
# Spotlight
|
||||||
|
xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Primary><Shift>space" --create --type string --set "xfce4-popup-whiskermenu"
|
||||||
|
|
||||||
|
# Change workspace to left
|
||||||
|
xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Super>Left" --create --type string --set "move_window_prev_workspace_key"
|
||||||
|
|
||||||
|
# Change workspace to right
|
||||||
|
xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Super>Right" --create --type string --set "move_window_next_workspace_key"
|
||||||
|
|
||||||
|
# PopOS
|
||||||
|
|
||||||
|
# Close App Alt+F4 (Super+w)
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings close "['<Alt>F4','<Super>w']"
|
||||||
|
# Undo
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings close "['<Super>w']"
|
||||||
|
|
||||||
|
# Maximize Window
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings toggle-maximized "['<Alt>F10','<Primary><Super>Up']"
|
||||||
|
# Undo
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings toggle-maximized "['<Primary><Super>Up']"
|
||||||
|
|
||||||
|
# Ubuntu 19.10
|
||||||
|
# Change Workspace
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['<Primary><Alt>Left','<Super>Left']"
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['<Primary><Alt>Right','<Super>Right']"
|
||||||
|
|
||||||
|
# ElementaryOS
|
||||||
|
# Show Desktop
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings show-desktop "['<Super>d','<Super>Down']"
|
||||||
|
# Maximize Window
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings toggle-maximized "['<Alt>F10','<Super>Up']"
|
||||||
|
# Spotlight
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "['<Control><Shift>Space','<Super>Space']"
|
||||||
|
|
||||||
|
# Fedora 31
|
||||||
|
# Show Desktop
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings show-desktop "['<Super>d']"
|
||||||
|
# Change Workspace
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['<Primary><Alt>Left','<Super>Left']"
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['<Primary><Alt>Right','<Super>Right']"
|
||||||
|
|
||||||
|
# Manjaro/Arch KDE
|
||||||
|
# Maximize
|
||||||
|
kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" \
|
||||||
|
--key "Maximize Window" "Alt+F10,Meta+PgUp,Maximize Window"
|
||||||
|
# Minimize
|
||||||
|
kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" \
|
||||||
|
--key "Minimize Window" "Meta+h,Meta+PgDown,Minimize Window"
|
||||||
|
# Switch Desktops
|
||||||
|
kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" \
|
||||||
|
--key "Switch to Next Desktop" "Meta+Right,Meta+Right,Switch to Next Desktop"
|
||||||
|
kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" \
|
||||||
|
--key "Switch to Previous Desktop" "Meta+Left,Meta+Left,Switch to Previous Desktop"
|
||||||
|
kquitapp5 kglobalaccel && sleep 2s && kglobalaccel5 &
|
1411
references/symbol_names.txt
Normal file
1411
references/symbol_names.txt
Normal file
File diff suppressed because it is too large
Load Diff
139
setup.py
139
setup.py
@@ -15,6 +15,8 @@ def cmdline(command):
|
|||||||
)
|
)
|
||||||
return process.communicate()[0]
|
return process.communicate()[0]
|
||||||
|
|
||||||
|
dename = cmdline("./system-config/dename.sh").replace('"','').strip().split(" ")[0].lower()
|
||||||
|
|
||||||
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 " + pkgm + " " + run_pkg + "\n")
|
print("sudo " + pkgm + " " + run_pkg + "\n")
|
||||||
@@ -36,6 +38,107 @@ 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()
|
||||||
|
|
||||||
|
def setShortcuts():
|
||||||
|
distro = cmdline("awk -F= '$1==\"NAME\" { print $2 ;}' /etc/os-release").replace('"','').strip().split(" ")[0]
|
||||||
|
distroVersion = cmdline("awk -F= '$1==\"VERSION_ID\" { print $2 ;}' /etc/os-release").replace('"','').strip()
|
||||||
|
|
||||||
|
print("\nIf Kinto is already running it will be stopped...")
|
||||||
|
print("If you cancel the installer you can re-run Kinto via\n systemctl --user start keyswap")
|
||||||
|
|
||||||
|
cmdline("systemctl --user stop keyswap")
|
||||||
|
print("\nDetected " + distro + " " + distroVersion.strip() + " DE: " + dename + "\n")
|
||||||
|
addhotkeys = yn_choice("\nDo you want to apply system level shortcuts?")
|
||||||
|
if(addhotkeys):
|
||||||
|
distro = distro.lower()
|
||||||
|
if dename == "gnome":
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-applications \"['<Primary>F13','<Primary><Shift>F13','<Alt>Tab']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward \"['<Primary>F14','<Primary><Shift>F14','<Alt><Shift>Tab']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings minimize \"['<Super>h','<Alt>F9']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Primary><Shift>Space','<Primary>Space']\"")
|
||||||
|
if distro == "ubuntu" and dename == "gnome":
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up \"['<Super>Up','<Super>Left']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down \"['<Super>Down','<Super>Right']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left ['']")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right ['']")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings minimize \"['<Super>h','<Alt>F9']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Primary><Shift>Space','<Primary>Space']\"")
|
||||||
|
elif distro == "pop!_os" and dename == "gnome":
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings close \"['<Alt>F4','<Super>w']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings toggle-maximized \"['<Alt>F10','<Primary><Super>Up']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings minimize \"['<Super>h','<Alt>F9']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Primary><Shift>Space','<Primary>Space']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up \"['<Super>Up','<Super>Left']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down \"['<Super>Down','<Super>Right']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left ['']")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right ['']")
|
||||||
|
elif distro == "elementary" and dename == "gnome":
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-applications \"['<Primary>F13','<Primary><Shift>F13','<Alt>Tab']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward \"['<Primary>F14','<Primary><Shift>F14','<Alt><Shift>Tab']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings show-desktop \"['<Super>d','<Super>Down']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings toggle-maximized \"['<Alt>F10','<Super>Up']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Control><Shift>Space','<Super>Space']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings minimize \"['<Super>h','<Alt>F9']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Super>Space','<Primary>Space']\"")
|
||||||
|
cmdline('perl -pi -e "s/(\/\/ )(.*)(\/\/ Elementary cmdtab)/\$2\$3/g" ~/.xkb/symbols/mac_term')
|
||||||
|
cmdline('perl -pi -e "s/(\w.*)(\/\/ Default cmdtab)/\/\/ \$1\$2/g" ~/.xkb/symbols/mac_term')
|
||||||
|
cmdline('perl -pi -e "s/(\/\/ )(.*)(\/\/ Elementary cmdtab)/\$2\$3/g" ~/.xkb/symbols/mac_gui')
|
||||||
|
cmdline('perl -pi -e "s/(\w.*)(\/\/ Default cmdtab)/\/\/ \$1\$2/g" ~/.xkb/symbols/mac_gui')
|
||||||
|
elif distro == "galliumos" and dename == "xfce":
|
||||||
|
print("Applying GalliumOS (xfce) shortcuts...")
|
||||||
|
# Reset Show desktop
|
||||||
|
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>d" --reset')
|
||||||
|
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Super>d" --create --type string --set "show_desktop_key"')
|
||||||
|
# Reset App Cycle
|
||||||
|
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Alt>Tab" --reset')
|
||||||
|
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Alt><Shift>Tab" --reset')
|
||||||
|
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary>backslash" --create --type string --set "cycle_windows_key"')
|
||||||
|
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Shift>backslash" --create --type string --set "cycle_reverse_windows_key"')
|
||||||
|
# cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Super>h" --create --type string --set "hide_window_key"')
|
||||||
|
# Don't need to undo other maps for menu
|
||||||
|
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Primary>space" --create --type string --set "xfce4-popup-whiskermenu"')
|
||||||
|
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/commands/custom/<Primary><Shift>space" --create --type string --set "xfce4-popup-whiskermenu"')
|
||||||
|
# Reset move to desktop shortcuts
|
||||||
|
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>Home" --reset')
|
||||||
|
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>End" --reset')
|
||||||
|
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>Left" --reset')
|
||||||
|
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>Right" --reset')
|
||||||
|
os.system('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>Left" --create --type string --set "move_window_prev_workspace_key"')
|
||||||
|
os.system('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>Right" --create --type string --set "move_window_next_workspace_key"')
|
||||||
|
# Reset Change Workspace
|
||||||
|
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>Left" --reset')
|
||||||
|
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>Right" --reset')
|
||||||
|
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Super>Left" --create --type string --set "left_workspace_key"')
|
||||||
|
cmdline('xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Super>Right" --create --type string --set "right_workspace_key"')
|
||||||
|
print("\nYou may need to run these commands manually to make sure they are set, if you want to move windows between desktops.\n")
|
||||||
|
print(' xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>Left" --create --type string --set "move_window_prev_workspace_key"')
|
||||||
|
print(' xfconf-query --channel xfce4-keyboard-shortcuts --property "/xfwm4/custom/<Primary><Alt>Right" --create --type string --set "move_window_next_workspace_key"\n')
|
||||||
|
elif distro == "fedora" and dename == "gnome":
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings show-desktop \"['<Super>d']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up \"['<Super>Up','<Super>Left']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down \"['<Super>Down','<Super>Right']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left ['']")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right ['']")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings minimize \"['<Super>h','<Alt>F9']\"")
|
||||||
|
cmdline("gsettings set org.gnome.desktop.wm.keybindings panel-main-menu \"['<Primary><Shift>Space','<Primary>Space']\"")
|
||||||
|
cmdline("gsettings set org.gnome.mutter.keybindings toggle-tiled-right \"['<Super><Alt>Right']\"")
|
||||||
|
cmdline("gsettings set org.gnome.mutter.keybindings toggle-tiled-left \"['<Super><Alt>Left']\"")
|
||||||
|
# org.gnome.mutter.keybindings toggle-tiled-right ['<Super>Right']
|
||||||
|
# org.gnome.mutter.keybindings toggle-tiled-left ['<Super>Left']
|
||||||
|
elif distro == "manjaro linux" and dename == "kde":
|
||||||
|
# cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "krunner.desktop" --key "_launch","Alt+Space\tAlt+F2\tSearch,Alt+Space\tAlt+F2\tSearch,KRunner"')
|
||||||
|
# Remove Alt+F3 Operations Menu - Sublimetext Select-All
|
||||||
|
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Window Operations Menu","none,Alt+F3,Window Operations Menu"')
|
||||||
|
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Walk Through Windows" "Ctrl+F13,Alt+Tab,Walk Through Windows"')
|
||||||
|
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Walk Through Windows (Reverse)" "Ctrl+Shift+F14,Alt+Shift+Backtab,Walk Through Windows (Reverse)"')
|
||||||
|
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Window Maximize" "Meta+Ctrl+F,Meta+PgUp,Maximize Window"')
|
||||||
|
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Minimize Window" "Meta+h,Meta+PgDown,Minimize Window"')
|
||||||
|
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Switch to Next Desktop" "Meta+Right,Meta+Right,Switch to Next Desktop"')
|
||||||
|
cmdline('kwriteconfig5 --file "$HOME/.config/kglobalshortcutsrc" --group "kwin" --key "Switch to Previous Desktop" "Meta+Left,Meta+Left,Switch to Previous Desktop"')
|
||||||
|
cmdline('kquitapp5 kglobalaccel && sleep 2s && kglobalaccel5 &')
|
||||||
|
else:
|
||||||
|
print('distro: ' + distro + ' de: ' + dename)
|
||||||
|
print("A supported OS and DE was not found, you may not have full system level shortcuts installed.")
|
||||||
|
|
||||||
def windows_setup():
|
def windows_setup():
|
||||||
keymaps = ["Apple keyboard standard", "Apple keyboard w/ Caps lock as Esc", "Windows keyboard standard", "Windows keyboard w/ Caps lock as Esc","Uninstall"]
|
keymaps = ["Apple keyboard standard", "Apple keyboard w/ Caps lock as Esc", "Windows keyboard standard", "Windows keyboard w/ Caps lock as Esc","Uninstall"]
|
||||||
for index, item in enumerate(keymaps):
|
for index, item in enumerate(keymaps):
|
||||||
@@ -68,9 +171,8 @@ def windows_setup():
|
|||||||
else:
|
else:
|
||||||
os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\"")
|
os.system("del \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\kinto.ahk\"")
|
||||||
|
|
||||||
|
|
||||||
# check_x11 = cmdline("env | grep -i x11").strip()
|
# check_x11 = cmdline("env | grep -i x11").strip()
|
||||||
check_x11 = cmdline("env | grep -i x11 || loginctl show-session \"$XDG_SESSION_ID\" -p Type | awk -F= '{print $2}'").strip()
|
check_x11 = cmdline("(env | grep -i x11 || loginctl show-session \"$XDG_SESSION_ID\" -p Type) | awk -F= '{print $2}'").strip()
|
||||||
|
|
||||||
if len(check_x11) == 0:
|
if len(check_x11) == 0:
|
||||||
if os.name != 'nt':
|
if os.name != 'nt':
|
||||||
@@ -92,6 +194,7 @@ if len(pkgm) == 0:
|
|||||||
if len(pkgm) > 0:
|
if len(pkgm) > 0:
|
||||||
pkgm += " check-update;sudo dnf install -y "
|
pkgm += " check-update;sudo dnf install -y "
|
||||||
else:
|
else:
|
||||||
|
pkgm += " install -y "
|
||||||
pkgm += " update; sudo apt-get install -y "
|
pkgm += " update; sudo apt-get install -y "
|
||||||
|
|
||||||
if len(pkgm) == 0:
|
if len(pkgm) == 0:
|
||||||
@@ -215,8 +318,8 @@ if os.path.isdir(homedir + "/.xkb/keymap") == False:
|
|||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
os.system('setxkbmap -option')
|
os.system('setxkbmap -option')
|
||||||
os.system('setxkbmap -print > ~/.xkb/keymap/kbd.mac.gui')
|
os.system('setxkbmap -print > ~/.xkb/keymap/kbd.mac.gui')
|
||||||
os.system('setxkbmap -print > ~/.xkb/keymap/kbd.mac.gui.nw')
|
|
||||||
os.system('setxkbmap -print > ~/.xkb/keymap/kbd.mac.gui.chrome')
|
os.system('setxkbmap -print > ~/.xkb/keymap/kbd.mac.gui.chrome')
|
||||||
|
os.system('setxkbmap -print > ~/.xkb/keymap/kbd.mac.gui.browsers')
|
||||||
os.system('setxkbmap -print > ~/.xkb/keymap/kbd.mac.term')
|
os.system('setxkbmap -print > ~/.xkb/keymap/kbd.mac.term')
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
|
|
||||||
@@ -228,17 +331,37 @@ cmdline('sed -i '' -e "' + types_line + 's/\\"/' + keyboardconfigs[defaultkb-1][
|
|||||||
cmdline('sed -i '' -e "' + symbols_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_symbols_term'] + '\\"/2" ~/.xkb/keymap/kbd.mac.term')
|
cmdline('sed -i '' -e "' + symbols_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_symbols_term'] + '\\"/2" ~/.xkb/keymap/kbd.mac.term')
|
||||||
cmdline('sed -i '' -e "' + types_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_types_term'] + '\\"/2" ~/.xkb/keymap/kbd.mac.term')
|
cmdline('sed -i '' -e "' + types_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_types_term'] + '\\"/2" ~/.xkb/keymap/kbd.mac.term')
|
||||||
|
|
||||||
cmdline('sed -i '' -e "' + symbols_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_symbols_gui'].replace("+mac_gui(mac_levelssym)","") + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.nw')
|
# Set chrome file accordingly for chromebooks or normal
|
||||||
cmdline('sed -i '' -e "' + symbols_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_symbols_gui'].replace("+mac_gui(mac_levelssym)","+mac_gui(mac_chrome)") + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.chrome')
|
if default != 3:
|
||||||
cmdline('sed -i '' -e "' + types_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_types_gui'] + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.nw')
|
cmdline('sed -i '' -e "' + symbols_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_symbols_gui'].replace("+mac_gui(mac_levelssym)+mac_gui(mac_appcycle)","+mac_gui(mac_levelssym)+mac_gui(mac_browsers)") + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.browsers')
|
||||||
|
cmdline('sed -i '' -e "' + symbols_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_symbols_gui'].replace("+mac_gui(mac_levelssym)+mac_gui(mac_appcycle)","+mac_gui(mac_browsers)+mac_gui(mac_chrome)") + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.chrome')
|
||||||
|
else:
|
||||||
|
# Fix multicursor in mac_gui
|
||||||
|
cmdline('perl -pi -e "s/(\/\/ )(.*)(\/\/ Chromebook multicursor)/\$2\$3/g" ~/.xkb/symbols/mac_gui')
|
||||||
|
cmdline('perl -pi -e "s/(\w.*)(\/\/ Default multicursor)/\/\/ \$1\$2/g" ~/.xkb/symbols/mac_gui')
|
||||||
|
# Fix browsers
|
||||||
|
cmdline('sed -i '' -e "' + symbols_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_symbols_gui'].replace("+mac_gui(mac_levelssym)+mac_gui(mac_appcycle_chromebook)","+mac_gui(mac_levelssym)+mac_gui(mac_browsers_chromebook)") + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.browsers')
|
||||||
|
cmdline('sed -i '' -e "' + symbols_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_symbols_gui'].replace("+mac_gui(mac_levelssym)+mac_gui(mac_appcycle_chromebook)","+mac_gui(mac_browsers_chromebook)+mac_gui(mac_chrome)") + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.chrome')
|
||||||
|
if dename == "kde":
|
||||||
|
# Fix maximize shortcut
|
||||||
|
cmdline('perl -pi -e "s/(\/\/ )(.*)(\/\/ KDE maximize)/\$2\$3/g" ~/.xkb/symbols/mac_gui')
|
||||||
|
# term app switching
|
||||||
|
cmdline('perl -pi -e "s/(\/\/ )(.*)(\/\/ KDE cmdtab)/\$2\$3/g" ~/.xkb/symbols/mac_term')
|
||||||
|
else:
|
||||||
|
# Fix maximize shortcut
|
||||||
|
cmdline('perl -pi -e "s/(\/\/ )(.*)(\/\/ Default maximize)/\$2\$3/g" ~/.xkb/symbols/mac_gui')
|
||||||
|
# term app switching
|
||||||
|
cmdline('perl -pi -e "s/(\/\/ )(.*)(\/\/ Default cmdtab)/\$2\$3/g" ~/.xkb/symbols/mac_term')
|
||||||
|
cmdline('sed -i '' -e "' + types_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_types_gui'] + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.browsers')
|
||||||
cmdline('sed -i '' -e "' + types_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_types_gui'] + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.chrome')
|
cmdline('sed -i '' -e "' + types_line + 's/\\"/' + keyboardconfigs[defaultkb-1]['xkb_types_gui'] + '\\"/2" ~/.xkb/keymap/kbd.mac.gui.chrome')
|
||||||
|
|
||||||
|
setShortcuts()
|
||||||
|
|
||||||
user_file = homedir + '/.config/kinto/user_config.json'
|
user_file = homedir + '/.config/kinto/user_config.json'
|
||||||
with open(user_file, 'r') as f:
|
with open(user_file, 'r') as f:
|
||||||
user_config = json.load(f)
|
user_config = json.load(f)
|
||||||
|
|
||||||
onetime = yn_choice("One time initialization tweaks are available. Would you like to view them?")
|
onetime = yn_choice("\nOne time initialization tweaks are available. Would you like to view them?")
|
||||||
print("")
|
print("")
|
||||||
if(onetime):
|
if(onetime):
|
||||||
intents = [obj for obj in user_config['de'] if(obj['intent'] == "init")]
|
intents = [obj for obj in user_config['de'] if(obj['intent'] == "init")]
|
||||||
@@ -285,7 +408,7 @@ if len(defaultde) != 0:
|
|||||||
|
|
||||||
user_config['config'][0]['run'] = keyboardconfigs[defaultkb-1]['gui']
|
user_config['config'][0]['run'] = keyboardconfigs[defaultkb-1]['gui']
|
||||||
user_config['config'][1]['run'] = keyboardconfigs[defaultkb-1]['term']
|
user_config['config'][1]['run'] = keyboardconfigs[defaultkb-1]['term']
|
||||||
user_config['config'][2]['run'] = keyboardconfigs[defaultkb-1]['gui']
|
user_config['config'][2]['run'] = keyboardconfigs[defaultkb-1]['gui'].replace("kbd.mac.gui","kbd.mac.gui.browsers")
|
||||||
user_config['config'][3]['run'] = keyboardconfigs[defaultkb-1]['gui'].replace("kbd.mac.gui","kbd.mac.gui.chrome")
|
user_config['config'][3]['run'] = keyboardconfigs[defaultkb-1]['gui'].replace("kbd.mac.gui","kbd.mac.gui.chrome")
|
||||||
|
|
||||||
os.remove(user_file)
|
os.remove(user_file)
|
||||||
|
@@ -4,3 +4,6 @@ setxkbmap -option
|
|||||||
# force command to run silently and report true
|
# force command to run silently and report true
|
||||||
killall xbindkeys > /dev/null 2>&1 || :
|
killall xbindkeys > /dev/null 2>&1 || :
|
||||||
# rm /tmp/kinto/caret
|
# rm /tmp/kinto/caret
|
||||||
|
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Alt>Tab']"
|
||||||
|
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['<Shift><Alt>Tab']"
|
||||||
|
167
system-config/dename.sh
Executable file
167
system-config/dename.sh
Executable file
@@ -0,0 +1,167 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function detect_gnome()
|
||||||
|
{
|
||||||
|
ps -e | grep -E '^.* gnome-session' > /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
VERSION=`gnome-session --version | awk '{print $2}'`
|
||||||
|
DESKTOP="gnome"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function detect_kde4()
|
||||||
|
{
|
||||||
|
ps -e | grep -E '^.* kded4$' > /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
VERSION=`kded4 --version | grep -m 1 'KDE' | awk -F ':' '{print $2}' | awk '{print $1}'`
|
||||||
|
DESKTOP="KDE"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function detect_kde()
|
||||||
|
{
|
||||||
|
ps -e | grep -E '^.* kded5$' > /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
VERSION=`kded5 --version | grep -m 1 'KDE' | awk -F ':' '{print $2}' | awk '{print $1}'`
|
||||||
|
DESKTOP="KDE"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function detect_unity()
|
||||||
|
{
|
||||||
|
ps -e | grep -E 'unity-panel' > /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
VERSION=`unity --version | awk '{print $2}'`
|
||||||
|
DESKTOP="unity"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function detect_xfce()
|
||||||
|
{
|
||||||
|
ps -e | grep -E '^.* xfce4-session$' > /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
VERSION=`xfce4-session --version | grep xfce4-session | awk '{print $2}'`
|
||||||
|
DESKTOP="xfce"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function detect_cinnamon()
|
||||||
|
{
|
||||||
|
ps -e | grep -E '^.* cinnamon$' > /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
VERSION=`cinnamon --version | awk '{print $2}'`
|
||||||
|
DESKTOP="cinnamon"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function detect_mate()
|
||||||
|
{
|
||||||
|
ps -e | grep -E '^.* mate-panel$' > /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
VERSION=`mate-about --version | awk '{print $4}'`
|
||||||
|
DESKTOP="mate"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function detect_lxde()
|
||||||
|
{
|
||||||
|
ps -e | grep -E '^.* lxsession$' > /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# We can detect LXDE version only thru package manager
|
||||||
|
which apt-cache > /dev/null 2> /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
which yum > /dev/null 2> /dev/null
|
||||||
|
if [ $? -ne 0 ];
|
||||||
|
then
|
||||||
|
VERSION='unknown'
|
||||||
|
else
|
||||||
|
# For Fedora
|
||||||
|
VERSION=`yum list lxde-common | grep lxde-common | awk '{print $2}' | awk -F '-' '{print $1}'`
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# For Lubuntu and Knoppix
|
||||||
|
VERSION=`apt-cache show lxde-common /| grep 'Version:' | awk '{print $2}' | awk -F '-' '{print $1}'`
|
||||||
|
fi
|
||||||
|
DESKTOP="lxde"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function detect_sugar()
|
||||||
|
{
|
||||||
|
if [ "$DESKTOP_SESSION" == "sugar" ];
|
||||||
|
then
|
||||||
|
VERSION=`python -c "from jarabe import config; print config.version"`
|
||||||
|
DESKTOP="sugar"
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DESKTOP="unknown"
|
||||||
|
if detect_unity;
|
||||||
|
then
|
||||||
|
if detect_kde;
|
||||||
|
then
|
||||||
|
if detect_kde4;
|
||||||
|
then
|
||||||
|
if detect_gnome;
|
||||||
|
then
|
||||||
|
if detect_xfce;
|
||||||
|
then
|
||||||
|
if detect_cinnamon;
|
||||||
|
then
|
||||||
|
if detect_mate;
|
||||||
|
then
|
||||||
|
if detect_lxde;
|
||||||
|
then
|
||||||
|
detect_sugar
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$1" == '-v' ];
|
||||||
|
then
|
||||||
|
echo $VERSION
|
||||||
|
else
|
||||||
|
if [ "$1" == '-n' ];
|
||||||
|
then
|
||||||
|
echo $DESKTOP
|
||||||
|
else
|
||||||
|
echo $DESKTOP $VERSION
|
||||||
|
fi
|
||||||
|
fi
|
@@ -1,4 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
./caret_status.sh &
|
if [ $# -eq 0 ]
|
||||||
./kintox11
|
then
|
||||||
|
# No arguments
|
||||||
|
./kintox11
|
||||||
|
else
|
||||||
|
./caret_status.sh &
|
||||||
|
./kintox11
|
||||||
|
fi
|
||||||
|
@@ -2,6 +2,8 @@ GroupAdd, terminals, ahk_exe ubuntu.exe
|
|||||||
GroupAdd, terminals, ahk_exe ConEmu.exe
|
GroupAdd, terminals, ahk_exe ConEmu.exe
|
||||||
GroupAdd, terminals, ahk_exe ConEmu64.exe
|
GroupAdd, terminals, ahk_exe ConEmu64.exe
|
||||||
GroupAdd, terminals, ahk_exe powershell.exe
|
GroupAdd, terminals, ahk_exe powershell.exe
|
||||||
|
GroupAdd, terminals, ahk_exe WindowsTerminal.exe
|
||||||
|
GroupAdd, terminals, ahk_exe Hyper.exe
|
||||||
|
|
||||||
GroupAdd, posix, ahk_exe ubuntu.exe
|
GroupAdd, posix, ahk_exe ubuntu.exe
|
||||||
GroupAdd, posix, ahk_exe ConEmu.exe
|
GroupAdd, posix, ahk_exe ConEmu.exe
|
||||||
@@ -10,6 +12,7 @@ GroupAdd, posix, ahk_exe mintty.exe
|
|||||||
|
|
||||||
GroupAdd, ConEmu, ahk_exe ConEmu.exe
|
GroupAdd, ConEmu, ahk_exe ConEmu.exe
|
||||||
GroupAdd, ConEmu, ahk_exe ConEmu64.exe
|
GroupAdd, ConEmu, ahk_exe ConEmu64.exe
|
||||||
|
GroupAdd, ConEmu, ahk_exe WindowsTerminal.exe
|
||||||
|
|
||||||
GroupAdd, editors, ahk_exe sublime_text.exe
|
GroupAdd, editors, ahk_exe sublime_text.exe
|
||||||
|
|
||||||
@@ -61,6 +64,10 @@ $^+Right::Send +{End}
|
|||||||
; Copy
|
; Copy
|
||||||
^c::Send {LCtrl down}{LShift down}c{LCtrl Up}{LShift Up}
|
^c::Send {LCtrl down}{LShift down}c{LCtrl Up}{LShift Up}
|
||||||
#c::Send {LCtrl down}c{LCtrl Up}
|
#c::Send {LCtrl down}c{LCtrl Up}
|
||||||
|
#IfWinNotActive ahk_group ConEmu
|
||||||
|
; Paste
|
||||||
|
^v::Send {LCtrl down}{LShift down}v{LCtrl Up}{LShift Up}
|
||||||
|
#If
|
||||||
#If
|
#If
|
||||||
|
|
||||||
#IfWinActive ahk_group posix
|
#IfWinActive ahk_group posix
|
||||||
@@ -85,12 +92,13 @@ $^+Right::Send +{End}
|
|||||||
#j::Send {LCtrl down}j{LCtrl Up}
|
#j::Send {LCtrl down}j{LCtrl Up}
|
||||||
#t::Send {LCtrl down}t{LCtrl Up}
|
#t::Send {LCtrl down}t{LCtrl Up}
|
||||||
#_::Send {LCtrl down}_{LCtrl Up}
|
#_::Send {LCtrl down}_{LCtrl Up}
|
||||||
|
#z::Send {LCtrl down}z{LCtrl Up}
|
||||||
#If
|
#If
|
||||||
|
|
||||||
#IfWinActive ahk_group ConEmu
|
#IfWinActive ahk_group ConEmu
|
||||||
; Paste
|
; Paste
|
||||||
$^v::Send {Shift down}{Insert}{Shift Up}
|
$^v::Send {Shift down}{Insert}{Shift Up}
|
||||||
#v::^v
|
#v::Send {LCtrl down}v{LCtrl Up}
|
||||||
#If
|
#If
|
||||||
|
|
||||||
#IfWinActive ahk_exe mintty.exe
|
#IfWinActive ahk_exe mintty.exe
|
||||||
@@ -102,11 +110,6 @@ $^+Right::Send +{End}
|
|||||||
#v::Send {LCtrl down}v{LCtrl Up}
|
#v::Send {LCtrl down}v{LCtrl Up}
|
||||||
#If
|
#If
|
||||||
|
|
||||||
#IfWinActive ahk_exe ubuntu.exe
|
|
||||||
; Paste
|
|
||||||
^v::Send {LCtrl down}{LShift down}v{LCtrl Up}{LShift Up}
|
|
||||||
#If
|
|
||||||
|
|
||||||
;Disable win + l key locking (This line must come before any hotkey assignments in the .ahk file)
|
;Disable win + l key locking (This line must come before any hotkey assignments in the .ahk file)
|
||||||
|
|
||||||
; Admin privileges required
|
; Admin privileges required
|
||||||
|
Reference in New Issue
Block a user