Skip to content

Instantly share code, notes, and snippets.

@hmijail
Created June 12, 2017 11:33
Show Gist options
  • Save hmijail/78b42f9becc52e137323ef024cd2c910 to your computer and use it in GitHub Desktop.
Save hmijail/78b42f9becc52e137323ef024cd2c910 to your computer and use it in GitHub Desktop.
A CopyQ command to implement a "Clipboard Revolver" (or LIFO, or Stack)
[Command]
Command="
copyq:
select(0)
paste()
remove(0)"
GlobalShortcut=meta+ctrl+v
Name=Clipboard LIFO
@dlsso
Copy link

dlsso commented Dec 23, 2019

Not working for me either, but seems to be a problem with the software, not this script.
I tried to implement by doing f6, add a global shortcut command (find script option) and then entering the script under command.
I can trigger the command, but paste() does not paste so it just ends up removing items from the clipboard.

@hmijail
Copy link
Author

hmijail commented Dec 23, 2019

Unfortunately I can only say that when I posted it, it worked... and then it stopped working. I don't remember if it was because of a CopyQ update or an OS update; the failure mode changed a couple of times and I never looked seriously into making it work again.

@waiting-for-dev
Copy link

Probably can be fixed in a similar way that the FIFO counterpart:

https://gist.github.com/hmijail/5676ce439edbd3c1c5a0e46e04c5293a#gistcomment-3965258

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment