I'd like to put my 2-cents in requesting a 2-state command toggle feature in a future DO release.
The workaround that Nudel provided using the "Three Buttons" option to toggle a command via LMB/RMB works great for buttons, but this can't be done with a hotkey (can it?) which is what I want to do.
In this particular case, what I want to do is toggle between the current view mode and checkbox mode in details view. For example, flip between image thumbnails to preview images and then checkbox mode to select some images for copying.
This is how I'm doing it now with the Three Button approach.
State 1 (LMB):
Set layout=remember
Set view=details checkboxmode=on
State 2 (RMB):
Set layout=restore
This would be much cleaner with a 2-state toggle command that could be assigned to a button or hotkey.
I think such a thing would be left to providing toggle capability in more of the internal functions and supporting arguments... unless perhaps there was a good way of implementing some sort of generic @cycle or @toggle directive that could be used like:
Which would be cool to be able to toggle between MORE than just two states along with additional arguments which some of the functions don't allow to be 'cycled' along with other args that can be... and it would be possible to STACK multiple sets of commands to toggle through by putting multiple functions in sets of 'user' commands that could be toggled/cycled... Hmmm.
But for the particular case you've mentioned here won't a single hotkey that runs Set VIEW=Details,Thumbnails CHECKBOXMODE=Toggle do the trick?
I agree wholeheartedly. An @toggle directive followed by a parameterized statement that gets operated on would be very cool. I like it.
Man you are really close but it's not quite there. I don't want to hard code thumbnail view in the command, rather I want a generic command that toggles between whatever the last view mode was to detail mode and then back again. The last view mode could be thumbnails, tiles, largeicons or whatever. Expanding on your parameter idea, something like this would do the trick:
Set VIEW=Details,@last CHECKBOXMODE=Toggle
Right now I'm using layout=remember/restore to keep track of the last view, but in the code example below if I accidentally hit the LMB twice instead of LMB then RMB to toggle, then I lose the last view. A 2-state toggle would eliminate that problem.
LMB Set LAYOUT=remember
Set VIEW=details CHECKBOXMODE=On
Toggling between Details view and Thumbnails view is a very handy feature for me.
I figured out the LMB/RMB Three Button workaround on my own, but I wanted a true toggle button.
steje's brilliant suggestion to use a button with the Set VIEW=Details,Thumbnails CHECKBOXMODE=Toggle command worked great, but it left checkboxes visible in Details view.
Here's how I got rid of the checkboxes, but kept the toggle:
Set VIEW=Details,Thumbnails CHECKBOXMODE=Toggle+Set VIEW=Details,Thumbnails CHECKBOXMODE=Off
Question: is there an even more elegant way to program this button?
I really feel stupid overlooking the simple solution. I thought the "toggle" function came from the CHECKBOXMODE command - I didn't realize that just listing the 2 states would toggle them.