bash脚本中的对话框 [英] Dialog from bash script
本文介绍了bash脚本中的对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想要什么?每页多少页,打印间隔。这是(至少)两个选项。
解决这个问题的最好的方法是什么?
解决方案
我搜索过什么对话框创建者。我发现 yad ,并且我可以设置我想要的选项:
yad --skip-taskbar --center --title =打印对话框{--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 |
。
这是我想要的。 Zenity或Xdialog可以做类似的?
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.
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"
And when I choose "2 pages per sheet" and pages "1-12" and after click OK
the output will 2|1-12|
.
This is what I desired. Zenity or Xdialog can do similar?
这篇关于bash脚本中的对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文