Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
7Roses

ComputerPowerChecker

Recommended Posts

While starting with Opencomputers scripting (and learning some lua),

I found out that while not much, there computers still need some power.

So here came my idea to build a powercheck script (deamon) to show my power level of the computer (or network) and be ready to save my files before the computer shuts down mid editing a script.

this version is only a visual aid for knowing your energy leven, executing some functions if the power is to low to continue aren't implemented.

 

Requirements:

not much, the openOS should be enough, and a valid computer with screen.

 

script & installation:

http://pastebin.com/0112kJVN

after downloading this script:

copy or move it to /etc/rc.d/<your chosen filename>

then

rc <yourchosenfilename without .lua> enable

once you reboot your system you should have an indicator of the power level in the right bottom corner of the screen.

hope this is usefull for someone :)

Share this post


Link to post
Share on other sites

currently it just takes the text size of your screen. so if you change your resolution of the chars the text will scale with it.

I may try to see if there is an easy way to change the size of the powerchecker separate from other parts of the screen, but for the moment it just takes the gpu and asks to write text.

So if you want to get it bigger and don't care that all text on the screen will be bigger, just change the screen's resolution and the text will be bigger.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.