Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 16 submissions in the queue.
posted by martyb on Thursday January 17 2019, @01:45AM   Printer-friendly
from the automation++ dept.

Hi all,

I have been learning linux and have a secondary monitor that I wanted to use for showing some sensor data. Currently I need to manually enter in three commands and then arrange my windows each time I want to look at (and start-up, etc). I am using the nethogs, inxi, and lm-sensors libraries:

sudo nethogs
watch -n1 "inxi -s"
watch -n1 "sensors | grep Tdie"

The end result looks something like this:
https://i.ibb.co/TgWXKSn/sensors.png

Is it possible/easy to script the opening of these three terminal windows and position them onto a specific monitor? Or is there a completely different better way to go about this?

Also, is there a way for me to custom arrange the data on the screen? Eg, could I put the sensors "Tdie" data into two columns and remove the "high = +70.0 C" info?

[Beyond this specific case, is there a general solution with, say, a directory containing a separate shell script for launching each program, with a master script that specifies terminal width/height as well as (x,y) coordinates? --Ed.]


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 5, Interesting) by Runaway1956 on Thursday January 17 2019, @01:59AM (3 children)

    by Runaway1956 (2926) Subscriber Badge on Thursday January 17 2019, @01:59AM (#787698) Journal

    You appear to be trying to reinvent conky. There is nothing wrong with that, of course, but you might want to look at some images, and then look at how they accomplish the same thing.

    http://www.linuxandubuntu.com/home/5-best-linux-conky-themes [linuxandubuntu.com]
    https://en.wikipedia.org/wiki/Conky_(software) [wikipedia.org]
    https://www.lifewire.com/beginners-guide-to-conky-4043352 [lifewire.com]
    http://conky.sourceforge.net/documentation.html [sourceforge.net]

    Starting Score:    1  point
    Moderation   +3  
       Interesting=2, Informative=1, Total=3
    Extra 'Interesting' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   5  
  • (Score: 0) by Anonymous Coward on Thursday January 17 2019, @02:10AM (2 children)

    by Anonymous Coward on Thursday January 17 2019, @02:10AM (#787707)

    Thanks, I tried conky (a little) but it didn't seem to meet my needs.

    1) Is there a way to move conky windows around on the screen with the cursor after they are loaded?

    2) It looks like I can't just feed arbitrary data to conky:
    https://superuser.com/questions/492858/is-there-anyway-to-show-nethogs-output-in-conky [superuser.com]

    • (Score: 3, Interesting) by Runaway1956 on Thursday January 17 2019, @03:25AM (1 child)

      by Runaway1956 (2926) Subscriber Badge on Thursday January 17 2019, @03:25AM (#787755) Journal

      1. no, you can't move conky around. Instead you edit your startup script to place the windows where you want them. The script determines transparency, colors, size of text, how many CPU's you're monitoring - everything. Once running, conky can't be altered.

      2. I've not used nethogs, so I really don't know if it's compatible with conky. Maybe a search for "conky nethogs"? There are hits to SuperUser and to StackExchange in my search window, both summaries seem to say "no". Sorry.

      But, the existence of Conky proves that it is possible to perform the tasks that you originally asked about. I'm a lame-ass scripter, and we have some good scripters on the site. I'll let some of those people offer their ideas. ;^)