Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


bmamlin last won the day on June 12 2013

bmamlin had the most liked content!

Recent Profile Visitors

421 profile views

bmamlin's Achievements

Helping Hand

Helping Hand (3/5)



  1. I've been a heavy user of Alfred for years (thank you!), but recently started re-discovering Alfred Remote while working ... um ... remotely. When I tried Alfred Remote at work a few years ago, the wifi network at work didn't allow devices to see each other, so it never worked. But at home, I discovered I can be watching a Zoom call on my big screen TV (as a 2nd display) and use Alfred Remote to copy screenshots to into Bear, disable my screen saver, etc. right from my iPhone. Sweet! I created a workflow to use on Alfred Remote to mute or unmute my Zoom Audio and, since it's a toggle, I'd like to know whether I've muted or unmuted. I'm currently showing a notification on my laptop, but it'd be even better to show a notification on my phone either with a notification on the phone, a toast within the Alfred Remote app, or being able to dynamically change the icon/text of the remote button (e.g., switch between a mic icon with or without a red line through it like Zoom does). I found a preference setting in Alfred Remote for iOS called "Show command run feedback" but Mother Google didn't yield any details on what this setting might do. I was hoping there might be an option in workflow notification to send a short message to the remote and/or a separate output for this purpose, but haven't found one. I know the remote gives a little feedback in the top right corner "<command name> - OK" to let you know the command was received, but that doesn't help if you've got presbyopia nor does it let you return a status like "muted" or "unmuted". I also know I could create separate commands for mute and unmute, but that wouldn't be nearly as awesome as being able to toggle the icon or show a brief message on the phone. Any chance there's a way to send feedback to the remote that I haven't discovered? And, either way, what does the "Show command run feedback" setting do? I tried toggleing it off and still see the "<command name> - OK" feedback in the top right corner.
  2. I ran into a case where I wanted to copy & paste a little recipe of commands with small changes that varied each time I used the recipe. Rather than making an Alfred workflow for the specific task, I thought it would be more useful to simply copy my recipe and then edit it before pasting. Surely Alfred would help me with that! 😀 A google search for "alfredapp edit clipboard" led me to this thread, but not to the solution I was seeking. So I thought I would share my solution... My solution for this was to use an editor (in my case Sublime Text) that supports editing of stdin. Sublime Text offers a command line option for editing stdin in the form: subl - That will open the editor with the contents of stdin and return whatever is saved from that editor to stdout. All I needed to do was pipe the clipboard into this and then send the output back to the clipboard. That's a piece of cake for Alfred. So, I chose a hotkey (⌥⇧V) to be my "edit before paste" hotkey and linked it to a bash script with this single line: pbpaste | /Users/username/bin/subl - where "username" is my MacOS username. This needs to be have the full path to the subl command (which you can find from the terminal using "which subl". I could get something like "$(which subl) -" or "$(command -v subl) - " to work to avoid having to hardcode the full path. Finally, the output from the editor is passed to a Copy to Clipboard output (with "Automatically paste to front most app" selected). With this workflow, if I want to edit the clipboard before pasting, I press ⌥⇧V, my editor comes up with the clipboard contents, I make my edits & save, and the edited value gets pasted into whatever app I was in when I pressed the hotkey. Voilà!
  3. Okay. Fair enough (I just haven't discovered all the amazing things workflows can do ). I updated the workflow to have Alfred simulate the ⌘V keypress. Now my "Paste and remove" workflow looks much sleeker: (download link) The only "messy" bit is the bash one-liner to remove the most recent item from the clipboard history: sqlite3 ~/Library/Application\ Support/Alfred/Databases/clipboard.alfdb 'delete from clipboard where ts=(select max(ts) from clipboard);' Thanks for your help, @deanishe! This turned out better than I expected. Now I don't need Launchbar's clipboard history any longer and I've got a decent workaround until Alfred adds a native "Paste and remove" option.
  4. Though, I'd happily throw out my workflow in exchange for this feature native within Alfred...
  5. Awesome! That worked. Thanks so much, @deanishe! Locally, it works with a 0.1 second delay, but a 0.5 second delay seems to work more reliably when working in a Citrix Viewer. You can download the Paste and remove workflow from here. Update: I changed the first step to not send an argument and replaced the second step with a simulated ⌘V. I did this because using Alfred's built-in Copy to Clipboard was removing/altering some formatting from clipboard content (underscoring & bulleted lists) in my particular situation of pasting from a Mac into a Citrix Windoze environment.
  6. Thanks for the help, @deanishe! Okay. I thought this was a problem when trying to paste within Citrix Viewer, since it was bringing up a menu instead of pasting. It turns out avoiding the option key (alt key for Windoze in Citrix) is sufficient – i.e., I changed my shortcut key to ⇧⌘V. I copied that from another workflow. I think it was a way of keeping UTF-8 text while removing any associated formatting. You're right, it's unnecessary here. You've helped me simplify the workflow, but I'm still stuck here: So, I can use the paste as provided in the "Clipboard - Getting Started" example and then remove the top entry from the clipboard history, but, despite the item being removed from the history, it's still sitting in the active clipboard instead of being replaced with the next item in the clipboard history. If I try adding the final step of copying the top entry of the clipboard history – {clipboard:0} – to the clipboard, the workflow pastes that to the active application instead of the original item. For example: Type "foo", select it and cut it. Type "bar", select it and cut it. Verify clipboard history shows "bar" and "foo" as 1st and 2nd entries, respectively. Press hotkey (⇧⌘V) "foo" is pasted, is shown as the top item in the clipboard history, is the active clipboard contents. "bar" is gone from the clipboard history. In the last step, I was expecting/hoping it would paste "bar". If I leave off the last step in the workflow, it works as expected, but the active clipboard still contains "bar". I've tried re-ordering steps, but so far I haven't found a way to paste the current clipboard contents and then reload the active clipboard with a different item from the clipboard history. Any ideas what I'm doing wrong?
  7. Well, I've found a workaround using a workflow to "Paste and remove from history". Here's what I've got: My hotkey maps to an AppleScript Run Script that waits for modifier keys to be released (since the paste step simulates a ⌘V, doing so while modifier keys are still pressed can make the paste action fail). The next step is another AppleScript Run Script to paste the clipboard contents. A bash script remove the most recent entry from Alfred's clipboard database. And, finally, the last step uses the "Copy to Clipboard" output to paste the new top entry of the clipboard history into the clipboard so it's ready to be pasted. Wait for modifier keys to be released – Run Script – /usr/bin/osascript (AS) use framework "Foundation" property NSEventModifierFlagOption : a reference to 524288 property NSEventModifierFlagCommand : a reference to 1048576 property NSEventModifierFlagShift : a reference to 131072 property NSEventModifierFlagControl : a reference to 262144 on anyModifierKeysPressed() set currentModifiers to current application's class "NSEvent"'s modifierFlags() -- option if (currentModifiers div (get NSEventModifierFlagOption) mod 2 is 1) then return true -- command if (currentModifiers div (get NSEventModifierFlagCommand) mod 2 is 1) then return true -- shift if (currentModifiers div (get NSEventModifierFlagShift) mod 2 is 1) then return true -- control if (currentModifiers div (get NSEventModifierFlagControl) mod 2 is 1) then return true return false end anyModifierKeysPressed -- Wait until modifier keys are released set anyModifier to anyModifierKeysPressed() repeat while anyModifier set anyModifier to anyModifierKeysPressed() end repeat Paste clipboard contents – Run Script – /usr/bin/osascript (AS) tell application "System Events" do shell script "export LANG=\"en_US.UTF-8\"; pbpaste | pbcopy" keystroke "v" using {command down} end tell Remove most recent entry from clipboard history – Run Script – /bin/bash sqlite3 ~/Library/Application\ Support/Alfred/Databases/clipboard.alfdb 'delete from clipboard where ts=(select max(ts) from clipboard);' Update clipboard with new top of clipboard history – Outputs > Copy to Clipboard (Automatically paste to front most app option unchecked) {clipboard:0}
  8. Could an optional "Paste and remove from history" hotkey be added to Alfred's Clipboard History feature? Sometimes I work with sensitive information that I want to pop off the clipboard history when pasting. Launchbar has this feature in its clipboard history and I've found it very handy. If I'm copying some sensitive information around, I just paste with ⌃⌥⌘V (my chosen hotkey) and know the information will be removed from the clipboard history as it's pasted. I'm aware items can be deleted manually from the clipboard history using fn+delete, but clearing out items manually is tedious and much easier to forget to do. In the meantime, is there possibly a workaround possible within Alfred? For example, can a workflow manipulate the clipboard history? If I could connect my ⌃⌥⌘V hotkey to a workflow that pastes and then removes the top entry of the clipboard entry, it could serve as a workaround. Apologies if this feature has already been discussed/requested. I did some searching and didn't find this specific feature request.
  9. Awesome! Tried it out and it works perfectly. Even better, since you made a separate option for Large Type, I discovered that I prefer keeping Alfred on my primary monitor and just having the Large Type follow the cursor to the secondary display. Great for presentations! While checking it out, I also confirmed that the Show Alfred on mouse screen doesn't work with display one under the other bug is fixed too. Thanks! -Burke
  10. The "Show Alfred on mouse screen" option is a great addition ; however, Large Type has not joined the game. Using Large Type with the latest version of Alfred and the mouse cursor (and Alfred's prompt) on a secondary screen, the Large Type displays on the primary screen instead of the mouse screen as expected. Can we get Large Type to display on the mouse screen when the "Show Alfred on mouse screen" option is selected? Thanks! -Burke I'm running OS X 10.8.4 and Alfred v2.0.6 (203).
  11. +1000 I still run LaunchBar (which I had purchased before switching to Alfred) solely for it's clipboard history (to fill the only real gap in Alfred's functionality). A new Alfred clipboard history that can reliably recall my last ~40 clipboard entries (like LaunchBar does) without cherry picking only certain types of content (like Alfred currently does) would allow me to finally drop LaunchBar altogether. I've looked at other clipboard history tools, but they are all too heavy with unnecessary bells & whistles that make them less efficient than LaunchBar's approach.
  • Create New...