Coder Social home page Coder Social logo

pavolume's Introduction

pavolume is a simple python PulseAudio volume control for the command line. It is designed to be bound to your XF86Audio* keys so you can comfortably control PulseAudio volume.

pavolume notifications

Usage

pavolume -help		   # show complete usage explanation
pavolume show              # show volume and mute status as notification
pavolume sinks             # show sinks from pulse audio
pavolume volup             # increase volume
pavolume voldown           # increase volume
pavolume volset 50%        # set volume to 50%
pavolume volset 200%       # boost volume to 200%
pavolume muteon            # mute audio output
pavolume muteoff           # un-mute audio output
pavolume mutetoggle        # toggle mute

You can use the --quiet switch to not play a blip sound and the --noshow switch to not show libnotify notifications. If you want to allow volup to go over 100%, you can use the --nolimit switch:

pavolume volup --nolimit   # turn it to 11!

Installation

Clone the git repo somewhere and put pavolume on your $PATH. The pavolume.conf can go in one of these places:

  • The same directory as pavolume
  • $XDG_CONFIG_HOME/pavolume/pavolume.conf, i.e. $HOME/.config/pavolume/pavolume.conf
  • /etc/pavolume/pavolume.conf

Make sure to edit the config file so that it points to a valid blip sound file (it uses the Ubuntu message sound by default). Other than that, pavolume will use the first sink registered in your system.

Using pavolume with awesome

If you are using awesome, you can use the following key bindings to control pavolume:

awful.key({                   }, "XF86AudioRaiseVolume", function() awful.util.spawn("pavolume volup") end),
awful.key({                   }, "XF86AudioLowerVolume", function() awful.util.spawn("pavolume voldown") end),
awful.key({         "Shift"   }, "XF86AudioRaiseVolume", function() awful.util.spawn("pavolume volup --nolimit") end),
awful.key({         "Shift"   }, "XF86AudioLowerVolume", function() awful.util.spawn("pavolume voldown") end),
awful.key({                   }, "XF86AudioMute", function() awful.util.spawn("pavolume mutetoggle") end),

Pressing the volume up/down keys normally will increase/decrease volume, if you hold shift, you can increase the volume over 100%.

If these bindings don't work for some reason, try calling the commands from the command line directly. If this works, then check whether the pavolume script is also visible from awesome's $PATH.

Dependencies

  • pacmd
  • Python 3 with packages:
    • docopt
    • pygobject
    • appdirs
    • colorsysplus for the --color option

Questions, Comments, Code

If you have questions or comments, drop me a mail on GitHub! Code contributions are always welcome, too!

pavolume's People

Contributors

sseemayer avatar mheistermann avatar klaasb avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.