I now want to hide the "Default Layout" button when I am in Default Layout and the "Small Layout" button when I am in Small Layout. How to do that? Thanks in advance.
It worked like a charm. Thanks a lot. Your solution turned out to be more complex than I initially thought (it needed script to accomplish what I wanted).
Got me wondering if it would also be possible to have a single button with a similar purpose but one that cycles though all saved layouts. Switching to the next saved layout on each subsequent click, with a dynamic label displaying the current active layout and displaying the next in line on mouse hover.
I wish I could accept your suggested challenge but that would be just silly due to my brains computing limitations regarding to coding
But it didn't work. Can you explain why it didn't work? Why we needed script in this case? Forgive me if my question looks silly, I am a new user without any coding background.
Command modifiers can test many settings but not all. So there is nothing that could tell us the current layout. We need to take notes ourselves and store that info in a variable.
Every lister needs its own variable so it needs to be scoped to the lister level. If calling a layout only changes the current lister we are fine.
But do we do when the layout opens one or more listers?
What if there is a second button that opens listers?
All these cases are covered by a short script that updates the info about the layout whenever a lister gets activated.
A little late to the party and perhaps a tangent but...
Here are commands for a button that toggles between two listers:
@if:$glob:lay
@set glob:lay
@sync:/home\dopusrt.exe /cmd Close
Prefs LAYOUT="Your first lister"
@if:else
@sync:/home\dopusrt.exe /cmd Close
Prefs LAYOUT="Your second lister"
@set glob:lay=on
Thanks @jinsight . It works fine. The only thing lacking in your code is that the Button Label doesn't change dynamically when I change the Layout. In my case detailed above when I am in "Small Layout", it should show "Default Layout" and vice versa.