Re: wishlist: switch-client hook

2018-03-23 Thread Thomas Sattler

Hi again ...

Am 23.03.2018 um 13:20 schrieb Nicholas Marriott:
There is client-session-changed hook which is fired by switch-client, 
can you use it?


  set-hook -g client-session-changed "set-option -s \
set-titles-string \"#W#{?client_readonly, (ro),}\""

would indeed work.

Or can't you put the format in the option all the time but make it 
expand to empty when you don't want to see it?


  set-option -g set-titles-string '#W#{?client_readonly, (ro),}'

just as this one. I can't understand how I missed that ...

Thanks a lot!
Thomas

--
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 tmux-users+unsubscr...@googlegroups.com.
To post to this group, send an email to tmux-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: wishlist: switch-client hook

2018-03-23 Thread Nicholas Marriott
There is client-session-changed hook which is fired by switch-client, can
you use it?

Or can't you put the format in the option all the time but make it expand
to empty when you don't want to see it?


On 23 March 2018 at 10:55, Thomas Sattler 
wrote:

> Am 23.03.2018 um 11:49 schrieb Nicholas Marriott:
>
>> The pane_input_off format doesn't have anything to with read-only clients
>> (which would block the command)? Do you mean client_readonly?
>>
>
> Yes of course. (I'm aware of the difference and I'm using both.)
>
> We can add a hook but not for 2.7.
>>
>
> Eventually having it would be great.
>
> Thomas
>

-- 
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 tmux-users+unsubscr...@googlegroups.com.
To post to this group, send an email to tmux-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: wishlist: switch-client hook

2018-03-23 Thread Thomas Sattler

Am 23.03.2018 um 11:49 schrieb Nicholas Marriott:
The pane_input_off format doesn't have anything to with read-only 
clients (which would block the command)? Do you mean client_readonly?


Yes of course. (I'm aware of the difference and I'm using both.)


We can add a hook but not for 2.7.


Eventually having it would be great.

Thomas

--
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 tmux-users+unsubscr...@googlegroups.com.
To post to this group, send an email to tmux-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: wishlist: switch-client hook

2018-03-23 Thread Nicholas Marriott
The pane_input_off format doesn't have anything to with read-only clients
(which would block the command)? Do you mean client_readonly?

We can add a hook but not for 2.7.



On Fri, 23 Mar 2018, 10:44 Thomas Sattler, 
wrote:

> Hi there ...
>
> I might be to late as we're on RC, but I'd love to have a hook
> at switch-client to, for example, modify my xterm-title:
>
>set-hook -g switch-client "set-option -s set-titles-string \"foo
> #{?pane_input_off, (ro), (rw)}\""
>
> The problem I'm trying to solve is, that I cannot bind toggling
> read-only and modifying the title to a single key as the bound
> key won't work when the client is in read-only mode.
>
> Thomas
>
> --
> 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 tmux-users+unsubscr...@googlegroups.com.
> To post to this group, send an email to tmux-users@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 tmux-users+unsubscr...@googlegroups.com.
To post to this group, send an email to tmux-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.