This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/.local/bin/backlight_notify

20 lines
613 B
Bash
Executable File

#!/bin/sh
######################################################################
# @author : swytch
# @file : backlight_notify
# @license : GPLv3
# @created : Wednesday May 20, 2020 17:53:36 CEST
#
# @description : send a notification with xbacklight value
######################################################################
current=$(cat /sys/class/backlight/intel_backlight/brightness)
max=$(cat /sys/class/backlight/intel_backlight/max_brightness)
step=$(expr $max / 20)
level=$(expr $(expr $current / $step) \* 5)
dunstify -r 100001 -u "low" "Current xBacklight value :" "$level%"