[问题]请教oroborus窗口管理器themes设置脚本的问题及ICEWM菜单问题?

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
头像
bobo4548
帖子: 661
注册时间: 2007-07-17 22:52
来自: cn,shandong

[问题]请教oroborus窗口管理器themes设置脚本的问题及ICEWM菜单问题?

#1

帖子 bobo4548 » 2008-02-12 22:40

1 网上关于窗口管理器oroborus的帮助信息不多,英文的也很少,中文就更不用说了,其中有个themes的设置工具下载,原来是个脚本,但是按照说明运行却:提示EXEC:3:WISH:NOT FOUND,网上下载网站并没有关于其他需要安装的说明和介绍啊,不知怎样解决,脚本见下面!
2 ICEWM的菜单选项中有些内容并不是改变其MENU文件设定,请问如何全面更改菜单呢??

代码: 全选

#!/bin/sh
# the next line restarts using wish \
exec wish "$0" "$@"
#
#   Paul Millar - OTC 1.2
#   Copyright (C) 2001  Paul Millar
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
#   [email protected]
#

# Change this if your theme directory is located elsewhere
set prefix "/usr/share"
set rev 0

wm title . "OTC"
wm resizable . 0 0

#menubutton .mb -text File -menu .mb.menu
#. config -menu .mb -side left
#set m [menu .mb.menu -tearoff true]
#$m add command -label "Install Theme.."
#$m add command -label "About.."
frame .frame1
set theme_list [listbox .frame1.f -background white -selectmode single -width 22 -height 10 -yscrollcommand {.frame1.yscroll set}]
scrollbar .frame1.yscroll -command {.frame1.f yview} -orient vertical
frame .frame3
button .frame3.apply -text "TRY" -command try
button .frame3.quit -text "OK" -command ok
button .frame3.cancel -text "CANCEL" -command cancel
#pack .mb -side top
pack .frame1  -side top -fill both
pack .frame1.f -side left -fill both
pack .frame1.yscroll -side right -fill both
pack .frame3 -side bottom -fill both
pack .frame3.apply .frame3.quit .frame3.cancel -side left

set orc [file exists ~/.oroborusrc]
if {$orc<1} {
        set orc1 [file exists $prefix/oroborus/defaults]
                if {$orc1>=1} {
                        set default "defaults"
                } else {
                        set default "oroborusrc"
                }
        file copy -force $prefix/oroborus/$default ~/.oroborusrc
                tk_dialog {.confirm} {Info} {.oroborusrc created in home directory} {info} 0 OK
}

set rc1  [open ~/.oroborusrc r]

if {$rev == 0} {
        while {[gets $rc1 line]>=0} {
                set auto [string match "theme=*" $line]
                        if {$auto>0} {
                                set boolean [string range $line 6 end]
                        }
        }
}

close $rc1

proc click {} {
        global theme_list prefix rc boolean rev
                set rc [open ~/.oroborusrc r]
                foreach back [$theme_list curselection] {
                        set i [$theme_list get $back]
                }
        set theme $i
                set lines [split [read -nonewline $rc] ]
                close $rc
                set lstring [lsearch $lines "theme=*"]
                set lines [lreplace $lines $lstring $lstring]
                if {$rev == 1} {
                        lappend lines "theme=$boolean"
                } else {
                        lappend lines "theme=$prefix/oroborus/themes/$theme"
                }
        set rj [join $lines \n]
                set rc2 [open ~/.oroborusrc w]
                puts $rc2 $rj 
                flush stdout
                close $rc2
                set kill1 "-1"
                set wm "oroborus"
                exec killall $kill1 $wm
}

proc dirlist {} {
        global a prefix theme_list  
                $theme_list delete 0 end
                set a [exec ls $prefix/oroborus/themes]
                foreach item $a {
                        $theme_list insert end $item
                }
        $theme_list selection set 0
}

proc try {} {
global rev
set rev 0 
click
}

proc ok {} {
click
exit
}

proc cancel {} {
global rev f
set rev 1
click
}

dirlist 
头像
matri
帖子: 1140
注册时间: 2006-10-27 11:14
来自: 悉尼

#2

帖子 matri » 2008-02-12 22:56

1:没用过不清楚。
2:搜索huahua的脚本。
回复