Jump to content

Volume Control


Recommended Posts

Control the volume of your Mac with Alfred workflow.

 

#Usage

 
  - vol: show current volume
  - vol $num: set volume to a specified number.
  - vol mute/unmute: mute or unmute.
  - vol up [$num]: increase the volume by a specified number. The default value is 10% if the $num parameter is not present. And you can hold cmd to double the increasement.
  - vol down [$num]: similar to above.
  - vol max: set volume to 100%.
  - vol low: set volume to 25%.
  - vol mid: set volume to 50%.
  - vol high: set volume to 75%.
 
> All the above commands is searchable.   
> And you can use first letters of a command, e.g. `vol u 20` means `vol up 20`, `vol mu` means `vol mute`.
 
#Download
 
BTW, I'm new to Alfred, can someone tell me how do I log debug message in a workflow with python?
Edited by raulchen
Link to comment

Great workflow. It can show the current volume which is what I want.

However, the execution is slow, e.g., once you input the value quick enough, the workflow will somehow swallow the last digit. The mainbar input and the execution subtext is not simultaneous. 

 

Thanks for your feedback. I just did some optimization right now, but it didn't seem to be quicker. I will try to figure out this later.

Link to comment

Without trying the workflow, but based on the reports, it seems you might be using a Script Filter. That being the case, this won’t be solved with optimisations to your code, but with changes to your Workflow logic.

Script Filters rerun their code after keys are pressed, there’s no way around that. If you type fast enough, there’s always the chance the last parts of your input will be eaten up. Script Filters aren’t really meant to be used in a way that relies on the input being complete: you’re meant to use the input to filter (hence the name) from a list of results and pick one. This means that the result you want should already exist fully-formed — for example, form a list of results you download or have stored locally.

Your best chance there is to use a Keyword instead. A Keyword Filter would be even better, but that seems unlikely. Keep in mind, though, that if the only thing you want is to update the subtext value as the user types, Keyword can do that as well, as {query} works in its Title and Subtext fields.

Link to comment

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...