Chinaunix

标题: dialog 问题请教 [打印本页]

作者: yjh777    时间: 2016-01-20 17:00
标题: dialog 问题请教
怎么做可以让两个 dailog 共享屏幕,互不打扰?

我这样写, 发现当while循环,开始执行dialog inputbox 后,上面的prgbox区域被一片蓝色覆盖了

dialog --keep-window --begin 0 0 --prgbox ircmsg "tailf $msgf" 20 150 &

while true: do
    dialog --begin 30 0  --inputbox  kkk 8 100 2>$inputf
done
作者: yjh777    时间: 2016-01-20 20:04
@王楠w_n

帮忙删一下重复帖,(系统故障导致的)
作者: 王楠w_n    时间: 2016-01-21 10:30
好的回复 2# yjh777


   
作者: yjh777    时间: 2016-01-23 13:22
http://bash.cyberciti.biz/guide/Bash_display_dialog_boxes

好像没有办法,再试试 trap 组合键 + tput + dialog ,,,
作者: yjh777    时间: 2016-03-14 16:13
本帖最后由 yjh777 于 2016-03-14 16:38 编辑

还是太浮躁,不好好看手册
/usr/share/doc/dialog/samples 下面好多例子

基本需求搞定了:
  1. while :; do
  2.         $DIALOG --backtitle "irc" --no-shadow \
  3.          --keep-window --begin 2 0 --title "irc msg" --tailboxbg ${chanf} 30 120 --and-widget \
  4.          --begin 33 0 --title "irc msg" --inputbox "" 5 120  2> >(sed 's/$/\n/' >>$chanf)

  5.         retval=$?
  6.         #proceess msg
  7. done
复制代码
--keep-window 好像不需要:
  1. while :; do
  2.         $DIALOG --backtitle "irc" --no-shadow \
  3.          --begin 2 0 --title "irc msg" --tailboxbg ${chanf} 30 120 --and-widget \
  4.          --begin 33 0 --title "irc msg" --inputbox "" 5 120  2> >(sed 's/$/\n/' >>$chanf)

  5.         retval=$?
  6.         #proceess msg
  7. done
复制代码

作者: yjh777    时间: 2016-03-18 13:48
shell 版 irc 客户端 做好了 : )


-----------------------------------
BTW: 怎么附件不支持png?
    mogrify -format jpg *.png

ircmsg.jpg (13.54 KB, 下载次数: 37)

screen

screen





欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2