Shell script for volume control

The base of the Linux sound software stack is formed by ALSA, the Advanced Linux Sound Architecture, with these days normally a midlevel layer on top in the form of Pulseaudio; you can arrange for volume adjustment at both levels; should preferably do so at the Pulseaudio one.

Pulseaudio makes available the pactl tool, which you can use in the form of, say,

pactl set-sink-volume 0 0
pactl set-sink-volume 0 50%
pactl set-sink-volume 0 +10%
pactl set-sink-volume 0 -10%

In Mint 17.3 pactl has a bug that necessitates writing that last example as pactl -- set-sink-volume 0 -10% instead; would not know if the Mint 18 version still has the issue; see https://bugs.freedesktop.org/show_bug.cgi?id=77108. The first 0 in those commands specifies the sink, the sound card, and is automatically correct if you have only one card installed. Otherwise decide which sink to use from the output of pactl list sinks. Use man pactl for further information.

At the ALSA level you have available the amixer command line mixer. For example,

amixer set Master 0
amixer set Master 50%
amixer set Master 10%+
amixer set Master 10%-

In this, not specifying a card number with -c <number> means card 0; if not, use aplay -l to identify the number. “Master” is the name of a generally available control; you can list available controls with amixer scontrols and learn more from man amixer.

If you are not specifying correct sink for pactl or card/device/control for amixer please see your outputs of pactl list sinks and aplay -l.

Notepad++ on Linux

Notepad++ is one of the popular code editors and the fact that most of the users run Windows, it is available for Windows only. Some Linux users have surely missed it. Good news is that Notepad++ is now (unofficially) available as a Snap package for Linux user. Though this Notepad++ Linux application is not natively developed for Linux platform and actually runs on Wine, it’s now a command (or click) away for you.

Read More