Recent

Author Topic: Another desktop widget  (Read 6247 times)

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Another desktop widget
« on: November 03, 2015, 01:27:29 am »
I created another Linux utility with Lazarus. Here is my CPU Graph utility:

http://cache.getlazarus.org/video/widget-cpugraph.mp4

It can record up to 1 hour of CPU activity while silently sitting in the tray. Pressing a hotkey toggles the display of the graph.

I am probably going to add a few styles the user can choose from as well individual CPU percentages and core speed stepping (CPU Mhz can change depending on system load).

I think the benefit of this over the gnome system monitor is that when the gnome monitor is closed no CPU activity is recorded. Mine allows you to change the graph range and rewind through history. It also uses very little resources when it's not being displayed. Oh and it's easier to open/close (through a global hotkey).

mdalacu

  • Full Member
  • ***
  • Posts: 233
    • dmSimpleApps
Re: Another desktop widget
« Reply #1 on: November 03, 2015, 06:58:46 am »
Nice work!
How did you get the system tray working on Unity?
Thx.

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Another desktop widget
« Reply #2 on: November 03, 2015, 07:15:59 am »

mdalacu

  • Full Member
  • ***
  • Posts: 233
    • dmSimpleApps
Re: Another desktop widget
« Reply #3 on: November 03, 2015, 08:21:53 am »
Thanks. I didn't know that Unity imposes such limitations.

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Another desktop widget
« Reply #4 on: November 03, 2015, 08:34:01 am »
Thanks. I didn't know that Unity imposes such limitations.
Mark Shuttleworth he has been trying to convince others to impose strict behaviors on user interface elements. Tray icons (Unity appindicators) don't provide event notification or tooltip support. You can only associate an icon, text, and a menu, and you get no notification events.

http://www.markshuttleworth.com/archives/347

Quote:

Some firm decisions

3. Constrained behaviour All the indicators will take the form of an indicator (icon or text), and a menu. Clicking on an indicator will open its menu. Keyboard navigation will always work, and left and right arrows will translate either into submenu navigation or flipping from indicator to indicator. The whole set of indicators on the panel will be navigable as a single menu, in essence. We won’t support “right click” on indicators differently from “left click”, and there’ll be no ability for arbitrary applications to define arbitrary behaviors to arbitrary events on indicators.

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Another desktop widget
« Reply #5 on: November 05, 2015, 06:01:50 am »
Here's an update:

I added the a timeline scrubber control to go through the CPU usage history up to 1 hour:

 http://cache.getlazarus.org/video/cpugraph-scrub.mp4

Tony Stone

  • Full Member
  • ***
  • Posts: 219
Re: Another desktop widget
« Reply #6 on: December 20, 2021, 01:53:55 am »
Hey sysrpl !!

I have been looking for a way to properly monitor CPU usage in one of my  linux programs.  I am wondering if this is something you have opened sourced?  I am also looking to setup global system hot keys for my program which seems to be kind of difficult in Linux!   >:(  However... you just gave me some hope!  I will check back here the next few days... or if I see you on IRC soon I will pick your brain!  You could probably also give me some direction on implementing send keys or keyboard input.  Currently I am using an external tool called xdotool becausde MouseAndKeyInput package included with Lazarus is giving me some troubles.  But I really don't want to make my program dependent on external tools.  Anyway, talk to you soon!  Thanks for all the great stuff you are putting out and over at getlazarus.org

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Another desktop widget
« Reply #7 on: December 20, 2021, 03:25:45 am »
Maybe this helps. Feel free to ask me any questions:

https://gist.github.com/sysrpl/626f45e72f9632b017fc81fae6381ad4
« Last Edit: December 20, 2021, 03:28:40 am by sysrpl »

 

TinyPortal © 2005-2018