Jump to content

Search the Community

Showing results for tags 'iterm'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
    • Advanced Tips & Tricks
  • Alfred Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting
  • Alfred 5 Early Access
    • Alfred 5 Early Access


  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Website URL




Found 21 results

  1. I want to be able to launch some zsh/bash commands from the Alfred's bar. I sat the prefix to my likings, selected "Custom", modify the script accordingly. on alfred_script(q) tell application "iTerm" activate do script q end tell end alfred_script But it doesn't work.
  2. So here's a workflow to open the current Finder window in Terminal or iTerm, depending on what you like to stick with. Also the other way round is possible. ft: open current Finder directory in Terminal tf: open current Terminal directory in Finder fi: open current Finder directory in iTerm if: open current iTerm directory in Finder For Path Finder fans: pt: open current Path Finder directory in Terminal tp: open current Terminal directory in Path Finder pi: open current Path Finder directory in iTerm ip: open current iTerm directory in Path Finder GitHub. Direct Download.
  3. Hey everybody! I am working on this workflow where I have a file filter with the most important text files (for me, at least) to open with vim in iTerm. Currently I have it configured so that I can choose to just run vim and get a new document or I can choose to run "v $SOMEFILE" in Alfred to make it open that way. It's super cool, I've used https://github.com/stuartcryan/custom-iterm-applescripts-for-alfred/ and Macvimtoolbox as inspiration for this. There is one bug, however. When the active iTerm window is not just showing a prompt but engaged, then the script doesn't open a new windows but just pastes the "nvim /path/to/file" into the window. I'd like to configure the Apple-script to just open a new window in that case. How do I do that? The code I'm using is here, btw: on alfred_script(q) my runIniTerm( "nvim " & q & "" ) end alfred_script -- This is v0.5 of the custom script for AlfredApp for iTerm 2.9+ -- Please see https://github.com/stuartcryan/custom-iterm-applescripts-for-alfred/ -- for the latest changes. on is_running(app_name) tell application "System Events" to (name of processes) contains app_name end is_running -- Please note, if you store the iTerm binary in any other location than the Applications Folder -- please ensure you update the two locations below (in the format of : rather than / for folder dividers) -- this gets around issues with AppleScript not handling things well if you have two iTerm binaries on your system... which can happen on runIniTerm(q) if is_running("iTerm2") or is_running("iTerm") then run script " on run {q} tell application \":Applications:iTerm.app\" activate try select first window set onlywindow to true on error create window with default profile select first window set onlywindow to true end try tell the first window if onlywindow is false then create tab with default profile end if tell current session to write text q end tell end tell end run " with parameters {q} else run script " on run {q} tell application \":Applications:iTerm.app\" activate try select first window on error create window with default profile select first window end try tell the first window tell current session to write text q end tell end tell end run " with parameters {q} end if end runIniTerm The workflow can be found here: https://transfer.sh/Ul5L3/Open-files-with-Vim.alfredworkflow
  4. Secure SHell for Alfred 3 Open SSH/SFTP/mosh connections from Alfred with autosuggestions based on SSH config files, /etc/hosts and your history. Features Auto-suggest hostnames from ~/.ssh/* and /etc/hosts (sources can be individually disabled). Remembers usernames, so you don't have to type them in every time. (You can also remove connections from your history or disable it entirely.) Alternate actions: - Open connection with mosh instead of SSH. - Open SFTP connection instead of SSH. - Ping host. Data sources The workflow reads hosts from the following sources (in this order of priority): ~/.ssh/config History (i.e. username + host addresses previously entered by the user) ~/.ssh/known_hosts /etc/hosts /etc/ssh/ssh_config Installation Download from Packal or GitHub releases and double-click the file to install in Alfred. Source code is on GitHub. Usage Keyword is ssh: ssh [<query>] — View and filter known SSH connections. - ↩ or ⌘+<NUM> — Open the connection. - ⇥ — Expand query to selected connection's title. Useful for adding a port number. - ⌘+↩ — Open an SFTP connection instead. - ⌘+⌥ — Open a mosh connection instead. - ⇧+↩ — Ping host. - ^+↩ — Forget connection (if it's from history). Configuration There are several options available in the workflow's configuration sheet. Notably, you can turn off individual autosuggestion sources. Please see the GitHub README for details. Please note: The workflow generates an ssh:// (or sftp://) URL and asks Alfred to open it. Similarly, the ping and mosh features uses Alfred 3's Terminal Command feature. If it's not opening in the right app, it's not the workflow's fault. Licencing & thanks This workflow is released under the MIT Licence. It uses the following libraries and resources: The icon is based on Octicons by Github (SIL Licence). ssh_config (MIT Licence) to parse SSH config files. awgo (MIT Licence) for the workflowy stuff. This workflow started as a port of @isometry's Python SSH workflow to Go as a testbed for awgo. It has since gained some additional features. If you need Alfred 2 support, check out @isometry's workflow. Changelog v0.6.0 — 2016-11-09 - Add in-workflow updates v0.5.0 — 2016-10-31 - Add support for SSH configuration files (~/.ssh/config and /etc/ssh/ssh_config) - Alternate action: open connection with mosh v0.4.0 — 2016-05-27 - Add ability to turn sources of suggestions off #1 v0.3.0 — 2016-05-26 - Alternate action: Open SFTP connection - Alternate action: Ping host - Remember connections with usernames, so you don't have to type the username each time v0.2.0 — 2016-05-23 - First public release
  5. itermocil seems like a great match for an alfred workflow, I'm wondering if anyone is working on putting together a workflow for it? Something like listing the different layouts and triggering them on enter.
  6. Alfred workflow to quickly select of one currently opened iTerm sessions Just type “sessions” and it will show currently opened iTerm sessions. Optionally, you can type text to filter by session name. You can download on Github: https://github.com/madvas/alfred-iterm-sessions
  7. I've done a little workflow for iTerm 2 users. iTerm is a great Terminal program which includes the concept of 'profiles' - a profile is a collection of terminal settings which can include things like background colour, initial command to be executed, etc. As an example, I can open a new iTerm window which will ssh into my production web server, got to the main web directory, and has a red background to warn me I can do dangerous things here. This workflow uses a Python script to extract a list of your iTerm profiles, and a bit of Applescript to tell iTerm to start up the selected one. It's my first use of a script filter, and I couldn't really find any documentation, so suggestions, corrections etc are most welcome! You can find the workflow here: http://qandr.org/quentin/software/alfred_itp Quentin
  8. The snippet expansion works fine in every application I use, including iTerm itself, but not when using Neovim in iTerm. This is my main text editor so I'd love if the snippets worked in Neovim
  9. Hi! I have been a user of Alfred (+ Powerpack) for years, but only recently decided to invest more time into customizing it with the workflows I thought were helpful. As I am a software developer, I generally setup any new Mac OSX environment using a completely automated installer: https://github.com/kigster/pullulant I wanted to add to Pullulant a simple bash script for installing Alfred. I can install the software itself using Homebrew, and then I was hoping to download and install my favorite workflows. I have now spent over an hour searching online, and I am absolutely stunned to find out that Alfred, the supposedly tool for automating your OS-X life, is itself so difficult to automate!!! What I want is a single line command I can run in Terminal (or iTerm, i.e. bash), that tells Alfred to import the given workflow. Since Alfred insists on choosing a category for a workflow (which is completely useless in my opinion), I would imagine that this command would need to tell Alfred what category to assign it. Right now I am able to do this: open $(curl -s -L -O -w %{filename_effective} \ https://github.com/packal/repository/raw/master/com.alfredapp.mdeboer.atom/atom.alfredworkflow) And as you would expect, curl downloads the file, OSX then opens Alfred, which then stays open like a village fool waiting for me to choose a category for it, and I can't, for the love of life, my laptop or the universe, find a way to make this entire process non-interactive, so that I can run it in a goddamn loop and be done with it. Why!? Why is it so hard? LOL. Cry. LOL. Cry. Sorry, it's very late, and I am getting a bit delirious. I do not mean to offend anyone, I just hoped that I could find a solution without having to post a new question in the forum, because even after searching this entire forum for "install", "command line", "bash", "terminal", "non-interactive" I found nada. Your truly, Konstantin https://github.com/kigster
  10. Howdy, I'd like to create a workflow which starts a Docker quick terminal, which is basically a shell script which starts the docker daemon. After the docker daemon is ready, meaning the shell script has finished and the shell is ready to receive command I'd like to run my shell commands, such as cd to a specific dir and running docker-compose commands. The problem I tend to get stuck with is running the shell commands when the docker daemon is ready, it doesn't wait until the new "shell" is ready for the docker commands. This is the quick term command I run within my Alfred Terminal command script: bash --login '/Applications/Docker/Docker Quickstart Terminal.app/Contents/Resources/Scripts/start.sh' I want to run my other commands, which I appended using && only after the daemon is ready. I'm must be doing things wrong here and would appriciate any assistance. Cheers, Shahar
  11. Hello, I'm using Alfred with the powerpack for a while now and still have issues with the '>' command which should open up Terminal or iTerm and run the given command. For example: when I type: > cd ~/Desktop It only open up iTerm. It doesn't matter which command I enter, only iTerm will start up. Also tried to make it work with Terminal, but same issue. Alfred version: 2.8 (414) OSX: 10.11.1 (15B42) iTerm: 2.1.4 Screenshots: Step 1: Opening Alfred and enter the command (https://www.dropbox.com/s/v8ut3we5q8lvj1p/Screenshot%202015-11-14%2019.35.20.png) Step 2: Alfred launches iTerm (https://www.dropbox.com/s/1elw5l2dat7d0jq/Screenshot%202015-11-14%2019.35.32.png) Step 3: No command has passed through (https://www.dropbox.com/s/kyoujb7rec00yv7/Screenshot%202015-11-14%2019.36.04.png) Step 4: Entered command manually (https://www.dropbox.com/s/n1atunrop7yta3t/Screenshot%202015-11-14%2019.36.55.png) -Brian
  12. Hi Team, I seem to be having a bit of an issue that has cropped up in the last few weeks, I am not sure exactly when it started but the symptoms are this: 1. When I try to execute a terminal command with '.< command >' or a workflow tries to execute a terminal command... if I don't already have iTerm open, nothing happens at all. 2. If I manually open iTerm and have it running in the background... everything runs fine. This seems to occur across all three of my Macs. Versions: iTerm2 2.1.1 OSX: 10.10.4 Alfred: 2.7.1 (387) I have had a look and turned on all info for one of the flows and it does not error out at all, this seems to execute successfully: [iNFO: alfred.workflow.input.keyword] Processing output 'alfred.workflow.action.terminalcommand' with arg '' But strangely iTerm2 is never opened. It seems the iTerm2 program is now just called iTerm in my Applications folder, not sure if this has affected things at all (or if it always was). I have also checked the system console and no errors seem to be outputted to any system logs during the time I was testing. Look forward to hearing from you. Cheers, Stuart Update: All righty and now I have updated the scripts... made them more awesome and even added one for iTerm 2.9 https://github.com/stuartcryan/custom-iterm-applescripts-for-alfred/tree/master Not sure the best way to publish this but if anyone has any issues let me know and I will try to tweak the scripts further. Cheers, Stuart
  13. Hi Everyone, I have a created a workflow for quickly loading iTerm with 4 preset tabs: 1. rails server (will start automatically) 2. rails console (will start automatically) 3. prompt (an empty tab for all your bash needs) 4. rspec guard (will not start automatically) By launching Alfred and typing 'rails' you will launch these 4 tabs. Afterwards, you can easily switch to these tabs from anywhere by launching Alfred and typing: 1. rs 2. rc 3. prompt 4. guard I made a blog post about this here: http://eyaleizenberg.blogspot.com/2014/07/3-alfred-workflows-to-make-your-rails.html Let me know what you think, Thanks.
  14. Hi, Here is a new workflow: https://github.com/raguay/MyAlfred/blob/master/OpenInAlfred.alfredworkflow You type "oa:install" to install a helper script into your /usr/local/bin directory. Make sure that directory exists, is writable by you, and in your path. Then you can use these commands: oa:terminal open the topmost terminal window in Alfred oa:iterm open the topmost iterm window in Alfred Let me know if this works for you.
  15. This workflow is an action on a folder that allows you to open the path of that folder into a new session in iTerm. To use, select a folder in Alfred then press → to open the action panel and select "Open in iTerm". Download workflow on Packal
  16. Alfred workflow to add the current iTerm directory as a folder in the Sublime Text project window. https://github.com/kevinSuttle/alfred-iterm-sublime
  17. There are already multiple discussions on Alfred-run Applescript sometimes having a different behaviour than on other places, and in many cases, it seems like nothing can be done about it, since Alfred is not doing anything special with the scripts (which means it may be out of reach for the developers to solve). In this case, however, it’s a case of Alfred apparently having a different implementation in different places. It’s seems more of an oddity than a bug, but there’s no “oddities subforum”. Using the latest builds of both Alfred (2.0.6) and Mountain Lion (10.8.4). The code in question is on alfred_script(q) tell application "System Events" to set isRunning to (name of processes) contains "iTerm" tell application "iTerm" if not isRunning then set _term to (make new terminal) set _term to the first terminal tell _term to set _session to current session else set _term to the first terminal tell _term to set _session to (launch session "Default") end if tell _session to write text q activate end tell end alfred_script What this does is, taking a command as an argument, if iTerm is currently closed, it’ll open a window, and run the command; if it’s open, it’ll open a new tab on the current window, and run the command. If I set this on Run NSApplescript connected to Keyword, in a workflow, or run it from AppleScript Editor, it runs just as intended. However, if I set this as the Custom code for the Terminal / Shell option on the Features tab, it does not — if iTerm is closed, it opens it and a new tab, running the command on this second tab, and if iTerm is already open, it’ll behave as expected. Why is it working differently in these two places? What is it about the Terminal / Shell feature that makes it behave differently (and in a suboptimal manner)?
  18. Hi, I am experiencing a bug when copying text in iTerm 2. When I select some text and press "Cmd + c", it merges the text into the clipboard - but it should only merge when double tapping "c". In Terminal.app that doesn't happen, so I suppose that's a very specific bug and annoying bug (because I end up pasting undesirable text). I don't know wether it's a particular iTerm 2 setting that's causing a conflict. The bug is present in Alfred v1 too. I'm a heavy iTerm 2 user, so that is reason enough for me to disable the feature.
  19. Hi guys, i'm experiencing a weird issue here. I open iterm, type a basic open command and it works juste fine. I use the terminal / shell tool in Alfred, it works just fine too. I copy/paste this command in a Run script object in a workflow and nothing happens. Because i can't see errors, i got no idea what's going on. Any clue ? :/
  20. Here is a workflow to set iTerm2 console with random color setting. With iTerm2 running, entering keyword 'ct' will set color of the last focused / used iTerm2 console. http://tinyurl.com/d96cyvv - Gignesh
  21. I know i can write Applescript to open Terminal or iTerm, but I'm interested to know if i can use the Alfred-configured choice for the 'shell command' and 'open terminal here' features.
  • Create New...