parent
acb56d8909
commit
fc2609acb5
@ -1,24 +1,46 @@
|
|||||||
# battery_status_led
|
# Battery Status LED
|
||||||
Battery (low/critical) status indication by making a (the capslock) LED blink
|
Battery (low/critical) status indication by making a (the capslock) LED blink
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
Make sure you have your laptop's ACPI module compiled into your kernel:
|
Make sure you have your laptop's ACPI module compiled into your kernel:
|
||||||
|
```
|
||||||
Device Drivers > X86 Platform Specific Device Drivers
|
Device Drivers > X86 Platform Specific Device Drivers
|
||||||
|
```
|
||||||
|
|
||||||
For example: Asus laptop extras, ThinkPad ACPI Laptop Extras, etc.
|
For example: Asus laptop extras, ThinkPad ACPI Laptop Extras, etc.
|
||||||
|
|
||||||
Start it as root user:
|
## Usage
|
||||||
|
Execute the script as a root user:
|
||||||
|
```
|
||||||
/usr/bin/battery_status_led.sh
|
/usr/bin/battery_status_led.sh
|
||||||
|
```
|
||||||
|
|
||||||
Or with systemd:
|
Or start with systemd:
|
||||||
|
```
|
||||||
systemctl start battery_status_led
|
systemctl start battery_status_led
|
||||||
systemctl enable battery_status_led
|
systemctl enable battery_status_led
|
||||||
|
```
|
||||||
|
|
||||||
The LED device can be changed by editing the systemd service file's line:
|
The LED device can be changed by editing the systemd service file's line:
|
||||||
|
```
|
||||||
Environment="BATTERY_STATUS_LED_DEV=/sys/class/leds/input4\:\:capslock"
|
Environment="BATTERY_STATUS_LED_DEV=/sys/class/leds/input4\:\:capslock"
|
||||||
|
```
|
||||||
|
|
||||||
Manual install on gentoo:
|
## Manual install on gentoo:
|
||||||
|
```
|
||||||
cd DIR
|
cd DIR
|
||||||
git clone https://github.com/dmatetelki/battery_status_led
|
git clone https://github.com/dmatetelki/battery_status_led
|
||||||
cd /usr/local/portage/app-misc/
|
cd /usr/local/portage/app-misc/
|
||||||
ln -s DIR/battery_status_led/app-misc/battery_status_led battery_status_led
|
ln -s DIR/battery_status_led/app-misc/battery_status_led battery_status_led
|
||||||
ebuild battery_status_led-0.1.ebuild digest
|
ebuild battery_status_led-0.1.ebuild digest
|
||||||
emerge battery_status_led
|
emerge battery_status_led
|
||||||
|
```
|
||||||
|
|
||||||
|
## Note
|
||||||
|
Did you know that the CapsLock key can be turned into another Ctrl?
|
||||||
|
Add the following lines to `~/.Xmodmap` :
|
||||||
|
```
|
||||||
|
remove Lock = Caps_Lock
|
||||||
|
keycode 0x42 = Control_L
|
||||||
|
add Control = Control_L
|
||||||
|
```
|
||||||
|
Loading…
Reference in new issue