-
Notifications
You must be signed in to change notification settings - Fork 91
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
clipdel: Delete current clip #98
Comments
While i think the use case is valid, i think it would make more sense to create a "Delete picker" (with |
Not really, since I wouldn't be able to delete the last clip by just invoking a shortcut combo. The issue gave me some ideas to implement this together with a clipdelmenu, though. I'll try to hack something when I get some time to spare. |
Yeah i guess ideally you could pass a number as a parameter for which item to delete and if no parameter is passed it asks interactively. For the interactive mode one could even (for rofi users) use rofi's multi-select. |
I'm not sure about that, as there's no indication of which number corresponds to an entry.
Yeap, that'll totally be possible. |
Well i would say in the order of the history: |
Sure, but what's the use case? The only way to know a entry's position is by running |
I only thought of your use case: deleting the last element |
I was actually thinking of implementing it like But don't get me wrong, I'm all in for something like @cdown have you thought of adding numbers in front of the entries in Something like:
|
I guess you're right, i don't really see a reason to automate deleting any other but the last copied entry |
This allows avoiding having to delete after the fact for things like issues #57 and #98. Why have this over just stopping clipmenud? Well: 1. Stopping clipmenud should usually be an init system action, but we are init-system agnostic. If we just exit, we don't have a way of reliably starting again. 2. Even if we *do* do it using the init system, we don't want some things (like a lingering xsel which owns the selection for CM_OWN_CLIPBOARD) being killed as well. 3. This is a nicer interface for things like password managers to stop clipmenu rather than stopping clipmenu entirely.
This allows avoiding having to delete after the fact for things like issues #57 and #98. Why have this over just stopping clipmenud? Well: 1. Stopping clipmenud should usually be an init system action, but we are init-system agnostic. If we just exit, we don't have a way of reliably starting again. 2. Even if we *do* do it using the init system, we don't want some things (like a lingering xsel which owns the selection for CM_OWN_CLIPBOARD) being killed as well. 3. This is a nicer interface for things like password managers to stop clipmenu rather than stopping clipmenu entirely.
I use something like this in the clipmenu script when I start it with a flag but I agree is not necessary. rm_line=$(cut -d' ' -f2- "$cache_file" | grep -Fxn "$chosen_line" | cut -d':' -f1 | sed 's/$/d/' | paste -sd';')
sed -i "${rm_line}" "$cache_file"
rm -f "$file" |
Passwords, copied to clipboard on a timeout (for example, Edit - sorry, nevermind, I misread and there already is a |
@cdown bumping this up since I too use |
@snprajwal You can disable clipmenud's collection like so when using pass:
|
As for this general issue, it seems somewhat related to #57, which should be trivial to implement in the current version. PRs welcome, of course :) |
I'd like to have a feature in
clipdel
to delete the current clip (first item ofclipmenu
), so I wrote a WIP patch which deletes the current clip and sets the clipboard content to the next item. It currently works withclipdel -l
.I'm opening this issue so we can discuss what's the best way to implement this feature.
The text was updated successfully, but these errors were encountered: