It is currently May 2nd, 2024, 9:57 pm

Using Text= with [MeterUserName]

Get help with creating, editing & fixing problems with skins
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Using Text= with [MeterUserName]

Post by CodeCode »

balala wrote: September 5th, 2022, 10:39 am Sorry, but I believe it doesn't, because the user name rarely is the same (DEATHSTAR in this case). This is returned by the [MeasureUserName] measure, so it varies from computer to computer. That's why its length varies as well, so aligning it to left and placing it to certain position, is not doing properly the job.
Based on the posted screenshot and code snippets, I assume TildaNiobe works with illustro's Network skin. If I am right, the [MeterUserName1] and [MeterUserName2] meters should look this way:

Code: Select all

[MeterUserName1]
Meter=String
MeterStyle=styleLeftText
X=10
Y=10r
W=190
H=14
Text=Hostname

[MeterUserName2]
Meter=String
MeterStyle=styleRightText
MeasureName=MeasureUserName
X=200
Y=r
Text=%1
This is very true about computer names. Some are a garbled string, to something like "Hannah's Open Source Production Machine".
That means an enduser - other then you of course, mighn't ge great results from stretching the skin to fit the long string of words, to just overlapping ther edges. Justy a pointer - there are several ways to mitigate this.
:great:
If you need help or not please enjoy your new hobby - Rainmeter! :thumbup:
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
balala
Rainmeter Sage
Posts: 16195
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Using Text= with [MeterUserName]

Post by balala »

CodeCode wrote: September 19th, 2022, 11:58 pm Justy a pointer - there are several ways to mitigate this.
Yep, the ClipString for instance.
Alexletiti
Posts: 17
Joined: April 19th, 2024, 1:21 pm

Re: Using Text= with [MeterUserName]

Post by Alexletiti »

Good morning.
I just came across this discussion.
I just installed RainMeter and am using original Illustro.
In System I would like to add the hostname and the OS.
When I added the codes you indicated for the hotsnam, it didn't work for me.
Thank you in advance for your help.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Using Text= with [MeterUserName]

Post by eclectic-tech »

Alexletiti wrote: April 19th, 2024, 1:25 pm Good morning.
I just came across this discussion.
I just installed RainMeter and am using original Illustro.
In System I would like to add the hostname and the OS.
When I added the codes you indicated for the hotsnam, it didn't work for me.
Thank you in advance for your help.
Did you also copy the new measure code?

Code: Select all

[MeasureUserName]
Measure=Plugin
Plugin=SysInfo
SysInfoType=COMPUTER_NAME
Paste that anywhere in the file.
Paste the 2 new meters to the at the bottom end of the file:

Code: Select all

[MeterUserName1]
Meter=String
MeterStyle=styleLeftText
X=10
Y=10r
W=190
H=14
Text=Hostname

[MeterUserName2]
Meter=String
MeterStyle=styleRightText
MeasureName=MeasureUserName
X=200
Y=r
Text=%1
Save the file and refresh.
Alexletiti
Posts: 17
Joined: April 19th, 2024, 1:21 pm

Re: Using Text= with [MeterUserName]

Post by Alexletiti »

Yes thank you I only saw it afterwards.
It's all good, it works now.
THANKS.

I would also like just the hostname line to be bigger
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Using Text= with [MeterUserName]

Post by eclectic-tech »

Alexletiti wrote: April 19th, 2024, 2:07 pm Yes thank you I only saw it afterwards.
It's all good, it works now.
THANKS.
On the other hand, I would like to put the hostname at the beginning but it doesn't work.

I would also like just the hostname line to be bigger
If I understand your request, you only want the ComputerName and have it aligned to the left side.
To do that you can use all of the values of [MeterUserName2] as the values in [MeterUserName1] (and visa versa if you want the description to the right). To make the name style larger add StringCase=UPPER:

Code: Select all

[MeterUserName1]
Meter=String
MeterStyle=styleLeftText
MeasureName=MeasureUserName
X=10
Y=10r
W=190
StringCase=UPPER
Text=%1

; Optional label
; [MeterUserName2]
; Meter=String
; MeterStyle=styleRightText
; X=200
; Y=r
; H=14
; Text=Hostname
EDIT: You could also add FontSize to [MeterUserName1], but changing the default text size is going to cause other issues and not keep the "look" of illustro skins.
Alexletiti
Posts: 17
Joined: April 19th, 2024, 1:21 pm

Re: Using Text= with [MeterUserName]

Post by Alexletiti »

It's all good.
Thanks for the directions.
Last small request, how to increase the width of the column?

THANKS
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Using Text= with [MeterUserName]

Post by eclectic-tech »

Alexletiti wrote: April 19th, 2024, 4:14 pm It's all good.
Thanks for the directions.
Last small request, how to increase the width of the column?

THANKS
If you mean the width of the entire skin, then you have to make a lot of changes to the code and modify the image used as the background; "illustro\@Resources\background.png".

illustro uses an image that has fixed width, header, and footer sizes; it automatically expands vertically depending on the number of meters in the skin.

If you want to expand the skin width you need to modify the image used as the background in a graphic editor and make its width your desired size; note that it has nearly invisible areas on each side and you should not change the vertical size.

Then you would need to modify every W=190, X=100, and X=200 in the skin to values that positions the text properly right and centered.

Or you could look at alternate skins in the illustro style that are scalable:
illustra,
Gadgets,
RainformerAIDA or
RainformerHWiNFO
Alexletiti
Posts: 17
Joined: April 19th, 2024, 1:21 pm

Re: Using Text= with [MeterUserName]

Post by Alexletiti »

eclectic-tech wrote: April 19th, 2024, 8:01 pm If you mean the width of the entire skin, then you have to make a lot of changes to the code and modify the image used as the background; "illustro\@Resources\background.png".

illustro uses an image that has fixed width, header, and footer sizes; it automatically expands vertically depending on the number of meters in the skin.

If you want to expand the skin width you need to modify the image used as the background in a graphic editor and make its width your desired size; note that it has nearly invisible areas on each side and you should not change the vertical size.

Then you would need to modify every W=190, X=100, and X=200 in the skin to values that positions the text properly right and centered.

Or you could look at alternate skins in the illustro style that are scalable:
illustra,
Gadgets,
RainformerAIDA or
RainformerHWiNFO
Thanks for introducing me to Illustra. You did a very good job.
I can't put a different color in the same skin (as in the illustration photo)
And on the Network skin:
- When I switch from wired network card to wifi, the IP address disappears instead of showing the new address
- And the Upload and Download values are different from the values displayed by Illustro. You know why ?

THANK YOU.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Using Text= with [MeterUserName]

Post by eclectic-tech »

Alexletiti wrote: April 19th, 2024, 9:44 pm Thanks for introducing me to Illustra. You did a very good job.
I can't put a different color in the same skin (as in the illustration photo)
And on the Network skin:
- When I switch from wired network card to wifi, the IP address disappears instead of showing the new address
- And the Upload and Download values are different from the values displayed by Illustro. You know why ?

THANK YOU.
Thanks!

As for the network info, it will be different for each system (and different from the illustro skins due to different maxupload/maxdownload speed variables).

You will need to edit the network skin to show different connections and speeds based on your system and network.

You can read more about the settings here:
Network Measure and
SystemInfo Measure ~ Network