Console Application
Posted: Thursday 30th September 2021 2:21am
Ladies/Gents,
Have a very stupid question I am sure.
I am trying to write a console application to help me fix a pulsemixer issue. LOL. The problem is simple. As I have an Elgato Stream Deck, I want to be able to press one key to mute/unmute a particular source. Problem is pulsemixer for whatever reason (or Linux) keeps changing the source 'ID' randomly. So one morning it may show my USB Mic as 'source-3' and the other day as 'source-15'.
So I wrote this small app using Gambas3 that basically runs a shell command to a variable (something like 'pulsemixer -list-sources | grep 'Realtek') and then I massage the string to find the actual source ID that is tied to the 'Realtek USB' input.
When I run it within the Gambas3 IDE, everything works GREAT! I see the mic icon on the taskbar being muted. Just perfect. LOL
Now the problem is, how do I run this on bash (terminal)? I tried simply running the .gambas file but it throws all sorts of errors and resuming, does not work.
How is this achieved?
I want to get this going so I can configure my Stream Deck to mute/unmute that particular input using this Gambas console app. Does it make sense?
Thanks a lot!
CR
Have a very stupid question I am sure.
I am trying to write a console application to help me fix a pulsemixer issue. LOL. The problem is simple. As I have an Elgato Stream Deck, I want to be able to press one key to mute/unmute a particular source. Problem is pulsemixer for whatever reason (or Linux) keeps changing the source 'ID' randomly. So one morning it may show my USB Mic as 'source-3' and the other day as 'source-15'.
So I wrote this small app using Gambas3 that basically runs a shell command to a variable (something like 'pulsemixer -list-sources | grep 'Realtek') and then I massage the string to find the actual source ID that is tied to the 'Realtek USB' input.
When I run it within the Gambas3 IDE, everything works GREAT! I see the mic icon on the taskbar being muted. Just perfect. LOL
Now the problem is, how do I run this on bash (terminal)? I tried simply running the .gambas file but it throws all sorts of errors and resuming, does not work.
How is this achieved?
I want to get this going so I can configure my Stream Deck to mute/unmute that particular input using this Gambas console app. Does it make sense?
Thanks a lot!
CR