Skip to content

General Scriptability #345

Closed
Closed

Description

@Gregory-Gelfond

Describe the solution you'd like?

Currently we are using iTerm with a custom script to launch a Java environment from within IntelliJ:


#!/bin/bash
TEMP="${HOME}/EC-Projects/misc/bin/jlineExec.sh"
if [ $1 = "-version" ]; then
  echo "" > ${TEMP}
else
  export JAVA_CMD="${JAVA_HOME}/bin/java $@"
  export FIRST="${JAVA_CMD/javaagent:/javaagent:\"}"
  export ALMOST="${FIRST/agent.jar -Dfile/agent.jar\" -Dfile}"
  echo "#!/bin/bash" > ${TEMP}
  echo "${ALMOST/bin -Dfile/bin\" -Dfile}" >> ${TEMP}
  echo ${TEMP}
  open -a iTerm.app ${TEMP}
fi

Having support to use Warp instead of iTerm in this script would be awesome.



### Is your feature request related to a problem? Please describe.

_No response_

### Additional context

_No response_

Activity

  1. changed the title [-]Integration: General Scriptability[/-] [+]General Scriptability[/+] on Dec 7, 2021
  2. elviskahoro commented on Jan 9, 2022

    @elviskahoro
    Contributor

    From discord:

    "Thanks! Another question, is it possible to change your current/default theme programmatically? I like to have a single script to setup my machines"

  3. elviskahoro commented on Jan 12, 2022

    @elviskahoro
    Contributor

    Hi, Is there any way to open a new warp tab by setting the custom zshrc file ? I am trying to set my shortcut in the zshrc file, and the goal is to open mutiple tab in Warp and run the specfic command for each tab

  4. elviskahoro commented on Jan 12, 2022

    @elviskahoro
    Contributor

    Is there any way to open Warp in a particular directory from a shell script? Looking for similar behaviour to vscode: code ./some/directory

  5. elviskahoro commented on Jan 12, 2022

    @elviskahoro
    Contributor

    I came from using Iterm2, and in the settings I was able to set a file to be source on launch ( ~/.bash_profile).
    Is there a way to do this in warp?

  6. elviskahoro commented on Jan 12, 2022

    @elviskahoro
    Contributor

    From @ianwalter via:

    Describe the solution you'd like?

    I just used iTerm2's Python API to create a python script in my monorepo that creates a bunch of tabs to run different services (e.g. docker compose, API server, Next.js dev server, iOS simulator, etc). It's great because I can easily start my whole dev environment with one command and have a meaningful tab name set for each tab. I would have preferred to use Node.js instead of Python, but not a big deal. Really liking Warp so far but this is what I am still using iTerm2 for.

    Is your feature request related to a problem? Please describe.

    No response

    Additional context

    Here's an example of a tab I create in the script:

            # Create a new tab and run the Docker Compose services.
            tab = await window.async_create_tab()
            await tab.async_set_title('Docker')
            command = f'cd {root}/packages/web; yarn docker\n'
            await tab.current_session.async_send_text(command)
  7. elviskahoro commented on Jan 12, 2022

    @elviskahoro
    Contributor

    From @kieran-osgood via:

    Describe the solution you'd like?

    Possibly related to #102 but in the default mac terminal and iTerm you can use a command like: open -a terminal ./path/to/directory and it will open the terminal window/tab at that directory - (which I use frequently in combination with Launchbar (https://www.obdev.at/resources/launchbar/help/index.php?chapter=OtherFeatures#:~:text=Select%20a%20folder%20in%20LaunchBar,pressing%20Tab%20and%20selecting%20Terminal.)

    Is your feature request related to a problem? Please describe.

    Currently running open -a Warp ./path/to/directory just opens Warp at my home directory instead of the specified one

    Additional context

    No response

  8. elviskahoro commented on Jan 12, 2022

    @elviskahoro
    Contributor

    Make it super easy to do a “open Warp to this directory” and 90% of our scriptability needs will be met.
    Heck supporting a “warp:///newterminal/path=~/Downloads” URL scheme would be the easiest by far.

  9. locked and limited conversation to collaborators on Jan 17, 2022
  10. converted this issue into a discussion #612 on Jan 17, 2022
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions