Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Custom Actions upon copying/selecting #35

Open
jvonhoff opened this issue Feb 25, 2022 · 3 comments
Open

Add Custom Actions upon copying/selecting #35

jvonhoff opened this issue Feb 25, 2022 · 3 comments
Labels
enhancement New feature or request maybe

Comments

@jvonhoff
Copy link

When copying some text/image, filter it through a regex to then run a bash one-liner

Xfce's Clipman

The Xfce panel plugin Clipman is where I first used this functionality, and found it very useful -- the ability to simply select or copy some text, and then have clipman pop up a small "Actions" dialog to ask what I want to do with it.

Use Case 1

  • Flipping through IMDb, I get interested in Baby Driver: https://m.imdb.com/title/tt3890160/
  • I copy the URL from Firefox
  • My IMDb Action regex matches with https?:\/\/.*\.imdb\.com\/title\/tt([0-9]{4,})\/ (note that I'm capturing the 4+ digit IMDb identifier
  • A popup shows "Find in Radarr", with a bash one-liner that says "firefox https://my.radarr.lan/add/new?term=imdb:$1" (or maybe it's \1?)

Use Case 2

  • Installed a new app, but hate the icon. Downloaded a nicer image icon, but it doesn't match my icon theme.
  • Select the icon image filename & copy it
  • My Local Image regex matches with (.*Downloads\/.*\.jpg|png|JPEG)
  • A popup shows "Iconify", with a bash script that uses imagemagick, etc. to resize, round corners, etc. and save the new icon.
@jvonhoff jvonhoff added the enhancement New feature or request label Feb 25, 2022
@SUPERCILEX
Copy link
Owner

This sounds like a super cool idea, but I'll have to think on it some more. Right now, I'm leaning towards saying this should be a separate extension entirely since this feature has nothing to do with the history.

@jvonhoff
Copy link
Author

Completely understand -- this really has nothing to do with history, so I get where you're coming from there. I do hope you'll consider it, though, as I think it's a powerful feature that (AFAIK) isn't found in any other Gnome extensions. But, if you do decide that it should be another extension, I might try my hand at porting the clipman code over, and see how that goes. Thanks!

@CristianKerr
Copy link

@jvonhoff you may want to look into copyq application. It can do what you need. However, it doesn't work well with wayland, that's why I stopped using it, but if you are still on x11 you may want to give it a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request maybe
Projects
None yet
Development

No branches or pull requests

3 participants