zsh-users
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Tomasz Moskal <boojum@stercus-accidit.com>
Cc: zsh-users@zsh.org
Subject: Re: Change terminal cursor shape from precmd()
Date: Wed, 23 Aug 2017 17:22:14 +0000	[thread overview]
Message-ID: <1503508934.2259468.1082721952.1C3E86FB@webmail.messagingengine.com> (raw)
In-Reply-To: <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)


       reply	other threads:[~2017-08-23 17:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CACfAdfan-pGMWXAqL28Z0sVymODmSxjSXzyHnx3j2vBjFeTS8A@mail.gmail.com>
2017-08-23 17:22 ` Daniel Shahaf [this message]
2017-08-24  8:50   ` Tomasz Moskal
2017-08-24  8:53     ` Sharing dotfiles among users (was: Re: Change terminal cursor shape from precmd()) Daniel Shahaf
2017-09-04 19:55       ` Roman Neuhauser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1503508934.2259468.1082721952.1C3E86FB@webmail.messagingengine.com \
    --to=d.s@daniel.shahaf.name \
    --cc=boojum@stercus-accidit.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).