Thursday, July 21, 2011

Zenity makes me happy a bit...

Today I've created tiny dialog using "Zenity".

Why zenity? yeah that's clearly because I had really poor brain for python or something like that... :P

Yep. today AWN had a lot of lack in indicators... damned.

Here is my dialog for "Quit Session":

And its code is here:

list=("Logout" "Suspend" "Reboot" "Shutdown")

answer=$(zenity --list --title="Quit Your Session..." --text="<span weight='bold'>Select Action</span>" --column actions ${list[@]} --hide-header --width=200 --height=200)

case ${answer} in
    sudo service lightdm restart ;;
    sudo pm-suspend ;;
    sudo reboot ;;
    sudo poweroff ;;

...What a poor developments!! lol
but works well! :) yeah surely using beautiful elementary gtk3.

guys let's give a try to make original zenity GUI. :-)

No comments:

Post a Comment