Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Call a function when idle?
- X-seq: zsh-users 26227
- From: "A. Wik" <awik32@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Call a function when idle?
- Date: Tue, 15 Dec 2020 11:09:01 +0000
- Archived-at: <https://zsh.org/users/26227>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2020-12/CALPW7mSyK%3DRH2OmD8OouL7eK9%3DsOuv8eCRGCvRpKUfZ90xUvjw%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-lf1-f54.google.com) smtp.remote-ip=209.85.167.54; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=FTAlJASHsGz57ogxB1eUPL5jTr8vsNFW81U6LYIeW1g=; b=DefCUgZFIJ23geqzCbOWp9r3beLlaoTUP1HjdV3lzd7DoORWZE6U0ufg21vOYUmg+R 4v44D8lSHXVCfZOOmXQN/9GIvOhSz75A5lbmpfJLSKrvGxL25P4NmPduhRRYzbGBEDCi gJm3MaQg7+0n2DmL1OF2VYRkTtYNZQwLiISFYoaHbYGwbaAMOKu+ay6smCI90mDadWBn kKVrf77B/P1BNZ9TvLkJ2mvDcJkFg+6spXq4aJmKtYLLLFUnPVXzMOLPSDR82arX2L8u nSC47x1m15jyGmEBKapcALWsJ+G+oZLAL6h+AsMRC+q4jF9pZb1hb6vr92ssmPflbred qePQ==
- In-reply-to: <CAH+w=7YwtDNBMzZ8Vx52XwVmkZgT8a0eGNHzJa0+OFQfTwkdxA@mail.gmail.com>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-users>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-users.zsh.org>
- List-owner: <mailto:zsh-users-request@zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-users>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-users>
- References: <CALPW7mQjh9-5USvtdcmW=Z=bSFT7qmXN8bM0VXhrJtYzSzJ-ag@mail.gmail.com> <CAHYJk3QNN7yGZspvXyNhn3WVhss-xYZ9dW-kSY1QnLT9ED3gaw@mail.gmail.com> <CAH+w=7YwtDNBMzZ8Vx52XwVmkZgT8a0eGNHzJa0+OFQfTwkdxA@mail.gmail.com>
- Sender: zsh-users-request@xxxxxxx
Thanks for the replies.
I adapted Bart's code as follows:
TRAPALRM () {
TMOUT=60
title
if ((!$DIDPRINT)) {
DIDPRINT=1
print -nP '\r%n@%m(%y):%d%# \n%# '
}
}
precmd () {
TMOUT=120
DIDPRINT=0
title
}
-aw
Messages sorted by:
Reverse Date,
Date,
Thread,
Author