Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update warp terminal open_local_terminal_in_uri functionality #214

Merged
merged 2 commits into from
Jan 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions nautilus_open_any_terminal/nautilus_open_any_terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ class Terminal:
"urxvt": Terminal("rxvt-unicode"),
"urxvtc": Terminal("urxvtc"),
"uxterm": Terminal("UXTerm"),
"warp": Terminal("warp"),
"warp": Terminal(
"Warp",
new_tab_arguments=["--virtual-arg-for-tabs"], # This is just to indicate tab support
),
"wezterm": Terminal(
"Wez's Terminal Emulator",
workdir_arguments=["--cwd"],
Expand Down Expand Up @@ -235,8 +238,9 @@ def open_local_terminal_in_uri(uri: str):
result = urlparse(uri)
cmd = terminal_cmd.copy()
if terminal == "warp":
# Force new_tab to be considered even without traditional tab arguments
Popen( # pylint: disable=consider-using-with
["xdg-open", f'warp://action/new_{"tab" if new_tab else "window"}?path={result.path}']
["xdg-open", f"warp://action/new_{"tab" if new_tab else "window"}?path={result.path}"]
)
return

Expand Down
Loading