Add old dotfiles
This commit is contained in:
commit
1cace80e48
192 files changed
+13538
No files matched your search
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Get the current brightness level as a percentage
|
||||
brightness=$(brightnessctl g)
|
||||
max_brightness=$(brightnessctl m)
|
||||
|
||||
# Perform float division and store the result with 2 decimal points
|
||||
result=$(awk "BEGIN { printf \"%.2f\", $brightness / $max_brightness }")
|
||||
|
||||
# Convert the result to a percentage (multiply by 100) and round to the nearest whole number
|
||||
percentage=$(awk "BEGIN { printf \"%.0f\", $result * 100 }")
|
||||
|
||||
# Set the icon based on the brightness level
|
||||
if [ $percentage -le 33 ]; then
|
||||
icon=""
|
||||
elif [ $percentage -le 66 ]; then
|
||||
icon=""
|
||||
else
|
||||
icon=""
|
||||
fi
|
||||
|
||||
echo "$icon $percentage%"
|
||||
Reference in new issue
Block a user