You are Here:
Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section



Optional Widget for Linux Lite 3.2

Author (Read 21091 times)

0 Members and 1 Guest are viewing this topic.

Re: Optional Widget for Linux Lite 3.2
« Reply #59 on: November 14, 2016, 09:08:33 AM »
 

frakbe

  • New to Forums
  • *
  • 5
    Posts
  • Reputation: 0
  • Linux Lite Member
    • View Profile

  • CPU: Intel(R) Core(TM) i5-4310M

  • MEMORY: 8Gb
Hi trinidad,
I' think that commas instead of periods depends on locale chosen for distro (mine is it_IT.UTF-8).
About the script: you're true, the only information that "have sense" to display near the label "Logged in as: " is the login name of the current user graphically logged on the desktop.
On the other hand, don't make sense to display sudoed user root, because the label explicitally refer only to the user that logged in.
Instead, if we assume to change the label from "Logged in as: " to "Users logged: ", then it would make sense to display all users connected, and even also sudoed ones (but how? I don't know).

 

Re: Optional Widget for Linux Lite 3.2
« Reply #58 on: November 14, 2016, 08:39:32 AM »
 

trinidad

  • Platinum Level Poster
  • **********
  • 1471
    Posts
  • Reputation: 214
  • Linux Lite Member
    • View Profile
    • dbts-analytics.com

  • CPU: i7 4 cores 8 threads

  • MEMORY: 16Gb

  • VIDEO CARD: Intel HD graphics

  • Kernel: 5.x
Frakbe,

In your posted image of the widget the memory display shows commas i/e - 7,71 GiB. I will check my other system to see if mine displays commas. Should be a period. Also the script to solve the multiple user issue, should either exchange the user names and not add a new user next to the one logged in, or the login as: user information should just display the original user logged in from the session login screen. Ideally root would be displayed next to user when sudo is invoked as well. Of course "ifs" and "thens" and a longer script would be required. The issue does not occur with LXterm or ROXterm for me, only XFCE4term, UXterm, and Xterm.

To sum up it would be nice if:
1) Users names would exchange
2) Root would be displayed next to user when sudoing.

TC     
All opinions expressed and all advice given by Trinidad Cruz on this forum are his responsibility alone and do not necessarily reflect the views or methods of the developers of Linux Lite. He is a citizen of the United States where it is acceptable to occasionally be uninformed and inept as long as you pay your taxes.
 

Re: Optional Widget for Linux Lite 3.2
« Reply #57 on: November 14, 2016, 05:28:33 AM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8777
    Posts
  • Reputation: 801
  • Linux Lite Member
    • View Profile
    • Linux Lite OS

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 5.x
Good to hear :)
 

Re: Optional Widget for Linux Lite 3.2
« Reply #56 on: November 14, 2016, 05:23:30 AM »
 

frakbe

  • New to Forums
  • *
  • 5
    Posts
  • Reputation: 0
  • Linux Lite Member
    • View Profile

  • CPU: Intel(R) Core(TM) i5-4310M

  • MEMORY: 8Gb
Thank you for your commitment on Linux Lite, I'm using your good distro for my everyday tasks.
 

Re: Optional Widget for Linux Lite 3.2
« Reply #55 on: November 14, 2016, 05:17:51 AM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8777
    Posts
  • Reputation: 801
  • Linux Lite Member
    • View Profile
    • Linux Lite OS

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 5.x
I see what you mean, I'll add that to LL 3.4, thank you :)
 

Re: Optional Widget for Linux Lite 3.2
« Reply #54 on: November 14, 2016, 05:15:31 AM »
 

frakbe

  • New to Forums
  • *
  • 5
    Posts
  • Reputation: 0
  • Linux Lite Member
    • View Profile

  • CPU: Intel(R) Core(TM) i5-4310M

  • MEMORY: 8Gb
@Jerry: If i use "$USER" variable I'll see only my current session, but I don't see if there are session(s) of other user ('pino' user, in my example picture posted above).

 

Re: Optional Widget for Linux Lite 3.2
« Reply #53 on: November 14, 2016, 04:59:31 AM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8777
    Posts
  • Reputation: 801
  • Linux Lite Member
    • View Profile
    • Linux Lite OS

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 5.x
@frakbe, can you try:

Code: [Select]
${color}Logged in as:   ${alignr}${color}$USER
and let me know the result? Thank you.
« Last Edit: November 14, 2016, 05:02:12 AM by Jerry »
 

Re: Optional Widget for Linux Lite 3.2
« Reply #52 on: November 14, 2016, 04:56:19 AM »
 

frakbe

  • New to Forums
  • *
  • 5
    Posts
  • Reputation: 0
  • Linux Lite Member
    • View Profile

  • CPU: Intel(R) Core(TM) i5-4310M

  • MEMORY: 8Gb
