来自 bash 脚本的对话框 [英] Dialog from bash script
问题描述
我想在 bash 中创建一个简单的图形(Qt、Gtk、...)对话框,具体来说是一个简单的打印对话框,作为 lpr 的前端".我想要的是?每页多少页,打印间隔.这是(至少)两个选项.
解决这个问题的最佳工具是什么?
我已经搜索了对话框创建者是什么.我找到了 yad 并且我可以设置我想要的选项:
yad --skip-taskbar --center --title="打印对话框" {--image,--window-icon}=/usr/share/icons/Tango/72x72/devices/printer1.png --form --item-separator=, --field="每张页数":CB 1,2,4,6,8 --field="页数"
当我选择每张 2 页"和1-12 页"并单击 OK
后,输出将是 2|1-12|
.p>
这是我想要的.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屋!