Jump to content

bennyty

Member
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

434 profile views

bennyty's Achievements

Helping Hand

Helping Hand (3/5)

0

Reputation

  1. I have a hack that is almost working. I'm using BetterTouchTool to make a new key-shortcut that does 3 actions. Run terminal command: sqlite3 /Users/Ben/Library/Application\ Support/Alfred\ 2/Databases/clipboard.alfdb 'SELECT item FROM clipboard ORDER BY ts DESC LIMIT 1;' | pbcopy Trigger: ⌘V Run terminal command: sqlite3 /Users/Ben/Library/Application\ Support/Alfred\ 2/Databases/clipboard.alfdb 'DELETE FROM clipboard ORDER BY ts DESC LIMIT 2;' This reads the most recent item from Alfred's database and copies it to the system clipboard. This has the side effect of adding it again to the Alfred database. Then ⌘V pastes it. Then we delete the two most recent items from Alfred. Problem is, BTT is missing a way to wait for terminal command to finish; the method above is inconsistent because it pastes before the database and pbcopy resolve. I guess I'm currently waiting on https://github.com/fifafu/BetterTouchTool/issues/444. Any suggestions? ------------------------------------------------ EDIT: Currently trying an Alfred only solution. Similar issue as above (particularly that Copy to Clipboard & Paste is an output and can't be chained). Alfred Workflow attempt: Using Applescript: do shell script "sqlite3 '/Users/Ben/Library/Application Support/Alfred 2/Databases/clipboard.alfdb' 'SELECT item FROM clipboard ORDER BY ts DESC LIMIT 1;' | pbcopy" tell application "System Events" to keystroke "v" using command down do shell script "sqlite3 '/Users/Ben/Library/Application Support/Alfred 2/Databases/clipboard.alfdb' 'DELETE FROM clipboard ORDER BY ts DESC LIMIT 2;'" Has the same issue as it needs to pass the text through the clipboard again. Alfred takes some time to pickup on the clipboard change causing the sql-delete to delete the next entry instead of the duplicate. The ideal solution would be to use a bash script and pipe the output to Alfred's Copy to Clipboard & Paste action WITHOUT having it inserted into Alfred's clipboard.
  2. hmijail, you have it exactly right. I'm not sure why I didn't think to call it a LIFO/stack (I'm a computer scientist). I would also be happy with some sort of pointer into the stack that pastes and moves down on ⌥⌘V and resets to the top of the stack on ⌘V. Alfred stores the clipboard at ~/Library/Application Support/Alfred 2/Databases/clipboard.alfdb perhaps I can write a script (later™) that could edit the SQLite3 database to pop the object off the "stack".
  3. Agreed, along with searchability it makes Alfred a joy to use (except when it minimizes my pop-over window by stealing focus. I'd love if I was able to pull the first item in the stack with one keybind then the next then the next (maybe up to 5 or 9 deep?) if that would be easier than rearranging the stack.
  4. Hey Forum, I use Alfred's clipboard manager ~100 times per day, often in a terminal window. However I am using iTerm2's hotkey (⌥<Space>) window which opens the terminal as an overlay. Unfortunately, triggering the clipboard manager (⌥⌘C) causes the hotkey window to close. Thus, in order to paste several entries I paste one into the terminal then paste the next one into another application effectively moving it to the top of the clipboard stack and repeat. It would be excellent if it was possible to do one of the following: shuffle the clipboard (make the next item down active so that ⌘V would paste it) pop the top item off the stack (pasting it and removing it the same way you can with ⌫) I've done some searching and this seems to indicate that we cannot manipulate Alfred's clipboard manager. Alfred's clipboard manager is the best one I've used (searchable and no mouse required) but I'd be open to alternative suggestions Thank, Ben
×
×
  • Create New...