Created
May 18, 2024 10:15
-
-
Save naranyala/b800aca98c7c934e50a5b5949f48a9db to your computer and use it in GitHub Desktop.
fix your brightness controls
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Define the options for brightness levels | |
options="0%\n5%\n10%\n15%\n20%\n25%\n30%\n35%\n40%\n45%\n50%\n55%\n60%\n65%\n70%\n75%\n80%\n85%\n90%\n95%\n100%" | |
# Use rofi to select a brightness level | |
chosen=$(echo -e "$options" | rofi -dmenu -p "Set Brightness Level") | |
# If the user made a selection, set the brightness | |
if [ -n "$chosen" ]; then | |
brightnessctl set "$chosen" | |
else | |
echo "No brightness level selected." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment