Create volume notification osd

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
speeedfire

Create volume notification osd

Post by speeedfire »

I wanna call the cinnamon volume nofitication-osd.
My idea:
I use crtl + [+] or ctrl + [-] for volume up and volume down and show notification.

Code: Select all

#volume up
sh -c "pactl set-sink-mute 0 false ; pactl set-sink-volume 0 +1%"

#volume down
sh -c "pactl set-sink-mute 0 false ; pactl -- set-sink-volume 0 -1%"

How to call notification?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
tigrezno

Re: Create volume notification osd

Post by tigrezno »

You can install the "xosd-bin" package, that includes a command named "osd_cat" for scripts

Its output is shown on the screen like an osd (I've used it in the past and works well)

For the "volume up" script you can show a text like "volume up" or just get the output from pactl and filter the current value for volume "volume: 35%"
speeedfire

Re: Create volume notification osd

Post by speeedfire »

tigrezno wrote:You can install the "xosd-bin" package, that includes a command named "osd_cat" for scripts

Its output is shown on the screen like an osd (I've used it in the past and works well)

For the "volume up" script you can show a text like "volume up" or just get the output from pactl and filter the current value for volume "volume: 35%"
Not bad, but i wanna the cinnamon osd. :)
tigrezno

Re: Create volume notification osd

Post by tigrezno »

Then use the "notify-send" command and it will appear as any other notification on the screen
ericramos1990

Re: Create volume notification osd

Post by ericramos1990 »

Any way to replicate this:
Locked

Return to “Scripts & Bash”