Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zcurses hello world

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@xxxxxxxxx> 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@xxxxxxxxx> 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

Messages sorted by: Reverse Date, Date, Thread, Author