zsh-users
 help / color / mirror / code / Atom feed
* Re: Change terminal cursor shape from precmd()
       [not found] <CACfAdfan-pGMWXAqL28Z0sVymODmSxjSXzyHnx3j2vBjFeTS8A@mail.gmail.com>
@ 2017-08-23 17:22 ` Daniel Shahaf
  2017-08-24  8:50   ` Tomasz Moskal
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Shahaf @ 2017-08-23 17:22 UTC (permalink / raw)
  To: Tomasz Moskal; +Cc: zsh-users

[>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)


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

* Re: Change terminal cursor shape from precmd()
  2017-08-23 17:22 ` Change terminal cursor shape from precmd() Daniel Shahaf
@ 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
  0 siblings, 1 reply; 4+ messages in thread
From: Tomasz Moskal @ 2017-08-24  8:50 UTC (permalink / raw)
  To: Daniel Shahaf; +Cc: zsh-users

[-- Attachment #1: Type: text/plain, Size: 911 bytes --]

On 23 August 2017 at 18:22, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
>
> 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)
>

Eh, it was my own idiocy - after symlinking my user zsh config to root's
one it all works as intended. Obviously, cominit is complaining about
insecure directories. So symlinking is out of the question, as is comptinit
-u. Sourcing zsh user startup files from root startup files is fine but a
bit tedious in case of various helper functions (many separate files). I
don't want to touch global zsh startup files and overload them with my
personal settings either. My new question is:

How do you folks share (if you do) your user zsh startup files with root's?

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

* Sharing dotfiles among users (was: Re: Change terminal cursor shape from precmd())
  2017-08-24  8:50   ` Tomasz Moskal
@ 2017-08-24  8:53     ` Daniel Shahaf
  2017-09-04 19:55       ` Roman Neuhauser
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Shahaf @ 2017-08-24  8:53 UTC (permalink / raw)
  To: Tomasz Moskal; +Cc: zsh-users

[I've changed the subject for you]

Tomasz Moskal wrote on Thu, 24 Aug 2017 09:50 +0100:
> How do you folks share (if you do) your user zsh startup files with root's?

I don't, but if I did I'd use vcsh: https://github.com/RichiH/vcsh


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

* Re: Sharing dotfiles among users (was: Re: Change terminal cursor shape from precmd())
  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
  0 siblings, 0 replies; 4+ messages in thread
From: Roman Neuhauser @ 2017-09-04 19:55 UTC (permalink / raw)
  To: zsh-users

# d.s@daniel.shahaf.name / 2017-08-24 08:53:49 +0000:
> [I've changed the subject for you]
> 
> Tomasz Moskal wrote on Thu, 24 Aug 2017 09:50 +0100:
> > How do you folks share (if you do) your user zsh startup files with root's?
> 
> I don't, but if I did I'd use vcsh: https://github.com/RichiH/vcsh

shameless plug: i didn't like some aspects of vcsh and wrote my own (in zsh):

https://github.com/roman-neuhauser/git-dirs

-- 
roman


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

end of thread, other threads:[~2017-09-04 20:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CACfAdfan-pGMWXAqL28Z0sVymODmSxjSXzyHnx3j2vBjFeTS8A@mail.gmail.com>
2017-08-23 17:22 ` Change terminal cursor shape from precmd() Daniel Shahaf
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

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).