Linux Lite Forums

Full Version: Optional Widget for Linux Lite 3.2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
Hi Jocklad,

After extracting it you'll find two hidden folders:
Code:
.config
.conky

The ".conky" folder needs to be placed in your home folder. So if you extracted the file in a different folder than your home folder (like Downloads), you need to move it there:
Code:
$ mv .conky ~/

Inside the ".config" folder you'll find another folder "autostart" with the file "litewidget.desktop" in it. This file needs to go into the same place within your home folder:
Code:
$ mv .config/autostart/litewidget.desktop ~/.config/autostart/
Then "Lite Widget" will show up under Application Autostart.

Hope that helps Smile


PS: Oops, Jerry you have been faster than me! Smile
(09-22-2016, 09:56 AM)Jerry link Wrote: [ -> ]Did you extract it directly to your home folder? For example, if you downloaded it into your Downloads folder, you may have extracted it into your Downloads folder.

Sent from my Nexus 6 using Tapatalk

Thanks Jerry,yes I did extract to the downloads folder.

Have corrected and its now running on startup  Smile Smile Smile

Jocklad
Thanks LL-user ok now.

Jocklad
Some important information about this. How the check for updates function works. How it currently works is it uses apt-check during boot up to see if there are any updates according to the last time sudo apt-get update was run. The widget cannot check for actual updates on a regular basis without being run as sudo, something we cannot do without adding users to the sudoers file - not an option!

Also - the latest update check method is not accurate, please revert back to the previous method in the ~/.conky/updates file:

Code:
#!/bin/bash
# Check for Updates - for the Linux Lite Conky Widget
# Licence - GPLv2 Sharing is Caring
# Jerry Bezencon - Linux Lite 2016

# Variables

NUMOFUPDATES=$(LANG=C apt-get upgrade -s |grep -P '^\d+ upgraded'|cut -d" " -f1)
UPDATEY1="There is 1 Update available"
UPDATEY2="There are $NUMOFUPDATES Updates available"
UPDATEN="Your system is up to date"

# Statements

if [ $NUMOFUPDATES -gt 1 ]; then
    echo "\${color3}"$UPDATEY2    # If there is more than 1 update available

elif [ $NUMOFUPDATES -eq 1 ]; then
    echo "\${color3}"$UPDATEY1    # Return 1 Update available

else
    echo "\${color2}"$UPDATEN    # System is up to date
fi

exit 0

https://www.linuxliteos.com/files/litewidget3.tar.gz

So, you ask then, why is this part of the widget? It's a reminder when you don't remember, about how important updates are to get. Should this still be part of the widget? Your thoughts please.
Hi Jerry,

Thanks for the update and very valuable information answering quite a few questions I had/raised Smile

In the given situation ('apt-get update' needs to be run manually) I would consider trinidad's suggestion to show the time of the last update more valuable to users.

As "Your system is up to date" in the current state only refers to the time 'apt-get update' was run, it could give the user a false sense of "all OK", not realizing the package lists haven't been updated for maybe ages.

my 2c Smile
(09-22-2016, 09:31 PM)LL-user link Wrote: [ -> ]In the given situation ('apt-get update' needs to be run manually) I would consider trinidad's suggestion to show the times of the last update more valuable to users.

I like that suggestion Smile
[Image: 66FhOYt.png]

updates file code:

Code:
#!/bin/bash
# Check for Updates - for the Linux Lite Conky Widget
# Licence - GPLv2 Sharing is Caring
# Jerry Bezencon - Linux Lite 2016

# Variables

LASTUPDATES=$(LANG=C ls -lt --time-style="long-iso" /var/log/apt | grep -o '\([0-9]\{2,4\}[- ]\)\{3\}[0-9]\{2\}:[0-9]\{2\}' -m 1)

# Statements

echo "\${color2}"$LASTUPDATES

exit 0

widget code, line 127:

Code:
${alignc}${font AvantGardeLTMedium:bold:size=10}${color Tan1}Your last update was on:${font}
Great Jerry! Smile

If you wanted to take it a bit further and make it more convenient/straight forward to the user, you could give the relative time.
Something like:

---------------------
You last update was

      9 days ago
---------------------

Maybe even changing color from green to red if it went beyond a certain threshold of days.

In general I consider providing update status information very valuable and a great step forward.
Next step would be to work towards Shaggy's solution or to use one of the other ones out there.
I agree either x day since last update or similar or a date last checked.. If I recall 2.8 was worded similarly in LLCC...

I too use hibernate more than shutdown.. Could a button or a link when clicked force the update to check or too is it too much for conky?
(09-22-2016, 11:38 PM)firenice03 link Wrote: [ -> ]I agree either x day since last update or similar or a date last checked.. If I recall 2.8 was worded similarly in LLCC...

I too use hibernate more than shutdown.. Could a button or a link when clicked force the update to check or too is it too much for conky?

I can't find a resource that gives an example of clickable links in conky, but will work on a way to try and show time since the last update in human readable format.
Pages: 1 2 3 4 5 6