fzf and dialog are new tools to me, thanks for pointing them out. for now I 
have managed to do something decent with a key binding to set the tag set 
-w @mysubset 'yes' and a key binding to get a tree of just the windows 
having the tag. I think for a few tags of not really fast-changing windows 
in the list it's the minimal friction and works quite effectively.

On Thursday, September 3, 2020 at 2:30:51 PM UTC+2 [email protected] 
wrote:

> Another thing you could do if you are using 3.2-rc or master is to write a 
> simple shell script that shows a menu to choose a window or session in a 
> way you want, or uses something like dialog or fzf, and open it in a popup 
> using display-popup.
>
>
>
> On Thu, 3 Sep 2020 at 13:28, Nicholas Marriott <[email protected]> 
> wrote:
>
>> You can change the s and w key bindings to add -Otime, something like:
>>
>> bind s choose-tree -Zs -Otime
>> bind w choose-tree -Zw -Otime
>>
>> You can look at these for choose-tree:
>>
>>
>> https://github.com/tmux/tmux/wiki/Getting-Started#choosing-sessions-windows-and-panes
>> https://man.openbsd.org/OpenBSD-current/man1/tmux.1#choose-tree
>>
>> You can use filters to show only a subset, for example:
>>
>> choose-tree -Zw -f '#{m:*sh,#{window_name}}'
>>
>> Of course the filter can be much more complicated than this.
>>
>> If you want to create subsets of windows you could set a user option, for 
>> example do this on the windows you want:
>>
>> set -w @mysubset 'yes'
>>
>> And then you can filter only the ones where this option is set:
>>
>> choose-tree -Zw -f '#{==:yes,#{@mysubset}}'
>>
>> Of course you can bind these to keys to make them easier to use.
>>
>> find-window (C-b f) works by generating filters automatically for tree 
>> mode.
>>
>> See:
>>
>> https://github.com/tmux/tmux/wiki/Formats
>> https://github.com/tmux/tmux/wiki/Formats#choose-modes-and-formats
>>
>>
>>
>> On Thu, 3 Sep 2020 at 13:19, Roberto Franceschini <
>> [email protected]> wrote:
>>
>>> Thanks a lot for pointing the capital O key for changing the sort 
>>> ordering. It does exactly what I was looking for and it seems to sort both 
>>> sessions and windows inside each session. This is very nice. 
>>> I was wondering if I can make this my default sorting, instead of 
>>> pressing O twice every time I open the sessions or windows lists.
>>>
>>> Also, what part of the documentation would be relevant to read more on 
>>> this and other ways to interact with the windows lists?
>>>
>>> Concerning bookmarks, you are correct, the windows name is the place to 
>>> use. I have chosen to have windows names set dynamically from the path of 
>>> the folder they are in, so I have given up that in favor of showing PWD in 
>>> the window name. The bookmarks where more intended to have a subset of the 
>>> existing windows reachable pressing a single key, a sort of quick-dial in 
>>> which you list only a subset of the windows you have and can access them by 
>>> a conifgurable single stroke (e.g. b for build, r for run, d for debug and 
>>> so no ...). Maybe I am just thinking about a configurable shortcut for 
>>> certain windows, indest of having them bound to the standard 0-10 M-a to 
>>> M-z. Can these be configured to access a given window of a given session by 
>>> one single user-defined key or sequence?
>>>
>>> Best
>>> Roberto
>>>
>>>
>>>
>>> On Thursday, September 3, 2020 at 10:51:16 AM UTC+2 
>>> [email protected] wrote:
>>>
>>>> If you go into tree mode and press O to change the sort order, one of 
>>>> the orders is by time which will show sessions and windows in order of 
>>>> activity time.
>>>>
>>>> tmux does maintain a stack of the last windows for each session and 
>>>> there is no reason it couldn't sort each session's windows using it but 
>>>> currently it is not possible.
>>>>
>>>> There is no way to set bookmarks but it doesn't seem terribly useful to 
>>>> me - that's what window and session names are for.
>>>>
>>>>
>>>> On Thu, 3 Sep 2020 at 09:37, Roberto <[email protected]> wrote:
>>>>
>>>>> I have maybe 100 panes in 10+ sessions kept running thanks to tmux. 
>>>>> These are mostly to collect a separate bash history for different 
>>>>> repetitive, but not completely predictable, tasks.
>>>>>
>>>>> Navigating this many sessions and panes is a bit of a pain, but I 
>>>>> think there are possible helping features in tmux.
>>>>>
>>>>> I could exploit a "history" and a "bookmarks" panel, pretty much 
>>>>> similar to those you have in web browsers. Is there anything like that in 
>>>>> tmux as of now?
>>>>>
>>>>> -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "tmux-users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to [email protected].
>>>>> To view this discussion on the web, visit 
>>>>> https://groups.google.com/d/msgid/tmux-users/22B4DC91-0C1D-4BE0-A8C6-FE5B1577C9EC%40gmail.com
>>>>> .
>>>>>
>>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "tmux-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> To view this discussion on the web, visit 
>>> https://groups.google.com/d/msgid/tmux-users/13b97df0-4784-485c-a662-a9ba2984ecc7n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/tmux-users/13b97df0-4784-485c-a662-a9ba2984ecc7n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/tmux-users/a3d73ab0-0557-4dc1-b4b4-6028983c77afn%40googlegroups.com.

Reply via email to