1 # This script is free software; you can redistribute it and/or modify
2 # it under the terms of the GNU General Public License as published by
3 # the Free Software Foundation; either version 2 of the License, or
4 # (at your option) any later version.
6 # This program is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 # GNU General Public License for more details.
11 # You should have received a copy of the GNU General Public License
12 # along with this program; if not, write to the Free Software
13 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 #-----------------------------------------------------------------------------
17 # This fvwm-themes "module" is a modification of FvwmScript-FileBrowser
18 # from fvwm (in fact rewrote from scratch ...)
19 # Copyright 2000, Olivier Chapuis
20 #-----------------------------------------------------------------------------
22 # Note : the mode list is not yet supported!
24 WindowTitle {Icon Browser}
25 WindowSize 390 430 # Taille
26 Font -adobe-helvetica-bold-r-*-*-12-*
30 # Name of the "utile" perl script
31 Set $PerlUtile={fvwm-themes-script }
39 Set $ARG = (GetScriptArgument $i)
45 If $ARG == {--dir} Then
46 Set $Directory = (GetScriptArgument $j)
47 If $ARG == {--mode} Then
48 Set $Mode = (GetScriptArgument $j)
49 If $ARG == {--ls-options} Then
50 Set $LsOptions = $LsOptions (GetScriptArgument $j)
51 If $ARG == {--text-colorset} Then
52 Set $TextColorset = (GetScriptArgument $j)
53 If $ARG == {--icon-colorset} Then
54 Set $ICON_COLORSET = (GetScriptArgument $j)
55 If $ARG == {--list-title} Then
56 Set $ListTitle = (GetScriptArgument $j)
57 If $ARG == {--launched} Then
58 Set $Launched = (GetScriptArgument $j)
60 Set $ARG = (GetScriptArgument $i)
63 If $Launched == 1 Then
64 Do {Style "FvwmScript-IconBrowser" StaysOnTop, NoHandles}
66 Do {Style "FvwmScript-IconBrowser" StaysPut, NoHandles}
68 If $TextColorset <> {} Then
70 ChangeColorset 5 $TextColorset
71 ChangeColorset 7 $TextColorset
73 If $ICON_COLORSET <> {} Then
75 ChangeColorset 8 $ICON_COLORSET
78 If $Mode == {list} Then
86 ChangeTitle 20 $ListTitle
90 If $Mode == {browser} Then
93 Set $CMD={cd } $Directory{; pwd}
94 Set $Directory=(GetOutput $CMD 1 -1)
96 ChangeTitle 5 $Directory
105 If $UpdateValue == 1 Then
108 Set $CMD = $PerlUtile {--dirs="}$Directory{" --ls --ls-opt=-"}$LsOptions $hidden{" --item=}$Value{ --type="}$Type{"}
109 Set $TheItem = (GetOutput $CMD 1 -1)
110 Set $CMD = {if [ -d "}$Directory {/} $TheItem{" ]; then echo 1; else echo 0; fi}
111 Set $test = (GetOutput $CMD 1 -1)
115 Set $Directory = $Directory {/} $TheItem
116 Set $CMD={cd } $Directory{; pwd}
117 Set $Directory=(GetOutput $CMD 1 -1)
118 ChangeTitle 5 $Directory
120 ChangeIcon 8 mini/empty.xpm
124 ChangeTitle 9 $TheItem
125 Set $Icon = $Directory {/} $TheItem
130 If $UpdateList == 1 Then
133 Set $GetListCmd= $PerlUtile {--dirs="}$Directory{" --ls --ls-opt="-}$LsOptions $hidden{" --type="}$Type{"}
134 Set $List = (GetOutput $GetListCmd 1 -1)
136 ChangeTitle 5 $Directory
138 ChangeIcon 8 mini/empty.xpm
155 If $Launched == 1 Then
157 If $Mode == {list} Then
158 SendToScript (GetScriptFather) (GetTitle 9)
160 SendToScript (GetScriptFather) $Directory {/} (GetTitle 9)
177 If $Launched == 1 Then
178 SendToScript (GetScriptFather) {Cancel}
205 Set $Directory = (GetTitle 5)
214 Font -*-fixed-medium-r-semicondensed-*-13-*
231 Title {All Applications in Path}
251 Set $CMD={cd } $Directory {; cd ../; pwd}
252 Set $Directory=(GetOutput $CMD 1 -1)
270 Set $CMD={cd } $Directory{; pwd}
271 Set $Directory=(GetOutput $CMD 1 -1)
281 Title { Show hidden files}
286 If (GetValue 12) == 1 Then
299 Font -*-fixed-medium-r-semicondensed-*-13-*
306 Set $Value = (GetValue 7)