Jump to content

Search the Community

Showing results for tags 'Terminal'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

Categories

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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Twitter


Website URL


Jabber


Location


Interests

Found 82 results

  1. 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.
  2. 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.
  3. 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?
  4. 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.
  5. 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!
  6. 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?
  7. 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.
  8. 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.
  9. 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.
  10. 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.
  11. I'm looking to build a Workflow that effectively does a series of things in Terminal. My idea is to trigger the Script with a keyword which triggers action 1 in Terminal. Action 2 would run once Action 1 completes. I haven't been able to find any docs on whether or not that's possible. For example, let's say Action 1 is generating a .tar archive of everything in a directory and Action 2 is moving the .tar to a subdirectory (or something else). Can Alfred know when the first Action is done to kick off the second? (I know I can do the .tar generation and move in one command - that's not what I'm actually doing here, but is just an example of something that came to mind for having Alfred know the first thing's done before doing the second thing.) Hoping it's possible, but I don't think it is.
  12. How do I create a workflow that will pass multiple commands to the terminal with a pause in between? I am trying to simulate the following: Open terminal ssh nuc@192.168.1.3 Insert password Press return to submit password I tried the following workflow: keywords to open a terminal and enter ssh nuc@192.168.1.3 && sleep 2 && password && yes Alfred ends up entering everything as a single line
  13. Hi, So I'm a newbie, but I've managed to install Google assistant using terminal and can access it there. I want to use this alfred workflow http://www.packal.org/workflow/google-assistant to launch Google Assistant in the background but can't get the workflow to talk to python. Currently I have to type " source env/bin/activate and then: python -m googlesamples.assistant.grpc.pushtotalk The way the workflow is originally does not correspond to the steps I take to launch Google Assistant using Terminal. Can someone help me modify the workflow script to allow me to use Alfred to trigger Google Assistant? Many Thanks, Stephan
  14. 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.
  15. Hi, have a file action to convert gifs to mp4 using ffmpeg: ffmpeg -f gif -i {query} -pix_fmt yuv420p -c:v libx264 -movflags +faststart -filter:v crop='floor(in_w/2)*2:floor(in_h/2)*2' ~/Desktop/converted_file.mp4 This works perfectly with the terminal command but I want it to run it as a script so it doesn't opens a terminal window. Do I have to change anything? The way it it's not working. Thanks in advance for your help!
  16. Hello, I am trying to run a terminal command "terminus site:list" but keep getting error when trying to use the Run Script action. I've read in other articles it's because the terminal doesn't load the user profile but I can not figure out how to set the $PATH variable in the workflow to make this command accessible. I installed Terminus using composer so I created an alias in my .bash_profile that is "alias composer='php ~/composer.phar'" . I've also listed the rest of my .bash_profile below for reference. How do I get this to work with Run Script? How do I get terminal to load the $PATH variable? export PATH="/usr/local/mysql/bin:~/.composer/vendor/bin:$PATH" alias composer='php ~/composer.phar' Reference Articles: Thanks, Rich
  17. Hey there Alfred Community, Full disclaimer: I am a hopeless newbie when it comes to the topics I'm addressing here, so I apologize in advance for ambiguous vocabulary. Basically, I am trying to use a combination of "File Filter" and "Run Script" to open a server on a specific folder (for development's sake). In Terminal, I would do the following: cd ~/PathToRelevantFolder php -S localhost: (Port) How do I transform this into a workflow such that I can use a file filter to return my folder of interest and provide an additional argument that allows me to specify the port I wish to use for the local host (e.g. 8000, 9090, 3012...). It's the latter half (providing the port argument) that's giving me the most difficulty. My thanks in advance for any help anyone can give me! -Colin
  18. With the help of answers here I managed to make a workflow that uses Terminal to call a PHP script to delete a file on a remote server, getting the file name from the most recent item in the clipboard. I don't actually need to see the Terminal after the script has completed, but I can't seem to find a way to just run it in the background, or quit Terminal when done. Any suggestions welcome. Thanks
  19. 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
  20. I want to update a directory on my Raspberry PI and I want to use scp for this. I've got a keyword which initiates a Run NSAppleScript action. This applescript launches Terminal and it should enter a command. But it won't open Terminal. on alfred_script(q) tell application "Terminal" do script "scp -r /path/to/folder pi@192.178.168.20:/var/www" activate end tell end alfred_script This Applescript action works flawlessly when used with a normal ssh command like "ssh user@server.com". But it does not work with scp. Any ideas?
  21. 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:
  22. Hey All, Looking for a solution on a very minor annoyance, I usually run a lot of shell commands from Alfred using the > prefix, which is great! Love it! However, when it executes the command it pops open terminal and runs the command and leaves another lingering window around which I find annoying. Does anyone know of a way to force Alfred to close the window it opens after the command is executed? Very rarely do I need the returned command's output. It's usually for firing off quick things like docker pulls, file moves, git commits and such. If I need to do this through an AppleScript I'm open to that as well, just wanted to find some way around my terminal windows popping up everywhere like mushrooms. Thanks!
  23. I'm trying create a workflow to utilize the MacOS Say command. With this command, I'd like to queue up several paragraphs for it to speak and highlight the spoken paragraph. I'm close, but I'm running into issue with the clipboard management. It was my understanding that the /bin/bash scripts can queue commands up in sequence. In which case the below code should execute like this; 1. Copy the query (which in my workflow is the selected text). 2. Open find in Safari 3. Paste the clipboard contents. 4. Say the selected text. It looks like the LAST copied text ends up being pasted, instead of in sequence. The say command adheres to the sequence properly. The other commands do not, what am I missing? screenshot of the workflow is attached. pbcopy < "{query}" osascript -e 'tell application "System Events" to keystroke "f" using command down' osascript -e 'tell application "System Events" to keystroke "v" using command down' say "{query}" -r 250
  24. I love Packal, and I’ve grown to like awm, the CLI tool by Jonathan Wiesel. The response was not exactly overwhelming when Jonathan pushed awm out three years ago. But that was 2014, and since then CLI tools have gotten some traction, and today they are considered sexier than ever (I think). Anyway, I can’t stop dreaming of a version of awm that is ready for the year 2017. As a humble first step, I’ve just finished up three tiny PRs. They do absolutely nothing but remove the gunk from the `npm install` process. But hey, it’s a start! Regards, Claudia
  25. Hello, I want to create a basic workflow (I am a beginner): 1. Select a folder, and run "make" 2. To show as output if the command worked (e.g., there is a makefile in the folder), otherwise to say that the folder didn't have any make file. So, I have a file action (in this case a folder), and then a script (/bin/bash) with: cd "{query}" make But, nothing happens. Any ideas and suggestions on how to do this? Thanks so much! ![](https://dl.dropboxusercontent.com/u/18116710/Screenshots/Screenshot_2016-09-16_08.36.3.png)
×
×
  • Create New...