My favorites | Sign in
yad
Project Home Downloads Wiki Issues Source
Search
for
ZenityWrapper  
Zenity compatible wrapper
Featured, Phase-Implementation
Updated May 25, 2011 by ananasik

Introduction

A little shell wrapper for use yad with zenity-based scripts

Just place following code to your startup files (~/.xprofile, ./bash_profile or same)

This is just a proof of concept, not a fully-worked solution!

Code

function zenity ()
{
    local ARGS
    ARGS=
    for a in "$@"; do
        case $a in
            --info) ARGS="$ARGS --image=gtk-dialog-info" ;;
            --question) ARGS="$ARGS --image=gtk-dialog-question" ;;
            --warning) ARGS="$ARGS --image=gtk-dialog-warning" ;;
            --error) ARGS="$ARGS --image=gtk-dialog-error" ;;
            *) ARGS="$ARGS $a"
        esac
    done
    eval set -- $ARGS
    yad $@
}
export -f zenity

Sign in to add a comment
Powered by Google Project Hosting