[download]
local/bin/icon
1
2
3 icon(){
4
5 shopt -s nocasematch
6 case $1 in
7 gtk) i=;;
8 hud) i=;;
9 man) i=;;
10 ocr) i=廓;;
11 apps) i=;;
12 grab) i=;;
13 kino) i=;;
14 pass) i=聾;;
15 temp) i=糖;;
16 vbox) i=;;
17 wifi) i=;;
18 wiki) i=;;
19 bloge) i=;;
20 files) i=;;
21 games) i=;;
22 repos) i=;;
23 start) i=;;
24 theme) i=;;
25 editor) i=;;
26 emojis) i=;;
27 picker) i=;;
28 qrcode) i=;;
29 browser) i=;;
30 symbols) i=;;
31 windows) i=;;
32 calendar) i=;;
33 document) i=;;
34 dotfiles) i=;;
35 terminal) i=;;
36 nerdfonts) i=;;
37 wikipedia) i=;;
38 screenshot) i=;;
39 wallpapers) i=;;
40
41 redshift- ) i=;;
42 redshift-*) i=;;
43 redshift ) i=$(icon redshift-$(pidof redshift));;
44
45 network-e*) i=;;
46 network-w*) i=;;
47 network-?*) i=;;
48 network- ) i=;;
49 network ) i=$(icon network-$(ip r g 1 | awk '{ print $5 }'));;
50
51 inbox-0) i=;;
52
53
54 inbox-*) i=;;
55 inbox ) i=$(icon inbox-$(inbox | wc -l));;
56
57 days-0) i=;;
58 days-1) i=;;
59 days-*) i=;;
60 days ) i=$(icon days-$(days | grep -c 🎂));;
61
62 os-*alpine*) i=;;
63 os-arch* ) i=;;
64 os-*bsd* ) i=;;
65 os-*mint* ) i=;;
66 os-*ubuntu*) i=;;
67 os-*win* ) i=;;
68 os ) source /etc/os-release; i=$(icon os-${ID:-$(uname -s)});;
69 os-* ) i=$(nerdfonts | awk "/linux-${1:3}/ { print \$1 }") i=${i:-};;
70
71 torrents ) i=;;
72 torrents-[Dda]*) i=;;
73 torrents-[Qq]* ) i=;;
74 torrents-comp* ) i=;;
75 torrents-Seed* ) i=;;
76 torrents-uplo* ) i=;;
77 torrents-Up ) i=;;
78 torrents-[Sp]* ) i=;;
79 torrents-*DL* ) i=;;
80 torrents-*UP* ) i=;;
81 torrents-Idle* ) i=;;
82 torrents-* ) i=;;
83
84 system ) i=;;
85 system-lock ) i=;;
86 system-quit ) i=;;
87 system-sleep ) i=鈴;;
88 system-reload ) i=;;
89 system-reboot ) i=;;
90 system-restart ) i=;;
91 system-poweroff) i=;;
92
93 audio ) i=蓼;;
94 audio-*usb*) i=禍;;
95 audio-* ) i=菉;;
96
97 battery-100*c*) i=;;
98 battery-9?*-c*) i=;;
99 battery-8?*-c*) i=;;
100 battery-7?*-c*) i=;;
101 battery-6?*-c*) i=;;
102 battery-5?*-c*) i=;;
103 battery-4?*-c*) i=;;
104 battery-3?*-c*) i=;;
105 battery-2?*-c*) i=;;
106 battery-1?*-c*) i=;;
107 battery-?*-c* ) i=;;
108 battery-100* ) i=;;
109 battery-9?* ) i=;;
110 battery-8?* ) i=;;
111 battery-7?* ) i=;;
112 battery-6?* ) i=;;
113 battery-5?* ) i=;;
114 battery-4?* ) i=;;
115 battery-3?* ) i=;;
116 battery-2?* ) i=;;
117 battery-1?* ) i=;;
118 battery-?* ) i=;;
119 battery-* ) i=;;
120 battery ) i=$(icon battery-$(battery | awk '{ print $1 "-" $2; exit }'));;
121
122 weather-☀️ ) i=;;
123 weather-☁️ ) i=;;
124 weather-⛅️) i=;;
125 weather-⛈) i=;;
126 weather-✨) i=;;
127 weather-❄️ ) i=;;
128 weather-🌦) i=;;
129 weather-🌧) i=;;
130 weather-🌨) i=;;
131 weather-🌩) i=朗;;
132 weather-🌫) i=;;
133 weather-* ) i=;;
134 weather ) i=$(icon weather-$(< ~/.cache/weather.ico));;
135
136 moonday-🌑) i=;;
137 moonday-🌒) i=;;
138 moonday-🌓) i=;;
139 moonday-🌔) i=;;
140 moonday-🌕) i=;;
141 moonday-🌖) i=;;
142 moonday-🌗) i=;;
143 moonday-🌘) i=;;
144 moonday-* ) i=;;
145 moonday ) i=$(icon moonday-$(< ~/.cache/moonday.ico));;
146
147 music-play ) i=;;
148 music-pause ) i=;;
149 music-stop ) i=;;
150 music-prev ) i=;;
151 music-next ) i=;;
152 music-seek*+*) i=;;
153 music-seek*-*) i=;;
154 music ) i=($(MUSIC_FORMAT=\$icon music) ) i=$i;;
155
156 news ) i=;;
157 news-*youtube*) i=輸;;
158 news-*reddit* ) i=樓;;
159 news-* ) i=留;;
160
161 recent ) i=;;
162 recent-gvim ) i=;;
163 recent-gimp ) i=;;
164 recent-godot ) i=;;
165 recent-krita ) i=;;
166 recent-blender ) i=;;
167 recent-inkscape ) i=;;
168 recent-audacious) i=嗢;;
169 recent-audacity ) i=;;
170
171 daylight-рассвет) i=;;
172 daylight-восход ) i=;;
173 daylight-зенит ) i=;;
174 daylight-заход ) i=;;
175 daylight-сумерки) i=;;
176 daylight-* ) i=;;
177 daylight ) i=$(icon daylight-$(daylight | tac | awk '/-/ { print $NF; exit }'));;
178
179 mixer-婢) i=婢;;
180 mixer-* ) i=;;
181 mixer ) i=$(icon mixer-$(< ~/.cache/volume.ico));;
182
183 ?) i=$1;;
184 *-*) i=$(icon ${1%-*});;
185 '') grep -o '^\s\+\w\+' $0 | tr -d ' ' | sort -u;;
186 *) i=($(nerdfonts | grep -im 1 "$1")) i=${i:-};;
187 esac 2>&-
188
189 [[ $ICON_FIX ]] &&
190 echo "${i// }${2:+ }${@:2}" ||
191 echo "${i// } ${2:+ }${@:2}"
192
193 }
194
195 return 2>&-
196 icon "$@"
|