power menu, redshift, polybar
This commit is contained in:
15
.config/polybar/scripts/info-redshift-temp/README.md
Normal file
15
.config/polybar/scripts/info-redshift-temp/README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Script: info-redshift-temp
|
||||
|
||||
This script displays the current color temperature.
|
||||
|
||||

|
||||
|
||||
|
||||
## Module
|
||||
|
||||
```ini
|
||||
[module/info-redshift-temp]
|
||||
type = custom/script
|
||||
exec = ~/polybar-scripts/info-redshift-temp.sh
|
||||
interval = 5
|
||||
```
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$(pgrep -x redshift)" ]; then
|
||||
temp=$(redshift -p 2> /dev/null | grep temp | cut -d ":" -f 2 | tr -dc "[:digit:]")
|
||||
|
||||
if [ -z "$temp" ]; then
|
||||
echo "%{F#65737E} #"
|
||||
elif [ "$temp" -ge 5000 ]; then
|
||||
echo "%{F#8FA1B3} #"
|
||||
elif [ "$temp" -ge 4000 ]; then
|
||||
echo "%{F#EBCB8B} #"
|
||||
else
|
||||
echo "%{F#D08770} #"
|
||||
fi
|
||||
fi
|
||||
BIN
.config/polybar/scripts/info-redshift-temp/screenshots/1.png
Normal file
BIN
.config/polybar/scripts/info-redshift-temp/screenshots/1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 589 B |
Reference in New Issue
Block a user