Jump to content

Volume Adjust Workflow


Recommended Posts

I had created a Volume Adjust Extension for Alfred v1, now I've updated it as a Workflow for Alfred v2.

 

More info including a download link and the source is available on my website: http://victorquinn.com/development/#volumeadjust

 

But below are the commands it will accept for changing the system volume. Includes a notification of the exact numeric (0-100) volume level. There's a prettier and more readable table version on my website.

 

  • vol {number, 1-100}  [invoked as “vol 30” or “vol 74”. Any number from 0-100 will work and the volume will be set to that percentage. So “vol 30” will set the output volume to 30%. Any number less than 0 will just set the volume to 0% and any number greater than 100 will just set it to 100%]
  • vol mute || vol off  [Mutes the volume. Unfortunately, since Alfred just runs the Applescript and then terminates, it is not possible at this time to mute then unmute back to the same volume you were before the mute.]
  • vol quiet || vol soft || vol low  [sets volume to 15%]
  • vol medium || vol mid || vol half  [sets volume to 50%]
  • vol loud || vol high  [sets volume to 85%]
  • vol up || vol more || vol +  [invoked as either “vol up” or “vol up {number, 1-100}”. Used as just “vol up” it will increase the volume by 10%. But invoked as “vol up 30” it will increase the volume from its current level by 30%. So if your volume were at 10%, invoking “vol up 30” will end with the volume at 40%.]
  • vol down || vol less || vol - [invoked as either “vol down” or “vol down {number, 1-100}”. Used as just “vol down” it will decrease the volume by 10%. But invoked as “vol down 30” it will decrease the volume from its current level by 30%. So if your volume were at 73%, invoking “vol down 30” will end with the volume at 43%.]
Edited by victorquinn
Link to comment

Thanks, I updated a v1 volume control script that I had found by Kopepasah, which you can find here most likely still: https://github.com/kopepasah/Volume-Controls

 

It allows for muting and unmuting back to the same volume... I just have two keywords one to do the volume stuff and one to mute but you can probably figure out how to get it to work with your workflow... It's an applescript consisting of only this:

on alfred_script(q)
set isMuted to output muted of (get volume settings)
set newMuted to not isMuted
set volume output muted newMuted
end alfred_script

 

but it works great on v2 and v1. Hope to see this feature implemented in yours one day! Nice workflow though! I like the percentage change notifications

Link to comment
  • 5 months later...
  • 2 months later...
  • 3 months later...

Hi,

 

Tis does not work for me - I am using Mavericks is that it? It appears not to be parsing the string properly. If I hack the action script with a fixed q variable it works nicely. It also does not output to notification centre properly, but presume that is all the same issue?

 

Thanks

 

Nick

 

EDIT:  I have fixed this by removing the splitstring function although the Notification Center output does not fit and truncates the number. I subsequently removed the icon and all is good, albeit not pretty

Edited by nickwild
Link to comment

I really like your volume script.  However, I really wanted to be able to use the true mute functionality.  I have added mute, added some error checking, and changed how level works to account for mute.  Please let me know what you think.  I would love some feedback!

 

Here is a link to the download: Volume Adjust Workflow

 

Here is a link to the repository.  Please fork me of file a bug ticket!

Edited by BigHandsome
Link to comment
  • 3 months later...

Hi BigHandsome,

 

Can I ask what you meant by "adding mute?" Did you mean that you can return to the original volume after muting? What command is it? Thanks!

 

I really like your volume script.  However, I really wanted to be able to use the true mute functionality.  I have added mute, added some error checking, and changed how level works to account for mute.  Please let me know what you think.  I would love some feedback!

 

Here is a link to the download: Volume Adjust Workflow

 

Here is a link to the repository.  Please fork me of file a bug ticket!

Link to comment

Sorry for the long turn around time.  I am not on this forum a lot.  

 

In the original version of this script, when you used the keyword mute, the volume was just adjusted to 0.  There was no way to return to your original volume (or unmute).  I changed the keyword mute (also off) to now call the volume mute api.  I then added the unmute keyword (also on) to remove the mute call.  Now you can return to your original volume.

 

You can try for yourself by using my version of the script and typing `vol mute` and then `vol unmute` (or `vol off` and then `vol on`). 

Link to comment
  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...