use volnoti for nice brightness display

auto-flake-update
Yorick van Pelt 2012-11-14 21:06:46 +01:00
parent 3f0b40d187
commit cfb5b698e8
2 changed files with 7 additions and 1 deletions

View File

@ -30,7 +30,11 @@ set_raw() {
scale_to_bl() { scale_to_bl() {
get_raw_maximum get_raw_maximum
max=$? max=$?
echo "$max * $1 / 1024" | bc scale_from_to $1 $max
}
scale_from_to() {
echo "$2 * $1 / 1024" | bc
} }
# from 0-max to 0-1024 # from 0-max to 0-1024
@ -52,6 +56,7 @@ max() {
set_bl() { set_bl() {
set_raw $(scale_to_bl $1) set_raw $(scale_to_bl $1)
volnoti-show -s /usr/local/share/pixmaps/volnoti/display-brightness-symbolic.svg $(scale_from_to $1 100)
} }
get() { get() {

View File

@ -2,4 +2,5 @@ upower -e
xrdb ~/dotfiles/x/Xresources xrdb ~/dotfiles/x/Xresources
#.screenlayout/display_pluggedin.sh #.screenlayout/display_pluggedin.sh
/usr/bin/xscreensaver -no-splash & /usr/bin/xscreensaver -no-splash &
volnoti
exec awesome -c ~/dotfiles/awesome/rc.lua exec awesome -c ~/dotfiles/awesome/rc.lua