mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-06 10:58:26 +02:00
Merge pull request #235 from rbreaves/dev
- Fixed alt/cmd swap append issue & added proper close all for browsers
This commit is contained in:
@@ -96,6 +96,12 @@ GroupAdd, editors, ahk_exe sublime_text.exe
|
|||||||
GroupAdd, editors, ahk_exe VSCodium.exe
|
GroupAdd, editors, ahk_exe VSCodium.exe
|
||||||
GroupAdd, editors, ahk_exe Code.exe
|
GroupAdd, editors, ahk_exe Code.exe
|
||||||
|
|
||||||
|
GroupAdd, browsers, ahk_exe chrome.exe
|
||||||
|
GroupAdd, browsers, ahk_exe opera.exe
|
||||||
|
GroupAdd, browsers, ahk_exe firefox.exe
|
||||||
|
; Disabled Edge for now - no ability to close all instances
|
||||||
|
; GroupAdd, browsers, Microsoft Edge ahk_class ApplicationFrameWindow
|
||||||
|
|
||||||
GroupAdd, vscode, ahk_exe VSCodium.exe
|
GroupAdd, vscode, ahk_exe VSCodium.exe
|
||||||
GroupAdd, vscode, ahk_exe Code.exe
|
GroupAdd, vscode, ahk_exe Code.exe
|
||||||
|
|
||||||
@@ -202,6 +208,11 @@ $^+Right::Send +{End}
|
|||||||
; Cmd+Space Alternative
|
; Cmd+Space Alternative
|
||||||
^Space::Send ^{Esc}
|
^Space::Send ^{Esc}
|
||||||
|
|
||||||
|
; Close all browsers
|
||||||
|
#IfWinActive ahk_group browsers
|
||||||
|
^q::send {Alt Down}f{Alt Up}x ; exit all windows
|
||||||
|
#If
|
||||||
|
|
||||||
; Sublime Text Remaps for VS Code
|
; Sublime Text Remaps for VS Code
|
||||||
#IfWinActive ahk_group vscode
|
#IfWinActive ahk_group vscode
|
||||||
; Remap Ctrl+Shift to behave like macOS Sublimetext
|
; Remap Ctrl+Shift to behave like macOS Sublimetext
|
||||||
|
@@ -10,6 +10,11 @@ terminals = ["gnome-terminal","konsole","io.elementary.terminal","terminator","s
|
|||||||
terminals = [term.casefold() for term in terminals]
|
terminals = [term.casefold() for term in terminals]
|
||||||
termStr = "|".join(str(x) for x in terminals)
|
termStr = "|".join(str(x) for x in terminals)
|
||||||
|
|
||||||
|
# Use for browser specific hotkeys
|
||||||
|
browsers = ["Chromium","Chromium-browser","Google-chrome","Epiphany","Firefox","Discord"]
|
||||||
|
browsers = [browser.casefold() for browser in browsers]
|
||||||
|
browserStr = "|".join(str(x) for x in browsers)
|
||||||
|
|
||||||
mscodes = ["code","vscodium"]
|
mscodes = ["code","vscodium"]
|
||||||
codeStr = "|".join(str(x) for x in mscodes)
|
codeStr = "|".join(str(x) for x in mscodes)
|
||||||
|
|
||||||
@@ -69,6 +74,11 @@ define_keymap(re.compile("org.gnome.nautilus", re.IGNORECASE),{
|
|||||||
K("RC-Right"): K("M-Right"), # Go Forward
|
K("RC-Right"): K("M-Right"), # Go Forward
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# Keybindings for Browsers
|
||||||
|
define_keymap(re.compile(browserStr, re.IGNORECASE),{
|
||||||
|
K("RC-Q"): K("RC-Q"), # Close all browsers Instances
|
||||||
|
})
|
||||||
|
|
||||||
define_keymap(None,{
|
define_keymap(None,{
|
||||||
# Basic App hotkey functions
|
# Basic App hotkey functions
|
||||||
K("RC-Q"): K("Alt-F4"),
|
K("RC-Q"): K("Alt-F4"),
|
||||||
|
@@ -75,13 +75,13 @@ function uninstall {
|
|||||||
function removeAppleKB {
|
function removeAppleKB {
|
||||||
# Undo Apple keyboard cmd & alt swap
|
# Undo Apple keyboard cmd & alt swap
|
||||||
if test -f "/sys/module/hid_apple/parameters/swap_opt_cmd" && [ `cat /sys/module/hid_apple/parameters/swap_opt_cmd` == "1" ]; then
|
if test -f "/sys/module/hid_apple/parameters/swap_opt_cmd" && [ `cat /sys/module/hid_apple/parameters/swap_opt_cmd` == "1" ]; then
|
||||||
echo '0' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd
|
echo '0' | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd
|
||||||
echo 'options hid_apple swap_opt_cmd=0' | sudo tee -a /etc/modprobe.d/hid_apple.conf
|
echo 'options hid_apple swap_opt_cmd=0' | sudo tee /etc/modprobe.d/hid_apple.conf
|
||||||
sudo update-initramfs -u -k all
|
sudo update-initramfs -u -k all
|
||||||
fi
|
fi
|
||||||
if test -f "/sys/module/applespi/parameters/swap_opt_cmd" && [ `cat /sys/module/applespi/parameters/swap_opt_cmd` == "1" ]; then
|
if test -f "/sys/module/applespi/parameters/swap_opt_cmd" && [ `cat /sys/module/applespi/parameters/swap_opt_cmd` == "1" ]; then
|
||||||
echo '0' | sudo tee -a /sys/module/applespi/parameters/swap_opt_cmd
|
echo '0' | sudo tee /sys/module/applespi/parameters/swap_opt_cmd
|
||||||
echo 'options applespi swap_opt_cmd=0' | sudo tee -a /etc/modprobe.d/applespi.conf
|
echo 'options applespi swap_opt_cmd=0' | sudo tee /etc/modprobe.d/applespi.conf
|
||||||
sudo update-initramfs -u -k all
|
sudo update-initramfs -u -k all
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -270,10 +270,10 @@ fi
|
|||||||
|
|
||||||
if [[ $1 == "1" || $1 == "winmac" ]]; then
|
if [[ $1 == "1" || $1 == "winmac" ]]; then
|
||||||
if ls /sys/module | grep hid_apple >/dev/null 2>&1 ; then
|
if ls /sys/module | grep hid_apple >/dev/null 2>&1 ; then
|
||||||
echo '1' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd;echo 'options hid_apple swap_opt_cmd=1' | sudo tee -a /etc/modprobe.d/hid_apple.conf;sudo update-initramfs -u -k all
|
echo '1' | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd;echo 'options hid_apple swap_opt_cmd=1' | sudo tee /etc/modprobe.d/hid_apple.conf;sudo update-initramfs -u -k all
|
||||||
fi
|
fi
|
||||||
if ls /sys/module | grep applespi >/dev/null 2>&1 ; then
|
if ls /sys/module | grep applespi >/dev/null 2>&1 ; then
|
||||||
echo '1' | sudo tee -a /sys/module/applespi/parameters/swap_opt_cmd;echo 'options applespi swap_opt_cmd=1' | sudo tee -a /etc/modprobe.d/applespi.conf;sudo update-initramfs -u -k all
|
echo '1' | sudo tee /sys/module/applespi/parameters/swap_opt_cmd;echo 'options applespi swap_opt_cmd=1' | sudo tee /etc/modprobe.d/applespi.conf;sudo update-initramfs -u -k all
|
||||||
fi
|
fi
|
||||||
if ! ls /sys/module | grep apple ; then
|
if ! ls /sys/module | grep apple ; then
|
||||||
removeAppleKB
|
removeAppleKB
|
||||||
|
Reference in New Issue
Block a user