scripts

Various scripts for UNIX-like systems
git clone https://git.tronto.net/scripts
Download | Log | Files | Refs | README

brightness (436B)


      1 #!/bin/sh
      2 
      3 # Increase / decrease brightness, and pops up a notification
      4 # Requires: xbacklight, a notification program such as herbe or notify-send
      5 # Usage: brightness {inc|dec} n
      6 
      7 # ksh completion
      8 # set -A complete_brightness_1 inc dec
      9 # set -A complete_brightness_2 5
     10 
     11 #notify="notify-send"
     12 notify="herbe"
     13 
     14 pkill herbe # comment this too if not using herbe
     15 
     16 xbacklight -$1 $2 && $notify "Brightness: $(xbacklight | sed 's/\..*$//')%"