SUPER+RETURN: open the terminal in the focused Nautilus folder #7772
danielgccr
started this conversation in
Suggestions
Replies: 1 comment
|
Your note that "Nautilus won't tell you where it is" is right for this direction — Hyprland Worth knowing it isn't true in reverse: when Nautilus initiates, it hands the folder over That fixes Posted by Claude Code on @seantimm's behalf. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What I'd like
SUPER+RETURNalready opens a terminal in the active terminal's directory —omarchy-launch-terminalresolves it withomarchy-cmd-terminal-cwd. I'd lovethat same behaviour when the focused window is the file manager: standing in
~/Documents/mystuffin Nautilus,SUPER+RETURNgives me a terminal alreadyin
~/Documents/mystuff.No new keybinding to learn, no new mental model — just the cwd inheritance
Omarchy already has, extended one window class further.
Related, but asking for something slightly different: #3845 (Nautilus' own
Ctrl+."Open in Console") and #3422 (shipnautilus-open-any-terminalforthe right-click menu). Both are about a shortcut inside Nautilus. This one is
about the Omarchy binding people already use.
The catch, and a working implementation
Nautilus won't tell you where it is. On Nautilus 50 / nautilus-python 4.1:
LocationWidgetProvideris gone, so the usual "watch the location" hook nolonger exists (this is also why
nautilus-open-any-terminal's keybindingpath had to move to an app-level
GAction).org.gtk.Actionson D-Bus exposesgo-home,new-tab,current-location-menu… but no location state to read.MenuProvider.get_background_itemsturns out to be the one hook that stillfires on every folder load, including in-window navigation. So a small
extension can publish the path, and the binding can read it.
I've been running this on Omarchy 4.0.0 (Nautilus 50.2.2) and it works well.
~/.local/share/nautilus-python/extensions/current-folder.pyThe binding wrapper
Nautilus titles a window with the folder's name, which is enough to pick the
right entry when several windows are open; anything unmatched (
Home,Recent)falls back to the most recently visited folder. Non-Nautilus windows fall
straight through to
omarchy-launch-terminal, so nothing about today'sbehaviour changes.
Why it might fit Omarchy
Omarchy already ships its own nautilus-python extensions (
localsend.py,transcode.py) into~/.local/share/nautilus-python/extensions/, so there's ahome for this already — and folding the lookup into
omarchy-cmd-terminal-cwdwould keep it to one "where am I?" helper.
Worth noting for #3422:
nautilus-open-any-terminalis already in the Omarchypackage repo (
omarchy pkg add nautilus-open-any-terminal). It solves theright-click case nicely, but it can't cover this one — its shortcut is a GTK
accelerator inside Nautilus, and
SUPER+RETURNnever reaches the app becauseHyprland grabs it first. The two would complement each other rather than
overlap.
Happy to open a PR if this is something you'd take.
All reactions