|
249 | 249 | K("Super-c"): K("LC-c"), # Sigints - interrupt
|
250 | 250 | },"Jetbrains")
|
251 | 251 |
|
252 |
| -# Keybindings for Nautilus |
253 |
| -define_keymap(re.compile("org.gnome.nautilus", re.IGNORECASE),{ |
254 |
| - K("RC-Up"): K("M-Up"), # Go Up dir |
255 |
| - K("RC-Down"): K("M-Down"), # Go Down dir |
256 |
| - K("RC-Left"): K("M-Left"), # Go Back |
257 |
| - K("RC-Right"): K("M-Right"), # Go Forward |
258 |
| -},"Nautilus - Finder") |
| 252 | +############################################## |
| 253 | +### START OF FILE MANAGER GROUP OF KEYMAPS ### |
| 254 | +############################################## |
| 255 | + |
| 256 | +# Keybindings overrides for Caja |
| 257 | +# (overrides some bindings from general file manager code block below) |
| 258 | +define_keymap(re.compile("caja", re.IGNORECASE),{ |
| 259 | + # K("RC-Super-o"): K("RC-Shift-Enter"), # Open in new tab |
| 260 | + K("RC-Super-o"): K("RC-Shift-W"), # Open in new window |
| 261 | +},"Overrides for Caja - Finder") |
| 262 | + |
| 263 | +# Keybindings overrides for DDE (Deepin) File Manager |
| 264 | +# (overrides some bindings from general file manager code block below) |
| 265 | +define_keymap(re.compile("dde-file-manager", re.IGNORECASE),{ |
| 266 | + K("RC-i"): K("RC-i"), # File properties dialog (Get Info) |
| 267 | + K("RC-comma"): K("RC-comma"), # Open preferences dialog (doesn't work, no shortcut available?) |
| 268 | + K("RC-Up"): K("RC-Up"), # Go Up dir |
| 269 | +},"Overrides for DDE File Manager - Finder") |
| 270 | + |
| 271 | +# Keybindings overrides for Dolphin |
| 272 | +# (overrides some bindings from general file manager code block below) |
| 273 | +define_keymap(re.compile("dolphin", re.IGNORECASE),{ |
| 274 | + K("RC-Super-o"): K("RC-Shift-o"), # Open in new window (or new tab, user's choice) |
| 275 | + # "Open in new window" requires manually setting custom shortcut of Ctrl+Shift+o |
| 276 | + # in Dolphin's keyboard shortcuts. There is no default shortcut set for this function. |
| 277 | + ### |
| 278 | + # "Open in new tab" requires manually setting custom shortcut of Ctrl+Shift+o in |
| 279 | + # Dolphin's keyboard shortcuts. There is no default shortcut set for this function. |
| 280 | + ### |
| 281 | + K("RC-Shift-N"): K("F10"), # Create new folder |
| 282 | + K("RC-comma"): K("RC-Shift-comma"), # Open preferences dialog |
| 283 | +},"Overrides for Dolphin - Finder") |
| 284 | + |
| 285 | +# Keybindings overrides for elementary OS Files |
| 286 | +# (overrides some bindings from general file manager code block below) |
| 287 | +define_keymap(re.compile("io.elementary.files", re.IGNORECASE),{ |
| 288 | + # K("RC-Super-o"): K("Shift-Enter"), # Open folder in new tab |
| 289 | + K("RC-Comma"): None, # Disable preferences shortcut since none availabe |
| 290 | +},"Overrides for Pantheon - Finder") |
| 291 | + |
| 292 | +# Keybindings overrides for Nautilus |
| 293 | +# (overrides some bindings from general file manager code block below) |
| 294 | +define_keymap(re.compile("org.gnome.nautilus|nautilus", re.IGNORECASE),{ |
| 295 | + K("RC-Super-o"): K("Shift-Enter"), # Open in new window |
| 296 | + # K("RC-Super-o"): K("RC-Enter"), # Open in new tab |
| 297 | + K("RC-comma"): K("RC-comma"), # Overrides "Open preferences dialog" shortcut below |
| 298 | +},"Overrides for Nautilus - Finder") |
| 299 | + |
| 300 | +# Keybindings overrides for PCManFM |
| 301 | +# (overrides some bindings from general file manager code block below) |
| 302 | +define_keymap(re.compile("pcmanfm", re.IGNORECASE),{ |
| 303 | + K("RC-Backspace"): [K("Delete"),K("Enter")], # Move to Trash (delete, bypass dialog) |
| 304 | +},"Overrides for PCManFM - Finder") |
| 305 | + |
| 306 | +# Keybindings overrides for SpaceFM |
| 307 | +# (overrides some bindings from general file manager code block below) |
| 308 | +define_keymap(re.compile("spacefm", re.IGNORECASE),{ |
| 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("M-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") |
| 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("M-E"),K("E")], # Overrides "Open preferences dialog" shortcut below |
| 321 | +},"Overrides for Thunar - Finder") |
| 322 | + |
| 323 | +filemanagers = [ |
| 324 | + "caja", |
| 325 | + "dde-file-manager", |
| 326 | + "dolphin", |
| 327 | + "io.elementary.files", |
| 328 | + "nautilus", |
| 329 | + "nemo", |
| 330 | + "org.gnome.nautilus", |
| 331 | + "pcmanfm", |
| 332 | + "pcmanfm-qt", |
| 333 | + "spacefm", |
| 334 | + "thunar", |
| 335 | +] |
| 336 | +filemanagers = [filemanager.casefold() for filemanager in filemanagers] |
| 337 | +filemanagerStr = "|".join(str(x) for x in filemanagers) |
| 338 | + |
| 339 | +# Currently supported Linux file managers (file browsers): |
| 340 | +# |
| 341 | +# Caja File Browser (MATE file manager, fork of Nautilus) |
| 342 | +# DDE File Manager (Deepin Linux file manager) |
| 343 | +# Dolphin (KDE file manager) |
| 344 | +# Nautilus (GNOME file manager, may be named "Files") |
| 345 | +# Nemo (Cinnamon file manager, fork of Nautilus, may be named "Files") |
| 346 | +# Pantheon Files (elementary OS file manager, may be named "Files") |
| 347 | +# PCManFM (LXDE file manager) |
| 348 | +# PCManFM-Qt (LXQt file manager) |
| 349 | +# SpaceFM (Fork of PCManFM file manager) |
| 350 | +# Thunar File Manager (Xfce file manager) |
| 351 | +# |
| 352 | +# Keybindings for general Linux file managers group: |
| 353 | +define_keymap(re.compile(filemanagerStr, re.IGNORECASE),{ |
| 354 | + ########################################################################################################### |
| 355 | + ### Show Properties (Get Info) | Open Settings/Preferences | Show/Hide hidden files ### |
| 356 | + ########################################################################################################### |
| 357 | + K("RC-i"): K("M-Enter"), # File properties dialog (Get Info) |
| 358 | + K("RC-comma"): [K("M-E"),K("N")], # Open preferences dialog |
| 359 | + K("RC-Shift-dot"): K("RC-H"), # Show/hide hidden files ("dot" files) |
| 360 | + ########################################################################################################### |
| 361 | + ### Navigation ### |
| 362 | + ########################################################################################################### |
| 363 | + K("RC-Left"): K("M-Left"), # Go Back |
| 364 | + K("RC-Right"): K("M-Right"), # Go Forward |
| 365 | + K("RC-Up"): K("M-Up"), # Go Up dir |
| 366 | + # K("RC-Down"): K("M-Down"), # Go Down dir (only works on folders) [not universal] |
| 367 | + # K("RC-Down"): K("RC-O"), # Go Down dir (open folder/file) [not universal] |
| 368 | + K("RC-Down"): K("Enter"), # Go Down dir (open folder/file) [universal] |
| 369 | + ########################################################################################################### |
| 370 | + ### Open in New Window | Move to Trash | Duplicate file/folder ### |
| 371 | + ########################################################################################################### |
| 372 | + K("RC-Super-o"): K("RC-Shift-o"), # Open in new window (or tab, depends on FM setup) [not universal] |
| 373 | + K("RC-Backspace"): K("Delete"), # Move to Trash (delete) |
| 374 | + K("RC-D"): [K("RC-C"),K("RC-V")], # Mimic Finder's Duplicate command (Copy, then Paste) |
| 375 | + ########################################################################################################### |
| 376 | + ### To enable renaming files with the Enter key, uncomment the two keymapping lines just below this. ### |
| 377 | + ### Use Ctrl+Shift+Enter to escape or activate text fields such as "[F]ind" and "[L]ocation" fields. ### |
| 378 | + ########################################################################################################### |
| 379 | + # K("Enter"): K("F2"), # Rename with Enter key |
| 380 | + # K("RC-Shift-Enter"): K("Enter"), # Remap alternative "Enter" key to easily activate/exit text fields |
| 381 | +},"File Managers - Finder") |
| 382 | + |
| 383 | +############################################ |
| 384 | +### END OF FILE MANAGER GROUP OF KEYMAPS ### |
| 385 | +############################################ |
259 | 386 |
|
260 | 387 | # Keybindings for Browsers
|
261 | 388 | define_keymap(re.compile(browserStr, re.IGNORECASE),{
|
|
0 commit comments