nirish

config files for niri window manager
Log | Files | Refs | README | LICENSE

brightness-control (698B)


      1 #!/usr/bin/env bash
      2 
      3 # Taken from: https://github.com/salanpro/hyprland/tree/047f998e710b0ffe8d841a89fb7749b50c931b2c/.config/hypr/scripts
      4 
      5 # Brightness up and down
      6 if [[ "$1" == "up" ]]; then
      7     brightnessctl set -e1 -n2 5%+ -m \
      8         | awk -F ',' '{print $4+0}' \
      9         | xargs -I[] notify-send -e -u low -h \
     10         string:x-canonical-private-synchronous:brightness_notif -h \
     11         int:value:[] "☀ Brightness []"
     12 elif [[ "$1" == "down" ]]; then
     13     brightnessctl set -e1 -n2 5%- -m \
     14         | awk -F ',' '{print $4+0}' \
     15         | xargs -I[] notify-send -e -u low -h \
     16         string:x-canonical-private-synchronous:brightness_notif -h \
     17         int:value:[] "☀ Brightness []"
     18 fi