Desktop Widgets
Posted: Wed Jul 22, 2020 7:37 am
I compiled get2desklet64-3.1 in Bionic64, Gtk2desklet is used to create desktop widgets.
Get source here https://www.dropbox.com/sh/k1hn0un11p39 ... tk2desklet
Animwall Desktop Widget overlays the desktop
Download the sample gif to try it out
Get source here https://www.dropbox.com/sh/k1hn0un11p39 ... tk2desklet
Animwall Desktop Widget overlays the desktop
Download the sample gif to try it out
Code: Select all
#!/bin/bash
# Animwall a gtkdialog-desklet animated gif background widget.
# use with small file size animated gif's is recommended.
# Suitable as a wallpaper if a none active desktop is acceptable,
# as no icons or rightclick menus are accessible.
# To use select an animated gif file of appropriate dimensions
# and file size, select "Start", this will resize the gif to
# desktop dimensions and create a script /root/Startup/anim_wall
# and runs the script, widget runs at startup.
# Selecting "Stop" kills the process and removes anim_wall from /root/Startup
# Geoffrey 22/07/2020
ps > /tmp/anim_wall.run
if grep -c 'program=ANIM_WALL_GUI' /tmp/anim_wall.run; then
rm -f /tmp/anim_wall.run
exit 0
fi
rm -f /tmp/anim_wall.run
mkdir -p /root/.config/animwall
STOP_ANIMWALL(){
kill `ps | grep program=ANIMWALL | grep -v grep | awk '{print $1}'`
exit 0
}
export -f STOP_ANIMWALL
START_ANIMWALL(){
echo "#!/bin/sh
ps > /tmp/animwall.run
if grep -c '"'program=ANIMWALL'"' /tmp/animwall.run; then
rm -f /tmp/animwall.run
exit 0
fi
rm -f /tmp/animwall.run
export ANIMWALL='<window margin="'"0"'" decorated="'"false"'" skip-taskbar-hint="'"true"'">
<pixmap><input file>/root/.config/animwall/anim.gif</input></pixmap>
</window>'
gtkdialog-desklet --center --program=ANIMWALL " > /root/Startup/anim_wall
chmod a+x /root/Startup/anim_wall
exit 0
}
export -f START_ANIMWALL
export RES=`xdpyinfo | grep dimensions | awk '{print $2}'`
CREATE(){
gifsicle -i --resize $RES < $GIF > /root/.config/animwall/anim.gif
gifsicle -i --resize-height 256 < $GIF > /root/.config/animwall/preview.gif
exit 0
}
export -f CREATE
export ANIM_WALL_GUI='
<window title="Animwall Desktop Widget" image-name="/usr/share/pixmaps/preferences-desktop-wallpaper.png" resizable="false" decorated="true">
<vbox spacing="0">
<pixmap>
<variable>IMAGE</variable>
<input file>/root/.config/animwall/preview.gif</input>
</pixmap>
<hbox><text xalign="1" use-markup="true" width-chars="16"><label>Animated Gif</label></text>
<entry fs-action="newfile"
fs-filters="*.gif"
fs-title="Select an animated gif">
<variable>GIF</variable>
</entry>
<button relief="2" tooltip-text="Select an animated gif" use-underline="true">
<input file stock="gtk-open"></input>
<action type="refresh">IMAGE</action>
<action>fileselect:GIF</action>
<action>CREATE</action>
<action type="refresh">IMAGE</action>
</button>
</hbox>
<hbox space-fill="true" expand="true" homogeneous="true">
<button use-underline="true">
<label>'"▶ _Start"'</label>
<action>STOP_ANIMWALL</action>
<action>START_ANIMWALL</action>
<action>/root/Startup/anim_wall &</action>
</button>
<button use-underline="true">
<label>'"■ _Stop"'</label>
<action>STOP_ANIMWALL</action>
<action>rm -f /root/Startup/anim_wall</action>
</button>
<button use-underline="true">
<label>✖ _Quit</label>
</button>
</hbox>
</vbox>
</window>'
gtkdialog --center --program=ANIM_WALL_GUI
exit 0