Giter Club home page Giter Club logo

appvolumeplugin's Introduction

AppVolume Plugin for Rainmeter

GitHub release Github All Releases
A plugin that extend Rainmeter functionality: Get apps volume and peak level, control apps volume and mute.

Parent measure

Options:

  • IgnoreSystemSound (default = 1)
    System sound is Windows notification sound.
    Set to 0 to include System Sound. Set to 1 to skip System Sound.

  • ExcludeApp
    Set a blacklist of apps you do not want to control or care.
    You need to include apps name and their extension, separate them by ;. Eg: ExcludeApp = rainmeter.exe;firefox.exe

Measure value:
Number: Total number of apps. You can use this value to generate enough child measures and prevent out of range error.
String: Current device name.

Example:

[AppVolumeParent]
Measure = Plugin
Plugin = AppVolume
IgnoreSystemSound = 1

Child measure

Options:

  • Parent
    You have to set this to Parent measure name.

  • Index (default = 0)
    Index of app you want to get information and control. It has to be in range from 1 to number value of Parent measure.

  • AppName
    Specific name of app you want to get information and control. You need to include app name and its extension.
    Eg: Spotify.exe, AIMP.exe
    If this option is not empty and Index is also set, it overrides Index option.

  • NumberType (default = volume)
    Value you want to return in number value of measure. Valid options are volume or peak.

  • StringType (default = filename)
    Value you want to return in string value of measure. Valid options are filename or filepath.

Measure value:
Number: Depend on what you set in NumberType, it return current app volume or peak level.
String: Depend on what you set in StringType, it return current app only file name or full path.

Example:

[AppIndex2]
Measure = Plugin
Plugin = AppVolume
Parent = AppVolumeParent
Index = 2
NumType = Peak
StringType = Filename
[FoobarVolume]
Measure = Plugin
Plugin = AppVolume
Parent = AppVolumeParent
AppName = Foobar.exe
NumType = Volume
StringType = Filepath

Bangs

Both parent and child:

  • !CommandMeasure MeasureName "Update"
    You can use this bang after changing measure option so you do not have to set DynamicVariables = 1 Eg: LeftMouseUpAction = [!SetOption AppIndex2 NumType Volume][!CommandMeasure AppIndex2 "Update"]

Only child:

  • !CommandMeasure MeasureName "SetVolume x"
    x can be a absolute value (SetVolume 50 to set volume to 50%)
    Or a relative value (SetVolume +20 to increase volume by 20% or SetVolume -40 to decrease volume by 40%)

  • !CommandMeasure MeasureName "Mute" Mute app.

  • !CommandMeasure MeasureName "UnMute" Unmute app.

  • !CommandMeasure MeasureName "ToggleMute" Toggle mute app.

Section variable

Only available in Rainmeter version >= 4.1
An additional way to get app volume and peak by index or app name. DynamicVariables = 1 is required in where you use these variables.

[ParentMeasureName:GetVolumeFromIndex(x)]
[ParentMeasureName:GetPeakFromIndex(x)]
[ParentMeasureName:GetFileNameFromIndex(x)]
[ParentMeasureName:GetFilePathFromIndex(x)]
x is from 1 to number value of Parent measure.

[ParentMeasureName:GetVolumeFromAppName(name)]
[ParentMeasureName:GetPeakFromAppName(name)]
name is name of app you want to get. You need to include app name and its extension.

Example:

[AppVolumeParent]
Measure = Plugin
Plugin = AppVolume
IgnoreSoundSystem = 0

[Calc_SpotifyVolume]
Measure = Calc
Formula = [AppVolumeParent:GetVolumeFromAppName(spotify.exe)] * 100
DynamicVariables = 1

[Meter_SpotifyVolume]
Meter = String
MeasureName = Calc_SpotifyVolume
Text = Spotify: %1%
FontSize = 40
FontColor = 1FD662
AntiAlias = 1

AppVolume example skin

In release page, I included an example skin pack, you can download, examine and then make your own skin.
ExampleSkinDemo

Credit:

Big thanks to theAzack9 and tjhrulz who helped me get through some C++ stuff that I'm too noob to understand. I can't finish this one without them.

appvolumeplugin's People

Contributors

khanhas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appvolumeplugin's Issues

Memory Leak

Whilst running appvolume 1.1 I noticed that over time - and by way of association my memory usage spiked over the course of 24 hours. This included even more in swap memory. Eventually I got a memory hex code and Rainmeter shut down.
Even since I restarted I am seeing an increase in swap usage and lack of it returning to normal as usual when certain programs are closed after being done with them - games for example.
If i get the pop up again i will screenshot it.
Hopefully you still monitor this.

Exclude some programs

Hello, great work, i was looking for something like this since win10 releases !
I have a request, is it possible to include a easy way to exclude programs in the .ini ?
I see explorer and rainmeter.
Is there a way to set the max number of programs displayed ?

Sill leaking memory

Hi khanhas
I hate to bug you again but since I love love your appvolume I would like to request another fix.
There still seems to be a memory leak. What is happening is when appvolume is running, is my physical memory demand goes up and eventually my swap is maxed out requiring a restart.
I hope you can find what it is.
Thanks

Originally posted by @Mor3bane in #4 (comment)

Hey, khanhas, its me again.

Hey, khanhas, its me again.
Technical issue with the shape meter - the master volume does not like having a rounded edge - it just stays barely rounded and nothing seems to be able to change it beyond a minor rounding of the corner rather than being like a half circle on the end of the shape.

Suggestions?

Originally posted by @Mor3bane in #4 (comment)

Get a new exe that isn't automatically recognised

Hi khanhas,
I tried this in the main file, but it does not seem to be enough:

[SWTOR]
Measure=Plugin
Plugin=AppVolume
Parent= AppVolumeParent
AppName=swtor.exe
Index=2
NumType=Volume
StringType=FilePath

Click and Drag to Change Volume

Hello Khanhas,

I've been using this skin for months now and I really, really love it!
I have customized it long time ago to show mic peak among other little mods.

Now that I'm using the skin on a touch screen on the side, I'd love to check if is it possible to modify how changing the volume works.
What I'm looking for is to drag the sliders (click and move) to change volume, instead of the default scrollwheel action.

Appreciate if you could respond. Many thanks.

Rainmeter crashes after unloading of skin with this plugin

How to reproduce:
Load 2 skins with AppVolumePlugin (for example, 2 instances of your example skin), unload 1 of them.

Are you sure that you want to release static field "pEnumerator" on every parent measure unload?

SAFE_RELEASE(pEnumerator);

Null pointer dereferencing is probably the cause of the crash because static pEnumerator is null after unloading of a skin containing this plugin. Maybe it should not be static?

Also, although this is not directly related to the issue, I think that CoCreateInstance() in InitializeCOM() leads to memory leak because if pEnumerator is initialized it is not released before second initialization.
Another memory leak is probably happening because CoUninitialize should be called for every successful CoInitialize but now you call it only once per plugin lifetime.

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.