All of the X clipboard managers I've seen appear to follow a common model, which presents these problems: - pasting requires two steps: selection and then pasting - history is not preserved (i.e., the stack is reordered when an item is selected) In contrast, an alternative mode of operation would be useful: - selecting an item immediately pastes that item - history is preserved (i.e., items are not reordered) I also find the following behaviour useful: - use global key binding to show menu - use arrow keys to move through the list, and enter/space to paste - restore focus (i.e., when the menu is recalled by key binding, focus is restored to the item which was last selected) - avoid unwanted appearance of the actions menu by using an optional key binding to trigger it Please comment. I'd like to know if others are interested in these things. Thanks, Dick
Hello Richard, (In reply to comment #0) > All of the X clipboard managers I've seen appear to follow a common model, > which presents these problems: > > - pasting requires two steps: selection and then pasting > - history is not preserved (i.e., the stack is reordered when an item is > selected) > > In contrast, an alternative mode of operation would be useful: > > - selecting an item immediately pastes that item For the paste action -- that is pasting the content of the text after an item has been selected in the history -- I'll have a look. It's something that should be possible with X11. > - history is preserved (i.e., items are not reordered) The items in the history is reordered because there is a limitation of maximum displayed items, and the oldest are automatically deleted. So to me it makes sense to push the clicked element to the top of the history in order to not lose it when new items are pushed in. > I also find the following behaviour useful: > > - use global key binding to show menu There is a keybinding possible, just create a keyboard shortcut for the command "xfce4-popup-clipman". > - use arrow keys to move through the list, and enter/space to paste When you are in the menu you can browse through the items with the Up/DownArrow keys. Not sure I understand here, or is it again about the possibility to paste as soon as an item was selected? > - restore focus (i.e., when the menu is recalled by key binding, focus is > restored to the item which was last selected) This is a not supported by a menu, you cannot preselect an item. > - avoid unwanted appearance of the actions menu by using an optional key > binding to trigger it What do you suggest? I could see a possible way to disable the action when content is being copied with Ctrl+Shift+C. > Please comment. I'd like to know if others are interested in these things. > > Thanks, > Dick Thanks for the feedback, Mike
(In reply to comment #1) > For the paste action -- that is pasting the content of the text after an item > has been selected in the history -- I'll have a look. It's something that > should be possible with X11. Test code is working nice, I can emulate key presses, even the Ctrl+v shortcut, which is what we need here.
I have a commit in a local git, it will be pushed in the remote git. Marking this a FIXED now.
Thanks for your reply Mike! > The items in the history is reordered because there is a limitation of maximum > displayed items, and the oldest are automatically deleted. So to me it makes > sense to push the clicked element to the top of the history in order to not > lose it when new items are pushed in. For my usage patterns, maintaining the order is essential (and I use a large enough buffer that losing items off the other end of the stack is not a problem). In any case, please include an option to preserve order. >> - use arrow keys to move through the list, and enter/space to paste > > Not sure I understand here, or is it again about the possibility to paste > as soon as an item was selected? Yes. >> - avoid unwanted appearance of the actions menu by using an optional key >> binding to trigger it > > What do you suggest? I could see a possible way to disable the action when > content is being copied with Ctrl+Shift+C. Sure, and an option to invert the behaviour; i.e., to trigger the actions with the optional key binding (instead of the default Ctrl-C), and vice versa. Thanks again! Dick
I added another hidden setting /tweaks/reorder-items, when set to false it won't reorder items from the history.
And another hidden setting /tweaks/skip-action-on-key-down to skip the actions popup menu when the Control key is hold down at the end of the selection. E.g. select text with either the mouse or the shift key, and while doing the selection press on Ctrl, when you release the mouse button or the shift key the menu is not shown if Ctrl was still pressed. Hidden settings can be tweaked with xfconf-query. - list existing settings: xfconf-query -c xfce4-panel -p /plugins/clipman -lv - create a new propery: xfconf-query -c xfce4-panel -p /plugins/clipman/tweaks/skip-action-on-key-down -n -t bool -s true - modify existing property: xfconf-query -c xfce4-panel -p /plugins/clipman/tweaks/skip-action-on-key-down -s true You can also bind keyboard shortcuts to xfconf-query, so for example you can create a shortcut with the following command to enable/disable actions on the fly with the -T (toggle) option: xfconf-query -c xfce4-panel -p /plugins/clipman/settings/enable-actions -T To create keyboard shortcuts go to Xfce>Settings>Keyboard or xfce4-keyboard-settings. I will on a later version add a new "Tweaks" tab in the settings dialog.
For the record, version 1.2.1 provides a Tweaks tab with these options.
Your changes are greatly appreciated, but history preservation needs more explanation. There is now an option to preserve the stack order but the pointer to the active register changes which effectively means that the system paste command (e.g., ctrl-v) pastes from the active register not from the top of the stack as one would expect. For example: - paste something from clipman in the middle of the stack (thus marking that register active) - copy something - paste without calling clipman directly Result: the active register is pasted, not the most recently copied item. It seems useful to mark an active register but I think the system paste command should always paste the last copied item (as one would expect of a LIFO stack). I guess this interferes with your implementation of automatic pasting but I hope you can see a way to make it work. At the very least, it seems reasonable to set the active register to the top of the stack every time a new item is added (i.e., reset pointer on copy). Thanks again! Dick
Oops, I see what you spotted, but please open a file a new bug.