Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Change terminal cursor shape from precmd()
- X-seq: zsh-users 22853
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Tomasz Moskal <boojum@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: Change terminal cursor shape from precmd()
- Date: Wed, 23 Aug 2017 17:22:14 +0000
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Ez9jih YOzRba9TclkNBmFft8MXG3x7qYOmOewOkdeK4=; b=Zqpl03e1EfJyjc71KvlQm7 l7pQlMZfhfnOjmMHdkPlr0X9aPI4IlwkFDzjU6uW/gD+RL4aOEFfdGO9g1qUoWgn W89KLyl7t85cIeOFX5DjCYb2DFR7xsFLZ5hOtvWhCsP4s1oqqfle3qmPAS4O/sU8 htPF9PdR1YWsnARa4lWGOyRcZ6r9KHtjAXZbABjtOwHPL8B/D/Aa7JbvU3u9HLER zxSrvLMU9ClpqaCDgxGYY4m+keNZI3KxiYKC3a58Jl/00Lg/gkoTf2hj6GpuTn6x 0HDqk8jMrHGdv2OtUZDogHTk9iVt2pJ0DjJ4tTJjX/iDxwOH/3sI9FJnijV03kJg ==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Ez9jih YOzRba9TclkNBmFft8MXG3x7qYOmOewOkdeK4=; b=ngoDw8IoR3Q5+8+2/uOxhJ trvqjI+wNqZGFQ77HwAiw+44fcLlnQ62PaREh8SKgXolZJhafR1SBOLaKTBVdPUf oUdzN8iOVYFTr6kWw0NwY1BJg8ElbUmUFoc3XVrpjasiWQP23P3GC4cr1YSMU2kj WknfZ1T1iIdsFvReLhOG/7A3ZrrwoXFhqzMeVaxL0gp/eh4gIC8AlnYkJv8zEGot E7aUnHkG3qIj/J1l4q9vrTdI5R6Ka72uOa/ku9gyvFbFFsyyz5wFn9IZY8V+bTnC mfExgdBV3ltow9yOLQ5mc85ihKhms0AyMArwfKB8MIu0sngtdO0tfChKk+3MK2vQ ==
- In-reply-to: <CACfAdfan-pGMWXAqL28Z0sVymODmSxjSXzyHnx3j2vBjFeTS8A@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CACfAdfan-pGMWXAqL28Z0sVymODmSxjSXzyHnx3j2vBjFeTS8A@mail.gmail.com>
[>users]
Tomasz Moskal wrote on Wed, 23 Aug 2017 12:35 +0100:
> function precmd() {
> if [[ ! $(id -u) -eq 0 ]]; then
> echo -ne "\033]12;#fffeb3\007\e[3 q]"
> else
> echo -ne "\033]12;#ae0001\007\e[1 q]"
> fi
> }
Works for me in xfce4-terminal and in xterm in 'zsh -f'.
If you run 'which precmd' at the interactive prompt, does it show this
function or something else? (If something else: see precmd_functions)
(Also, zle-line-init might be a better place to put this in)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author