Customation, and its dangers for the Update System


When the Pyra is off, the Linux is not running. So there is no udev to monitor. The hardware circuit is the one doing all the charging. So that's normal.
 
So this means to have the best from this hack, I need to have the Pyra running when I charge, and at best on low cpu settings to keep it cold enough .. I will try this then..
anyway I want to use this thing much more..
 
As far as I find these things interesting, if I did understood correctly there will be an "official" way to modify the LEDs behaviors using a configuration file (that now I don't remember how it is called).

EDIT:

Found, it's @ToastBucket who is working on "uEnv.txt", the configuration file to manage the behavior of the LEDs
 
Last edited:
  • Like
Reactions: rSl
@pimaster It looks beautiful! (judged by watching @matzesu 's screenshots). Thanks for that code. Will bookmark your post for later.
Thanks! I'd love to do some more colourful things but simple works for now.
To edit the file using pluma, you will need to use
Bash:
sudo pluma /lib/udev/rules.d/pyra-charge-led.rules
It might not work if your DISPLAY variable is not set automatically under root. (on my Debian I have kate, and it dies with "Executing Kate with sudo is not possible due to unfixable security vulnerabilities.")
to activate, use "sudo udevadm control --reload" or just reboot.

note of warning: You should put all custom stuff in /etc not in /lib (disclaimer: I don't have a Pyra in my hands to verify this, but if it's Debian, then this rule should apply)

* make sure the files ends with .rules and not .rules.txt
* there is this udevadm test command, but I'm too noob to give instructions on how to use/test.
I did not know that. Important lesson to learn sooner than later. Thanks for helping out with instructions.
I don’t even know if this was just the normal colors or it was because of the scrippt
The original colours are red. I did include a summary of what the colours would be after the script was working.
Summary. Bottom logo will be red discharging, yellow charging.
Discharging, top goes green (99%-50%), yellow (49%-20%) then red.
Charging, top goes red (0-49%), yellow (50%-79%) then green.
 
Thanks for the Answers, i think this works now as my Lid Logo is now Red and Green whyle i write this on the Pyra..
I plan to use now my Pyra for Internet on the Go to see what happens under a certain % ..
and i have to charge whit OS on to have the Colors..
 
  • Like
Reactions: rSl
Would be fun to join the led coloring with entr (part of inotify, it waits using very little CPU for a file to change) and festival (Speech Engine). I would need a mirror to be able to look at the backside of the screen though.
 
entr seems a reasonable solution for watching a system file for changes, but I don't see why we need a speech engine. If you're looking at the screen you can read off the battery percentage from the system tray icon. Plus the system announcing that battery percentage even when you're not using it could get tiring fast.
 
Isnt so that the Pyra is that heavy that you cant turn it around ^^ , i ditnt used the Pyra yesterday that much to get it under 60 %, so i think i will use it this afternoon abit moor to see what the Colors make then..
 
Also, don't forget to document everything you have done in case you need to start over fresh!
 
I wonder: If something goes wrong, is there a Official Pyra LED Rules File available Online, so i just have to copy the text to the File in my Pyra to rewind the changes? Or would this need a complete New Installation of Debian?..
I made a Picture of the File bevor i changed the Rules, so i know that the Original Rules are only till row 25
I wantet to recharge today but the Pyra is still at 62 %, so i think i will wait till 20 % or something around, to have the full Charging Experience..
 
It’s now looks so when I have the os running, the lid closed and the charging cable in:
47d76d12fac45f31dc81b0f59cfb0f9c.jpg

( *∵* )
 
No doubt some package or other owns that /etc/udev.d/rules folder and the files within it. Just reinstall that package to revert any changes you've made, at least until the package itself gets upgraded with these rules if the community deems them good.
 
Or i wait until this feature founds it way to the Official Update, so its gets overwrite whit a propper made rules file..

I dont even know if this works now, i get this Color Sheme when the Pyra is running, and as im over 60 %, this should be look how it was meant, but i ditnt brought the Pyra to under 50 % Yet as somehow the Monday was not the day for this experiement..
 
I wonder: If something goes wrong, is there a Official Pyra LED Rules File available Online, so i just have to copy the text to the File in my Pyra to rewind the changes? Or would this need a complete New Installation of Debian?..
I made a Picture of the File bevor i changed the Rules, so i know that the Original Rules are only till row 25
I wantet to recharge today but the Pyra is still at 62 %, so i think i will wait till 20 % or something around, to have the full Charging Experience..

When messing with config files, it's common practice to first make a backup of the current config. So cp /path/to/myfile.sh /path/to/myfile.OLD

That way you can always revert.

Not sure if the rules file is online, but you should be able to find it in the memory card install version of the os.

I haven't edited mine, I'll see if I can post it here for ya.
 
  • Like
Reactions: rSl
I think this is what you wanted.
 

Attachments

  • rules.zip
    716 bytes · Views: 97
Well i dit copy the Rule File out to my "Documents" Folder on the SD Card, unfortunally i found then out how to edit these Files using Pluma whit Root Righs but i editet this file per Accident and the right File, i hope it could get rewindet by just delete all the text from line 26 to the end.. ^^
But its works, so i dont think i would need to rewind it..
 
Back
Top