All Projects → marioortizmanero → Polybar Pulseaudio Control

marioortizmanero / Polybar Pulseaudio Control

Licence: mit
A feature-full Polybar module to control PulseAudio

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Polybar Pulseaudio Control

Pulsemixer
CLI and curses mixer for PulseAudio
Stars: ✭ 441 (+197.97%)
Mutual labels:  audio, pulseaudio
Sfml
Simple and Fast Multimedia Library
Stars: ✭ 7,316 (+4843.24%)
Mutual labels:  hacktoberfest, audio
Vue Plyr
A Vue component for the plyr (https://github.com/sampotts/plyr) video & audio player.
Stars: ✭ 531 (+258.78%)
Mutual labels:  hacktoberfest, audio
Rust Av
Multimedia Toolkit written in pure rust.
Stars: ✭ 411 (+177.7%)
Mutual labels:  hacktoberfest, audio
Winyl
Winyl's main repository.
Stars: ✭ 97 (-34.46%)
Mutual labels:  audio, manager
Lavalink
Standalone audio sending node based on Lavaplayer.
Stars: ✭ 420 (+183.78%)
Mutual labels:  hacktoberfest, audio
Roc Toolkit
Real-time audio streaming over the network.
Stars: ✭ 673 (+354.73%)
Mutual labels:  hacktoberfest, audio
perfekt
Release, changelog and version your packages with perfe(k)t 👌 ease!
Stars: ✭ 15 (-89.86%)
Mutual labels:  control, manager
Edxposedmanager
Companion Android application for EdXposed
Stars: ✭ 1,172 (+691.89%)
Mutual labels:  hacktoberfest, manager
Audioplayers
A Flutter plugin to play multiple audio files simultaneously (Android/iOS)
Stars: ✭ 1,042 (+604.05%)
Mutual labels:  hacktoberfest, audio
Mumble
Mumble is an open-source, low-latency, high quality voice chat software.
Stars: ✭ 4,418 (+2885.14%)
Mutual labels:  hacktoberfest, audio
Fluent.ribbon
WPF Ribbon control like in Office
Stars: ✭ 1,895 (+1180.41%)
Mutual labels:  hacktoberfest, control
Sfml.net
Official binding of SFML for .Net languages
Stars: ✭ 354 (+139.19%)
Mutual labels:  hacktoberfest, audio
Libretime
LibreTime: Radio Broadcast & Automation Platform
Stars: ✭ 439 (+196.62%)
Mutual labels:  hacktoberfest, audio
Talk Android
📱😀 Video & audio calls through Nextcloud on Android
Stars: ✭ 282 (+90.54%)
Mutual labels:  hacktoberfest, audio
Controlzex
Shared Controlz for WPF and ... more
Stars: ✭ 561 (+279.05%)
Mutual labels:  hacktoberfest, control
Csfml
Official binding of SFML for C
Stars: ✭ 211 (+42.57%)
Mutual labels:  hacktoberfest, audio
Gwion
🎵 strongly-timed musical programming language
Stars: ✭ 235 (+58.78%)
Mutual labels:  hacktoberfest, audio
Simpletones.js
The goal of simpleTones.js is to provide every JavaScript developer with a lightweight solution for creating custom sounds in their web applications. This documentation has been written in hopes that the least experienced developer can read, understand and go on to do great things. You can check out several examples at this link:
Stars: ✭ 45 (-69.59%)
Mutual labels:  hacktoberfest, audio
Skip Silence
🔇 Chrome extension to skip silent parts in videos and audio files on any webpage
Stars: ✭ 130 (-12.16%)
Mutual labels:  hacktoberfest, audio

PulseAudio Control

A feature-full volume control module for PulseAudio. Also known as Pavolume. Main features:

  • Increase/Decrease and Mute the default sink's audio.
  • Switch between sinks easily. You can also blacklist useless devices.
  • Optionally enable notifications and OSD messages.
  • Works as a shortcut to pavucontrol or your favorite audio manager tool.
  • Highly customizable: check the Usage section for details.

example

Installation

Arch

Install pulseaudio-control from the AUR with your preferred method, for example:

$ yay -S pulseaudio-control

Other Linux

Download the bash script from this repository, or extract it from the latest release, and put it somewhere in your $PATH.

Dependencies

pulseaudio with pactl and pacmd in your $PATH. You might want to have pavucontrol installed to easily control pulseaudio with a GUI. The script can send notifications if enabled, for which you'll need a notification daemon like dunst.

To be able to switch the default sinks from this script you might need to disable stream target device restore by editing the corresponing line in /etc/pulse/default.pa to:

load-module module-stream-restore restore_device=false

At a minimum, bash version 4 is required to run the script. You can check your bash version by running bash --version.

Usage

polybar-pulseaudio-control is expected to be invoked from a polybar module:

[module/pulseaudio-control]
type = custom/script
exec = polybar-pulseaudio-control [option...] <action>

where action, and (optionally) options are as specified in polybar-pulseaudio-control help:

Usage: ./pulseaudio-control.bash [OPTION...] ACTION

Options: [defaults]
  --autosync | --no-autosync            whether to maintain same volume for all
                                        programs [no]
  --color-muted <rrggbb>                color in which to format when muted
                                        [6b6b6b]
  --notifications | --no-notifications  whether to show notifications when
                                        changing sinks [no]
  --osd | --no-osd                      whether to display KDE's OSD message
                                        [no]
  --icon-muted <icon>                   icon to use when muted [none]
  --icon-sink <icon>                    icon to use for sink [none]
  --format <string>                     use a format string to control the output
                                        Available variables: $VOL_ICON,
                                        $VOL_LEVEL, $ICON_SINK, and
                                        $SINK_NICKNAME
                                        [$VOL_ICON ${VOL_LEVEL}%  $ICON_SINK $SINK_NICKNAME]
  --icons-volume <icon>[,<icon>...]     icons for volume, from lower to higher
                                        [none]
  --volume-max <int>                    maximum volume to which to allow
                                        increasing [130]
  --volume-step <int>                   step size when inc/decrementing volume
                                        [2]
  --sink-blacklist <name>[,<name>...]   sinks to ignore when switching [none]
  --sink-nicknames-from <prop>          pacmd property to use for sink names,
                                        unless overriden by --sink-nickname.
                                        Its possible values are listed under
                                        the 'properties' key in the output of
                                        `pacmd list-sinks` [none]
  --sink-nickname <name>:<nick>         nickname to assign to given sink name,
                                        taking priority over
                                        --sink-nicknames-from. May be given
                                        multiple times, and 'name' is exactly as
                                        listed in the output of
                                        `pactl list sinks short | cut -f2`
                                        [none]

Actions:
  help              display this help and exit
  output            print the PulseAudio status once
  listen            listen for changes in PulseAudio to automatically update
                    this script's output
  up, down          increase or decrease the default sink's volume
  mute, unmute      mute or unmute the default sink's audio
  togmute           switch between muted and unmuted
  next-sink         switch to the next available sink
  sync              synchronize all the output streams volume to be the same
                    as the current sink's volume

See the Module section for an example, or the Useful icons section for some packs of icons.

Module

The example from the screenshot can:

  • Increase and decrease the volume on mousewheel scroll
  • Mute the audio on left click
  • Switch between devices on mousewheel click
  • Open pavucontrol on right click
[module/pulseaudio-control]
type = custom/script
tail = true
format-underline = ${colors.cyan}
label-padding = 2
label-foreground = ${colors.foreground}

# Icons mixed from Font Awesome 5 and Material Icons
# You can copy-paste your options for each possible action, which is more
# trouble-free but repetitive, or apply only the relevant ones (for example
# --sink-blacklist is only needed for next-sink).
exec = pulseaudio-control --icons-volume " , " --icon-muted " " --sink-nicknames-from "device.description" --sink-nickname "alsa_output.pci-0000_00_1b.0.analog-stereo:  Speakers" --sink-nickname "alsa_output.usb-Kingston_HyperX_Virtual_Surround_Sound_00000000-00.analog-stereo:  Headphones" listen
click-right = exec pavucontrol &
click-left = pulseaudio-control togmute
click-middle = pulseaudio-control --sink-blacklist "alsa_output.pci-0000_01_00.1.hdmi-stereo-extra2" next-sink
scroll-up = pulseaudio-control --volume-max 130 up
scroll-down = pulseaudio-control --volume-max 130 down

Useful icons

Here's a list with some icons from different fonts you can copy-paste. Most have an space afterwards so that the module has a bit of spacing. They may appear bugged on your browser if the font isn't available there. Please add yours if they aren't in the list.

Font name Volumes Muted Sink icons
FontAwesome " , " " " " " or " "
Material " , , " " " " " or " " or " "
Emoji "🔈 ,🔉 ,🔊 " "🔇 " "🔈 " or "🎧 "
Emoji v2 "🕨 ,🕩 ,🕪 " "🔇 " "🕨 " or "🎧 "

Most of these can be used after downloading a Nerd Font and including it in your Polybar config. For example:

font-X = Font Awesome 5 Free: style=Solid: pixelsize=11
font-Y = Font Awesome 5 Brands: pixelsize=11
font-Z = Material Icons: style=Regular: pixelsize=13; 2

Sources

Part of the script and of this README's info was taken from customlinux.blogspot.com, the creator. It was later adapted to fit polybar. It is also mixed with the ArcoLinux version, which implemented the listen action to use less resources.

Development

Any PRs and issues are welcome! The tests can be ran with bats tests.bats.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].