Jump to content

Search the Community

Showing results for tags 'Terminal'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Blogs

There are no results to display.

Categories

There are no results to display.

Calendars

There are no results to display.

Forums

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

Categories

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

Categories

  • New Features
  • Other

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Twitter


Location


Interests

  1. Usage Run shell commands without opening a terminal via the cmd keyword. Your shell’s configuration files will be loaded, making your custom aliases, functions, and more available to the environment. Commands execute relative to the frontmost Finder window to allow quick changes on the current working folder. Exit status is shown as a notification and output in a Text View. ↩ Run the command.⌘↩ Run command but do not open output in Text View.⌥↩ Show command history to rerun a command. Use the Universal Action to send files and text as arguments to a command. If the placeholder from the Workflow’s Configuration is present in the text, it will be replaced with your arguments, otherwise they are appended to the end. The same modifiers apply. Separate command histories are created for commands ran with the Keyword or the Universal Action. ↩ Run command.⌘↩ Delete all command histories and saved outputs.⌘Y (or tap ⇧) Quick Look saved output. ⤓ Install on the Alfred Gallery | Source
  2. Sorry for the very basic question, I am testing the script just by entering the following command in the Run Script window: networksetup -setairportnetwork en0 SSID "password" When I run it, I get: ERROR: Keyword to Script\[Run Script\] /bin/bash: -c: line 0: unexpected EOF while looking for matching \`"'/bin/bash: -c: line 1: syntax error: unexpected end of file Any help will be appreciated, I get the same message un Automator, I tested the command in Terminal and worked fine. Thanks
  3. 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.
  4. Hi. Sorry if this is a duplicate or out of place here, I just have a quick question that I wasn't able to answer myself. I'm planning to buy the powerpack but first need to know whether it's possible to change the default terminal application to iTerm2. Quickly executing commands with the `> ...` Prefix would be amazing -- but useless if it only supports the default macOS Terminal. Is there a direct way to change the default or is there another way to set up something similar through a workflow? I can't try this stuff out since I don't have a license yet. Thanks for your help! :)
  5. I'm trying to implement a non-standard terminal that I enjoy using called "Warp". I've come up with an AppleScript to add custom functionality under Features > Terminal, and I am trying to run it unsuccessfully. Furthermore, I've taken the same script and successfully run it under "Script Editor" When Alfred tries to run it is activates "Warp" as expected but does not do any keystrokes, therefore doesn't bring it to forefront (cmd, shift, w) or paste or enter. tell application "Warp" activate set the clipboard to q delay 0.5 tell application "System Events" to keystroke "w" using {command down, shift down} delay 0.5 tell application "System Events" to tell (name of application processes whose frontmost is true) to keystroke "v" using command down tell application "System Events" to tell (name of application processes whose frontmost is true) to keystroke return end tell Does anyone know what I am missing?
  6. Tmux Workflow for Alfred app Alfred workflow to manage tmux sessions, integrated with iTerm2. It can list current sessions, connect to them, kill them or create a new one. The connect or create action actually opens iTerm2 and connects to the session. Additionally, in all the open actions (new session or connect to session) it can cd to the current Finder's or Path Finder's directory. Please note: the workflow only handles tmux sessions. It doesn't handle windows, panes, or any other tmux command. Dependencies iTerm2 installed tmux installed in /usr/local/bin/tmux; easily installed with homebrew doing brew install tmux Usage Write the tmux keyword in Alfred to trigger the workflow. The initial menu options are: An initial not actionable menu item indicating to keep writing after the keyword to search/filter or create a new session. Option to connect to a default tmux session. It's a session named "default" that will always appear in the menu, and if it doesn't exists it will be automatically created. You can start typing right away after the keyword for search or create a session, or optionally add a space after the keyword for readability; the space is ignored. You'll see the filtered results (bash/zsh included), and a last option to created a new tmux session with the entered name, if non existent. If you want to kill a session, action it with ⌥ down. If failure, for example trying to kill the bash/zsh option, you'll hear a classic error sound. If you want to open the current Finder's or Path Finder's folder, action the current or new session with ⌘down. This command is very fast for new tmux sessions but adds a delay of 1 second for existent tmux sessions, since I cannot find a way to wait for tmux session to load, except by waiting long enough. Still, opening current Finder's path in already existing sessions shouldn't be that common. Installation For OS X 10.9 Mavericks, Download the alfred-tmux.alfredworkflow and import to Alfred 2. For Previous OS X Versions, Download the alfred-tmux.alfredworkflow and import to Alfred 2. Source Code Clone or Fork the Workflow: https://github.com/ramiroaraujo/alfred-tmux-workflow Changelog 2014-02-05 - Released
  7. When I was using "Open Terminal here" action today, I found that this command is not executed with arguments quoted. For example, here I got a folder named "a&b", when I perform "Open Terminal Here", a error happened. Why? I am guessing that the terminal actually executes such a command, "cd a&b", so it is apparently that this command is split by the symbol "&". I hope you can fix this bug just by surrounding the target folder path with a pair of quotes like this: cd "a&b" instead of: cd a&b thanks~ by iSMart
  8. If you run the command shown in the picture as Alfred, the osascript -e 'tell app "System Events" to restart' command won't work. Is there any way to solve this problem? Thank you in advance 🙏
  9. Hi! I just discovered this terminal application: https://hyper.is/ I find it appealing and I would like to change the default Alfred behaviour to this app. For example when I browse för files in Alfred and press "Open Terminal Here". This seems to be editable in settings but I'm not sure what to write in the AppleScript section. See this little video to understand more what I want to achieve:
  10. I created a small workflow displaying the system's uptime in a notification. Download This is also useful as an example for integrating scripts in your workflow. Enjoy. - David EDIT: corrected the download link to a private hosting provider, wikisend appears to be dubious. Sorry for any inconvenience.
  11. 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.
  12. Minimal Wide This theme is elegant, compact and offers space for long titles. (GitHub, Alfred, Packal) Monochrome This theme has a monospace font appears like a terminal on a monochrome monitor. (GitHub, Alfred, Packal) Crazy Accessible Blue This theme is big. It's definitely accessible with high contrast and big fonts. The color scheme is inspired by the old Amiga workbench (GitHub, Alfred, Packal)
  13. 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
  14. 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
  15. Hey all, I haven't been active in this community for a long time (though I used to a lot!). And I haven't really been keeping up with the updates. I'd like to have a workflow that would let me assign a keyboard trigger to open a terminal and make it the frontmost app. If the app was already open, just switch to it. If it wasn't, open it and switch to it. Does something like this exist already? If not, how can I make it? It seems very straightforward but glancing at the examples in the workflow tab of Alfred, I couldn't immediately see how to... Thanks for any help thrown my way, Cheers.
  16. Alfred - Terminal and iTerm2 Control Workflow Requires Alfred 3+ Quick Start: Download Here (Alfred 2 users, the last compatible version was Terminal Control 2.2, still available here) An Alfred workflow for controlling aspects of Apple's Terminal Utility and iTerm2. Designed specifically for developers and admins who spend a lot of time in terminals at the command line. Particularly useful for those who manage multiple tabs and use varied Profiles (color themes) for Terminal/iTerm2 windows. New Terminals The keyword trigger term (or iterm) will bring up a list of Profiles (themes/skins) based on Terminal preferences. Continue typing to select one. Modifier keys: Shift: launch this Profile in a new tab Command: change the active Terminal tab to this Profile Merge and Split Terminal only: Keyword trigger term move will separate the current tab into its own window. Terminal only: Keyword trigger term merge will merge all open Terminal windows into one tabbed set. iTerm Only: Keyword trigger *iterm arrange* will call iTerm's "arrange all windows horizontally" window helper. Terminal to a Directory Keyword trigger term dir (or iterm dir), followed by a directory search phrase will launch the default Terminal profile, and automatically change to the selected directory. Why Do I Want This? I spend a lot of time connected to various processes, machines, networks, running screen/tmux sessions, etc. From my personal experience (read: typing the wrong command into an ssh session of a production machine and taking down large consumer web properties in the process), I've built a habit of always color-coding my terminal windows. White on black for local OSX terminal. Green on black for local virtual machines, green background for testing networks, and RED background for production machines (a constant reminder to be careful what I type). This alfred workflow allows me to launch terminal themes, and also change a terminal tab quickly to a new theme if I repurpose it for a new task. Install Notes Download the compiled workflow directly, or visit the repository for the full source code This is my very first workflow, so I'd appreciated feedback on the installation process. In theory, I've bundled all the necessary ruby gems in the workflow package proper, so it should be a simple double-click install. If you do need to install manually, please let me know. Hints are in the developer notes. You will need to allow accessibility support for Alfred. This should be prompted automatically. But since Mavericks, this happens in a new place, in the security and privacy system preferences area. Enable it as shown here if you get stuck: Thanks to Bryan McKelvey for the simple Alfredo Ruby Gem Thanks to phyllisstein for Alleyoop Thanks to Quentin Stafford-Fraser for inspiration and approach in his dedicated iTerm2 Profiles workflow Release Notes v1.0 (May 6, 2013) - Initial release v1.1 (May 10, 2013) - Support for Alleyoop workflow updater v2.0 (May 12, 2013) - Added control for popular alternative iTerm2 terminal emulator v2.1 (Nov 7, 2013) - Included bundled gems for ruby 2.0.0 for Mavericks OS X 10.9 Support v2.2 (Nov 21, 2014) - Improved UI scripting dialog to conform with 10.9+ privacy behaviors v2.3 (Jun 23, 2016) - Support for iTerm2 version 3.0.0+ to accommodate their new AppleScript dictionaries, dropped support for Alfred 2.x v2.4 (Oct 15, 2017) - Included bundled gems for ruby 2.3.0 for macOS High Sierra 10.13 Support v2.5 (Sep 29, 2018) - Support for macOS Mojave 10.14 v2.6 (Oct 27, 2019) - Removed alfredo and nokogiri dependencies, moved to Alfred JSON format, macOS Catalina 10.15 Support. Requires Alfred 3+ Feedback Wanted: I'd love to hear feedback. Are you using this workflow? How? What improvements would you like?
  17. I see that using the ! command in Alfred will open a new Terminal Session. Is there a way to have Alfred pass the text into the current Terminal session window? Thanks.
  18. Hi, I updated from Alfred 3 to version 4 and my terminal integration stops working. By stops working I mean that Alfred opens terminal (default Terminal.app) yet command is not executed. I tried to restart Mac & Alfred. Alfred has access to Automation of System Events, Itunes & Terminal. Do you know what I need to do in order it to work?
  19. Does anyone have an Applescript to run commands in the Alacritty terminal emulator instead of the default one? I've been trying to adapt iterm2 ones but I'm not well versed in Applescript and cannot get it to work.
  20. Hey all! Alfred 3.8, MacOS 10.14- the Alfred 3.8 update has killed my terminal integration. Whenever I >cmd my terminal no longer loads. I have verified that all the accessibility/security/automation settings are configured for Alfred, and I'm not sure how to troubleshoot this issue. Can you provide any guidance?
  21. Short version Is there an equivalent to terminal's compgen autocomplete in runscript? Long version I work in an office with a shared NAS drive. All our clients take a very specific folder structure. It's kind of a pain in the ass to jump to a particular clients folder as we multi-task a lot. All our client folders start with the first four letters of the client name as a client code. So Super Dooper Client would be SUPE_Super Dooper Client - which is cool for autocompletion as it always knows where to go, since no two are the same (by chance to be fair, we've had to use acronyms for a couple, but we can remember those) I've written this script in terminal to jump to the right folder, but it leaves me with an annoying terminal window open. I don't want to quit terminal completely, just close the active window. I can't see how to do that (I've tried quit and exit, neither worked) - but I did see I should probably use a Run Script. Problem is I can't get the compgen autocomplete to work. Here's the code: src="{query}" //first go the right folder - an automatically mounted AFP drive cd /Volumes/Files/Clients/; //now automatically complete the file name from the 4 letter code I've typed in as the a query //this is the bit that doesn't work in a run script folder=$(compgen -d {query}_); //set the target folder target="/Volumes/Files/Clients/$folder" // go to it cd "$target" //open it open . thanks!
  22. Hey guys! Some of you out there (unfortunately, probably not that many) may have heard of the terminal emulator Kitty. It's cross platform, fast, and quite customizable. Long story short, I replaced Terminal.app with Kitty (iTerm never seemed to meet my needs). However, it took quite a lot of work to get Kitty to work when I entered a shell command (i.e. "> echo hello") into Alfred. At last, after much messing around, I finally got it working, and have come to share how I did that in case anyone else wants to do it too. Go to Features > Terminal / Shell and change Application to "Custom." Copy and paste this AppleScript into the box that shows up under the Application dropdown. That's all it takes! It took me about an hour and a half to make that work properly. I could easily get it to run a command, but not with the directory set to ~, the .bashrc file loaded, and then keep the window open after finishing the command. All of these things were important to me, so after much tinkering, I made it work. Note: this only works, of course, if you are using bash. If this is not the case, you can likely copy and modify my script and RTFM.
  23. 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.
  24. I'm trying to install this chrome history workflow (https://github.com/tupton/alfred-chrome-history), but I'm not versed in terminal or coding at all. Can anyone further dumb-down the FROM SOURCE section of this repo for me to understand? Much appreciated.
  25. Hello, I am attempting to create a workflow that allows me to turn on the built in TFTP server in Mac OS, followed (or before) opening a particular finder window and the creating of a file. The commands need to be; To launch the daemon run the following commands: sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist sudo launchctl start com.apple.tftpd Be sure Read/Write/eXecute permissions are set on the tftpboot folder and any files you wish to transfer: sudo chmod 777 /private/tftpboot sudo chmod 777 /private/tftpboot/* If you’ll be transferring a file TO your TFTP server, the file will technically need to exist on the server beforehand so create it with touch. For example: sudo touch /private/tftpboot/running-config sudo chmod 777 /private/tftpboot/running-config I have created (along with the help of a friend) the following workflow. What I would like to do; 1. Is create it so it opens up the finder location first (I can then visibly see the file being created because atm I pre-open the finder window manually). I cannot get this piece to work. 2. Include all of the terminal commands into just on window, with a "sleep x" in between the command lines, and then it auto close that window (I found this, its a preference in terminal rather than a cmd). 3. Close terminal totally. i.e. The entire program. I can share the created workflow, but you will need to replace the "1" in the commands with your Mac PW. Just trying to workout how to do the upload of a workflow.... Many, many thanks for any help or advice you can offer.
×
×
  • Create New...