Integate Warp (warp-terminal) into Thunar on Linux

I use Warp as my terminal of choice on Debian. In XFCE, I noticed that Thunar would launch Warp if I right-clicked within a window and selected "Open Terminal Here", but the directory switch is lost, and it defaults to my home directory. I created the following tutorial for anyone else wanting to use Warp with XFCE4 and Thunar. (I'm sure it can't just be me).

Step 1: Open Thunar Custom Actions

Click on the "Edit" menu in the toolbar. Go to "Configure custom actions...".

Step 2: Create a New Action

Click the "+" button to add a new action. Name the action something descriptive like "Open in Warp Terminal." In the "Command" field, enter: warp-terminal open-path %f Optionally, set an icon for the action by clicking on the icon button and selecting an appropriate image (e.g., the Warp icon).

Step 3: Configure Appearance Conditions

Switch to the "Appearance Conditions" tab. Check the boxes for "Directories" and any other file types you want the action to appear for (e.g., "Text files" for scripts).

Step 4: Test the Action

Click "OK" to save the custom action. Right-click on a directory and see if "Open in Warp Terminal" appears in the context menu. If it does, click on it, and Warp should open in that directory.

Explanation:

Troubleshooting:

warp-terminal not found: If you encounter a "command not found" error, ensure that the warp-terminal command is accessible from your terminal. You might need to add Warp's installation directory to your PATH environment variable.

Custom action not appearing: Double-check the "Appearance Conditions" tab to make sure you've selected the correct file types.

Tips:

You can assign a keyboard shortcut to this action in Thunar's custom actions settings for faster access.

If you want the terminal to open in the background, modify the command to: warp-terminal open-path %f &