zsh-users
 help / Atom feed
* zcurses hello world
@ 2019-08-03  0:30 Justin Garrison
  2019-08-06 23:07 ` Sebastian Gniazdowski
  0 siblings, 1 reply; 4+ messages in thread
From: Justin Garrison @ 2019-08-03  0:30 UTC (permalink / raw)
  To: zsh-users

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

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

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

* Re: zcurses hello world
  2019-08-03  0:30 zcurses hello world Justin Garrison
@ 2019-08-06 23:07 ` Sebastian Gniazdowski
  2019-08-07 21:13   ` Sebastian Gniazdowski
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Gniazdowski @ 2019-08-06 23:07 UTC (permalink / raw)
  To: Justin Garrison; +Cc: Zsh Users

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

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
>

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

* Re: zcurses hello world
  2019-08-06 23:07 ` Sebastian Gniazdowski
@ 2019-08-07 21:13   ` Sebastian Gniazdowski
  2019-08-07 23:07     ` Daniel Shahaf
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Gniazdowski @ 2019-08-07 21:13 UTC (permalink / raw)
  To: Justin Garrison; +Cc: Zsh Users

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

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

* Re: zcurses hello world
  2019-08-07 21:13   ` Sebastian Gniazdowski
@ 2019-08-07 23:07     ` Daniel Shahaf
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Shahaf @ 2019-08-07 23:07 UTC (permalink / raw)
  To: Zsh Users; +Cc: Justin Garrison

Sebastian Gniazdowski wrote on Wed, 07 Aug 2019 21:15 +00:00:
> Here's a complete hello world script:
> 
> #!/usr/bin/env zsh
> 
> zmodload zsh/curses || exit 1
...
> zcurses end

Might this be a good addition to the Misc/ directory (alongside
Misc/vcs_info-examples) or to the manual?

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-03  0:30 zcurses hello world Justin Garrison
2019-08-06 23:07 ` Sebastian Gniazdowski
2019-08-07 21:13   ` Sebastian Gniazdowski
2019-08-07 23:07     ` Daniel Shahaf

zsh-users

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-users

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.users


AGPL code for this site: git clone https://public-inbox.org/ public-inbox