From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Justin Garrison <justinleegarrison@gmail.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: zcurses hello world
Date: Wed, 7 Aug 2019 23:13:19 +0200 [thread overview]
Message-ID: <CAKc7PVCgKyBKELduqaoymPD8KafOiexJPhpNhwiKRexOhZwaLw@mail.gmail.com> (raw)
In-Reply-To: <CAKc7PVD3r4f-JjFQTKO0tv=f6vHntZcOEyTUwCX8Yf0H2ZFtUQ@mail.gmail.com>
Here's a complete hello world script:
#!/usr/bin/env zsh
zmodload zsh/curses || exit 1
zcurses init
zcurses move stdscr 2 2
zcurses string stdscr "Hello World!"
zcurses refresh
sleep 2
# More: add a window with a border
zcurses addwin win2 10 25 5 10 stdscr
zcurses border win2
zcurses move win2 1 2
zcurses string win2 "Hello World!"
zcurses refresh win2
sleep 5
zcurses end
On Wed, 7 Aug 2019 at 01:07, Sebastian Gniazdowski
<sgniazdowski@gmail.com> wrote:
>
> You need to add some content and then call refresh. So for example add some text or draw the window's border.
>
> sob., 3 sie 2019, 02:32 użytkownik Justin Garrison <justinleegarrison@gmail.com> napisał:
>>
>> I'm trying to write a cli app with zcurses. I've looked at feedz, zmixer,
>> and tetriscurses and also ZUI but I couldn't find any very basic hello
>> world examples. I also found that feedz and zmixer don't work for me (zsh
>> 5.7.1).
>>
>> The only documentation I found was
>> http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcurses-Module
>> and
>> when trying zcurses init && zcurses addwindow ... nothing seems to happen
>> for me.
>>
>> I also watch the videos on ncurses UI in zcurses but that all uses ZUI
>> which has it's own implementation.
>>
>> Does someone have basic/intro hello world examples for zcurses?
>>
>> Thanks
>>
>> --
>> Justin Garrison
>> justingarrison.com
--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
next prev parent reply other threads:[~2019-08-07 21:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-03 0:30 Justin Garrison
2019-08-06 23:07 ` Sebastian Gniazdowski
2019-08-07 21:13 ` Sebastian Gniazdowski [this message]
2019-08-07 23:07 ` Daniel Shahaf
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=CAKc7PVCgKyBKELduqaoymPD8KafOiexJPhpNhwiKRexOhZwaLw@mail.gmail.com \
--to=sgniazdowski@gmail.com \
--cc=justinleegarrison@gmail.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).