Commit 0ac0b0f 1 parent 4a4137e commit 0ac0b0f Copy full SHA for 0ac0b0f
File tree 1 file changed +11
-13
lines changed
1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -142,18 +142,17 @@ compwallpaper() {
142
142
instantoverlay
143
143
imgresize overlay.png " $RESOLUTION "
144
144
145
- # perpare effects
146
- case $( iconf logoeffects) in
147
- " invert" )
148
- convert wall.png -channel RGB -negate effect.png
149
- ;;
150
- " blur" )
151
- convert wall.png -blur 100x100 effect.png
152
- ;;
153
- " both" )
154
- convert wall.png -blur 100x100 -channel RGB -negate effect.png
155
- ;;
156
- esac
145
+ # perpare effect settings
146
+ iconf logoeffects | grep swirl && EFFECTS+=(" -swirl" " 360" )
147
+ iconf logoeffects | grep flip && EFFECTS+=(" -flip" )
148
+ iconf logoeffects | grep blur && EFFECTS+=(" -blur" " 100x100" )
149
+ iconf logoeffects | grep invert && EFFECTS+=(" -channel" " RGB" " -negate" )
150
+ iconf logoeffects | grep grayscale && EFFECTS+=(" -colorspace" " Gray" )
151
+ iconf logoeffects | grep contrast && EFFECTS+=(" -level" " 20000" )
152
+ iconf logoeffects | grep dim && EFFECTS+=(" -modulate" " 50" )
153
+ iconf logoeffects | grep brighten | grep -v dim && EFFECTS+=(" -modulate" " 150" )
154
+
155
+ convert wall.png " ${EFFECTS[@]} " effect.png
157
156
158
157
# create mask from overlay
159
158
convert overlay.png -alpha extract mask.png
@@ -165,7 +164,6 @@ compwallpaper() {
165
164
rm wall.png
166
165
rm mask.png
167
166
rm cut.png
168
- rm blackandwhite.png
169
167
rm effect.png
170
168
else
171
169
echo " logo disabled"
You can’t perform that action at this time.
0 commit comments