Coder Social home page Coder Social logo

renovate-bot / z-shell-_-zui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from z-shell/zui

1.0 0.0 0.0 486 KB

⚙️ The Rapid Application Development textual user interface library for Zsh.

Home Page: https://wiki.zshell.dev/ecosystem/plugins/zui

License: Other

Shell 99.82% Makefile 0.18%

z-shell-_-zui's Introduction

Logo ❮ ZI ❯ - ⬢ ZUI

ZUI – CGI+DHTML-like User Interface Library for Zsh / ZCurses

This is a RAD (Rapid Application Development) textual user interface library for Zsh. It in many aspects resembles typical CGI+(D)HTML setup. There are:

  • generators ran on "server" side (basic Zshell-code that is just generating text!),
  • event loop that turns the generated text into document with active elements (buttons, anchors, toggle buttons, text fields, list boxes),
  • mechanism to regenerate document parts from the original generators.

So, a Zshell code generates text. It is then turned into document with hyperlinks. DHTML-like calls are possible that will regenerate document parts on the fly. Page can be also reloaded with input data, just like an HTML page.

A voiced video tutorial shows how to create an application – Nmap network scanner frontend.

See also ZSTYLES

Hello World

# Started from Zle or from command line

-zui_std_cleanup deserialize:"zui-demo-hello-world"
-zui_std_init app:"zui-demo-hello-world" app_name:"ZUI Hello World"
emulate -LR zsh -o extendedglob -o typesetsilent -o warncreateglobal
-zui_std_init2 # after emulate -LR

-zui_std_store_default_app_config b:border 1

demo_generator_A() {
    local mod="$1" ice="$2"
    # Content, no hyper-links
    reply=( "Hello World from ${ZUI[YELLOW]}ZUI${ZUI[FMT_END]}! Module $mod, instance $ice." )
    # Non-selectable lines   Hops to jump with [ and ]   Local anchors
    reply2=( )               reply3=( 1 )                reply4=( )
}

## Start application ##
zui-event-loop 1:demo_generator_A

-zui_std_cleanup serialize

Other example which uses list-box: zui-demo-list-box

The API is described at the wiki.

Installation

The plugin is "standalone", which means that only sourcing it is needed. To install, unpack zui somewhere and add to zshrc:

source {where-zui-is}/zui.plugin.zsh

If using a plugin manager, then ZI is recommended, but you can use any other too, and also install with Oh My Zsh (by copying directory to ~/.oh-my-zsh/custom/plugins).

Add zi load z-shell/zui to your .zshrc file. ZI will handle the rest automatically the next time you start zsh. To update (i.e. to pull from origin) issue zi update z-shell/zui.

Antigen

Add antigen bundle z-shell/zui to your .zshrc file. Antigen will handle cloning the plugin for you automatically the next time you start zsh.

Oh-My-Zsh

  1. cd ~/.oh-my-zsh/custom/plugins
  2. git clone [email protected]:z-shell/zui.git
  3. Add zui to your plugin list

Zgen

Add zgen load z-shell/zui to your .zshrc file in the same place you're doing your other zgen load calls in.

z-shell-_-zui's People

Contributors

psprint avatar ss-o avatar agkozak avatar digital-teams avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.