Files
linux-config/dot_config/i3blocks/scripts/executable_backlight
2019-04-15 00:05:48 -04:00

10 lines
191 B
Bash

#!/bin/sh
# https://askubuntu.com/a/179949/794515
round()
{
echo $(printf %.$2f $(echo "scale=$2;(((10^$2)*$1)+0.5)/(10^$2)" | bc))
};
cur_bl=$(xbacklight -get)
echo "$(round "$cur_bl" 0)%"