power menu, redshift, polybar
This commit is contained in:
31
.config/polybar/scripts/battery-combined-tlp/README.md
Normal file
31
.config/polybar/scripts/battery-combined-tlp/README.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Script: battery-combined-tlp
|
||||
|
||||
A shell script that shows the battery status.
|
||||
|
||||
It uses TLP and requires root privileges. Note that the icon doesn't change.
|
||||
|
||||

|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
* `tlp`
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
You have to add the `tlp-stat` command to the `/etc/sudoers` NOPASSWD of your user:
|
||||
|
||||
```ini
|
||||
user ALL=(ALL) NOPASSWD: /usr/bin/tlp-stat
|
||||
```
|
||||
|
||||
|
||||
## Module
|
||||
|
||||
```ini
|
||||
[module/battery-combined-tlp]
|
||||
type = custom/script
|
||||
exec = ~/polybar-scripts/battery-combined-tlp.sh
|
||||
interval = 10
|
||||
```
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
battery=$(sudo tlp-stat -b | tac | grep -m 1 "Charge" | tr -d -c "[:digit:],.")
|
||||
|
||||
echo "# $battery %"
|
||||
BIN
.config/polybar/scripts/battery-combined-tlp/screenshots/1.png
Normal file
BIN
.config/polybar/scripts/battery-combined-tlp/screenshots/1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 841 B |
Reference in New Issue
Block a user