zsh-users
 help / color / mirror / code / Atom feed
* command on switching terminals?
@ 2018-01-06  5:33 Ray Andrews
  2018-01-06 22:20 ` Mikael Magnusson
  0 siblings, 1 reply; 21+ messages in thread
From: Ray Andrews @ 2018-01-06  5:33 UTC (permalink / raw)
  To: Zsh Users

Is it possible for zsh to know when the terminal in which it is running 
has awakened by having the mouse moved into that window?  I understand 
that it's the window manager that decides which terminal is active of 
course, but perhaps zsh knows when it is put to sleep by the mouse 
moving out of it's window, and also knows when it has been awakened 
again? I have a utility that lets you hotkey a mouse jump between 
terminals so as to jump between them without having to reach for the 
mouse itself, and I can call it fine within a function, but I'd like to 
be able to also execute some code after each jump but in the new 
window.  As it is, zsh just wakes up without seeming to know it's been 
asleep so there's nothing to 'attach' any commands to.  precmd() and 
preexec() are not aroused.   Any commands inside the calling function 
placed after the command to jump to the new terminal are executed in the 
old terminal, which is not surprising, so it would have to depend on the 
awakened terminal knowing it's been awakened.  Sorta like precmd but 
hooked to the activation of the terminal.  I understand that this might 
be outside of zsh's domain.



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2018-01-08 17:08 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-06  5:33 command on switching terminals? Ray Andrews
2018-01-06 22:20 ` Mikael Magnusson
2018-01-06 22:45   ` Ray Andrews
2018-01-07 18:48     ` Grant Taylor
2018-01-07  0:51   ` Ray Andrews
2018-01-07 13:24     ` Mikael Magnusson
2018-01-07 16:45       ` Ray Andrews
2018-01-07 18:23         ` Mikael Magnusson
2018-01-07 18:39           ` Grant Taylor
2018-01-07 19:06           ` Ray Andrews
2018-01-07 20:27             ` Bart Schaefer
2018-01-07 20:43               ` Grant Taylor
2018-01-07 21:12               ` Ray Andrews
2018-01-07 21:36                 ` Grant Taylor
2018-01-08  1:43                 ` Ray Andrews
2018-01-07 20:29             ` Grant Taylor
2018-01-08  6:25   ` Mikael Magnusson
2018-01-08  6:28     ` Mikael Magnusson
2018-01-08 15:39       ` Ray Andrews
2018-01-08 16:08         ` Peter Stephenson
2018-01-08 16:38           ` Ray Andrews

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).