A versatile graphical DSL and army knife to make and modify GUIs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3.7 KiB

guish - a versatile, simple DSL and army knife to make and modify GUIs (optionally using XEmbed)


guish is a GUI creation and modification tool that can be used to tie different programs together using XEmbed protocol and the shell (or as standalone) to create new programs, or to make simple GUIs.

It makes possible to control graphical elements using the shell, and allows to decouple the driving logic from the GUI.

The logic can be expressed by using plain shell code (or embedding it inside guish with some special syntax)

To view available elements do:

guish -l

To view available commands, events and signals for an element do:

guish -d

To view commands, events, signals and special syntax common to all elements do:

guish -a

Usage examples (please see the examples in examples directory)

Try guish in raw mode as a command interpreter:

    rlwrap guish
    button settext ok
    style {

Use guish in raw mode to make a button that launch free program:

echo 'button settext mem style "background:red;"' undecorate | guish | (
     while read -r input
         set -- $input
         test "$2" = clicked && free

Same as above, but uses the new events system:

    echo button settext mem on clicked run free | guish -qnc

Same as above, but use command line arguments:

    guish -qnc 'button settext mem on clicked run free'

Same as above, but use an english-like syntax:

    guish 'make a button, and when it`s clicked run free'

Same as above, but use an italian-like syntax:

    guish -t it.syntax 'crea un bottone, e quando vien cliccato esegui free'

Demo screenshots

Reuse xterm program to create a mini-splitted term (see splitterm.sh example)


Same but with toggled orientation


A mini-browser (standalone mode with English-like DSL)

#!/usr/local/bin/guish -conqimzf

Make a button named b, 
    filling it with '<-',
    and styling it with '
        max-width: 40px;
        background: magenta;

Then, make a button named f,
    fill it with '->',
    and style it with '
        max-width: 40px;
        background: magenta;

Create an input, and call it urlbar.

Then make a page named toolbar, 
    and stylize it with '
        #toolbar { 
            min-height: 30px;
            max-height: 30px; 
    Make it embed b
    Make it embed urlbar
    Make it embed f

Create a webpage named w, with images, private, and with javascript.

Make a page named main entitled MiniBrowser
    and make it vertical
    and make it embed toolbar
    and make it embed w

Center it
    Show it

When w link is clicked 'fill urlbar with "@1"'
    When urlbar is return pressed 'use urlbar to load w'
        When b is clicked 'w back, use w to fill urlbar'
            When f is clicked 'w forward, use w to fill urlbar'

And its screenshot


Building and installing

    git clone https://codeberg.org/phranz/guish
    cd guish
    ./configure --enable-webkit
    sudo make install

By default xtest is enabled to support xembedded application control (with keyboard)

Please see configure options to know more:

./configure --help


For more details on syntax and other stuff, please refer to the manual page.