Skip to content

How to use warp terminal to run my cmd? #282

Open

Description

@zhangyc310

I like shuttle, it helped me.
Now I try warp terminal , and It looks great.
Now shuttle support iterm and term to run my cmd .
How to use warp terminal to run my cmd?
May some one help me ?

Activity

  1. stefanocurnis commented on Jun 14, 2022

    @stefanocurnis

    Also looking for this. Did you find any solution?

  2. rickbakker commented on Nov 10, 2022

    @rickbakker

    I also recently downloaded Warp. Tried to change the iterm.app to warp.app but it's not opening the command in Warp. Instead it's opening in the default terminal instead. Anyone got a fix for that? I see there is also no recent updates to Shuttle which is a shame. Is this something we gotta code ourselfs?

  3. j-like-jeff commented on Feb 6, 2023

    @j-like-jeff

    I'm also looking for using Warp but found no solution.

  4. j-like-jeff commented on Feb 6, 2023

    @j-like-jeff

    Okay got it working..

    here is my solution:

    .shuttle.json

    "terminal": "Terminal.app",

    I wrote a custom AppleScript to open warp. Shuttle uses AppleScripts to do that.

    warp.applescript

    --for testing uncomment the "on run" block
    --on run
    --	set argsCmd to "ps aux | grep [s]creen"
    --	set argsTheme to "Homebrew"
    --	set argsTitle to "Custom title"
    --	scriptRun(argsCmd, argsTheme, argsTitle)
    --end run
    
    on scriptRun(argsCmd, argsTheme, argsTitle)
    	set withCmd to (argsCmd)
    	set withTheme to (argsTheme)
    	set theTitle to (argsTitle)
    	CommandRun(withCmd, withTheme, theTitle)
    end scriptRun
    
    on CommandRun(withCmd, withTheme, theTitle)
    	tell application "Warp"
    			activate
                tell application "System Events"
                    tell process "Warp"
                        keystroke "t" using command down
                    end tell
    	        end tell
                tell application "System Events"
                    tell process "Warp"
                        delay 0.5
                        keystroke withCmd
                        delay 0.5
                        key code 36
                    end tell
    	        end tell
    		
    	end tell
    end CommandRun
    

    after that you need to replace the old termimal scripts with the new ones:

    #!/bin/bash
    echo "compiling applescripts for OS X terminal..."
    osacompile -o /Applications/Shuttle.app/Contents/Resources/terminal-new-window.scpt -x warp.applescript
    osacompile -o /Applications/Shuttle.app/Contents/Resources/terminal-current-window.scpt -x warp.applescript
    osacompile -o /Applications/Shuttle.app/Contents/Resources/terminal-new-tab-default.scpt -x warp.applescript
    
    chmod +x compile.sh
    ./compile.sh
    

    You need to add access for shuttle in your system preferences to use it. Now my shuttle is working fine with warp.

    Here you can find the old ones again: Github

    I forked the Repo with spotlight search integration. When I have enough time I will add Warp to the config Option and release a new build. But not today. This workarround should helps for the moment.

    EDIT:

    Here is my warp release and changes:

    https://github.com/j-like-jeff/shuttle/releases/tag/v1.30-warp

    remove old shuttle version, remove it from security panel in system settings, install the new version and add new security preferences for shuttle.

    warp
    Shuttle.app.zip

    Currently I check for Spotlight Integration. It is working but got a strange error with (null) on search and my programming time in objective-c is a long time ago.. maybe @ObladiObladaLifeGoesOn can help.

    Bildschirm­foto 2023-02-06 um 20 44 27

  5. rickbakker commented on Feb 9, 2023

    @rickbakker

    That does the job pretty well :) Thanks for your effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions