zsh-workers
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Extend `zed' with status bar, is it possible?
Date: Thu, 18 Oct 2018 18:27:35 +0200	[thread overview]
Message-ID: <CAKc7PVCbux72W2GDHHHUpp63E6nW5bu=qrXejCBCdRZN+iQGyg@mail.gmail.com> (raw)
In-Reply-To: <CAKc7PVBu9Ddg1c0AAAYy8RjdhePcA_LcGj8sL=kns36-QM5f1w@mail.gmail.com>

I got some progress on this. vared's option -t allows to select tty. So I have:

% cat /usr/local/bin/bash5
#!/bin/sh
tty
tty > /tmp/ttynum
sleep 200

Above is to get the tty created/used by tmux and make tmux just hang
on sleep. Then to run:

killtmux() { tmux kill-session -t vared_se; }
zle -N killtmux
saveterm="$(stty -g)"
tmux set -g default-shell /usr/local/bin/bash5 \; new-session -s vared_se &
sleep 3 && vared -t "$(</tmp/ttynum)" -f killtmux ZSH_VERSION
stty "$saveterm"

The point is, tmux can be configured to start small window at bottom
where ezed's / zedex's status bar will be shown. Above code works very
well except one thing: after 1st run/edit, second run fails with:

open terminal failed: not a terminal

This comes from tmux. Wonder what can happen to... /dev/tty? or
stdin/stdout, so that tmux cannot take control?
On Thu, 18 Oct 2018 at 07:10, Sebastian Gniazdowski
<sgniazdowski@gmail.com> wrote:
>
> Hello
> I'm looking at vared and it seems that there is no way to replace/append-to vared's last line (last POSTDISPLAY line?) with some custom contents, basically a status bar. Does someone know a way?
>
> Using zed to add debug-print lines / fine-tune modifications is a nice use-case, if done with syntax highlighting that includes brackets-highlighting. There is a group of developers that edit in-session (not hash-bang) scripts and could benefit from this – theme (prompt) creators. As established earlier, this would be for say `zedex', an extended version of zed (unsure if  it will succeed to include in upstream).
>
> --
> Sebastian Gniazdowski
> News: https://twitter.com/ZdharmaI
> IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
> Blog: http://zdharma.org



-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

  reply	other threads:[~2018-10-18 16:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18  5:10 Sebastian Gniazdowski
2018-10-18 16:27 ` Sebastian Gniazdowski [this message]
2018-10-20 17:35 ` Bart Schaefer
2018-10-20 21:40   ` Sebastian Gniazdowski

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='CAKc7PVCbux72W2GDHHHUpp63E6nW5bu=qrXejCBCdRZN+iQGyg@mail.gmail.com' \
    --to=sgniazdowski@gmail.com \
    --cc=zsh-workers@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).