It is currently May 19th, 2022, 3:52 pm

Need a Analog Clock that fits with Windows 11 and is transparent/has a blur

General topics related to Rainmeter.
User avatar
Yincognito
Rainmeter Sage
Posts: 4694
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Need a Analog Clock that fits with Windows 11 and is transparent/has a blur

Post by Yincognito »

eclectic-tech wrote: March 11th, 2022, 3:06 pm I took a quick look at the cached image, and it is the one that matches the applied wallpaper.
But as you noticed, there is a short delay in creating it when the wallpaper is changed, which is understandable, so there will still be some delay in applying it in skins.

The issue I am looking at now is an error "cannot find image" when trying to access that file as the source for my background image in the MagickMeter plugin measure. I also tried using a Fileview skin, and cannot navigate to that folder; '%appdata%\Microsoft' folder was not displayed in the FileView skin I used (I haven't checked options for system file in that plugin yet) even when running Rainmeter as Admin.

I need to try a few other methods to see if that file can be accessed or saved, preferably in the skin's @Resources folder, when I have some time.
Really? :jawdrop
I didn't try accessing the file yet in the skin, but I'm sure it's possible one way or another either from native Rainmeter, PS, batch or Lua. Till now I only accessed the folder via Run in Windows, so theoretically it should work as a plain bang too. If not, replacing %appdata% with the actual path might improve the process.

I'll try it in a skin as soon as I get to my laptop, as I'm now on my phone, and will let you know what I find out. I'll use the simpler logo like skin I made in the other thread for that, since it has all the needed elements you use in the suite overall.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4738
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Need a Analog Clock that fits with Windows 11 and is transparent/has a blur

Post by eclectic-tech »

Have it working to use the cached image file. Just needed to modify a few FileView options.
Now I need to make mods to about 40 files and test a few days! :?

Thanks for making me look at this process and find a better method. :thumbup:
User avatar
Yincognito
Rainmeter Sage
Posts: 4694
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Need a Analog Clock that fits with Windows 11 and is transparent/has a blur

Post by Yincognito »

eclectic-tech wrote: March 11th, 2022, 6:30 pm Have it working to use the cached image file. Just needed to modify a few FileView options.
Now I need to make mods to about 40 files and test a few days! :?

Thanks for making me look at this process and find a better method. :thumbup:
You beat me to it as I just got back to my laptop, but just for the record, for me it works right out of the box, no other measures or stuff required:

Code: Select all

[Variables]
FontFaceDay=Tahoma
FontFaceTime=Calibri
FontColW=255,255,255,255
FontColB=0,0,0,255
FontWeight=700
StringCase=Upper
Size=48
SizeFactor=3
XPadding=(-2*#SizeFactor#)
YPadding=(-3*#SizeFactor#)
Angle=0

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

---Measures---

[Day]
Measure=Time
Format="%A%A"

[Time]
Measure=Time
Format="%I:%M"

[MagickMeter]
Measure=Plugin
Plugin=MagickMeter
Image=File %appdata%\Microsoft\Windows\Themes\CachedFiles\CachedImage_1920_1080_POS4.jpg | Crop #CURRENTCONFIGX#, #CURRENTCONFIGY#, #CURRENTCONFIGWIDTH#, #CURRENTCONFIGHEIGHT# | Blur 0,0
DynamicVariables=1

---Styles---

[TextStyle]
Y=-4R
FontFace=#FontFaceDay#
FontSize=#Size#
FontColor=#FontColW#
FontWeight=#FontWeight#
StringCase=#StringCase#
Angle=#Angle#
Padding=#XPadding#,#YPadding#,#XPadding#,#YPadding#
AntiAlias=1

---Meters---

[DayTextLine1]
Meter=String
MeterStyle=TextStyle
MeasureName=Day

[DayTextLine2]
Meter=String
MeterStyle=TextStyle
MeasureName=Day

[DayTextLine3]
Meter=String
MeterStyle=TextStyle
MeasureName=Day

[DayTextLine4]
Meter=String
MeterStyle=TextStyle
MeasureName=Day

[DayTextLine5]
Meter=String
MeterStyle=TextStyle
MeasureName=Day

[TimeText]
Meter=String
MeterStyle=TextStyle
X=(#CURRENTCONFIGWIDTH#/2)
Y=(#CURRENTCONFIGHEIGHT#/2)
W=(#CURRENTCONFIGWIDTH#)
H=(#CURRENTCONFIGHEIGHT#)
FontFace=#FontFaceTime#
FontSize=(#Size#*#SizeFactor#)
FontColor=#FontColB#
Padding=0,0,0,0
StringAlign=CenterCenter
MeasureName=Time
DynamicVariables=1

[WallpaperImage]
Meter=Image
Container=TimeText
X=(-#CURRENTCONFIGWIDTH#/2)
Y=(-#CURRENTCONFIGHEIGHT#/2)
MeasureName=MagickMeter
DynamicVariables=1
Wallpaper 0.jpg
I kept the file name hardcoded for this test, but it can easily be changed to include some variables like screen dimensions or the combobox "fit method" as the "position number". I also tested this very code on changing the wallpaper - it takes roungly 4 seconds in my case to get / use the new wallpaper, with 5 harmless errors all this time, on an update rate of 1 second for the skin. Personally, I don't believe any other trick to hide things until the new wallpaper is grabbed by the MagickMeter are necessary since it really doesn't look that bad in that 4 seconds period, but of course if you want to be thorough and all, you'd probably have to [!Hide] for that amount of time, and that would be it.

Not sure exactly how you'd get the "position number" to use it in the filename, but I'm sure there is some place in Windows (registry or other) where it's stored if the wallpaper is tiled, streched, filled, fit, and so on so you can take the value from there and use it for the file name. Or maybe you use FileView measure to get any (or the 1st) image in that folder without bothering with the file name at all?

Oh, and you don't have to thank me for it, it captivated my attention since I like your way of making this effects. ;-)
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 4694
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Need a Analog Clock that fits with Windows 11 and is transparent/has a blur

Post by Yincognito »

eclectic-tech wrote: March 11th, 2022, 6:30 pmNow I need to make mods to about 40 files [...] ! :?
Replace All In All Opened Documents in Notepad++ is your friend, if you find it easier with a regex there, otherwise manually I guess... :D
justachild
Posts: 8
Joined: March 9th, 2022, 3:52 pm

Re: Need a Analog Clock that fits with Windows 11 and is transparent/has a blur

Post by justachild »

YinCognito and Ecletic-Tech, thank you soo much for taking discussion so forward. I have my spectacles gone, getting a new pair. So I will reply back after 4-5 days. Thank you for so beautiful support and helping me :)

Edit: I am using Roland Clock its transparent and doesn't require adjusting to wallpaper by trigger or manually. Thank you very much YinCognito and Eclectic-Tech for helping though.
https://www.deviantart.com/apexxx-sensei/art/Roland-805776904
User avatar
Yincognito
Rainmeter Sage
Posts: 4694
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Need a Analog Clock that fits with Windows 11 and is transparent/has a blur

Post by Yincognito »

justachild wrote: March 12th, 2022, 4:13 am YinCognito and Ecletic-Tech, thank you soo much for taking discussion so forward. I have my spectacles gone, getting a new pair. So I will reply back after 4-5 days. Thank you for so beautiful support and helping me :)

Edit: I am using Roland Clock its transparent and doesn't require adjusting to wallpaper by trigger or manually. Thank you very much YinCognito and Eclectic-Tech for helping though.
https://www.deviantart.com/apexxx-sensei/art/Roland-805776904
No problem from my part, as the discussion led to new ideas and potential improvement. ;-)
Didn't know you were happy with a simple transparent clock too though, judging from your first post... :???:
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4738
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Need a Analog Clock that fits with Windows 11 and is transparent/has a blur

Post by eclectic-tech »

justachild wrote: March 12th, 2022, 4:13 am YinCognito and Ecletic-Tech, thank you soo much for taking discussion so forward. I have my spectacles gone, getting a new pair. So I will reply back after 4-5 days. Thank you for so beautiful support and helping me :)

Edit: I am using Roland Clock its transparent and doesn't require adjusting to wallpaper by trigger or manually. Thank you very much YinCognito and Eclectic-Tech for helping though.
https://www.deviantart.com/apexxx-sensei/art/Roland-805776904
Thanks for asking. You made me take another look at how I was achieving this effect.

The new V2 of Sigma does NOT require any hiding windows/skins to update; everything happens automatically.

@Yincognito You've gotta love Windows...

When I was originally looking at this, I did not want to keep having to click for new wallpaper, so I set the personalize wallpaper change time to "every minute". When you select that rate, Windows does not create the 'Themes\CachedFiles' folder, so I did not see a way to use the only visible file, the transcoded file with the wrong aspect.

Thanks for suggesting I look again. Now I have the suite automatically updating when the desktop wallpaper changes.

As you noticed the name of the cached image is the screen resolution with a POS number from 0 to 5 corresponding to Windows aspect setting.
There was no straightforward way to determine the user's aspect setting, so I added a fallback for the cached file name using an end user variable for the aspect number.

Back to testing the update!!!
User avatar
Yincognito
Rainmeter Sage
Posts: 4694
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Need a Analog Clock that fits with Windows 11 and is transparent/has a blur

Post by Yincognito »

eclectic-tech wrote: March 12th, 2022, 10:53 pmThere was no straightforward way to determine the user's aspect setting, so I added a fallback for the cached file name using an end user variable for the aspect number.
I beg to differ... :D

See here and here for incomplete answers, just for reference, since I already had the answer at that moment. Or, based on my own testing, just before I looked for the links above:

- Center:
POS = 0
HKEY_CURRENT_USER\Control Panel\Desktop\TileWallpaper = 0
HKEY_CURRENT_USER\Control Panel\Desktop\WallpaperStyle = 0
- Tile:
POS = 1
HKEY_CURRENT_USER\Control Panel\Desktop\TileWallpaper = 1
HKEY_CURRENT_USER\Control Panel\Desktop\WallpaperStyle = 0
- Stretch:
POS = 2
HKEY_CURRENT_USER\Control Panel\Desktop\TileWallpaper = 0
HKEY_CURRENT_USER\Control Panel\Desktop\WallpaperStyle = 2
- Fit:
POS = 3
HKEY_CURRENT_USER\Control Panel\Desktop\TileWallpaper = 0
HKEY_CURRENT_USER\Control Panel\Desktop\WallpaperStyle = 6
- Fill:
POS = 4
HKEY_CURRENT_USER\Control Panel\Desktop\TileWallpaper = 0
HKEY_CURRENT_USER\Control Panel\Desktop\WallpaperStyle = 10
- Span:
POS = 5
HKEY_CURRENT_USER\Control Panel\Desktop\TileWallpaper = 0
HKEY_CURRENT_USER\Control Panel\Desktop\WallpaperStyle = 22

I'd say this is pretty straightforward, don't you think? :D Basically the whole thing is a bit of joggle or combination between checking those folders / files and the above Desktop location keys in the registry. Or, you could do it just with a couple Registry measures and go right to the file itself, if by any chance you only want that folder being used and don't care for "web" wallpapers. Other than that, you can very much have a fallback manual method similar to what you mentioned, if things go south somehow.

Summarizing, the cached file name would be:

Code: Select all

%appdata%\Microsoft\Windows\Themes\CachedFiles\CachedImage_(#SCREENAREAWIDTH#-#SCREENAREAX#)_(#SCREENAREAHEIGHT#-#SCREENAREAY#)_POS[StringMeasureWithASubstituteReplacingTheConcatenatedTileWallpaperAndWallpaperStyleWithTheCorrespondingPOSition].jpg
P.S. Don't ask me how Microbfuscatedsoft came up with those numbers in the registry though - not even hex numbers match, not to mention the gaps in values. Yeah, you gotta love Windows ... and slap Macrohard for not making this a walk in the park for the regular user, but who knows, maybe they have their reasons... :confused:

EDIT: And since I don't like to let stuff unfinished, here's the previous sample skin with the above (it doesn't do anything on errors or use the transcoded or any "web" image, it just patiently waits for the cached image to be created in order to use it, and doesn't use any fallback method since I you said you got that part covered - feel free to have a look and see this part of the process is feasible):

Code: Select all

[Variables]
FontFaceDay=Tahoma
FontFaceTime=Calibri
FontColW=255,255,255,255
FontColB=0,0,0,255
FontWeight=700
StringCase=Upper
Size=48
SizeFactor=3
XPadding=(-2*#SizeFactor#)
YPadding=(-3*#SizeFactor#)
Angle=0

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

---Measures---

[Day]
Measure=Time
Format="%A%A"

[Time]
Measure=Time
Format="%I:%M"

[ScreenW]
Measure=Calc
Formula=(#SCREENAREAWIDTH#-#SCREENAREAX#)
DynamicVariables=1

[ScreenH]
Measure=Calc
Formula=(#SCREENAREAHEIGHT#-#SCREENAREAY#)
DynamicVariables=1

[TileWallpaperStatus]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Control Panel\Desktop
RegValue=TileWallpaper

[WallpaperStyleStatus]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Control Panel\Desktop
RegValue=WallpaperStyle

[FitPosition]
Measure=String
String=[TileWallpaperStatus][WallpaperStyleStatus]
RegExpSubstitute=1
Substitute="^00$":"0","^10$":"1","^02$":"2","^06$":"3","^010$":"4","^022$":"5"
DynamicVariables=1

[MagickMeter]
Measure=Plugin
Plugin=MagickMeter
Image=File %appdata%\Microsoft\Windows\Themes\CachedFiles\CachedImage_[ScreenW]_[ScreenH]_POS[FitPosition].jpg | Crop #CURRENTCONFIGX#, #CURRENTCONFIGY#, #CURRENTCONFIGWIDTH#, #CURRENTCONFIGHEIGHT# | Blur 0,0
DynamicVariables=1

---Styles---

[TextStyle]
Y=-4R
FontFace=#FontFaceDay#
FontSize=#Size#
FontColor=#FontColW#
FontWeight=#FontWeight#
StringCase=#StringCase#
Angle=#Angle#
Padding=#XPadding#,#YPadding#,#XPadding#,#YPadding#
AntiAlias=1

---Meters---

[DayTextLine1]
Meter=String
MeterStyle=TextStyle
MeasureName=Day

[DayTextLine2]
Meter=String
MeterStyle=TextStyle
MeasureName=Day

[DayTextLine3]
Meter=String
MeterStyle=TextStyle
MeasureName=Day

[DayTextLine4]
Meter=String
MeterStyle=TextStyle
MeasureName=Day

[DayTextLine5]
Meter=String
MeterStyle=TextStyle
MeasureName=Day

[TimeText]
Meter=String
MeterStyle=TextStyle
X=(#CURRENTCONFIGWIDTH#/2)
Y=(#CURRENTCONFIGHEIGHT#/2)
W=(#CURRENTCONFIGWIDTH#)
H=(#CURRENTCONFIGHEIGHT#)
FontFace=#FontFaceTime#
FontSize=(#Size#*#SizeFactor#)
FontColor=#FontColB#
Padding=0,0,0,0
StringAlign=CenterCenter
MeasureName=Time
DynamicVariables=1

[WallpaperImage]
Meter=Image
Container=TimeText
X=(-#CURRENTCONFIGWIDTH#/2)
Y=(-#CURRENTCONFIGHEIGHT#/2)
MeasureName=MagickMeter
DynamicVariables=1
I would also note 2 things:
- I have no idea how the process is altered (if it does) on multi-monitor systems, probably some tests should be done in such an enivironment to see if adjustments are needed
- once an initially tiled image is stored in the cached folder, on reapply the image ceases to be tiled anymore, since it's basically that single image taken from that folder
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4738
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Need a Analog Clock that fits with Windows 11 and is transparent/has a blur

Post by eclectic-tech »

Thanks for the registry info, definitely helpful. :rosegift:

Not sure about multiple monitors (only use 1) or tiling (but I haven't used tiled wallpaper since maybe 2010? :vomit: )
User avatar
Yincognito
Rainmeter Sage
Posts: 4694
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Need a Analog Clock that fits with Windows 11 and is transparent/has a blur

Post by Yincognito »

eclectic-tech wrote: March 13th, 2022, 5:19 am Thanks for the registry info, definitely helpful. :rosegift:

Not sure about multiple monitors (only use 1) or tiling (but I haven't used tiled wallpaper since maybe 2010? :vomit: )
No problem. Me neither. :D