Closed axelKeizoStahl closed 1 month ago
If you think this would be a good feature, I can submit a pr, adding it to the docs/wiki as well (under the advanced part for scratchpads config).
I think this is an interesting feature, could be enabled using something like stash_excluded = true
.
After seeing the PR, restore_excluded
sounds more easy to explicit to me.
Is your feature request related to a problem? Please describe. If I have 3 scratchpads open, then I open one
excludes="8"
scratchpad, I now need to reopen all those other scratchpads.Describe the solution you'd like Instead of closing the other scratchpads, how about "stashing" them? So once the "
excludes="*"
" scratchpad is closed, the other scratch pads are reopened.Create a new attr for the
Scratch
class inobject.py
for scratchpads calledexcludes_stash
or something. This gets updated whenrun_show
is called on a scratchpad with anexcludes
option. Then, when said scratchpad is passed torun_hide
, do arun_show
command for each of those scratchpads.This implementation is pretty heavy (on
run_show
's), it may be better to see if we can run a succinct version of therun_show
command, given that we know it is a scratchpad that is running, and other stuff.We might also want the
excludes_stash
attr somewhere else. The thing is, this attr needs to specify what closed it, because that is what will open it, meaning we can't just have one big list in the actual Extension class for _init.py. I think in theScratch
class makes most sense.LMK if you have a better idea for the implementation.
Describe alternatives you've considered My current implementation for this stores closed scratchpads in a
excluded_scratchpads
attr of the FocusTracker class (for the "excludy" scratchpad). Then, it runs therun_show
function on each of those scratchpads inside of the_handle_focus_tracker
for smart focus.