从bash脚本对话框 [英] Dialog from bash script
问题描述
我要创建一个简单的图形(QT,GTK,...)对话框,较具体来说一个简单的打印对话框,作为前端,以LPR,在bash。
我想要的是?每页多少页,打印间隔。这是(至少)两个选项。
I want create a simple graphical (Qt, Gtk, ...) dialog, concretly a simple print dialog, as a "frontend" to lpr, in bash. What I want? How many pages per page, printing interval. It's (at least) two options.
什么是最好的UTIL(S)来解决这个问题呢?
What is the best util(s) to solve this problem?
推荐答案
我搜索对话框的创造者是什么。我发现连日来并有了这个,我可以把我需要的选项:
I've searched what dialog creators are. I found yad and with this I can set my desired options:
yad --skip-taskbar --center --title="Print dialog" {--image,--window-icon}=/usr/share/icons/Tango/72x72/devices/printer1.png --form --item-separator=, --field="Pages per sheet":CB 1,2,4,6,8 --field="Pages"
当我选择每张2页和网页1-12,点击后确定
输出将 2 | 1 12 |
And when I choose "2 pages per sheet" and pages "1-12" and after click OK
the output will 2|1-12|
.
这就是我想要的。的zenity或Xdialog可以做类似的?
This is what I desired. Zenity or Xdialog can do similar?
这篇关于从bash脚本对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!