Linux Lite Forums
Optional Widget for Linux Lite 3.2 - Printable Version

+- Linux Lite Forums (https://www.linuxliteos.com/forums)
+-- Forum: General (https://www.linuxliteos.com/forums/forumdisplay.php?fid=4)
+--- Forum: On Topic (https://www.linuxliteos.com/forums/forumdisplay.php?fid=14)
+--- Thread: Optional Widget for Linux Lite 3.2 (/showthread.php?tid=3318)

Pages: 1 2 3 4 5 6


Re: Optional Widget for Linux Lite 3.2 - Valtam - 09-26-2016

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 Smile


Re: Optional Widget for Linux Lite 3.2 - frakbe - 11-14-2016

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'.
[Image: 9nhInTE.jpg]
To modify this behaviour, I've made a little script, and saved it as "userlog.sh" in ~/.conky/userlog.sh.
Code:
~$ cat .conky/userlog.sh
#!/bin/bash
users|tr ' ' '\n'|sort -u|tr '\n' ' '
Then, I modified ~/.conky/widget as described below:
Code:
~$ 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.
[Image: JHwCNdz.jpg]
Hope you'll appreciate.

Franco 'frakbe'


Re: Optional Widget for Linux Lite 3.2 - Valtam - 11-14-2016

@frakbe, can you try:

Code:
${color}Logged in as:   ${alignr}${color}$USER

and let me know the result? Thank you.


Re: Optional Widget for Linux Lite 3.2 - frakbe - 11-14-2016

@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 - Valtam - 11-14-2016

I see what you mean, I'll add that to LL 3.4, thank you Smile


Re: Optional Widget for Linux Lite 3.2 - frakbe - 11-14-2016

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 - Valtam - 11-14-2016

Good to hear Smile


Re: Optional Widget for Linux Lite 3.2 - trinidad - 11-14-2016

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   


Re: Optional Widget for Linux Lite 3.2 - frakbe - 11-14-2016

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