Alright, as you want.
It is currently September 19th, 2024, 1:56 am
HotKey plugin 1.0
-
- Rainmeter Sage
- Posts: 16552
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
-
- Rainmeter Sage
- Posts: 8171
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: HotKey plugin 1.0
Taskbar's height is dependent on screen resolution, but not only on that - it also depends on the scaling applied in Windows (at least that are the dependencies I'm aware about). I don't know the exact formula and, as you know, Windows is closed source so we can't take a look there and have it ready to use, but you can investigate scaling using something similar to this:
Code: Select all
[Variables]
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!CommandMeasure MonitorScale "Run"]
[MonitorScale]
Measure=Plugin
Plugin=RunCommand
Program=powershell
Parameter=-command $activemonitorsregpath = 'HKCU:\Control Panel\Desktop\PerMonitorSettings'; $genericmonitorslist = Get-ChildItem 'HKLM:\System\CurrentControlSet\Control\GraphicsDrivers\ScaleFactors'; $dpicode = New-Object PSObject -Property @{'4294967295' = '100%'; '4294967294' = '100%'; '0' = '125%'; '1' = '150%'; '2' = '175%';}; $monitors = @(); $monitorindex = 0; foreach ($genericmonitor in $genericmonitorslist) {$regpath = $activemonitorsregpath + '\' + $genericmonitor.PsChildname; if (Test-Path -Path $regpath) {$dpivalue = (Get-ItemProperty -Path $regpath -Name 'DpiValue').'DpiValue'; $monitors += New-Object PSObject -Property @{'Index' = $monitorindex; 'Place' = $regpath; 'Scale' = $dpicode.$dpivalue}; $monitorindex++;}} $monitors | format-list;
State=Hide
OutputType=ANSI
Timeout=10000
;RegExpSubstitute=1
;Substitute="":""
DynamicVariables=1
[Result]
Meter=String
SolidColor=47,47,47,255
FontColor=255,255,255,255
FontFace=Consolas
FontSize=16
AntiAlias=1
Text=[MonitorScale]
DynamicVariables=1
-
- Posts: 18
- Joined: April 6th, 2022, 5:36 pm
Re: HotKey plugin 1.0
Yincognito and balala
thanks, you gave me a lot food for thought.
next week i will explore all of these
thanks, you gave me a lot food for thought.
next week i will explore all of these
-
- Rainmeter Sage
- Posts: 16552
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: HotKey plugin 1.0
Alright, from my point of view. If you have any question related to what did I posted, feel to come back and ask.
-
- Rainmeter Sage
- Posts: 8171
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: HotKey plugin 1.0
Good luck - hopefully you'll be able to use some of these to get closer to reaching your objective.
-
- Posts: 26
- Joined: August 26th, 2024, 7:59 am
- Location: Malaysia
Re: HotKey plugin 1.0
Hey Brian!
First of all, amazing plugin! I'm relatively knew to rainmeter but im learning the ropes quick!
I wanted to know if its possible to restrict keybinds to when the skin is focused only?
First of all, amazing plugin! I'm relatively knew to rainmeter but im learning the ropes quick!
I wanted to know if its possible to restrict keybinds to when the skin is focused only?
-
- Posts: 307
- Joined: August 14th, 2009, 8:04 am
Re: HotKey plugin 1.0
Yes, the plugin's functionality can be started/stopped on command. However, each keybind requires a dedicated measure and you have to send the start/stop command to each measure individually (measures do not support group bangs like meters do).
Code: Select all
[Rainmeter]
OnFocusAction=[!CommandMeasure mA Start][!CommandMeasure mB Start][!CommandMeasure mC Start]
OnUnfocusAction=[!CommandMeasure mA Stop][!CommandMeasure mB Stop][!CommandMeasure mC Stop]
[mA]
Measure=Plugin
Plugin=HotKey
HotKey=a
KeyDownAction=!CommandMeasure mScript Input("a")
[mB]
Measure=Plugin
Plugin=HotKey
HotKey=b
KeyDownAction=!CommandMeasure mScript Input("b")
[mC]
Measure=Plugin
Plugin=HotKey
HotKey=c
KeyDownAction=!CommandMeasure mScript Input("c")
[mScript]
Measure=Script
ScriptFile=#@#Script.lua
-
- Rainmeter Sage
- Posts: 8171
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: HotKey plugin 1.0
A minor clarification to an otherwise excellent answer: measures do support group bangs (actually, more group bangs than meters do), just not a hypothetical !CommandMeasureGroup bang.
-
- Posts: 26
- Joined: August 26th, 2024, 7:59 am
- Location: Malaysia
Re: HotKey plugin 1.0
Thank you very much Yincognito and killall-q! I also appreciate the relatively quick response!
-
- Rainmeter Sage
- Posts: 8171
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: HotKey plugin 1.0
Killall-q deserves all the plaudits here, but you're welcome!Hazrd wrote: ↑September 2nd, 2024, 9:30 am Thank you very much Yincognito and killall-q! I also appreciate the relatively quick response!