Sunday, October 20, 2013

Bash script: Volume and Brightness [Ubuntu 12.04]


Allows you to set up brightness of your monitor using terminal.

Following command is used to set brightness level.

sudo sh -c 'echo <brightness> > /sys/class/backlight/<device>/brightness'

Here <brightness> is brightness level, and takes integer values starting from 0. Higher the value, higher the brightness.


Allows you to mute or unmute speakers.


pactl set-sink-mute 0 1

Enable speakers

pactl set-sink-mute 0 0

Here pactl stands for 'Pulse Audio Control'


This script will run every bash script from given directory.

I use this script for switching profiles.

For example if I store and in startup_scripts directory and run then this will run both and for me.

No comments:

Post a Comment