[...] Put this in MyDocs so it is easy to use leafpad edit the wait time for how long you thing charging should last. Code: #!/bin/sh sudo gainroot stop bme modprobe bq2415x_charger # edit dumb mode charge mode time below in seconds wait 21600 rmmod bq2415x_charger start bme exit save the script name as qi_charge make it executable Code: sudo chmod +x qi_charge
#!/bin/sh sudo gainroot stop bme modprobe bq2415x_charger # edit dumb mode charge mode time below in seconds wait 21600 rmmod bq2415x_charger start bme exit
sudo chmod +x qi_charge
user ALL = NOPASSWD: /sbin/stop bme user ALL = NOPASSWD: /sbin/modprobe bq2415x_charger user ALL = NOPASSWD: /sbin/rmmod bq2415x_charger user ALL = NOPASSWD: /sbin/start bme
jr@saturn:~> help wait wait: wait [id] Wait for process completion and return exit status. Waits for the specified process and reports its termination status. If PID is not given, all currently active child processes are waited for, and the return code is zero. PID must be a process ID. Exit Status: Returns the status of ID; fails if ID is invalid or an invalid option is given.
jr@saturn:~> LANG=C sleep --help Usage: sleep NUMBER[SUFFIX]... or: sleep OPTION Pause for NUMBER seconds. SUFFIX may be 's' for seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days. Unlike most implementations that require NUMBER be an integer, here NUMBER may be an arbitrary floating point number. Given two or more arguments, pause for the amount of time specified by the sum of their values. --help display this help and exit --version output version information and exit Report sleep bugs to bug-coreutils@gnu.org GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
Code: [Desktop Entry] Encoding=UTF-8 Type=Application Name=qi_charge Comment=charge for a set time at full speed from an unshorted data pins dumb USB charger like the universal Qi ones and then reload BME to get battery meter back Exec=sudo /bin/sh /home/user/MyDocs/qi_charge Icon=make a PNG and put the path here
[Desktop Entry] Encoding=UTF-8 Type=Application Name=qi_charge Comment=charge for a set time at full speed from an unshorted data pins dumb USB charger like the universal Qi ones and then reload BME to get battery meter back Exec=sudo /bin/sh /home/user/MyDocs/qi_charge Icon=make a PNG and put the path here
Exec=/usr/local/bin/qi_charge