the script, originally written in bash, is rewrited into python,
whose UPower implements (from `wogscpar/upower-python`) make me lazy to check out again.
- known dependencies
- lessen symlink checking (might not easily break)
- move shell history into `/tmp`.
(py didn't often operate filesystem which doesn't matter)