naturegasil.blogg.se

Linux desklets
Linux desklets













linux desklets

Linux desklets code#

The method setupUI() contains the behaviour of the desklet, see comments in the code above. Using MyDesklet.prototype allows us to add new methods to the object constructors. The function MyDesklet is the constructor for our desklet, it takes metadata (dictionary) with the metadata of the desklet, and desklet_id (int) which is the instance id of the desklet. The Shell Toolkit is imported at imports.gi.St, it is a clutter-based toolkit that allows to add GUI elements to the desklet, St documentation can be found here. First, the Desklet class is imported from. St function MyDesklet ( metadata, desklet_id ) Ĭonstants are declared with const, and cannot be re-declared nor changed. Metadata.json: As it names indicates, this has the metadata for the desklet and additional options such as max-instances to allow multiple instances of the desklet.Ĭonst Desklet = imports. For example desklet requires at least two files: Then, create a directory with the name this is the UUID of the desklet. The files described in this section can be downloaded from here.įirst desklet, it prints "Hello Desktop" and can have multiple instancesįirst of all, the desklets are located at ~/.local/share/cinnamon/desklets, where each desklet has its own directory.

linux desklets

When finished, it should look like the image below. Ok, with the previous information in mind, here a simple desklet is created and explained. More information about desklets can be find in the official repository. Moreover, desklets as well as other graphical elements in Cinnamon are written in JavaScript 3, and use the Cinnamon's JavaScript interpreter (CJS) 4. "Desklets are little programs which you can place on your desktop, on top of your desktop background" 2. At the moment of writing, Cinnamon 4.4.8 on Arch Linux was used. Because the information to develop a desklet is outdated 1, I decided to document the process, this is the first part of that process. I can do 'serious' work with Puppy whenever I need to (after all, this new forum is, I believe, Puppy-powered!).but I just love "playing" with her.A good day I was going through the available Desklets for Cinnamon, looking for an desklet to display graphs about the current state of the system (CPU, RAM, disks, etc.), although I found the nice desklets such as Simple monitor system, CPU Load and Disk Space, none of them quite do what I need. The above images were all created with it.Īnd folks call Puppy boring.and scathingly refer to it as a 'toy' distro, not suitable for 'real' work. To this end, Fred 'modified' TakeAShot, and built TakeAGif.which allows you to create short GIF sequences directly at the click of a button. You don't always want a full-blown video (though we now have that option) sometimes a simple short GIF is perfectly adequate to get your point across. I'm of the same opinion as Fred.that visual demonstrations of things simplify comprehension. The 'globe', when clicked, brings up a YAD-powered 'selector' Menu, just for browsers like so:. Following a conflab with Fred - my bash skills are still not so hot! - he modified the GIF script I use for my wee Puppy so that clicking on the GIF would permit assigning a function to it. I wanted a simple way to launch all the different portable-browsers that I've built, rather than digging around in the Menu. Up in the main launcher area, there's a small, spinning globe:. Look closely, and see if you can spot the GIFs.īottom left corner, there's my wee puppy, endlessly romping across the desktop:. It, too, uses gtk2-desklet, I think from the Debian repos. Fred came up with a small utility - originally for his Debian Dogs - that would let you put an animated GIF onto the desktop. I've been doing summat similar for a while now. Gifsicle -i -resize-height 256 /root/.config/animwall/preview.gif Gifsicle -i -resize $RES /root/.config/animwall/anim.gif Kill `ps | grep program=ANIMWALL | grep -v grep | awk ''` If grep -c 'program=ANIM_WALL_GUI' /tmp/anim_n then # Selecting "Stop" kills the process and removes anim_wall from /root/Startup # and runs the script, widget runs at startup. # desktop dimensions and create a script /root/Startup/anim_wall # and file size, select "Start", this will resize the gif to

linux desklets

# To use select an animated gif file of appropriate dimensions # as no icons or rightclick menus are accessible.

linux desklets

# Suitable as a wallpaper if a none active desktop is acceptable, # use with small file size animated gif's is recommended. # Animwall a gtkdialog-desklet animated gif background widget.















Linux desklets