rev |
line source |
al@17950
|
1 #!/bin/sh
|
al@17950
|
2 # Make SliTaz icon theme
|
al@19003
|
3 # Aleksej Bobylev <al.bobylev@gmail.com>, 2014-2016
|
al@17950
|
4 # (Started in November 2014)
|
al@17950
|
5
|
al@19474
|
6 VERSION="161031"
|
al@17950
|
7
|
al@17950
|
8 . /lib/libtaz.sh
|
al@17950
|
9
|
al@17950
|
10
|
al@17950
|
11 ### Functions ###
|
al@17950
|
12
|
al@17950
|
13 # Usage of utility
|
al@17950
|
14
|
al@17950
|
15 usage() {
|
al@17950
|
16 cat <<EOT
|
al@17950
|
17 $(basename $0), v. $VERSION
|
al@17950
|
18 Make icon theme for SliTaz GNU/Linux
|
al@17950
|
19
|
al@17950
|
20 Usage:
|
al@17950
|
21 $(basename $0) [OPTIONS ...]
|
al@17950
|
22
|
al@17950
|
23 Options:
|
al@17950
|
24 -f <path> The path to the original theme from which the icons will be taken
|
al@17950
|
25 Note that this folder contains the file index.theme
|
al@17950
|
26 -t <path> The path where the folder with a new theme will created
|
al@17950
|
27 Note that existing folder will be silently removed
|
al@17950
|
28 -s <path> Path to icon substitution definitions. Where <path> can point to file
|
al@17950
|
29 or to folder containing file <original theme name>.sub
|
al@17950
|
30 -n 'name' The name of the new theme (default will be taken from -t path)
|
al@17950
|
31
|
al@17950
|
32 +is -is Whether to use Inkscape to convert svg icons to png (default: +is)
|
al@17950
|
33 +op -op Whether to use Optipng to optimize png icons (default: +op)
|
al@17950
|
34 +sl -sl Whether to replace the same icons by symlinks (default: +sl)
|
al@17950
|
35
|
al@17950
|
36 -opmax Maximal settings for Optipng (slow but save maximum bytes)
|
al@17950
|
37
|
al@17950
|
38 -nocolor Don't use color in the log
|
al@17950
|
39 EOT
|
al@17950
|
40 }
|
al@17950
|
41
|
al@17950
|
42
|
al@17950
|
43 # Color output
|
al@17950
|
44 colored() {
|
al@17961
|
45 if [ "$color" == 'yes' ]; then
|
al@17950
|
46 colorize $@
|
al@17950
|
47 else
|
al@17950
|
48 echo $2
|
al@17950
|
49 fi
|
al@17950
|
50 }
|
al@17950
|
51
|
al@17950
|
52
|
al@17950
|
53 # Find icon (use pre-generated list of icon files)
|
al@17950
|
54
|
al@17950
|
55 findi() {
|
al@17950
|
56 grep -e "/$1.png" -e "/$1.svg" $ICONSLIST
|
al@17950
|
57 }
|
al@17950
|
58
|
al@17950
|
59
|
al@17950
|
60 # Copy icon
|
al@17950
|
61
|
al@17950
|
62 c() {
|
al@17950
|
63 for SIZE in $SIZES; do
|
al@17950
|
64 FOUND=''
|
al@17950
|
65 for ICON in $(echo "$@" | sed 's|\([^ ]*\)|& gnome-mime-& gnome-dev-&|'); do
|
al@17950
|
66 FINDICON=$(findi $ICON | sed "s|$FROM||g" | grep -e "/$SIZE/" -e "/${SIZE}x$SIZE/")
|
al@17950
|
67
|
al@17950
|
68 if [ -n "$FINDICON" ]; then
|
al@17950
|
69 if [ $(echo "$FINDICON" | wc -l) != "1" ]; then
|
al@17950
|
70 # Multiple choice
|
al@17950
|
71 if [ "$(md5sum $(echo "$FINDICON" | sed 's|^.*$|'$FROM'&|g') | awk '{print $1}' | sort | uniq | wc -l)" != "1" ]; then
|
al@17950
|
72 # note: really different icons with different md5sum
|
al@17950
|
73 colored 33 "? $1($SIZE): Multiple choice:"
|
al@17950
|
74 echo "$FINDICON" | sed 's|^.*$| * &|g'
|
al@17950
|
75 fi
|
al@17950
|
76 FINDICON="$(echo "$FINDICON" | head -n1)"
|
al@17950
|
77 fi
|
al@17950
|
78 mkdir -p $TO/${SIZE}x${SIZE}/$CATEGORY
|
al@17950
|
79
|
al@17950
|
80 BASE_FINDICON="$(basename $FINDICON .png)"
|
al@17950
|
81 BASE_FINDICON="$(basename $BASE_FINDICON .svg)"
|
al@17950
|
82
|
al@17950
|
83 if [ "$1" == "$BASE_FINDICON" ]; then
|
al@17950
|
84 colored 32 "+ $1($SIZE)"
|
al@17950
|
85 else
|
al@17950
|
86 colored 34 "+ $1($SIZE) <= $(basename $FINDICON)"
|
al@17950
|
87 fi
|
al@17950
|
88
|
al@17950
|
89 EXT=${FINDICON##*.}
|
al@17950
|
90 cp -aL $FROM/$FINDICON $TO/${SIZE}x${SIZE}/$CATEGORY/$1.$EXT
|
al@17950
|
91
|
al@17950
|
92 FOUND='yes'
|
al@17950
|
93 break
|
al@17950
|
94 fi
|
al@17950
|
95 done
|
al@17950
|
96 if [ -z "$FOUND" ]; then
|
al@17950
|
97 colored 31 "- $1($SIZE) NOT FOUND!"
|
al@17950
|
98 fi
|
al@17950
|
99 done
|
al@17950
|
100 }
|
al@17950
|
101
|
al@17950
|
102
|
al@17950
|
103 # Maybe copy stock icon
|
al@17950
|
104
|
al@17950
|
105 s() {
|
al@18541
|
106 if [ "${BASED_ON%%-*}" != "Faenza" ]; then
|
al@17950
|
107 c $@
|
al@17950
|
108 else
|
al@17950
|
109 echo ". $1"
|
al@17950
|
110 fi
|
al@17950
|
111 }
|
al@17950
|
112
|
al@17950
|
113
|
al@17950
|
114 # Return shortest line
|
al@17950
|
115
|
al@17950
|
116 shortest_line() {
|
al@17950
|
117 S=$1; shift
|
al@17950
|
118 for L in $@; do
|
al@17950
|
119 [ "${#L}" -lt "${#S}" ] && S="$L"
|
al@17950
|
120 done
|
al@17950
|
121 echo "$S"
|
al@17950
|
122 }
|
al@17950
|
123
|
al@17950
|
124
|
al@17950
|
125 # Replace the same files by symlinks, $@ - list of identical files
|
al@17950
|
126
|
al@17950
|
127 make_symlinks() {
|
al@17950
|
128 S=$(shortest_line $@)
|
al@17950
|
129 for file in $@; do
|
al@17950
|
130 [ "$S" != "$file" ] && ln -sf $S $file
|
al@17950
|
131 done
|
al@17950
|
132 }
|
al@17950
|
133
|
al@17950
|
134
|
al@17950
|
135 # Calculate size in bytes
|
al@17950
|
136
|
al@17950
|
137 size() {
|
al@17950
|
138 echo -n "size: "
|
al@17950
|
139 find "$TO" -type f -exec stat -c %s {} \; | awk 'BEGIN{SUM=0}{SUM+=$1}END{print SUM}'
|
al@17950
|
140 }
|
al@17950
|
141
|
al@17950
|
142
|
al@17950
|
143 # Print out category
|
al@17950
|
144
|
al@17950
|
145 echo_cat() {
|
al@17950
|
146 echo
|
al@17950
|
147 colored 35 $CATEGORY
|
al@17950
|
148 colored 35 $(echo -n $CATEGORY | tr -c '' '-')
|
al@17950
|
149 }
|
al@17950
|
150
|
al@17950
|
151
|
al@17950
|
152
|
al@17950
|
153
|
al@17950
|
154
|
al@17950
|
155 case "$1" in
|
al@17950
|
156 -h|--help) usage; exit 0 ;;
|
al@17950
|
157 -V|--version) echo "$(basename $0) v. $VERSION"; exit 0 ;;
|
al@17950
|
158 esac
|
al@17950
|
159
|
al@17950
|
160
|
al@17950
|
161 # Default parameters:
|
al@17950
|
162
|
al@17950
|
163 IS='yes'; OP='yes'; SL='yes'; PNGOPT=''; SUBS=''; color='yes'
|
al@17950
|
164
|
al@17950
|
165 while [ "x$1" != "x" ]; do
|
al@17950
|
166 case "$1" in
|
al@17950
|
167 -f) FROM="$2"; shift; BASED_ON="$(basename ${FROM%/})" ;;
|
al@17950
|
168 -t) TO="$2"; shift; NAME="$(basename ${TO%/})" ;;
|
al@17950
|
169 -s) SUBS="$2"; shift; if [ -d "$SUBS" ]; then SUBS="${SUBS%/}/$BASED_ON.sub"; fi ;;
|
al@17950
|
170 -n) NAME="$2"; shift ;;
|
al@17950
|
171 -is) IS='no' ;;
|
al@17950
|
172 +is) IS='yes' ;;
|
al@17950
|
173 -op) OP='no' ;;
|
al@17950
|
174 +op) OP='yes' ;;
|
al@17950
|
175 -sl) SL='no' ;;
|
al@17950
|
176 +sl) SL='yes' ;;
|
al@17950
|
177 -opmax) PNGOPT="-o7 -zm1-9" ;;
|
al@17950
|
178 -nocolor) color='no' ;;
|
al@17950
|
179 esac
|
al@17950
|
180 shift
|
al@17950
|
181 done
|
al@17950
|
182
|
al@17950
|
183 if [ "x$FROM" == "x" -o "x$TO" == "x" ]; then
|
al@17950
|
184 echo "There are no required parameters (-f or -t)!"; exit 1
|
al@17950
|
185 fi
|
al@17950
|
186
|
al@17950
|
187 echo "Check components..."
|
al@17950
|
188 if [ $IS == 'yes' ]; then
|
al@17950
|
189 echo -n "Inkscape: "
|
al@17950
|
190 if [ -x "$(which inkscape)" ]; then
|
al@17950
|
191 echo "$(which inkscape)"
|
al@17950
|
192 else
|
al@17950
|
193 colored 31 "not found! Force '-is'"; IS='no'
|
al@17950
|
194 fi
|
al@17950
|
195 fi
|
al@17950
|
196 if [ $OP == 'yes' ]; then
|
al@17950
|
197 echo -n "Optipng: "
|
al@17950
|
198 if [ -x "$(which optipng)" ]; then
|
al@17950
|
199 echo "$(which optipng)"
|
al@17950
|
200 else
|
al@17950
|
201 colored 31 "not found! Force '-op'"; OP='no'
|
al@17950
|
202 fi
|
al@17950
|
203 fi
|
al@17950
|
204 echo -n "Symlinks: "
|
al@17950
|
205 if [ -x "$(which symlinks)" ]; then
|
al@17950
|
206 echo "$(which symlinks)"
|
al@17950
|
207 else
|
al@17950
|
208 colored 31 "not found! Abort."; exit 1
|
al@17950
|
209 fi
|
al@17950
|
210 echo
|
al@17950
|
211
|
al@17950
|
212 echo "Options: Inkscape=\"$IS\" Optipng=\"$OP\" Symlinks=\"$SL\""
|
al@17950
|
213 echo "From: \"$FROM\""
|
al@17950
|
214 echo "To: \"$TO\""
|
al@17950
|
215 echo "Subs: \"$SUBS\""
|
al@17950
|
216 echo "Name: \"$NAME\""
|
al@17950
|
217 echo
|
al@17950
|
218
|
al@17950
|
219
|
al@17950
|
220 rm -rf $TO
|
al@17950
|
221
|
al@17950
|
222 # make files list
|
al@17950
|
223 ICONSLIST=$(mktemp)
|
al@17950
|
224 find $FROM -type f -o -type l > $ICONSLIST
|
al@17950
|
225
|
al@17950
|
226
|
al@17950
|
227
|
al@17950
|
228
|
al@17950
|
229
|
al@17950
|
230 #########################
|
al@17950
|
231 # Standard Action Icons #
|
al@17950
|
232 #########################
|
al@17950
|
233 CATEGORY='actions'; SIZES='16'; echo_cat
|
al@17950
|
234
|
al@17950
|
235 c address-book-new
|
al@18796
|
236 c application-exit dialog-close # gtk_stock 16,24; Transmission (GTK+3) needs it # elementary hack
|
al@17950
|
237 c appointment-new
|
al@17950
|
238 c call-start
|
al@17950
|
239 c call-stop process-stop # elementary hack
|
al@17950
|
240 c contact-new
|
al@17950
|
241 s document-new # gtk_stock 16,24
|
al@18796
|
242 c document-open # gtk_stock 16,24; Transmission (GTK+3) needs it
|
al@17950
|
243 s document-open-recent # gtk_stock 16,24
|
al@17950
|
244 c document-page-setup
|
al@17950
|
245 s document-print # gtk_stock 16,24
|
al@17950
|
246 s document-print-preview # gtk_stock 16,24
|
al@17950
|
247 s document-properties # gtk_stock 16,24
|
al@17950
|
248 s document-revert # gtk_stock 16,24
|
al@17950
|
249 s document-save # gtk_stock 16,24
|
al@17950
|
250 s document-save-as document-save # gtk_stock 16,24 # elementary hack
|
al@17950
|
251 c document-send document-export # elementary hack
|
al@18561
|
252 c edit-clear remove # gtk_stock 16,24; Yad:tazbox new-file needs it # elementary hack
|
al@18796
|
253 c edit-copy # gtk_stock 16,24; Transmission (GTK+3) needs it
|
al@17950
|
254 s edit-cut # gtk_stock 16,24
|
al@18796
|
255 c edit-delete # gtk_stock 16,24; Transmission (GTK+3) needs it
|
al@17950
|
256 s edit-find # gtk_stock 16,24
|
al@17950
|
257 s edit-find-replace edit-find # gtk_stock 16,24 # elementary hack
|
al@17950
|
258 s edit-paste # gtk_stock 16,24
|
al@17950
|
259 s edit-redo # gtk_stock 16,24
|
al@18796
|
260 c edit-select-all # gtk_stock 16,24; Transmission (GTK+3) needs it
|
al@17950
|
261 s edit-undo # gtk_stock 16,24
|
al@17950
|
262 c folder-new
|
al@17950
|
263 s format-indent-less # gtk_stock 16,24
|
al@17950
|
264 s format-indent-more # gtk_stock 16,24
|
al@17950
|
265 s format-justify-center # gtk_stock 16,24
|
al@17950
|
266 s format-justify-fill # gtk_stock 16,24
|
al@17950
|
267 s format-justify-left # gtk_stock 16,24
|
al@17950
|
268 s format-justify-right # gtk_stock 16,24
|
al@17950
|
269 c format-text-direction-ltr
|
al@17950
|
270 c format-text-direction-rtl
|
al@17950
|
271 s format-text-bold # gtk_stock 16,24
|
al@17950
|
272 s format-text-italic # gtk_stock 16,24
|
al@17950
|
273 s format-text-underline # gtk_stock 16,24
|
al@17950
|
274 s format-text-strikethrough # gtk_stock 16,24
|
al@17950
|
275 s go-bottom # gtk_stock 16,24
|
al@18561
|
276 c go-down # gtk_stock 16,24 but Yad:scp-box needs it
|
al@19474
|
277 c go-first # gtk_stock 16,24
|
al@17950
|
278 s go-home # gtk_stock 16,24
|
al@17950
|
279 s go-jump # gtk_stock 16,24
|
al@19474
|
280 c go-last # gtk_stock 16,24
|
al@19474
|
281 c go-next # gtk_stock 16,24
|
al@19474
|
282 c go-previous # gtk_stock 16,24
|
al@17950
|
283 s go-top # gtk_stock 16,24
|
al@18561
|
284 c go-up # gtk_stock 16,24 but Yad:scp-box needs it
|
al@18796
|
285 c help-about # gtk_stock 16,24; Transmission (GTK+3) needs it
|
al@18796
|
286 c help-contents # gtk_stock 16,24; Transmission (GTK+3) needs it
|
al@17950
|
287 c help-faq help-hint # elementary hack
|
al@17950
|
288 c insert-image
|
al@17950
|
289 c insert-link
|
al@17950
|
290 c insert-object
|
al@17950
|
291 c insert-text
|
al@18796
|
292 c list-add # gtk_stock 16,24; Transmission (GTK+3) needs it
|
al@18796
|
293 c list-remove # gtk_stock 16,24; Transmission (GTK+3) needs it
|
al@17950
|
294 c mail-forward
|
al@17950
|
295 c mail-mark-important
|
al@17950
|
296 c mail-mark-junk
|
al@17950
|
297 c mail-mark-notjunk
|
al@17950
|
298 c mail-mark-read
|
al@17950
|
299 c mail-mark-unread
|
al@17950
|
300 c mail-message-new
|
al@17950
|
301 c mail-reply-all
|
al@17950
|
302 c mail-reply-sender
|
al@17950
|
303 c mail-send
|
al@17950
|
304 c mail-send-receive
|
al@17950
|
305 c media-eject list-remove # Matrilineare hack
|
al@18617
|
306 c media-playback-pause # gtk_stock 16,24 but Audacious needs it
|
al@18617
|
307 c media-playback-start # gtk_stock 16,24 but Audacious needs it
|
al@18617
|
308 c media-playback-stop # gtk_stock 16,24 but Audacious needs it
|
al@17950
|
309 s media-record # gtk_stock 16,24
|
al@17950
|
310 s media-seek-backward go-previous # gtk_stock 16,24 # Matrilineare hack
|
al@17950
|
311 s media-seek-forward go-next # gtk_stock 16,24 # Matrilineare hack
|
al@18617
|
312 c media-skip-backward # gtk_stock 16,24 but Audacious needs it
|
al@18617
|
313 c media-skip-forward # gtk_stock 16,24 but Audacious needs it
|
al@17950
|
314 c object-flip-horizontal
|
al@17950
|
315 c object-flip-vertical
|
al@17950
|
316 c object-rotate-left
|
al@17950
|
317 c object-rotate-right
|
al@17950
|
318 s process-stop # gtk_stock 16,24
|
al@17950
|
319 c system-lock-screen lock # Matrilineare hack
|
al@17950
|
320 c system-log-out contact-new # Matrilineare hack
|
al@18796
|
321 c system-run # gtk_stock 16,24; Transmission (GTK+3) needs it
|
al@17950
|
322 c system-search find # Matrilineare hack
|
al@17950
|
323 c system-reboot system-run # Matrilineare hack
|
al@17950
|
324 c system-shutdown system-shutdown-panel # Matrilineare hack
|
al@17950
|
325 s tools-check-spelling # gtk_stock 16,24
|
al@17950
|
326 s view-fullscreen # gtk_stock 16,24
|
al@18561
|
327 c view-refresh # gtk_stock 16,24 but Yad:tazbox manage-i18n needs it
|
al@17950
|
328 s view-restore # gtk_stock 16,24
|
al@17950
|
329 s view-sort-ascending # gtk_stock 16,24
|
al@17950
|
330 s view-sort-descending # gtk_stock 16,24
|
al@18796
|
331 c window-close # gtk_stock 16,20,24; Transmission (GTK+3) needs it
|
al@17950
|
332 c window-new
|
al@17950
|
333 s zoom-fit-best # gtk_stock 16,24
|
al@17950
|
334 s zoom-in # gtk_stock 16,24
|
al@17950
|
335 s zoom-original # gtk_stock 16,24
|
al@17950
|
336 s zoom-out # gtk_stock 16,24
|
al@17950
|
337 #---------------------------
|
al@17950
|
338 # PCManFM panel and menu
|
al@17950
|
339 c tab-new
|
al@18545
|
340 c view-choose preferences-desktop
|
al@17950
|
341 c view-filter
|
al@17950
|
342 c view-sidetree
|
al@17961
|
343
|
al@17950
|
344 c gtk-execute # LXPanel menu: run
|
al@17950
|
345 c system-shutdown-panel-restart # LXPanel menu: logout
|
al@17950
|
346 c gtk-close # Yad close button
|
al@17961
|
347 c gtk-go-forward gtk-go-forward-ltr # tazbox tz Yad dialog
|
al@18545
|
348 c bookmark-new # Midori
|
al@18561
|
349 c empty # Yad:tazbox new-file
|
al@18587
|
350 c extract-archive # tazpkg-box, xarchiver...
|
al@18587
|
351 c package-install # tazpkg-box
|
al@18561
|
352
|
al@18561
|
353 SIZES='16 48'
|
al@18561
|
354 c document-new # Yad:tazbox new-file
|
al@18561
|
355 c document-properties # Yad:tazbox locale, tazbox manage-i18n
|
al@17950
|
356
|
al@17950
|
357
|
al@17950
|
358 ############################
|
al@17950
|
359 # Standard Animation Icons #
|
al@17950
|
360 ############################
|
al@17950
|
361 CATEGORY='animations'; SIZES='16'; echo_cat
|
al@17950
|
362
|
al@17950
|
363 c process-working
|
al@17950
|
364
|
al@17950
|
365
|
al@17950
|
366
|
al@17950
|
367 ##############################
|
al@17950
|
368 # Standard Application Icons #
|
al@17950
|
369 ##############################
|
al@17950
|
370 CATEGORY='apps'; SIZES='16 48'; echo_cat
|
al@17950
|
371
|
al@17950
|
372 c accessories-calculator
|
al@17950
|
373 c accessories-character-map
|
al@17950
|
374 c accessories-dictionary
|
al@17950
|
375 c accessories-text-editor
|
al@17950
|
376 c help-browser
|
al@17950
|
377 c multimedia-volume-control # audio-volume-high
|
al@17950
|
378 c preferences-desktop-accessibility
|
al@17950
|
379 c preferences-desktop-font
|
al@17950
|
380 c preferences-desktop-keyboard # keyboard
|
al@17950
|
381 c preferences-desktop-locale
|
al@17950
|
382 c preferences-desktop-multimedia # applications-multimedia
|
al@17950
|
383 c preferences-desktop-screensaver
|
al@17950
|
384 c preferences-desktop-theme
|
al@17950
|
385 c preferences-desktop-wallpaper
|
al@17950
|
386 c system-file-manager
|
al@17950
|
387 c system-software-install # synaptic
|
al@17950
|
388 c system-software-update # update-notifier
|
al@17950
|
389 c utilities-system-monitor
|
al@17950
|
390 c utilities-terminal
|
al@17950
|
391 #-------------------
|
al@17950
|
392 c gcolor2 # gcolor2.desktop
|
al@17950
|
393 c gnome-glchess # chess.desktop
|
al@17950
|
394 c gpicview # gpicview.desktop
|
al@17950
|
395 c tazcalc gnumeric # tazcalc.desktop
|
al@17950
|
396 c alsaplayer gnome-audio # alsaplayer.desktop
|
al@17950
|
397 c leafpad # leafpad.desktop
|
al@17950
|
398 c midori # midori.desktop
|
al@17950
|
399 c mtpaint # mtpaint.desktop
|
al@17950
|
400 c xterm # xterm.desktop
|
al@17950
|
401 c burn-box brasero # burn-box.desktop
|
al@17950
|
402 c iso-image-burn # burn-iso.desktop
|
al@17950
|
403 c system-log-out # lxde-logout.desktop
|
al@17950
|
404 c sudoku gnome-sudoku # sudoku.desktop
|
al@17950
|
405 c utilities-log-viewer # bootlog.desktop
|
al@17950
|
406 c preferences-desktop-display # lxrandr.desktop
|
al@17950
|
407 c tazbug bug-buddy # tazbug.desktop
|
al@17950
|
408 c applets-screenshooter # mtpaint-grab.desktop
|
al@17950
|
409 c tazwikiss zim # tazwikiss.desktop
|
al@17950
|
410 c system-software-installer # tazpanel-pkgs.desktop
|
al@17950
|
411 c session-properties # lxsession-edit.desktop
|
al@17950
|
412 c terminal # sakura.desktop
|
al@17950
|
413 c user_auth # passwd.desktop
|
al@17950
|
414 c preferences-system-time # tazbox-tz.desktop
|
al@17950
|
415 c text-editor # vi.desktop
|
al@17950
|
416 c drive-harddisk-usb # tazusb-box.desktop
|
al@17950
|
417 c drive-optical # tazlito-wiz.desktop
|
al@17950
|
418 c network-wireless # wifi-box.desktop
|
al@17950
|
419 c gparted # gparted.desktop
|
al@17950
|
420 c epdfview acroread # epdfview.desktop
|
al@17950
|
421 c menu-editor # libfm-pref-apps.desktop
|
al@17950
|
422 c preferences-system-windows # obconf.desktop
|
al@17950
|
423 c twitter # twitter.desktop
|
al@17950
|
424 c network-server # httpd.desktop
|
al@17950
|
425 c pcmanfm system-file-manager # pcmanfm.desktop
|
al@18561
|
426 c preferences-desktop-default-applications # tazbox tazapps
|
al@19415
|
427 c multimedia-video-player mplayer # tazbox-video.desktop tazbox-video-fullscreen.desktop
|
al@17950
|
428
|
al@17950
|
429
|
al@17950
|
430 ###########################
|
al@17950
|
431 # Standard Category Icons #
|
al@17950
|
432 ###########################
|
al@17950
|
433 CATEGORY='categories'; SIZES='16 48'; echo_cat
|
al@17950
|
434
|
al@17950
|
435 c applications-accessories
|
al@17950
|
436 c applications-development
|
al@18588
|
437 c applications-engineering gnome-do
|
al@17950
|
438 c applications-games
|
al@17950
|
439 c applications-graphics eog # Matrilineare hack
|
al@17950
|
440 c applications-internet web-browser # Matrilineare hack
|
al@17950
|
441 c applications-multimedia
|
al@17950
|
442 c applications-office
|
al@17950
|
443 c applications-other
|
al@17950
|
444 c applications-science
|
al@17950
|
445 c applications-system
|
al@17950
|
446 c applications-utilities
|
al@17950
|
447 c preferences-desktop
|
al@17950
|
448 c preferences-desktop-peripherals
|
al@17950
|
449 c preferences-desktop-personal
|
al@17950
|
450 c preferences-other
|
al@17950
|
451 c preferences-system
|
al@17950
|
452 c preferences-system-network
|
al@18588
|
453 c system-help help-contents
|
al@17950
|
454
|
al@17950
|
455
|
al@17950
|
456
|
al@17950
|
457 #########################
|
al@17950
|
458 # Standard Device Icons #
|
al@17950
|
459 #########################
|
al@17950
|
460 CATEGORY='devices'; SIZES='16'; echo_cat
|
al@17950
|
461
|
al@17950
|
462 c audio-card
|
al@18588
|
463 c audio-input-microphone gnome-sound-recorder
|
al@17950
|
464 c battery
|
al@18588
|
465 c camera camera-photo
|
al@17950
|
466 c camera-photo
|
al@17950
|
467 c camera-video
|
al@17950
|
468 c camera-web
|
al@17950
|
469 c computer
|
al@17950
|
470 c drive-harddisk
|
al@17950
|
471 c drive-optical
|
al@17950
|
472 c drive-removable-media drive-harddisk-removable # Matrilineare hack
|
al@17950
|
473 c input-gaming
|
al@17950
|
474 c input-keyboard
|
al@17950
|
475 c input-mouse
|
al@17950
|
476 c input-tablet
|
al@18588
|
477 c media-flash drive-removable-media-usb
|
al@17950
|
478 s media-floppy # gtk_stock 16,24
|
al@17950
|
479 s media-optical drive-optical # gtk_stock 16,24 # Matrilineare hack
|
al@17950
|
480 c media-tape
|
al@17950
|
481 c modem
|
al@17950
|
482 c multimedia-player
|
al@17950
|
483 c network-wired
|
al@17950
|
484 c network-wireless
|
al@17950
|
485 c pda
|
al@18588
|
486 c phone ekiga
|
al@17950
|
487 c printer
|
al@17950
|
488 c scanner
|
al@17950
|
489 c video-display
|
al@17950
|
490 #---------------------------
|
al@17950
|
491 c camera camera-photo # Matrilineare hack
|
al@17950
|
492
|
al@17961
|
493 # Big drive icons on the PCManFM Desktop
|
al@17967
|
494 SIZES='48'
|
al@17961
|
495 c drive-harddisk
|
al@17961
|
496 c drive-optical
|
al@17961
|
497 c drive-removable-media drive-harddisk-removable # Matrilineare hack
|
al@18561
|
498 c video-display # LXPanel - About
|
al@17961
|
499
|
al@17950
|
500
|
al@17950
|
501 #########################
|
al@17950
|
502 # Standard Emblem Icons #
|
al@17950
|
503 #########################
|
al@17950
|
504 CATEGORY='emblems'; SIZES='16'; echo_cat
|
al@17950
|
505
|
al@17950
|
506 c emblem-default
|
al@17950
|
507 c emblem-documents x-office-document # Matrilineare hack
|
al@17950
|
508 c emblem-downloads
|
al@17950
|
509 c emblem-favorite
|
al@17950
|
510 c emblem-important
|
al@17950
|
511 c emblem-mail
|
al@18588
|
512 c emblem-photos image-jpeg
|
al@17950
|
513 c emblem-readonly
|
al@17950
|
514 c emblem-shared
|
al@17950
|
515 c emblem-symbolic-link
|
al@18588
|
516 c emblem-synchronized emblem-ubuntuone-synchronized
|
al@17950
|
517 c emblem-system
|
al@17950
|
518 c emblem-unreadable
|
al@17950
|
519
|
al@17950
|
520
|
al@17950
|
521
|
al@17950
|
522 ##########################
|
al@17950
|
523 # Standard Emotion Icons #
|
al@17950
|
524 ##########################
|
al@17950
|
525 CATEGORY='emotions'; SIZES='16'; echo_cat
|
al@17950
|
526
|
al@17950
|
527 c face-angel
|
al@17950
|
528 c face-angry
|
al@17950
|
529 c face-cool
|
al@17950
|
530 c face-crying
|
al@17950
|
531 c face-devilish
|
al@17950
|
532 c face-embarrassed
|
al@17950
|
533 c face-kiss
|
al@17950
|
534 c face-laugh
|
al@17950
|
535 c face-monkey
|
al@17950
|
536 c face-plain
|
al@17950
|
537 c face-raspberry
|
al@17950
|
538 c face-sad
|
al@17950
|
539 c face-sick
|
al@17950
|
540 c face-smile
|
al@17950
|
541 c face-smile-big
|
al@17950
|
542 c face-smirk
|
al@17950
|
543 c face-surprise
|
al@17950
|
544 c face-tired
|
al@17950
|
545 c face-uncertain
|
al@17950
|
546 c face-wink
|
al@17950
|
547 c face-worried
|
al@17950
|
548
|
al@17950
|
549
|
al@17950
|
550
|
al@17950
|
551 ################################
|
al@17950
|
552 # Standard International Icons #
|
al@17950
|
553 ################################
|
al@17950
|
554
|
al@17950
|
555 #flag-aa
|
al@17950
|
556 #flag-RU
|
al@17950
|
557 #flag-UA
|
al@17950
|
558
|
al@17950
|
559
|
al@17950
|
560
|
al@17950
|
561 ############################
|
al@17950
|
562 # Standard MIME Type Icons #
|
al@17950
|
563 ############################
|
al@17950
|
564 CATEGORY='mimetypes'; SIZES='48 16'; echo_cat
|
al@17950
|
565 A='application'
|
al@17950
|
566
|
al@17950
|
567 # generic icons described in the /usr/share/mime/packages/freedesktop.org.xml
|
al@17950
|
568 c application-x-executable
|
al@17950
|
569 c audio-x-generic
|
al@17950
|
570 c font-x-generic
|
al@17950
|
571 c image-x-generic
|
al@17950
|
572 c package-x-generic
|
al@17950
|
573 c text-html
|
al@17950
|
574 c text-x-generic # gtk_stock 16,24 but...
|
al@17950
|
575 c text-x-generic-template
|
al@17950
|
576 c text-x-script
|
al@17950
|
577 c video-x-generic
|
al@17950
|
578 c x-office-address-book
|
al@17950
|
579 c x-office-calendar
|
al@17950
|
580 c x-office-document
|
al@17950
|
581 c x-office-presentation
|
al@17950
|
582 c x-office-spreadsheet
|
al@17950
|
583 #--------------------------------------
|
al@17950
|
584 # special types
|
al@17950
|
585 c $A-octet-stream
|
al@18588
|
586 c $A-x-zerosize empty
|
al@17950
|
587
|
al@17950
|
588 # archives
|
al@18588
|
589 c $A-gzip $A-x-gzip
|
al@17950
|
590 c $A-x-compressed-tar
|
al@17950
|
591 c $A-x-7z-compressed
|
al@17950
|
592 c $A-x-ace
|
al@17950
|
593 c $A-x-arc
|
al@17950
|
594 c $A-x-archive
|
al@17950
|
595 c $A-x-rar
|
al@17950
|
596 c $A-x-tar
|
al@17950
|
597 c $A-zip
|
al@18588
|
598 c $A-vnd.ms-cab-compressed $A-x-archive
|
al@18588
|
599 c $A-x-alz $A-x-archive
|
al@17950
|
600 c $A-x-arj
|
al@18588
|
601 c $A-x-bcpio $A-x-archive
|
al@17950
|
602 c $A-x-bzip
|
al@17950
|
603 c $A-x-bzip-compressed-tar
|
al@17950
|
604 c $A-x-lha
|
al@18588
|
605 c $A-x-lzma $A-x-archive
|
al@18588
|
606 c $A-x-lzma-compressed-tar $A-x-archive
|
al@18588
|
607 c $A-x-lzop $A-x-archive
|
al@18588
|
608 c $A-x-tzo $A-x-archive
|
al@18588
|
609 c $A-x-xar $A-x-archive
|
al@18588
|
610 c $A-x-xz $A-x-archive
|
al@18588
|
611 c $A-x-xz-compressed-tar $A-x-archive
|
al@17950
|
612
|
al@17950
|
613 # packages
|
al@17950
|
614 c $A-vnd.android.package-archive
|
al@17950
|
615 c $A-x-deb
|
al@17950
|
616 c $A-x-java-archive
|
al@17950
|
617 c $A-x-rpm
|
al@17950
|
618 c $A-x-source-rpm $A-x-rpm
|
al@18588
|
619 c $A-x-tazpkg package-x-generic
|
al@17950
|
620
|
al@17950
|
621 c $A-illustrator
|
al@17950
|
622 c $A-javascript
|
al@17950
|
623 c $A-mbox
|
al@17950
|
624 c $A-pdf
|
al@18588
|
625 c $A-pgp-signature $A-pgp-keys
|
al@17950
|
626 c $A-rtf
|
al@17950
|
627 c $A-x-apple-diskimage $A-x-cd-image
|
al@18588
|
628 c $A-x-cbr comix
|
al@17950
|
629 c $A-x-cd-image
|
al@18588
|
630 c $A-x-core emblem-danger
|
al@17950
|
631 c $A-x-designer
|
al@17950
|
632 c $A-x-desktop
|
al@17950
|
633
|
al@17950
|
634 c $A-x-theme
|
al@17950
|
635 c $A-x-emerald-theme $A-x-theme
|
al@17950
|
636 c $A-x-openbox-theme $A-x-theme
|
al@17950
|
637
|
al@18588
|
638 c $A-x-generic $A-x-executable
|
al@18588
|
639 c $A-x-object $A-octet-stream
|
al@18588
|
640 c $A-x-sharedlib $A-octet-stream
|
al@17950
|
641
|
al@18588
|
642 c $A-x-gettext-translation preferences-desktop-locale
|
al@18588
|
643 c text-x-gettext-translation preferences-desktop-locale
|
al@18588
|
644 c text-x-gettext-translation-template text-x-generic-template
|
al@17950
|
645
|
al@18588
|
646 c $A-x-gtk-builder $A-x-glade
|
al@17950
|
647 c $A-x-m4
|
al@17950
|
648 c $A-xml
|
al@17950
|
649 c $A-x-ms-dos-executable
|
al@17950
|
650
|
al@18588
|
651 c $A-x-perl text-x-script
|
al@17950
|
652 c $A-x-python-bytecode
|
al@17950
|
653 c $A-x-shellscript
|
al@17950
|
654 c $A-x-sqlite3
|
al@17950
|
655 c $A-x-trash
|
al@18588
|
656 c $A-x-x509-ca-cert $A-pgp-keys
|
al@17950
|
657
|
al@17950
|
658 c audio-mpeg
|
al@17950
|
659 c audio-x-vorbis+ogg
|
al@17950
|
660 c audio-x-wav
|
al@17950
|
661 c image-x-eps
|
al@18588
|
662 c image-x-xcursor ccsm
|
al@17950
|
663 c inode-blockdevice block-device
|
al@17950
|
664 c inode-chardevice chardevice
|
al@17950
|
665 c inode-directory
|
al@18588
|
666 c inode-mount-point drive-removable-media
|
al@18588
|
667 c inode-symlink emblem-symbolic-link
|
al@18588
|
668 c inode-x-generic emblem-generic
|
al@17950
|
669 c text-css
|
al@17950
|
670 c text-plain
|
al@17950
|
671 c text-richtext
|
al@17950
|
672 c text-x-authors
|
al@17950
|
673 c text-x-changelog
|
al@17950
|
674 c text-x-chdr
|
al@17950
|
675 c text-x-copying
|
al@17950
|
676 c text-x-csrc
|
al@17950
|
677 c text-x-install
|
al@18588
|
678 c text-x-log text-x-changelog
|
al@17950
|
679 c text-x-makefile
|
al@18588
|
680 c text-x-markdown text-x-source
|
al@17950
|
681 c text-x-patch
|
al@17950
|
682 c text-x-python
|
al@17950
|
683 c text-x-readme
|
al@17950
|
684 c text-x-tazpkg-receipt text-x-script
|
al@17950
|
685
|
al@18545
|
686 c application-x-shockwave-flash # Midori
|
al@18574
|
687 c unknown # for unknown mimetypes in PCManFM
|
al@17950
|
688
|
al@19003
|
689 SIZES='16'
|
al@19003
|
690 c package package-x-generic # for Midori: Sidepanel
|
al@19003
|
691
|
al@17950
|
692
|
al@17950
|
693 ########################
|
al@17950
|
694 # Standard Place Icons #
|
al@17950
|
695 ########################
|
al@17950
|
696 CATEGORY='places'; SIZES='16 48'; echo_cat
|
al@17950
|
697
|
al@17950
|
698 c folder # gtk_stock 16,24
|
al@17950
|
699 c folder-remote # gtk_stock 16,24
|
al@17950
|
700 c network-server
|
al@17950
|
701 c network-workgroup
|
al@17950
|
702 c start-here
|
al@17950
|
703 c user-bookmarks
|
al@17950
|
704 c user-desktop # gtk_stock 16,24
|
al@17950
|
705 c user-home # gtk_stock 16,24
|
al@17950
|
706 c user-trash
|
al@17950
|
707 #------------------
|
al@17950
|
708 # PCManFM XDG home sub-folders
|
al@17950
|
709 c folder-documents
|
al@17950
|
710 c folder-download
|
al@17950
|
711 c folder-music
|
al@17950
|
712 c folder-pictures
|
al@17950
|
713 c folder-publicshare
|
al@17950
|
714 c folder-templates
|
al@17950
|
715 c folder-videos
|
al@17950
|
716
|
al@17950
|
717
|
al@17961
|
718
|
al@17950
|
719 #########################
|
al@17950
|
720 # Standard Status Icons #
|
al@17950
|
721 #########################
|
al@17950
|
722 CATEGORY='status'; SIZES='22'; echo_cat
|
al@17950
|
723
|
al@17950
|
724 c appointment-missed
|
al@17950
|
725 c appointment-soon
|
al@17950
|
726 c audio-volume-high # gtk_stock 24
|
al@17950
|
727 c audio-volume-low # gtk_stock 24
|
al@17950
|
728 c audio-volume-medium # gtk_stock 24
|
al@17950
|
729 c audio-volume-muted # gtk_stock 24
|
al@18588
|
730 c battery-caution notification-battery-empty
|
al@18588
|
731 c battery-low notification-battery-low
|
al@17950
|
732 c dialog-error # gtk_stock 48
|
al@17950
|
733 c dialog-information # gtk_stock 16,24,48
|
al@17950
|
734 c dialog-password # gtk_stock 48
|
al@17950
|
735 c dialog-question # gtk_stock 48
|
al@17950
|
736 c dialog-warning # gtk_stock 48
|
al@17950
|
737 c folder-drag-accept
|
al@17950
|
738 c folder-open
|
al@17950
|
739 c folder-visiting
|
al@17950
|
740 c image-loading
|
al@17950
|
741 c image-missing # gtk_stock 16,24
|
al@17950
|
742 c mail-attachment
|
al@17950
|
743 c mail-unread
|
al@17950
|
744 c mail-read
|
al@17950
|
745 c mail-replied
|
al@17950
|
746 c mail-signed
|
al@17950
|
747 c mail-signed-verified
|
al@17950
|
748 c media-playlist-repeat
|
al@17950
|
749 c media-playlist-shuffle
|
al@17950
|
750 c network-error
|
al@17950
|
751 c network-idle # gtk_stock 16,24
|
al@17950
|
752 c network-offline
|
al@17950
|
753 c network-receive
|
al@17950
|
754 c network-transmit
|
al@17950
|
755 c network-transmit-receive
|
al@17950
|
756 c printer-error # gtk_stock 16,24
|
al@17950
|
757 c printer-printing
|
al@17950
|
758 c security-high
|
al@17950
|
759 c security-medium
|
al@17950
|
760 c security-low
|
al@17950
|
761 c software-update-available
|
al@17950
|
762 c software-update-urgent
|
al@17950
|
763 c sync-error
|
al@17950
|
764 c sync-synchronizing
|
al@17950
|
765 c task-due
|
al@17950
|
766 c task-past-due
|
al@17950
|
767 c user-available
|
al@17950
|
768 c user-away
|
al@17950
|
769 c user-idle
|
al@17950
|
770 c user-offline
|
al@17950
|
771 #c user-trash-full
|
al@17950
|
772 c weather-clear
|
al@17950
|
773 c weather-clear-night
|
al@17950
|
774 c weather-few-clouds
|
al@17950
|
775 c weather-few-clouds-night
|
al@17950
|
776 c weather-fog
|
al@17950
|
777 c weather-overcast
|
al@17950
|
778 c weather-severe-alert
|
al@17950
|
779 c weather-showers
|
al@17950
|
780 c weather-showers-scattered
|
al@17950
|
781 c weather-snow
|
al@17950
|
782 c weather-storm
|
al@17950
|
783 #------------------
|
al@17961
|
784 c system-shutdown-restart-panel # LXPanel logout icon (slitaz-logout.desktop)
|
al@17961
|
785
|
al@17950
|
786 SIZES="48 16"
|
al@17950
|
787 c user-trash-full # PCManFM desktop
|
al@17961
|
788 c dialog-password # tazbox su default icon
|
al@17961
|
789 c dialog-error # tazbox su error icon
|
al@18028
|
790 c dialog-information
|
al@18028
|
791 c dialog-password
|
al@18028
|
792 c dialog-question
|
al@18028
|
793 c dialog-warning
|
al@18561
|
794 c appointment-soon # Yad:tazbox manage-i18n
|
al@17967
|
795
|
al@17967
|
796 # LXPanel status icons
|
al@17967
|
797 SIZES="22"
|
al@17967
|
798 c gnome-netstatus-0-24 nm-signal-25
|
al@17967
|
799 c gnome-netstatus-25-49 nm-signal-50
|
al@17967
|
800 c gnome-netstatus-50-74 nm-signal-75
|
al@17967
|
801 c gnome-netstatus-75-100 nm-signal-100
|
al@17967
|
802 c gnome-netstatus-disconn network-error
|
al@17967
|
803 c gnome-netstatus-error network-error
|
al@17967
|
804 c gnome-netstatus-idle network-idle
|
al@17967
|
805 c gnome-netstatus-rx network-receive
|
al@17967
|
806 c gnome-netstatus-tx network-transmit
|
al@17967
|
807 c gnome-netstatus-txrx network-transmit-receive
|
al@17967
|
808
|
al@18561
|
809 # c avatar-default # 16x16 with canvas 22x22: for "slitaz-logout.desktop"
|
al@17967
|
810
|
al@17967
|
811
|
al@17950
|
812
|
al@17950
|
813 #####
|
al@17950
|
814
|
al@17950
|
815 echo -n "Original "; size
|
al@17950
|
816
|
al@17950
|
817 #####
|
al@17950
|
818
|
al@17950
|
819 if [ "$IS" == "yes" ]; then
|
al@17950
|
820 echo -n "Inkscape... "
|
al@17950
|
821 # convert svg to png
|
al@17950
|
822 # rarely inkscape may fail, good that we leave original file
|
al@17950
|
823 find $TO -type f -iname '*.svg' \( -exec sh -c "export E={}; inkscape -z -f \$E -e \${E%svg}png" \; -exec rm {} \; \)
|
al@17950
|
824 size
|
al@17950
|
825 fi
|
al@17950
|
826
|
al@17950
|
827 #####
|
al@17950
|
828
|
al@17950
|
829 if [ "$OP" == "yes" ]; then
|
al@17950
|
830 echo -n "Optipng... "
|
al@17950
|
831 # re-compress png files
|
al@17950
|
832 find $TO -type f -iname '*.png' -exec optipng -quiet -strip all $PNGOPT {} \;
|
al@17950
|
833 size
|
al@17950
|
834 fi
|
al@17950
|
835
|
al@17950
|
836 #####
|
al@17950
|
837
|
al@17950
|
838 if [ "$SL" == "yes" ]; then
|
al@17950
|
839 echo -n "Symlinks... "
|
al@17950
|
840 MD5FILE=$(mktemp); find $TO -type f -exec md5sum {} \; | sort > $MD5FILE
|
al@17950
|
841 # substitute repeated files by symlinks
|
al@17950
|
842 for md in $(uniq -d -w32 $MD5FILE | cut -c1-32); do
|
al@17950
|
843 make_symlinks $(grep $md $MD5FILE | cut -c35-)
|
al@17950
|
844 done
|
al@17950
|
845 rm "$MD5FILE"
|
al@17950
|
846 # make all symlinks relative
|
al@17950
|
847 SL=$(symlinks -crs $TO 2> /dev/null)
|
al@17950
|
848 size
|
al@17950
|
849 fi
|
al@17950
|
850
|
al@17950
|
851 #####
|
al@17950
|
852
|
al@17950
|
853 echo -n 'Make index.theme... '
|
al@17950
|
854 {
|
al@17950
|
855 echo "[Icon Theme]"
|
al@17950
|
856 echo "Name=$NAME"
|
al@17950
|
857
|
al@17950
|
858 echo -n "Directories="
|
al@17950
|
859 cd "$TO"
|
al@17950
|
860 FOLDERS=$(find . -type d -mindepth 2 | sort | sed "s|^\./||g")
|
al@17950
|
861 FOLDERS_COMMA=$(echo "$FOLDERS" | tr '\n' ',')
|
al@17950
|
862 echo ${FOLDERS_COMMA%,}
|
al@17950
|
863
|
al@17950
|
864 for FOLDER in $FOLDERS; do
|
al@17950
|
865 echo
|
al@17950
|
866 echo "[$FOLDER]"
|
al@17950
|
867 echo -n "Size="; echo "$FOLDER" | sed 's|^\([0-9]*\).*|\1|'
|
al@17950
|
868 echo -n "Context="
|
al@17950
|
869 case ${FOLDER#*/} in
|
al@17950
|
870 actions) echo 'Actions' ;;
|
al@17950
|
871 animations) echo 'Animations' ;;
|
al@17950
|
872 apps) echo 'Applications' ;;
|
al@17950
|
873 categories) echo 'Categories' ;;
|
al@17950
|
874 devices) echo 'Devices' ;;
|
al@17950
|
875 emblems) echo 'Emblems' ;;
|
al@17950
|
876 emotes) echo 'Emotes' ;;
|
al@17950
|
877 filesystems) echo 'FileSystems' ;;
|
al@17950
|
878 intl) echo 'International' ;;
|
al@17950
|
879 mimetypes) echo 'MimeTypes' ;;
|
al@17950
|
880 places) echo 'Places' ;;
|
al@17950
|
881 status) echo 'Status' ;;
|
al@17950
|
882 *) echo 'Other' ;;
|
al@17950
|
883 esac
|
al@17950
|
884 echo "Type=Threshold"
|
al@17950
|
885 done
|
al@17950
|
886 } > $TO/index.theme
|
al@17950
|
887 echo 'Done'
|