Annoyance on low battery
Fonte: cosarara.me ·
Laptops should be a bit annoying when they are low on battery. Otherwise, I will not realise it until it’s too late, and my computer will turn off in the middle of whatever I was doing. Proper linux Desktop Environments already do this, but since I am running the Awesome window manager with a custom config, I only get what I add myself. My solution is as follows. First, the annoyance script: ~/.local/bin/checkbattery #!/usr/bin/env python3 import subprocess import math import sys with open ( '/sys/class/power_supply/BAT0/status' ) as f : status = f . read () if status in [ "Charging \n "
Altri simili
-
Ardbeg Ten Cask Strength
Articolo · Whisky and Wisdom
-
The etiquette and politics of whisky write-ups and reviews
Articolo · Whisky and Wisdom
-
The Glendronach “Ode to….” series
Articolo · Whisky and Wisdom
-
Jack Daniel’s 10 Years Old
Articolo · Whisky and Wisdom
-
Glenfiddich 16 Aston Martin
Articolo · Whisky and Wisdom
-
Falkirk Distillery
Articolo · Whisky and Wisdom