Ubuntu – GTK commands in a single BASH shell script, is it possible

bashcommand linepythonscripts

Is it possible in a bash shell script (single file) with loops variables etc that executes zenity among other programs
to remove zenity and add GTK functions instead?

If yes then is it possible also to add bash commands, variables, loops (copied from the bash shell script) to qt4 designer?

What i'm asking is if there a possibility that GTK functions can be combined with bash commands inside a bash shell script or even bash commands with qt4 designer.

I want to get rid of zenity (or yad, kdialog) because is very limited to a more advanced windows and still use all the rest bash functions that there already there in the bash shell script, is it possible?

Best Answer

There are no "GTK commands" in the way there are GTK+ functions in Python. GTK+ is a library with bindings in several languages, but it doesn't have executable commands for the functions it provides. You can try to do parts of what the GTK+ API can do via some external commands:

  • zenity, yad, etc. for showing dialog boxes
  • xsel or xclip to access the clipboard
  • wmctrl for controlling application windows

But the vast majority of GTK+ functionality can't be accessed by commands.

Related Question