You can do this using gksu
. Specifically make the launcher run the command:
gksu "bash -c 'echo 1500 > /sys/class/backlight/intel_backlight/brightness'"
This will make the script prompt you for your password and then change the brightness.
Another, better, solution that might or might not work depending on your hardware is to use the gnome-settings Daemon to change brightness. This will allow you to change brightness without needing to enter your password.
The command to do it this way is:
gdbus call --session --dest org.gnome.SettingsDaemon --object-path /org/gnome/SettingsDaemon/Power --method org.gnome.SettingsDaemon.Power.Screen.SetPercentage 100
You can replace the 100
at the end with any percentage brightness from 0-100.
As I said this might not work in all cases and should only be used when you are logged in.
In order to get these to be runnable from the launcher you will need to make what is called a desktop file. To do this you should make a new file called ~/.local/share/applications/fullbright.desktop
and copy paste the following into it.
[Desktop Entry]
Name=Full Brightness
GenericName=Brightness
Comment=Set Full Brightness
Exec=gdbus call --session --dest org.gnome.SettingsDaemon --object-path /org/gnome/SettingsDaemon/Power --method org.gnome.SettingsDaemon.Power.Screen.SetPercentage 100
Terminal=false
Type=Application
Icon=checkbox
Categories=Utility;
If the gdbus command does not work on your system replace it with the gksu one.
You should now be able to call this command from the launcher with the name Full Brightness
and pin it to your dock like any other program.
/etc/sudoers
withvisudo
to make it run without a password.