Git Product home page Git Product logo

cinnamon-volume-step-osd's Introduction

cinnamon-volume-step-osd

A workaround script that allows you to change the system volume by a desired step size while still triggering Cinnamon's volume notification OSD (On Screen Display).

Originally based on garrett92895's script for GNOME.

Requirements

The script is built using Python3 and has a the following requirements

  • python3
  • python3-dbus (or equivalent)
  • pactl

The package with the correct version is listed as python-dbus in the Arch repositories and python3-dbus in the Debian and Fedora repositories. You can get pactl from the pulseaudio-utils package in Fedora (still works fine with PipeWire).

Usage

Note that the usage differs to the original script.

python volume-change.py [change]

Where [change] is the percentage to change volume by, e.g. -2 or 2 to decrease/increase by 2%.

Compiling

Because this script will run every time you press the volume up or down keys, you may want to run a compiled version. You can compile the script with basic optimizations with

python -O -m py_compile volume-change.py

You can then grab the .pyc output from the __pycache__ folder and substitute volume-change.py for that.

Motivation and Explanation

The motivation for this script is the same as the original: the volume step amount is too large and is hardcoded into Cinnamon. The GNOME devs have since been sensible and made this configurable through a config setting, but the same cannot be said for the Cinnamon devs who have actively refused to make the same change.

Previously I used perspektiv as a replacement for the volume OSD, however it now crashes with newer GTK versions so I decided to look into using the built-in OSD instead.

This script also uses pactl instead of amixer like the original script. This is because setting the volume with amixer somehow results in Cinnamon reporting a different value.

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.