Hi to everyone,
I propose a little modification in .conky/widget file. With current configuration, if you are logged on many tty (or x-terminal) conky reports your login for any login you made, with a terrible 'look&feel'.

To modify this behaviour, I've made a little script, and saved it as "userlog.sh" in ~/.conky/userlog.sh.
Code: [Select]
~$ cat .conky/userlog.sh
#!/bin/bash
users|tr ' ' '\n'|sort -u|tr '\n' ' '
Then, I modified ~/.conky/widget as described below:
Code: [Select]
~$ diff .conky/widget.orig .conky/widget
122c122,123
< ${color}Logged in as: ${alignr}${color}${user_names}
---
> #${color}Logged in as: ${alignr}${color}${user_names}
> ${color}Logged in as:  ${alignr}${execi 10 ~/.conky/userlog.sh}

At picture below you can see the final result.

Hope you'll appreciate.

Franco 'frakbe'
 

Re: Optional Widget for Linux Lite 3.2
« Reply #51 on: September 26, 2016, 12:55:55 AM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8777
    Posts
  • Reputation: 801
  • Linux Lite Member
    • View Profile
    • Linux Lite OS

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 5.x
Thanks to your feedback, I'm incredibly excited to show folks what we've now achieved with the Lite Widget. I've hired a developer to work on some complex bash code for the Updates information and am pleased to report that this is progressing nicely. Look for it all in Linux Lite 3.2 Beta :)
 

Re: Optional Widget for Linux Lite 3.2
« Reply #50 on: September 22, 2016, 07:56:36 PM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8777
    Posts
  • Reputation: 801
  • Linux Lite Member
    • View Profile
    • Linux Lite OS

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 5.x
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.
 

Re: Optional Widget for Linux Lite 3.2
« Reply #49 on: September 22, 2016, 07:38:40 PM »
 

firenice03

  • Rockin' the FREE World
  • Global Moderator
  • Platinum Level Poster
  • *****
  • 1848
    Posts
  • Reputation: 284
  • Linux Lite Member
    • View Profile

  • CPU: AMD E2//Atom X5//AMD Phenom II X2

  • MEMORY: 4Gb

  • VIDEO CARD: AMD Mullin Radeon R2//Intel//AMD/ATI RS880

  • Kernel: 5.x
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?
LL4.8 UEFI 64 bit ASUS E402W - AMD E2 (Quad) 1.5Ghz  - 4GB - AMD Mullins Radeon R2
LL5.8 UEFI 64 bit Test UEFI Kangaroo (Mobile Desktop) - Atom X5-Z8500 1.44Ghz - 2GB - Intel HD Graphics
LL4.8 64 bit HP 6005- AMD Phenom II X2 - 8GB - AMD/ATI RS880 (HD4200)
LL3.8 32 bit Dell Inspiron Mini - Atom N270 1.6Ghz - 1GB - Intel Mobile 945GSE Express  -- Shelved
BACK LL5.8 64 bit Dell Optiplex 160 (Thin) - Atom 230 1.6Ghz - 4GB-SiS 771/671 PCIE VGA - Print Server
Running Linux Lite since LL2.2
 

Re: Optional Widget for Linux Lite 3.2
« Reply #48 on: September 22, 2016, 06:25:53 PM »
 

LL-user

  • I come here a lot
  • *****
  • 455
    Posts
  • Reputation: 214
  • Linux Lite Member
    • View Profile
Great Jerry! :)

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.
 

Re: Optional Widget for Linux Lite 3.2
« Reply #47 on: September 22, 2016, 06:10:52 PM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8777
    Posts
  • Reputation: 801
  • Linux Lite Member
    • View Profile
    • Linux Lite OS

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 5.x


updates file code:

Code: [Select]
#!/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: [Select]
${alignc}${font AvantGardeLTMedium:bold:size=10}${color Tan1}Your last update was on:${font}
« Last Edit: September 22, 2016, 06:22:15 PM by Jerry »
 

Re: Optional Widget for Linux Lite 3.2
« Reply #46 on: September 22, 2016, 05:34:11 PM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8777
    Posts
  • Reputation: 801
  • Linux Lite Member
    • View Profile
    • Linux Lite OS

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 5.x

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 :)
 

Re: Optional Widget for Linux Lite 3.2
« Reply #45 on: September 22, 2016, 05:31:38 PM »
 

LL-user

  • I come here a lot
  • *****
  • 455
    Posts
  • Reputation: 214
  • Linux Lite Member
    • View Profile
Hi Jerry,

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

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 :)
« Last Edit: November 14, 2016, 01:43:57 PM by LL-user »
 

 

-->
X Close Ad

Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section