this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'main' of github.com:ian-h-chamberlain/dotfiles

+936 -8
+8 -8
.config/Code/User/extensions.txt
··· 26 26 eamodio.gitlens@13.6.0 27 27 emeraldwalk.RunOnSave@0.2.0 28 28 geequlim.godot-tools@1.3.1 29 - GitHub.vscode-pull-request-github@0.64.0 29 + GitHub.vscode-pull-request-github@0.66.1 30 30 golang.go@0.38.0 31 31 Gruntfuggly.todo-tree@0.0.226 32 32 haskell.haskell@2.2.4 ··· 52 52 ms-azuretools.vscode-docker@1.25.1 53 53 ms-dotnettools.vscode-dotnet-runtime@1.6.0 54 54 ms-python.isort@2022.8.0 55 - ms-python.python@2023.8.0 55 + ms-python.python@2023.10.0 56 56 ms-python.vscode-pylance@2023.6.10 57 - ms-toolsai.jupyter@2023.4.1011241018 57 + ms-toolsai.jupyter@2023.5.1001582324 58 58 ms-toolsai.jupyter-renderers@1.0.15 59 - ms-vscode-remote.remote-containers@0.292.0 59 + ms-vscode-remote.remote-containers@0.295.0 60 60 ms-vscode-remote.remote-ssh@0.102.0 61 61 ms-vscode-remote.remote-ssh-edit@0.86.0 62 62 ms-vscode.cmake-tools@1.14.33 ··· 65 65 ms-vscode.live-server@0.4.8 66 66 ms-vscode.remote-explorer@0.4.0 67 67 ms-vscode.vscode-serial-monitor@0.10.0 68 - ms-vsliveshare.vsliveshare@1.0.5864 68 + ms-vsliveshare.vsliveshare@1.0.5873 69 69 naumovs.color-highlight@2.5.0 70 70 neilding.language-liquid@0.1.1 71 71 nico-castell.linux-desktop-file@0.0.21 72 72 NicolasVuillamy.vscode-groovy-lint@2.0.0 73 - pierre-payen.gdb-syntax@0.4.2 73 + pierre-payen.gdb-syntax@0.5.1 74 74 PolyMeilex.wgsl@0.1.14 75 75 raynigon.nginx-formatter@0.0.13 76 76 Razoric.gdscript-toolkit-formatter@1.2.3 ··· 83 83 rioj7.command-variable@1.53.0 84 84 robocorp.robotframework-lsp@1.11.0 85 85 RReverser.llvm@0.1.1 86 - rust-lang.rust-analyzer@0.3.1541 86 + rust-lang.rust-analyzer@0.3.1549 87 87 ryanluker.vscode-coverage-gutters@2.11.0 88 88 samuelcolvin.jinjahtml@0.20.0 89 89 sleistner.vscode-fileutils@3.10.1 90 90 slevesque.shader@1.1.5 91 91 stevensona.shader-toy@0.10.15 92 - streetsidesoftware.code-spell-checker@2.20.4 92 + streetsidesoftware.code-spell-checker@2.20.5 93 93 tamasfe.even-better-toml@0.19.0 94 94 timonwong.shellcheck@0.32.6 95 95 tonybaloney.vscode-pets@1.22.0
+9
.config/Code/User/settings.json
··· 350 350 "generic.injected:rust": "#F8F8F2", 351 351 "operator.injected:rust": "#F92672", 352 352 "parenthesis.injected:rust": "#F8F8F2", 353 + "punctuation": "#F8F8F2", 353 354 "punctuation.injected:rust": "#F92672", 354 355 "semicolon.injected:rust": "#F8F8F2", 355 356 "unresolvedReference.injected:rust": "#F8F8F2", ··· 513 514 "extensions.experimental.affinity": { 514 515 "asvetliakov.vscode-neovim": 1 515 516 }, 517 + 516 518 "files.associations": { 517 519 "**/.cargo/config": "toml", 518 520 "**/.ssh/*config*": "ssh_config", ··· 586 588 "**/private/var/tmp/**": true, 587 589 }, 588 590 "files.insertFinalNewline": true, 591 + "files.readonlyInclude": { 592 + "/opt/devkitpro/**": true, 593 + "/var/log/**": true, 594 + "/home/*/.rustup/toolchains/**": true, 595 + "/Users/*/.rustup/toolchains/**": true 596 + }, 589 597 "files.trimTrailingWhitespace": true, 590 598 "files.watcherExclude": { 591 599 "**/.bazel_out/**": true, ··· 892 900 "RUST_TEST_THREADS": "1" 893 901 }, 894 902 "rust-analyzer.runnables.extraArgs": [], 903 + "rust-analyzer.semanticHighlighting.punctuation.specialization.enable": true, 895 904 896 905 "salt-lint.enable": true, 897 906 "salt-lint.executablePath": "/Users/ichamberlain/.pyenv/versions/i95-py3/bin/salt-lint",
+919
.config/keyszer/config.py
··· 1 + # Global keyszer configuration: https://github.com/joshgoebel/keyszer#configuration 2 + dump_diagnostics_key(Key.F7) 3 + emergency_eject_key(Key.F8) 4 + 5 + timeouts( 6 + multipurpose = 1.0, 7 + suspend = 0.1, 8 + ) 9 + 10 + # This seems to help with Firefox "cmd+," macro 11 + throttle_delays( 12 + key_pre_delay_ms = 0, 13 + key_post_delay_ms = 40, 14 + ) 15 + 16 + # TODO: break out a "custom.py" or something and include it here, instead of 17 + # just jamming everything together all in one file. 18 + 19 + # TODO: upgrade all "define_*" maps to be named and use new APIs 20 + # https://github.com/joshgoebel/keyszer/blob/main/UPGRADE_FROM_XKEYSNAIL.md#rewriting-your-config-using-the-new-keyszer-apis 21 + 22 + terminals = [ 23 + "alacritty", 24 + "cutefish-terminal", 25 + "deepin-terminal", 26 + "eterm", 27 + "gnome-terminal", 28 + "guake", 29 + "hyper", 30 + "io.elementary.terminal", 31 + "kinto-gui.py", 32 + "kitty", 33 + "Kgx", # GNOME Console terminal app 34 + "konsole", 35 + "lxterminal", 36 + "mate-terminal", 37 + "org.gnome.Console", 38 + "qterminal", 39 + "st", 40 + "sakura", 41 + "station", 42 + "tabby", 43 + "terminator", 44 + "termite", 45 + "tilda", 46 + "tilix", 47 + "urxvt", 48 + "xfce4-terminal", 49 + "xterm", 50 + ] 51 + terminals = [term.casefold() for term in terminals] 52 + termStr = "|".join(str('^'+x+'$') for x in terminals) 53 + 54 + mscodes = ["code","vscodium","code-oss"] 55 + mscodeStr = "|".join(str('^'+x+'$') for x in mscodes) 56 + 57 + sublimes = ["Sublime_text","subl"] 58 + sublimeStr = "|".join(str('^'+x+'$') for x in sublimes) 59 + 60 + emacs = ["Emacs", "emacs"] 61 + emacsStr = "|".join(str('^'+x+'$') for x in emacs) 62 + 63 + # Add remote desktop clients & VM software here 64 + # Ideally we'd only exclude the client window, 65 + # but that may not be easily done. 66 + remotes = [ 67 + "Gnome-boxes", 68 + "org.remmina.Remmina", 69 + "remmina", 70 + "qemu-system-.*", 71 + "qemu", 72 + "Spicy", 73 + "Virt-manager", 74 + "VirtualBox", 75 + "VirtualBox Machine", 76 + "xfreerdp", 77 + "Wfica", 78 + ] 79 + remotes = [client.casefold() for client in remotes] 80 + remotesStr = "|".join(str('^'+x+'$') for x in remotes) 81 + 82 + # Add remote desktop clients & VMs for no remapping 83 + terminals.extend(remotes) 84 + mscodes.extend(remotes) 85 + 86 + # Use for browser specific hotkeys 87 + browsers = [ 88 + "Brave-browser", 89 + "Chromium", 90 + "Chromium-browser", 91 + "Discord", 92 + "Epiphany", 93 + "Firefox", 94 + "Firefox Developer Edition", 95 + "Navigator", 96 + "firefoxdeveloperedition", 97 + "Waterfox", 98 + "Google-chrome", 99 + "microsoft-edge", 100 + "microsoft-edge-dev", 101 + "org.deepin.browser", 102 + ] 103 + browsers = [browser.casefold() for browser in browsers] 104 + browserStr = "|".join(str('^'+x+'$') for x in browsers) 105 + 106 + chromes = [ 107 + "Brave-browser", 108 + "Chromium", 109 + "Chromium-browser", 110 + "Google-chrome", 111 + "microsoft-edge", 112 + "microsoft-edge-dev", 113 + "org.deepin.browser", 114 + ] 115 + chromes = [chrome.casefold() for chrome in chromes] 116 + chromeStr = "|".join(str('^'+x+'$') for x in chromes) 117 + 118 + # [Global modemap] Change modifier keys as in xmodmap 119 + define_conditional_modmap(lambda wm_class: wm_class.casefold() not in (terminals + emacs),{ 120 + # - Mac Only 121 + Key.LEFT_META: Key.RIGHT_CTRL, # Mac 122 + Key.LEFT_CTRL: Key.LEFT_META, # Mac 123 + Key.RIGHT_META: Key.RIGHT_CTRL, # Mac - Multi-language (Remove) 124 + Key.RIGHT_CTRL: Key.RIGHT_META, # Mac - Multi-language (Remove) 125 + }) 126 + 127 + # Restore defaults for emacs, shortcuts gets messy otherwise 128 + define_conditional_modmap(re.compile(emacsStr, re.IGNORECASE),{ 129 + Key.LEFT_META: Key.RIGHT_CTRL, # Mac 130 + # Left Ctrl stays Left Ctrl 131 + Key.RIGHT_META: Key.RIGHT_CTRL, # Mac - Multi-language (Remove) 132 + Key.RIGHT_CTRL: Key.LEFT_CTRL, # Mac - Multi-language (Remove) 133 + }) 134 + 135 + # [Conditional modmap] Change modifier keys in certain applications 136 + define_conditional_modmap(re.compile(termStr, re.IGNORECASE), { 137 + # - Mac Only 138 + Key.LEFT_META: Key.RIGHT_CTRL, # Mac 139 + # # Left Ctrl Stays Left Ctrl 140 + Key.RIGHT_META: Key.RIGHT_CTRL, # Mac - Multi-language (Remove) 141 + Key.RIGHT_CTRL: Key.LEFT_CTRL, # Mac - Multi-language (Remove) 142 + }) 143 + 144 + # Keybindings for IntelliJ 145 + define_keymap(re.compile("^jetbrains-(?!.*toolbox).*$", re.IGNORECASE),{ 146 + # General 147 + K("C-Key_0"): K("Alt-Key_0"), # Open corresponding tool window 148 + K("C-Key_1"): K("Alt-Key_1"), # Open corresponding tool window 149 + K("C-Key_2"): K("Alt-Key_2"), # Open corresponding tool window 150 + K("C-Key_3"): K("Alt-Key_3"), # Open corresponding tool window 151 + K("C-Key_4"): K("Alt-Key_4"), # Open corresponding tool window 152 + K("C-Key_5"): K("Alt-Key_5"), # Open corresponding tool window 153 + K("C-Key_6"): K("Alt-Key_6"), # Open corresponding tool window 154 + K("C-Key_7"): K("Alt-Key_7"), # Open corresponding tool window 155 + K("C-Key_8"): K("Alt-Key_8"), # Open corresponding tool window 156 + K("C-Key_9"): K("Alt-Key_9"), # Open corresponding tool window 157 + K("Super-Grave"): K("C-Grave"), # Quick switch current scheme 158 + K("C-Comma"): K("C-Alt-s"), # Open Settings dialog 159 + K("C-Semicolon"): K("C-Alt-Shift-s"), # Open Project Structure dialog 160 + # Debugging 161 + K("C-Alt-r"): K("F9"), # Resume program 162 + # Search/Replace 163 + K("C-g"): K("F3"), # Find next 164 + K("C-Shift-F3"): K("Shift-F3"), # Find previous 165 + K("Super-g"): K("Alt-j"), # Select next occurrence 166 + K("C-Super-g"): K("C-Alt-Shift-j"), # Select all occurrences 167 + K("Super-Shift-g"): K("Alt-Shift-j"), # Unselect occurrence 168 + # Editing 169 + K("Super-Space"): K("LC-Space"), # Basic code completion 170 + K("Super-Shift-Space"): K("LC-Shift-Space"),# Smart code completion 171 + K("Super-j"): K("C-q"), # Quick documentation lookup 172 + K("C-n"): K("Alt-Insert"), # Generate code... 173 + K("Super-o"): K("C-o"), # Override methods 174 + K("Super-i"): K("C-i"), # Implement methods 175 + K("Alt-Up"): K("C-w"), # Extend selection 176 + K("Alt-Down"): K("C-Shift-w"), # Shrink selection 177 + K("Super-Shift-q"): K("Alt-q"), # Context info 178 + K("Super-Alt-o"): K("C-Alt-o"), # Optimize imports 179 + K("Super-Alt-i"): K("C-Alt-i"), # Auto-indent line(s) 180 + K("C-Backspace"): K("C-y"), # Delete line at caret 181 + K("Super-Shift-j"): K("C-Shift-j"), # Smart line join 182 + K("Alt-Delete"): K("C-Delete"), # Delete to word end 183 + K("Alt-Backspace"): K("C-Backspace"), # Delete to word start 184 + K("C-Shift-Equal"): K("C-KPPLUS"), # Expand code block 185 + K("C-Minus"): K("C-KPMINUS"), # Collapse code block 186 + K("C-Shift-Equal"): K("C-Shift-KPPLUS"), # Expand all 187 + K("C-Shift-Minus"): K("C-Shift-KPMINUS"), # Collapse all 188 + K("C-w"): K("C-F4"), # Close active editor tab 189 + # Refactoring 190 + K("C-Delete"): K("Alt-Delete"), # Safe Delete 191 + K("C-T"): K("C-Alt-Shift-t"), # Refactor this 192 + # Navigation 193 + K("C-o"): K("C-n"), # Go to class 194 + K("C-Shift-o"): K("C-Shift-n"), # Go to file 195 + K("C-Alt-o"): K("C-Alt-Shift-n"), # Go to symbol 196 + K("Super-Right"): K("Alt-Right"), # Go to next editor tab 197 + K("Super-Left"): K("Alt-Left"), # Go to previous editor tab 198 + K("C-l"): K("C-g"), # Go to line 199 + K("Alt-Space"): K("C-Shift-i"), # Open quick definition lookup 200 + K("C-Y"): K("C-Shift-i"), # Open quick definition lookup 201 + K("Super-Shift-b"): K("C-Shift-b"), # Go to type declaration 202 + K("Super-Up"): K("Alt-Up"), # Go to previous 203 + K("Super-Down"): K("Alt-Down"), # Go to next method 204 + K("Super-h"): K("C-h"), # Type hierarchy 205 + K("Super-Alt-h"): K("C-Alt-h"), # Call hierarchy 206 + K("C-Down"): K("C-Enter"), # Edit source/View source 207 + K("Alt-Home"): K("Alt-Home"), # Show navigation bar 208 + K("F2"): K("F11"), # Toggle bookmark 209 + K("Super-F3"): K("C-F11"), # Toggle bookmark with mnemonic 210 + K("Super-Key_0"): K("C-Key_0"), # Go to numbered bookmark 211 + K("Super-Key_1"): K("C-Key_1"), # Go to numbered bookmark 212 + K("Super-Key_2"): K("C-Key_2"), # Go to numbered bookmark 213 + K("Super-Key_3"): K("C-Key_3"), # Go to numbered bookmark 214 + K("Super-Key_4"): K("C-Key_4"), # Go to numbered bookmark 215 + K("Super-Key_5"): K("C-Key_5"), # Go to numbered bookmark 216 + K("Super-Key_6"): K("C-Key_6"), # Go to numbered bookmark 217 + K("Super-Key_7"): K("C-Key_7"), # Go to numbered bookmark 218 + K("Super-Key_8"): K("C-Key_8"), # Go to numbered bookmark 219 + K("Super-Key_9"): K("C-Key_9"), # Go to numbered bookmark 220 + K("C-F3"): K("Shift-F11"), # Show bookmarks 221 + # Compile and Run 222 + K("Super-Alt-r"): K("Alt-Shift-F10"), # Select configuration and run 223 + K("Super-Alt-d"): K("Alt-Shift-F9"), # Select configuration and debug 224 + K("Super-r"): K("Shift-F10"), # Run 225 + K("Super-d"): K("Shift-F9"), # Debug 226 + K("Super-Shift-r"): K("C-Shift-F10"), # Run context configuration from editor 227 + K("Super-Shift-d"): K("C-Shift-F9"), # Debug context configuration from editor 228 + # VCS/Local History 229 + K("Super-v"): K("Alt-Grave"), # VCS quick popup 230 + K("Super-c"): K("LC-c"), # Sigints - interrupt 231 + },"Jetbrains") 232 + 233 + ############################################## 234 + ### START OF FILE MANAGER GROUP OF KEYMAPS ### 235 + ############################################## 236 + 237 + # Keybindings overrides for Caja 238 + # (overrides some bindings from general file manager code block below) 239 + define_keymap(re.compile("^caja$", re.IGNORECASE),{ 240 + # K("RC-Super-o"): K("RC-Shift-Enter"), # Open in new tab 241 + K("RC-Super-o"): K("RC-Shift-W"), # Open in new window 242 + },"Overrides for Caja - Finder Mods") 243 + 244 + # Keybindings overrides for DDE (Deepin) File Manager 245 + # (overrides some bindings from general file manager code block below) 246 + define_keymap(re.compile("^dde-file-manager$", re.IGNORECASE),{ 247 + K("RC-i"): K("RC-i"), # File properties dialog (Get Info) 248 + K("RC-comma"): None, # Disable preferences shortcut (no shortcut available) 249 + K("RC-Up"): K("RC-Up"), # Go Up dir 250 + K("RC-Shift-Left_Brace"): K("C-Shift-Tab"), # Go to prior tab 251 + K("RC-Shift-Right_Brace"): K("C-Tab"), # Go to next tab 252 + K("RC-Shift-Left"): K("C-Shift-Tab"), # Go to prior tab 253 + K("RC-Shift-Right"): K("C-Tab"), # Go to next tab 254 + },"Overrides for DDE File Manager - Finder Mods") 255 + 256 + # Keybindings overrides for Dolphin 257 + # (overrides some bindings from general file manager code block below) 258 + define_keymap(re.compile("^dolphin$", re.IGNORECASE),{ 259 + K("RC-KEY_2"): K("C-KEY_3"), # View as List (Detailed) 260 + K("RC-KEY_3"): K("C-KEY_2"), # View as List (Compact) 261 + ########################################################################################## 262 + ### "Open in new window" requires manually setting custom shortcut of Ctrl+Shift+o 263 + ### in Dolphin's keyboard shortcuts. There is no default shortcut set for this function. 264 + ########################################################################################## 265 + ### "Open in new tab" requires manually setting custom shortcut of Ctrl+Shift+o in 266 + ### Dolphin's keyboard shortcuts. There is no default shortcut set for this function. 267 + ########################################################################################## 268 + K("RC-Super-o"): K("RC-Shift-o"), # Open in new window (or new tab, user's choice, see above) 269 + K("RC-Shift-N"): K("F10"), # Create new folder 270 + K("RC-comma"): K("RC-Shift-comma"), # Open preferences dialog 271 + },"Overrides for Dolphin - Finder Mods") 272 + 273 + # Keybindings overrides for elementary OS Files (Pantheon) 274 + # (overrides some bindings from general file manager code block below) 275 + define_keymap(re.compile("^io.elementary.files$", re.IGNORECASE),{ 276 + # K("RC-Super-o"): K("Shift-Enter"), # Open folder in new tab 277 + K("RC-comma"): None, # Disable preferences shortcut since none available 278 + },"Overrides for Pantheon - Finder Mods") 279 + 280 + # Keybindings overrides for Nautilus 281 + # (overrides some bindings from general file manager code block below) 282 + define_keymap(re.compile("^org.gnome.nautilus$|^nautilus$", re.IGNORECASE),{ 283 + # K("RC-N"): K("C-Alt-Space"), # macOS Finder search window shortcut Cmd+Option+Space 284 + # For this ^^^^^^^^^^^ to work, a custom shortcut must be set up in the Settings app in GNOME 285 + # to run command: "nautilus --new-window /home/USER" [ replace "USER" ] 286 + K("RC-KEY_1"): K("C-KEY_2"), # View as Icons 287 + K("RC-KEY_2"): K("C-KEY_1"), # View as List (Detailed) 288 + K("RC-Super-o"): K("Shift-Enter"), # Open in new window 289 + # K("RC-Super-o"): K("RC-Enter"), # Open in new tab 290 + K("RC-comma"): K("RC-comma"), # Overrides "Open preferences dialog" shortcut below 291 + },"Overrides for Nautilus - Finder Mods") 292 + 293 + # Keybindings overrides for PCManFM and PCManFAlt-Qt 294 + # (overrides some bindings from general file manager code block below) 295 + define_keymap(re.compile("^pcmanfm$|^pcmanfm-qt$", re.IGNORECASE),{ 296 + K("RC-KEY_2"): K("C-KEY_4"), # View as List (Detailed) [Not in PCManFAlt-Qt] 297 + K("RC-Backspace"): [K("Delete"),K("Enter")], # Move to Trash (delete, bypass dialog) 298 + },"Overrides for PCManFM - Finder Mods") 299 + 300 + # Keybindings overrides for SpaceFM 301 + # (overrides some bindings from general file manager code block below) 302 + define_keymap(re.compile("^spacefm$", re.IGNORECASE),{ 303 + K("RC-Page_Up"): K("C-Shift-Tab"), # Go to prior tab 304 + K("RC-Page_Down"): K("C-Tab"), # Go to next tab 305 + K("RC-Shift-Left_Brace"): K("C-Shift-Tab"), # Go to prior tab 306 + K("RC-Shift-Right_Brace"): K("C-Tab"), # Go to next tab 307 + K("RC-Shift-Left"): K("C-Shift-Tab"), # Go to prior tab 308 + K("RC-Shift-Right"): K("C-Tab"), # Go to next tab 309 + K("RC-Shift-N"): K("RC-F"), # Create new folder is Ctrl+F by default 310 + K("RC-Backspace"): [K("Delete"),K("Enter")], # Move to Trash (delete, bypass dialog) 311 + K("RC-comma"): [K("Alt-V"),K("p")], # Overrides "Open preferences dialog" shortcut below 312 + # This shortcut ^^^^^^^^^^^^^^^ is not fully working in SpaceFM. Opens "View" menu but not Preferences. 313 + # SpaceFM seems to be doing some nasty binding that blocks things like Alt+Tab while the menu is open. 314 + },"Overrides for SpaceFM - Finder Mods") 315 + 316 + # Keybindings overrides for Thunar 317 + # (overrides some bindings from general file manager code block below) 318 + define_keymap(re.compile("^thunar$", re.IGNORECASE),{ 319 + K("RC-Super-o"): K("RC-Shift-P"), # Open in new tab 320 + K("RC-comma"): [K("Alt-E"),K("E")], # Overrides "Open preferences dialog" shortcut below 321 + },"Overrides for Thunar - Finder Mods") 322 + 323 + filemanagers = [ 324 + "caja", 325 + "cutefish-filemanager", 326 + "dde-file-manager", 327 + "dolphin", 328 + "io.elementary.files", 329 + "nautilus", 330 + "nemo", 331 + "org.gnome.nautilus", 332 + "pcmanfm", 333 + "pcmanfm-qt", 334 + "spacefm", 335 + "thunar", 336 + ] 337 + filemanagers = [filemanager.casefold() for filemanager in filemanagers] 338 + filemanagerStr = "|".join(str('^'+x+'$') for x in filemanagers) 339 + 340 + # Currently supported Linux file managers (file browsers): 341 + # 342 + # Caja File Browser (MATE file manager, fork of Nautilus) 343 + # DDE File Manager (Deepin Linux file manager) 344 + # Dolphin (KDE file manager) 345 + # Nautilus (GNOME file manager, may be named "Files") 346 + # Nemo (Cinnamon file manager, fork of Nautilus, may be named "Files") 347 + # Pantheon Files (elementary OS file manager, may be named "Files") 348 + # PCManFM (LXDE file manager) 349 + # PCManFAlt-Qt (LXQt file manager) 350 + # SpaceFM (Fork of PCManFM file manager) 351 + # Thunar File Manager (Xfce file manager) 352 + # 353 + # Keybindings for general Linux file managers group: 354 + define_keymap(re.compile(filemanagerStr, re.IGNORECASE),{ 355 + ########################################################################################################### 356 + ### Show Properties (Get Info) | Open Settings/Preferences | Show/Hide hidden files ### 357 + ########################################################################################################### 358 + K("RC-i"): K("Alt-Enter"), # File properties dialog (Get Info) 359 + K("RC-comma"): [K("Alt-E"),K("N")], # Open preferences dialog 360 + K("RC-Shift-dot"): K("RC-H"), # Show/hide hidden files ("dot" files) 361 + ########################################################################################################### 362 + ### Navigation ### 363 + ########################################################################################################### 364 + K("RC-Left_Brace"): K("Alt-Left"), # Go Back 365 + K("RC-Right_Brace"): K("Alt-Right"), # Go Forward 366 + K("RC-Left"): K("Alt-Left"), # Go Back 367 + K("RC-Right"): K("Alt-Right"), # Go Forward 368 + K("RC-Up"): K("Alt-Up"), # Go Up dir 369 + # K("RC-Down"): K("Alt-Down"), # Go Down dir (only works on folders) [not universal] 370 + # K("RC-Down"): K("RC-O"), # Go Down dir (open folder/file) [not universal] 371 + K("RC-Down"): K("Enter"), # Go Down dir (open folder/file) [universal] 372 + K("RC-Shift-Left_Brace"): K("C-Page_Up"), # Go to prior tab 373 + K("RC-Shift-Right_Brace"): K("C-Page_Down"), # Go to next tab 374 + K("RC-Shift-Left"): K("C-Page_Up"), # Go to prior tab 375 + K("RC-Shift-Right"): K("C-Page_Down"), # Go to next tab 376 + ########################################################################################################### 377 + ### Open in New Window | Move to Trash | Duplicate file/folder ### 378 + ########################################################################################################### 379 + K("RC-Super-o"): K("RC-Shift-o"), # Open in new window (or tab, depends on FM setup) [not universal] 380 + K("RC-Backspace"): K("Delete"), # Move to Trash (delete) 381 + # K("RC-D"): [K("RC-C"),K("RC-V")], # Duplicate file/folder (Copy, then Paste) [conflicts with "Add Bookmark"] 382 + ########################################################################################################### 383 + ### To enable renaming files with the Enter key, uncomment the two keymapping lines just below this. ### 384 + ### Use Ctrl+Shift+Enter to escape or activate text fields such as "[F]ind" and "[L]ocation" fields. ### 385 + ########################################################################################################### 386 + # K("Enter"): K("F2"), # Rename with Enter key 387 + # K("RC-Shift-Enter"): K("Enter"), # Remap alternative "Enter" key to easily activate/exit text fields 388 + K("RC-Shift-Enter"): K("F2"), # Rename with Cmd+Shift+Enter 389 + },"General File Managers - Finder Mods") 390 + 391 + ############################################ 392 + ### END OF FILE MANAGER GROUP OF KEYMAPS ### 393 + ############################################ 394 + 395 + # Open preferences in browsers 396 + define_keymap(re.compile("^Firefox$", re.IGNORECASE),{ 397 + K("C-comma"): [ 398 + K("Alt-e"), K("n"), 399 + ], 400 + # K("RC-Shift-N"): K("RC-Shift-P"), # Open private window with Ctrl+Shift+N like other browsers 401 + 402 + # Firefox default shortcuts don't seem to work nicely without this 403 + K("RC-Backspace"): [K("Shift-Home"), K("Backspace")], # Delete Entire Line Left of Cursor 404 + K("RC-Delete"): [K("Shift-End"), K("Delete")], # Delete Entire Line Right of Cursor 405 + 406 + K("Super-K"): K("C-K"), 407 + }) 408 + 409 + define_keymap(re.compile(chromeStr, re.IGNORECASE),{ 410 + K("C-comma"): [K("Alt-e"), K("s"),K("Enter")], # Open preferences 411 + K("RC-q"): K("Alt-F4"), # Quit Chrome(s) browsers with Cmd+Q 412 + # K("RC-Left"): K("Alt-Left"), # Page nav: Back to prior page in history (conflict with wordwise) 413 + # K("RC-Right"): K("Alt-Right"), # Page nav: Forward to next page in history (conflict with wordwise) 414 + K("RC-Left_Brace"): K("Alt-Left"), # Page nav: Back to prior page in history 415 + K("RC-Right_Brace"): K("Alt-Right"), # Page nav: Forward to next page in history 416 + }, "Chrome Browsers") 417 + # Opera C-F12 418 + 419 + # Keybindings for General Web Browsers 420 + define_keymap(re.compile(browserStr, re.IGNORECASE),{ 421 + K("RC-Q"): K("RC-Q"), # Close all browsers Instances 422 + K("Alt-RC-I"): K("RC-Shift-I"), # Dev tools 423 + K("Alt-RC-J"): K("RC-Shift-J"), # Dev tools 424 + K("RC-Key_1"): K("Alt-Key_1"), # Jump to Tab #1-#8 425 + K("RC-Key_2"): K("Alt-Key_2"), 426 + K("RC-Key_3"): K("Alt-Key_3"), 427 + K("RC-Key_4"): K("Alt-Key_4"), 428 + K("RC-Key_5"): K("Alt-Key_5"), 429 + K("RC-Key_6"): K("Alt-Key_6"), 430 + K("RC-Key_7"): K("Alt-Key_7"), 431 + K("RC-Key_8"): K("Alt-Key_8"), 432 + K("RC-Key_9"): K("Alt-Key_9"), # Jump to last tab 433 + # Enable Cmd+Shift+Braces for tab navigation 434 + K("RC-Shift-Left_Brace"): K("C-Page_Up"), # Go to prior tab 435 + K("RC-Shift-Right_Brace"): K("C-Page_Down"), # Go to next tab 436 + # Enable Cmd+Option+Left/Right for tab navigation 437 + K("RC-Alt-Left"): K("C-Page_Up"), # Go to prior tab 438 + K("RC-Alt-Right"): K("C-Page_Down"), # Go to next tab 439 + # Enable Ctrl+PgUp/PgDn for tab navigation 440 + K("Super-Page_Up"): K("C-Page_Up"), # Go to prior tab 441 + K("Super-Page_Down"): K("C-Page_Down"), # Go to next tab 442 + # Use Cmd+Braces keys for tab navigation instead of page navigation 443 + # K("C-Left_Brace"): K("C-Page_Up"), 444 + # K("C-Right_Brace"): K("C-Page_Down"), 445 + 446 + # Github saved replies 447 + K("Super-Dot"): K("C-Dot"), 448 + # Emoji picker. This one might be better off as a top-level? 449 + K("C-Super-Dot"): K("Super-Dot"), 450 + 451 + }, "General Web Browsers") 452 + 453 + define_keymap(re.compile("^ulauncher$", re.IGNORECASE),{ 454 + K("RC-Key_1"): K("Alt-Key_1"), # Remap Ctrl+[1-9] and Ctrl+[a-z] to Alt+[1-9] and Alt+[a-z] 455 + K("RC-Key_2"): K("Alt-Key_2"), 456 + K("RC-Key_3"): K("Alt-Key_3"), 457 + K("RC-Key_4"): K("Alt-Key_4"), 458 + K("RC-Key_5"): K("Alt-Key_5"), 459 + K("RC-Key_6"): K("Alt-Key_6"), 460 + K("RC-Key_7"): K("Alt-Key_7"), 461 + K("RC-Key_8"): K("Alt-Key_8"), 462 + K("RC-Key_9"): K("Alt-Key_9"), 463 + K("RC-Key_0"): K("Alt-Key_0"), 464 + # K("RC-a"): K("Alt-a"), 465 + K("RC-b"): K("Alt-b"), 466 + # K("RC-c"): K("Alt-c"), 467 + K("RC-d"): K("Alt-d"), 468 + K("RC-e"): K("Alt-e"), 469 + K("RC-f"): K("Alt-f"), 470 + K("RC-g"): K("Alt-g"), 471 + K("RC-h"): K("Alt-h"), 472 + }, "Ulauncher") 473 + 474 + # Note: terminals extends to remotes as well 475 + define_keymap(lambda wm_class: wm_class.casefold() not in (terminals + mscodes),{ 476 + K("RC-Dot"): K("Esc"), # Mimic macOS Cmd+dot = Escape key (not in terminals) 477 + }) 478 + 479 + # Tab navigation overrides for apps that use Ctrl+Shift+Tab/Ctrl+Tab instead of Ctrl+PgUp/PgDn 480 + define_keymap(re.compile("^org.gnome.Console$|^Kgx$|^deepin-terminal$|^Angry*IP*Scanner$|^jDownloader$", re.IGNORECASE),{ 481 + ### Tab navigation 482 + K("RC-Shift-Left_Brace"): K("C-Shift-Tab"), # Tab nav: Go to prior tab (left) 483 + K("RC-Shift-Right_Brace"): K("C-Tab"), # Tab nav: Go to next tab (right) 484 + K("RC-Shift-Left"): K("C-Shift-Tab"), # Tab nav: Go to prior tab (left) 485 + K("RC-Shift-Right"): K("C-Tab"), # Tab nav: Go to next tab (right) 486 + },"Tab Navigation for apps that want Ctrl+Shift+Tab/Ctrl+Tab") 487 + 488 + # Special overrides for terminals for shortcuts that conflict with General GUI block below. 489 + define_keymap(re.compile(termStr, re.IGNORECASE),{ 490 + K("Alt-Backspace"): K("Alt-Shift-Backspace"), # Wordwise delete word left of cursor in terminals 491 + K("Alt-Delete"): [K("Esc"),K("d")], # Wordwise delete word right of cursor in terminals 492 + K("RC-Backspace"): K("C-u"), # Wordwise delete line left of cursor in terminals 493 + K("RC-Delete"): K("C-k"), # Wordwise delete line right of cursor in terminals 494 + ### Tab navigation 495 + K("RC-Shift-Left"): K("C-Page_Up"), # Tab nav: Go to prior tab (Left) 496 + K("RC-Shift-Right"): K("C-Page_Down"), # Tab nav: Go to next tab (Right) 497 + K("RC-Shift-Right"): K("C-Page_Down"), # Tab nav: Go to next tab (Right) 498 + 499 + # Global shortcut: tile to top. Needs to be before General GUI for some reason 500 + K("RC-LC-Shift-Up"): K("Super-LC-Shift-Up"), 501 + 502 + },"Special overrides for terminals") 503 + 504 + # Custom app-specific shortcuts (defined before General GUI to avoid conflicts) 505 + 506 + define_keymap(re.compile(r"^keepassxc$", re.IGNORECASE),{ 507 + K("Super-H"): K("C-H"), # Show/hide password while typing 508 + 509 + # These seem to work in the search bar, but not in the password entry: 510 + K("Alt-Backspace"): K("C-Backspace"), # Delete word left of cursor 511 + K("Alt-Delete"): K("C-Delete"), # Delete word right of cursor 512 + 513 + # C-U clears the whole line, so use this instead: 514 + K("C-Backspace"): [K("Shift-Home"), K("Backspace")], # Delete Entire Line Left of Cursor 515 + K("C-Delete"): K("C-K"), # Delete Entire Line Right of Cursor 516 + }, "KeepassXC") 517 + 518 + define_keymap(re.compile(emacsStr, re.IGNORECASE),{ 519 + K("RC-C"): K("Super-C"), 520 + K("RC-V"): K("Super-V"), 521 + K("RC-S"): [K("C-x"), K("C-s")], # Cmd+S saves on macOS by default 522 + K("RC-SLASH"): K("Super-SLASH"), 523 + K("RC-BACKSLASH"): K("Super-BACKSLASH"), 524 + K("RC-Shift-BACKSLASH"): K("Super-Shift-BACKSLASH"), 525 + 526 + K("RC-Shift-Left"): K("Super-Shift-Left"), 527 + K("RC-Shift-Right"): K("Super-Shift-Right"), 528 + 529 + # Global shortcuts: tiling / maximize 530 + K("RC-LC-Alt-Left"): K("Super-LC-Alt-Left"), 531 + K("RC-LC-Alt-Right"): K("Super-LC-Alt-Right"), 532 + K("RC-LC-Alt-Up"): K("Super-LC-Alt-Up"), 533 + K("RC-LC-Alt-Down"): K("Super-LC-Alt-Down"), 534 + K("RC-LC-Shift-Up"): K("Super-LC-Shift-Up"), 535 + 536 + # Global shortcuts: switch desktops, media etc 537 + K("LC-Up"): K("Super-Up"), 538 + K("LC-Down"): K("Super-Down"), 539 + K("LC-Left"): K("Super-Left"), 540 + K("LC-Right"): K("Super-Right"), 541 + 542 + K("LC-Shift-Up"): K("Super-Shift-Up"), 543 + K("LC-Shift-Down"): K("Super-Shift-Down"), 544 + K("LC-Shift-Left"): K("Super-Shift-Left"), 545 + K("LC-Shift-Right"): K("Super-Shift-Right"), 546 + 547 + K("LC-Shift-Space"): K("Super-Shift-Space"), 548 + 549 + # completion. C-I == <tab>, I guess? 550 + K("Alt-Tab"): K("C-Alt-i"), 551 + }, "emacs") 552 + 553 + # None referenced here originally 554 + # - but remote clients and VM software ought to be set here 555 + # These are the typical remaps for ALL GUI based apps 556 + define_keymap(lambda wm_class: wm_class.casefold() not in remotes,{ 557 + K("RC-Shift-Left_Brace"): K("C-Page_Up"), # Tab nav: Go to prior (left) tab 558 + K("RC-Shift-Right_Brace"): K("C-Page_Down"), # Tab nav: Go to next (right) tab 559 + K("RC-Space"): K("Alt-F1"), # Default SL - Launch Application Menu (gnome/kde) 560 + K("RC-F3"):K("Super-d"), # Default SL - Show Desktop (gnome/kde,eos) 561 + K("RC-Super-f"):K("Alt-F10"), # Default SL - Maximize app (gnome/kde) 562 + K("RC-Super-f"): K("Super-Page_Up"), # SL - Toggle maximized window state (kde_neon) 563 + # K("Super-Right"):K("C-Alt-Right"), # Default SL - Change workspace (budgie) 564 + # K("Super-Left"):K("C-Alt-Left"), # Default SL - Change workspace (budgie) 565 + K("RC-Q"): K("Alt-F4"), # Default SL - not-popos 566 + K("RC-H"):K("Super-h"), # Default SL - Minimize app (gnome/budgie/popos/fedora) 567 + K("Alt-Tab"): ignore_key, # Default - Cmd Tab - App Switching Default 568 + K("Shift-Alt-Tab"): ignore_key, # Default - Cmd Tab - App Switching Default 569 + K("RC-Tab"): [bind, K("Alt-Tab")], # Default - Cmd Tab - App Switching Default 570 + K("RC-Shift-Tab"): [bind, K("Alt-Shift-Tab")], # Default - Cmd Tab - App Switching Default 571 + K("RC-Grave"): [bind, K("Alt-Grave")], # Default not-xfce4 - Cmd ` - Same App Switching 572 + K("RC-Shift-Grave"): [bind, K("Alt-Shift-Grave")], # Default not-xfce4 - Cmd ` - Same App Switching 573 + # K("RC-Grave"): K("Super-Tab"), # xfce4 Switch within app group 574 + # K("RC-Shift-Grave"): K("Super-Shift-Tab"), # xfce4 Switch within app group 575 + # K("Super-Right"):K("Super-Page_Up"), # SL - Change workspace (ubuntu/fedora) 576 + # K("Super-Left"):K("Super-Page_Down"), # SL - Change workspace (ubuntu/fedora) 577 + # K("Super-Right"):K("Super-C-Up"), # SL - Change workspace (popos) 578 + # K("Super-Left"):K("Super-C-Down"), # SL - Change workspace (popos) 579 + # K("RC-Q"):K("Super-q"), # SL - Close Apps (popos) 580 + # K("RC-Space"): K("Super-Space"), # SL - Launch Application Menu (eos) 581 + K("RC-H"): K("Super-Page_Down"), # SL - Minimize app (kde_neon) 582 + K("RC-M"): K("Super-Page_Down"), # SL - Minimize app (kde_neon) 583 + # SL - Default SL - Change workspace (kde_neon) 584 + # K("RC-Space"): K("LC-Esc"), # SL- Launch Application Menu xfce4 585 + # K("RC-F3"):K("C-Alt-d"), # SL- Show Desktop xfce4 586 + # K("RC-LC-f"):K("Super-Up"), # SL- Maximize app eos 587 + # K("RC-LC-f"):K("Super-PAGE_UP"), # SL- Maximize app manjaro 588 + # Basic App hotkey functions 589 + # K("RC-H"):K("Alt-F9"), # SL - Minimize app xfce4 590 + # K("RC-LC-f"):K("Super-PAGE_DOWN"), # SL - Minimize app manjaro 591 + # In-App Tab switching 592 + # K("Alt-Tab"): K("C-Tab"), # Chromebook/IBM - In-App Tab switching 593 + # K("Alt-Shift-Tab"): K("C-Shift-Tab"), # Chromebook/IBM - In-App Tab switching 594 + # K("Alt-Grave") : K("C-Shift-Tab"), # Chromebook/IBM - In-App Tab switching 595 + K("Super-Tab"): K("LC-Tab"), # Default not-chromebook 596 + K("Super-Shift-Tab"): K("LC-Shift-Tab"), # Default not-chromebook 597 + 598 + # Fn to Alt style remaps 599 + K("RAlt-Enter"): K("insert"), # Insert 600 + 601 + # emacs style 602 + K("Super-a"): K("Home"), # Beginning of Line 603 + K("Super-e"): K("End"), # End of Line 604 + K("Super-b"): K("Left"), 605 + K("Super-f"): K("Right"), 606 + K("Super-n"): K("Down"), 607 + K("Super-p"): K("Up"), 608 + K("Super-k"): [K("Shift-End"), K("Backspace")], 609 + # K("Super-d"): K("Delete"), # Setting this interferes with Ctrl-D vscode binding 610 + 611 + # Minor fix for Japanese IME and switcher 612 + K("Super-J"): K("C-J"), 613 + 614 + # K("Alt-RC-Space"): K(""), # Open Finder - Placeholder 615 + 616 + # Wordwise 617 + K("RC-Left"): K("Home"), # Beginning of Line 618 + K("RC-Shift-Left"): K("Shift-Home"), # Select all to Beginning of Line 619 + K("RC-Right"): K("End"), # End of Line 620 + K("RC-Shift-Right"): K("Shift-End"), # Select all to End of Line 621 + # K("RC-Left"): K("C-LEFT_BRACE"), # Firefox-nw - Back 622 + # K("RC-Right"): K("C-RIGHT_BRACE"), # Firefox-nw - Forward 623 + # K("RC-Left"): K("Alt-LEFT"), # Chrome-nw - Back 624 + # K("RC-Right"): K("Alt-RIGHT"), # Chrome-nw - Forward 625 + K("RC-Up"): K("C-Home"), # Beginning of File 626 + K("RC-Shift-Up"): K("C-Shift-Home"), # Select all to Beginning of File 627 + K("RC-Down"): K("C-End"), # End of File 628 + K("RC-Shift-Down"): K("C-Shift-End"), # Select all to End of File 629 + # K("RAlt-Backspace"): K("Delete"), # Chromebook/IBM - Delete 630 + K("Super-Backspace"): K("C-Backspace"), # Delete Left Word of Cursor 631 + K("Super-Delete"): K("C-Delete"), # Delete Right Word of Cursor 632 + # K("LAlt-Backspace"): K("C-Backspace"), # Chromebook/IBM - Delete Left Word of Cursor 633 + K("Alt-Backspace"): K("C-Backspace"), # Default not-chromebook 634 + K("RC-Backspace"): K("C-Shift-Backspace"), # Delete Entire Line Left of Cursor 635 + K("Alt-Delete"): K("C-Delete"), # Delete Right Word of Cursor 636 + # K(""): ignore_key, # cancel 637 + # K(""): K(""), # 638 + 639 + # This will probably require keyszer to work: 640 + K("Fn-Space"): K("Meta-F12") 641 + }, "General GUI") 642 + 643 + define_keymap(lambda wm_class: wm_class.casefold() not in mscodes,{ 644 + # Wordwise remaining - for Everything but VS Code 645 + K("Alt-Left"): K("C-Left"), # Left of Word 646 + K("Alt-Shift-Left"): K("C-Shift-Left"), # Select Left of Word 647 + K("Alt-Right"): K("C-Right"), # Right of Word 648 + K("Alt-Shift-Right"): K("C-Shift-Right"), # Select Right of Word 649 + K("Alt-Shift-g"): K("C-Shift-g"), # View source control 650 + # ** VS Code fix ** 651 + # Electron issue precludes normal keybinding fix. 652 + # Alt menu auto-focus/toggle gets in the way. 653 + # 654 + # refer to ./xkeysnail-config/vscode_keybindings.json 655 + # ** 656 + # 657 + # ** Firefox fix ** 658 + # User will need to set "ui.key.menuAccessKeyFocuses" 659 + # under about:config to false. 660 + # 661 + # https://superuser.com/questions/770301/pentadactyl-how-to-disable-menu-bar-toggle-by-alt 662 + # ** 663 + # 664 + }, "Wordwise - not vscode") 665 + 666 + # Keybindings for VS Code 667 + define_keymap(re.compile(mscodeStr, re.IGNORECASE),{ 668 + K("Super-Space"): K("LC-Space"), # Basic code completion 669 + # Wordwise remaining - for VS Code 670 + # Alt-F19 hack fixes Alt menu activation 671 + # K("Alt-Left"): [K("Alt-F19"),K("C-Left")], # Left of Word 672 + # K("Alt-Right"): [K("Alt-F19"),K("C-Right")], # Right of Word 673 + # K("Alt-Shift-Left"): [K("Alt-F19"),K("C-Shift-Left")], # Select Left of Word 674 + # K("Alt-Shift-Right"): [K("Alt-F19"),K("C-Shift-Right")], # Select Right of Word 675 + 676 + # K("C-PAGE_DOWN"): ignore_key, # cancel next_view 677 + # K("C-PAGE_UP"): ignore_key, # cancel prev_view 678 + # K("C-Alt-Left"): K("C-PAGE_UP"), # next_view 679 + # K("C-Alt-Right"): K("C-PAGE_DOWN"), # prev_view 680 + K("RC-Shift-Left_Brace"): K("C-PAGE_UP"), # next_view 681 + K("RC-Shift-Right_Brace"): K("C-PAGE_DOWN"), # prev_view 682 + 683 + # VS Code Shortcuts 684 + K("C-g"): ignore_key, # cancel Go to Line... 685 + K("Super-g"): K("C-g"), # Go to Line... 686 + K("F3"): ignore_key, # cancel Find next 687 + K("C-h"): ignore_key, # cancel replace 688 + K("C-Alt-f"): K("C-h"), # replace 689 + K("C-Shift-h"): ignore_key, # cancel replace_next 690 + K("C-Alt-e"): K("C-Shift-h"), # replace_next 691 + K("f3"): ignore_key, # cancel find_next 692 + K("C-g"): K("f3"), # find_next 693 + K("Shift-f3"): ignore_key, # cancel find_prev 694 + K("C-Shift-g"): K("Shift-f3"), # find_prev 695 + # K("Super-c"): K("LC-c"), # Default - Terminal - Sigint 696 + # K("Super-x"): K("LC-x"), # Default - Terminal - Exit nano 697 + # K("Alt-c"): K("LC-c"), # Chromebook/IBM - Terminal - Sigint 698 + # K("Alt-x"): K("LC-x"), # Chromebook/IBM - Terminal - Exit nano 699 + # K("Super-C-g"): K("C-f2"), # Default - Sublime - find_all_under 700 + # K("C-Alt-g"): K("C-f2"), # Chromebook/IBM - Sublime - find_all_under 701 + # K("Super-Shift-up"): K("Alt-Shift-up"), # multi-cursor up - Sublime 702 + # K("Super-Shift-down"): K("Alt-Shift-down"), # multi-cursor down - Sublime 703 + # K(""): ignore_key, # cancel 704 + # K(""): K(""), # 705 + 706 + K("Alt-Space"): K("LC-Space"), # Basic code completion 707 + K("Super-Grave"): K("C-Grave"), # Toggle terminal 708 + K("Super-Shift-Grave"): K("C-Shift-Grave"), # New terminal 709 + 710 + # Terminal shortcuts 711 + K("C-C"): K("Super-C"), 712 + K("C-Z"): K("Super-Z"), 713 + K("C-V"): K("Super-V"), 714 + K("Super-V"): K("C-V"), 715 + K("Super-D"): K("C-D"), 716 + K("RC-Backspace"): K("C-Shift-Backspace"), 717 + K("RC-Delete"): K("C-Shift-Delete"), 718 + 719 + # "Find+replace" vs neovim "redo" 720 + K("C-R"): K("Super-R"), 721 + K("Super-R"): K("C-R"), 722 + 723 + # Select all 724 + K("C-A"): K("Super-A"), 725 + }, "Code") 726 + 727 + # Keybindings for Sublime Text 728 + define_keymap(re.compile(sublimeStr, re.IGNORECASE),{ 729 + # K("Super-c"): K("LC-c"), # Default - Terminal - Sigint 730 + # K("Super-x"): K("LC-x"), # Default - Terminal - Exit nano 731 + # K("Alt-c"): K("LC-c"), # Chromebook/IBM - Terminal - Sigint 732 + # K("Alt-x"): K("LC-x"), # Chromebook/IBM - Terminal - Exit nano 733 + K("Super-Space"): K("C-Space"), # Basic code completion 734 + K("C-Super-up"): K("Alt-o"), # Switch file 735 + K("Super-RC-f"): K("f11"), # toggle_full_screen 736 + K("C-Alt-v"): [K("C-k"), K("C-v")], # paste_from_history 737 + K("C-up"): ignore_key, # cancel scroll_lines up 738 + K("C-Alt-up"): K("C-up"), # scroll_lines up 739 + K("C-down"): ignore_key, # cancel scroll_lines down 740 + K("C-Alt-down"): K("C-down"), # scroll_lines down 741 + K("Super-Shift-up"): K("Alt-Shift-up"), # multi-cursor up 742 + K("Super-Shift-down"): K("Alt-Shift-down"), # multi-cursor down 743 + K("C-PAGE_DOWN"): ignore_key, # cancel next_view 744 + K("C-PAGE_UP"): ignore_key, # cancel prev_view 745 + K("C-Shift-left_brace"): K("C-PAGE_DOWN"), # next_view 746 + K("C-Shift-right_brace"): K("C-PAGE_UP"), # prev_view 747 + K("C-Alt-right"): K("C-PAGE_DOWN"), # next_view 748 + K("C-Alt-left"): K("C-PAGE_UP"), # prev_view 749 + K("insert"): ignore_key, # cancel toggle_overwrite 750 + K("C-Alt-o"): K("insert"), # toggle_overwrite 751 + K("Alt-c"): ignore_key, # cancel toggle_case_sensitive 752 + K("C-Alt-c"): K("Alt-c"), # toggle_case_sensitive 753 + K("C-h"): ignore_key, # cancel replace 754 + K("C-Alt-f"): K("C-h"), # replace 755 + K("C-Shift-h"): ignore_key, # cancel replace_next 756 + K("C-Alt-e"): K("C-Shift-h"), # replace_next 757 + K("f3"): ignore_key, # cancel find_next 758 + K("C-g"): K("f3"), # find_next 759 + K("Shift-f3"): ignore_key, # cancel find_prev 760 + K("C-Shift-g"): K("Shift-f3"), # find_prev 761 + K("C-f3"): ignore_key, # cancel find_under 762 + K("Super-Alt-g"): K("C-f3"), # find_under 763 + K("C-Shift-f3"): ignore_key, # cancel find_under_prev 764 + K("Super-Alt-Shift-g"): K("C-Shift-f3"), # find_under_prev 765 + K("Alt-f3"): ignore_key, # Default - cancel find_all_under 766 + # K("Alt-Refresh"): ignore_key, # Chromebook/IBM - cancel find_all_under 767 + # K("Alt-C-g"): K("Alt-Refresh"), # Chromebook/IBM - find_all_under 768 + K("Super-C-g"): K("Alt-f3"), # Default - find_all_under 769 + K("C-Shift-up"): ignore_key, # cancel swap_line_up 770 + K("Super-Alt-up"): K("C-Shift-up"), # swap_line_up 771 + K("C-Shift-down"): ignore_key, # cancel swap_line_down 772 + K("Super-Alt-down"): K("C-Shift-down"), # swap_line_down 773 + K("C-Pause"): ignore_key, # cancel cancel_build 774 + K("Super-c"): K("C-Pause"), # cancel_build 775 + K("f9"): ignore_key, # cancel sort_lines case_s false 776 + K("f5"): K("f9"), # sort_lines case_s false 777 + K("Super-f9"): ignore_key, # cancel sort_lines case_s true 778 + K("Super-f5"): K("Super-f9"), # sort_lines case_s true 779 + K("Alt-Shift-Key_1"): ignore_key, # cancel set_layout 780 + K("C-Alt-Key_1"): K("Alt-Shift-Key_1"), # set_layout 781 + K("Alt-Shift-Key_2"): ignore_key, # cancel set_layout 782 + K("C-Alt-Key_2"): K("Alt-Shift-Key_2"), # set_layout 783 + K("Alt-Shift-Key_3"): ignore_key, # cancel set_layout 784 + K("C-Alt-Key_3"): K("Alt-Shift-Key_3"), # set_layout 785 + K("Alt-Shift-Key_4"): ignore_key, # cancel set_layout 786 + K("C-Alt-Key_4"): K("Alt-Shift-Key_4"), # set_layout 787 + K("Alt-Shift-Key_8"): ignore_key, # cancel set_layout 788 + K("C-Alt-Shift-Key_2"): K("Alt-Shift-Key_8"), # set_layout 789 + K("Alt-Shift-Key_9"): ignore_key, # cancel set_layout 790 + K("C-Alt-Shift-Key_3"): K("Alt-Shift-Key_9"), # set_layout 791 + K("Alt-Shift-Key_5"): ignore_key, # cancel set_layout 792 + K("C-Alt-Shift-Key_5"): K("Alt-Shift-Key_5"), # set_layout 793 + # K(""): ignore_key, # cancel 794 + # K(""): K(""), # 795 + }, "Sublime Text") 796 + 797 + define_keymap(re.compile("^konsole$", re.IGNORECASE),{ 798 + # Ctrl Tab - In App Tab Switching 799 + K("LC-Tab") : K("Shift-Right"), 800 + K("LC-Shift-Tab") : K("Shift-Left"), 801 + K("LC-Grave") : K("Shift-Left"), 802 + 803 + }, "Konsole tab switching") 804 + 805 + define_keymap(re.compile("^Io.elementary.terminal$|^kitty$", re.IGNORECASE),{ 806 + # Ctrl Tab - In App Tab Switching 807 + K("LC-Tab") : K("LC-Shift-Right"), 808 + K("LC-Shift-Tab") : K("LC-Shift-Left"), 809 + K("LC-Grave") : K("LC-Shift-Left"), 810 + 811 + }, "Elementary Terminal tab switching") 812 + 813 + define_keymap(re.compile("^deepin-terminal$", re.IGNORECASE),{ 814 + K("RC-w"): K("Alt-w"), # Close only current tab, instead of all other tabs 815 + K("RC-j"): None, # Block Cmd+J from remapping to vertical split (Ctrl+Shift+J) 816 + K("RC-minus"): K("C-minus"), # Decrease font size/zoom out 817 + K("RC-equal"): K("C-equal"), # Increase font size/zoom in 818 + },"Deepin Terminal fixes") 819 + 820 + define_keymap(re.compile("alacritty", re.IGNORECASE),{ 821 + K("RC-K"): K("C-L"), # clear log 822 + }) 823 + 824 + define_keymap(re.compile(termStr, re.IGNORECASE),{ 825 + K("LC-RC-f"): K("Alt-F10"), # Toggle window maximized state 826 + # K("RC-Grave"): K("Super-Tab"), # xfce4 Switch within app group 827 + # K("RC-Shift-Grave"): K("Super-Shift-Tab"), # xfce4 Switch within app group 828 + # K("LC-Right"):K("C-Alt-Right"), # Default SL - Change workspace (budgie) 829 + # K("LC-Left"):K("C-Alt-Left"), # Default SL - Change workspace (budgie) 830 + # K("LC-Left"):K("C-Alt-End"), # SL - Change workspace xfce4 831 + # K("LC-Left"):K("Super-Left"), # SL - Change workspace eos 832 + # K("LC-Right"):K("C-Alt-Home"), # SL - Change workspace xfce4 833 + # K("LC-Right"):K("Super-Right"), # SL - Change workspace eos 834 + # K("LC-Right"):K("Super-Page_Up"), # SL - Change workspace (ubuntu/fedora) 835 + # K("LC-Left"):K("Super-Page_Down"), # SL - Change workspace (ubuntu/fedora) 836 + # K("LC-Right"):K("Super-C-Up"), # SL - Change workspace (popos) 837 + # K("LC-Left"):K("Super-C-Down"), # SL - Change workspace (popos) 838 + # Ctrl Tab - In App Tab Switching 839 + K("LC-Tab") : K("LC-PAGE_DOWN"), 840 + K("LC-Shift-Tab") : K("LC-PAGE_UP"), 841 + K("LC-Grave") : K("LC-PAGE_UP"), 842 + # K("Alt-Tab"): ignore_key, # Default - Cmd Tab - App Switching Default 843 + # K("RC-Tab"): K("Alt-Tab"), # Default - Cmd Tab - App Switching Default 844 + # K("RC-Shift-Tab"): K("Alt-Shift-Tab"), # Default - Cmd Tab - App Switching Default Converts Cmd to use Ctrl-Shift K("RC-MINUS"): K("C-MINUS"), 845 + K("RC-EQUAL"): K("C-Shift-EQUAL"), 846 + K("RC-BACKSPACE"): K("C-Shift-BACKSPACE"), 847 + K("RC-W"): K("C-Shift-W"), 848 + K("RC-E"): K("C-Shift-E"), 849 + K("RC-R"): K("C-Shift-R"), 850 + K("RC-T"): K("C-Shift-t"), 851 + K("RC-Y"): K("C-Shift-Y"), 852 + K("RC-U"): K("C-Shift-U"), 853 + K("RC-I"): K("C-Shift-I"), 854 + K("RC-O"): K("C-Shift-O"), 855 + K("RC-P"): K("C-Shift-P"), 856 + K("RC-LEFT_BRACE"): K("C-Shift-LEFT_BRACE"), 857 + K("RC-RIGHT_BRACE"): K("C-Shift-RIGHT_BRACE"), 858 + K("RC-Shift-Left_Brace"): K("C-Page_Up"), # Go to prior tab (Left) 859 + K("RC-Shift-Right_Brace"): K("C-Page_Down"), # Go to next tab (Right) 860 + K("RC-A"): K("C-Shift-A"), 861 + K("RC-S"): K("C-Shift-S"), 862 + K("RC-D"): K("C-Shift-D"), 863 + K("RC-F"): K("C-Shift-F"), 864 + K("RC-G"): K("C-Shift-G"), 865 + K("RC-H"): K("C-Shift-H"), 866 + K("RC-J"): K("C-Shift-J"), 867 + K("RC-K"): K("C-Shift-K"), 868 + K("RC-L"): K("C-Shift-L"), 869 + K("RC-APOSTROPHE"): K("C-Shift-APOSTROPHE"), 870 + K("RC-GRAVE"): K("C-Shift-GRAVE"), 871 + K("RC-Z"): K("C-Shift-Z"), 872 + K("RC-X"): K("C-Shift-X"), 873 + K("RC-C"): K("C-Shift-C"), 874 + K("RC-V"): K("C-Shift-V"), 875 + K("RC-B"): K("C-Shift-B"), 876 + K("RC-N"): K("C-Shift-N"), 877 + K("RC-M"): K("C-Shift-M"), 878 + K("RC-COMMA"): K("C-Shift-COMMA"), 879 + K("RC-Dot"): K("LC-c"), 880 + K("RC-SLASH"): K("C-Shift-SLASH"), 881 + K("RC-KPASTERISK"): K("C-Shift-KPASTERISK"), 882 + 883 + # Move pane focus 884 + K("Super-Alt-Left"): K("LC-Alt-Left"), 885 + K("Super-Alt-Right"): K("LC-Alt-Right"), 886 + K("Super-Alt-Up"): K("LC-Alt-Up"), 887 + K("Super-Alt-Down"): K("LC-Alt-Down"), 888 + 889 + # Global shortcut: IME switch input method 890 + K("RC-SEMICOLON"): K("C-SEMICOLON"), 891 + 892 + # Global shortcuts: tiling / maximize 893 + K("RC-LC-Alt-Left"): K("Super-LC-Alt-Left"), 894 + K("RC-LC-Alt-Right"): K("Super-LC-Alt-Right"), 895 + K("RC-LC-Alt-Up"): K("Super-LC-Alt-Up"), 896 + K("RC-LC-Alt-Down"): K("Super-LC-Alt-Down"), 897 + 898 + # Global shortcuts: switch desktops, media etc 899 + K("LC-Up"): K("Super-Up"), 900 + K("LC-Down"): K("Super-Down"), 901 + K("LC-Left"): K("Super-Left"), 902 + K("LC-Right"): K("Super-Right"), 903 + 904 + K("LC-Shift-Up"): K("Super-Shift-Up"), 905 + K("LC-Shift-Down"): K("Super-Shift-Down"), 906 + K("LC-Shift-Left"): K("Super-Shift-Left"), 907 + K("LC-Shift-Right"): K("Super-Shift-Right"), 908 + 909 + K("LC-Shift-Space"): K("Super-Shift-Space"), 910 + }, "terminals") 911 + 912 + keymap( 913 + "Steam Big Picture", 914 + { 915 + K("Meta-1"): K("C-1"), 916 + K("Meta-2"): K("C-1"), 917 + }, 918 + when = lambda ctx: ctx.wm_name == "Steam Big Picture Mode", 919 + )