[Rainmeter] Update=1000 AccurateText=1 DynamicWindowSize=1 BackgroundMode=2 SolidColor=0,0,0,1 [Metadata] Name=MyClock with Bing Author=YourName Description=时钟(时间/中英星期/日期)+ 必应搜索 + 霓虹表盘 Version=1.3 ; ================================================== ; 全局变量定义:统一管理缩放、尺寸、颜色和字体,便于维护和适配 ; ================================================== [Variables] ; 全局缩放因子,用于响应 DPI 变化或自定义大小 Scale=1 ; 文字垂直微调偏移,补偿字体渲染的基线差异 TextStartOffset=(1 * #Scale#) ; 霓虹表盘几何参数(基于 360px 外径设计) BaseCentre=360 CCentre=(#BaseCentre# * #Scale#) COut=(360 * #Scale#) CIn=(300 * #Scale#) CDAR=((#COut#+#CIn#)/2) ClockLineStart=(#CDAR# - 2*#Scale#) ClockLineLength=(#CDAR# + 2*#Scale#) ; 指针长度(从中心向外延伸的距离) SecondHandLength=(#CIn# - 1*#Scale#) MinuteHandLength=(#CIn# - 150*#Scale#) HourHandLength=(#CIn# - 200*#Scale#) ; 整体绘制区域尺寸(确保完整显示 720px 直径表盘) CircleDiameter=(720 * #Scale#) CircleRadius=(#CircleDiameter# / 2) ; 表盘逻辑中心点(注意:Y = COut,非窗口中心,因表盘底部对齐布局) CenterX=#CCentre# CenterY=#COut# ; 布局元素间的垂直间距(用于文本区块排布) Spacing=(25 * #Scale#) ; 主信息区字体设置(时间、星期、日期) FontName=Microsoft YaHei FontSizeTime=(42 * #Scale#) FontSizeWeekday=(16 * #Scale#) FontSizeDate=(18 * #Scale#) FontColor=255,255,255 ; 功能区字体设置(搜索提示、标题等) SearchFont=Trebuchet MS SearchTextSize=(12 * #Scale#) SearchTextColor=255,255,255,255 ; 霓虹表盘视觉颜色定义(增强区分度) GlowColor1=255,0,160 GlowColor2=65,190,255 RingColor=255,255,255,245 SecTrailColor=255,30,30,220 SecondHandColor=255,30,30,230 MinuteHandColor=65,190,255,220 HourHandColor=255,255,255,180 SetGrad=270 ; ================================================== ; 时间与日期数据源:提供格式化的字符串用于显示 ; ================================================== [MeasureTime] Measure=Time Format=%H:%M:%S [MeasureWeekdayCN] Measure=Time Format=%A Substitute="Sunday":"周日","Monday":"周一","Tuesday":"周二","Wednesday":"周三","Thursday":"周四","Friday":"周五","Saturday":"周六" [MeasureWeekdayEN] Measure=Time Format=%A [MeasureFullDate] Measure=Time Format=%Y-%m-%d ; ================================================== ; 指针角度计算:将当前时间转换为旋转角度(-90° 使 12 点朝上) ; ================================================== [MeasureSeconds] Measure=Time Format=%S [MeasureTimeForAngles] Measure=Time Format=%H.%M.%S [MeasureTotalSeconds] Measure=Calc Formula=( ( ( Floor(MeasureTimeForAngles) % 24 ) * 3600 ) + ( ( Floor(MeasureTimeForAngles * 100) % 100 ) * 60 ) + ( MeasureTimeForAngles * 10000 % 100 ) ) [MeasureHourAngle] Measure=Calc Formula=( (MeasureTotalSeconds % 43200) * 360 / 43200 - 90 ) [MeasureMinuteAngle] Measure=Calc Formula=( (MeasureTotalSeconds % 3600) * 360 / 3600 - 90 ) [MeasureSecAngle] Measure=Calc Formula=(MeasureSeconds * 6 - 90) [MeasureSecondPercent] Measure=Calc Formula=(MeasureSeconds / 60) ; ================================================== ; 背景容器:创建透明圆形区域作为整体绘制基底 ; ================================================== [MeterBackground] Meter=Shape Shape=Ellipse #CircleRadius#,#CircleRadius#,#CircleRadius#,#CircleRadius# | Fill Color 19,18,60,0 | StrokeWidth 0 X=0 Y=0 W=#CircleDiameter# H=#CircleDiameter# DynamicVariables=1 ; ================================================== ; 顶部信息显示区:居中显示时间、中英双语星期、完整日期 ; ================================================== [MeterTime] Meter=String MeasureName=MeasureTime X=#CenterX# Y=50 FontFace=#FontName# FontSize=#FontSizeTime# FontColor=#FontColor# StringAlign=Center AntiAlias=1 Text=%1 [MeterWeekday] Meter=String MeasureName=MeasureWeekdayCN MeasureName2=MeasureWeekdayEN X=#CenterX# Y=(50 + #TextStartOffset# + #FontSizeTime# + #Spacing#) FontFace=#FontName# FontSize=#FontSizeWeekday# FontColor=#FontColor# StringAlign=Center AntiAlias=1 Text=%1 %2 [MeterFullDate] Meter=String MeasureName=MeasureFullDate X=#CenterX# Y=(50 + #TextStartOffset# + #FontSizeTime# + #Spacing# + #FontSizeWeekday# + #Spacing#) FontFace=#FontName# FontSize=#FontSizeDate# FontColor=#FontColor# StringAlign=Center AntiAlias=1 Text=%1 ; ================================================== ; 功能交互区:包含“我的首页”链接、“Bing”标题和搜索输入触发器 ; ================================================== [meterHome] Meter=String X=#CenterX# Y=(#CenterY# + #TextStartOffset# + #FontSizeTime# + 2.5*#Spacing# + #FontSizeWeekday# + #FontSizeDate#) W=(200 * #Scale#) H=(28 * #Scale#) FontFace=#SearchFont# FontSize=(16 * #Scale#) FontColor=#SearchTextColor# StringStyle=Bold StringAlign=Center AntiAlias=1 ClipString=1 Text=我的首页 LeftMouseUpAction=["file:///C:/Users/90917/Documents/HTML5/我的首页.html"] ToolTipText=点击打开我的首页 MouseOverAction=[!SetOption meterHome FontColor "255,255,0"][!UpdateMeter meterHome][!Redraw] MouseLeaveAction=[!SetOption meterHome FontColor "#SearchTextColor#"][!UpdateMeter meterHome][!Redraw] ; ================================================== ; 彩虹分隔装饰条 ; ================================================== [meterSeperator] Meter=Shape Shape=Rectangle (#CenterX# - 165*#Scale# + 0*20*#Scale#), #CenterY#, (10*#Scale#), (2*#Scale#) | Fill Color 255,0,0,200 Shape2=Rectangle (#CenterX# - 165*#Scale# + 1*20*#Scale#), #CenterY#, (10*#Scale#), (2*#Scale#) | Fill Color 255,165,0,200 Shape3=Rectangle (#CenterX# - 165*#Scale# + 2*20*#Scale#), #CenterY#, (10*#Scale#), (2*#Scale#) | Fill Color 255,255,0,200 Shape4=Rectangle (#CenterX# - 165*#Scale# + 3*20*#Scale#), #CenterY#, (10*#Scale#), (2*#Scale#) | Fill Color 0,255,0,200 Shape5=Rectangle (#CenterX# - 165*#Scale# + 4*20*#Scale#), #CenterY#, (10*#Scale#), (2*#Scale#) | Fill Color 0,127,255,200 Shape6=Rectangle (#CenterX# - 165*#Scale# + 5*20*#Scale#), #CenterY#, (10*#Scale#), (2*#Scale#) | Fill Color 0,0,255,200 Shape7=Rectangle (#CenterX# - 165*#Scale# + 6*20*#Scale#), #CenterY#, (10*#Scale#), (2*#Scale#) | Fill Color 75,0,130,200 Shape8=Rectangle (#CenterX# - 165*#Scale# + 7*20*#Scale#), #CenterY#, (10*#Scale#), (2*#Scale#) | Fill Color 148,0,211,200 Shape9=Rectangle (#CenterX# - 165*#Scale# + 8*20*#Scale#), #CenterY#, (10*#Scale#), (10*#Scale#) | Fill Color 255,0,255,200 Shape10=Rectangle (#CenterX# - 165*#Scale# + 9*20*#Scale#), #CenterY#, (10*#Scale#), (2*#Scale#) | Fill Color 255,192,203,200 Shape11=Rectangle (#CenterX# - 165*#Scale# + 10*20*#Scale#), #CenterY#, (10*#Scale#), (2*#Scale#) | Fill Color 255,165,0,200 Shape12=Rectangle (#CenterX# - 165*#Scale# + 11*20*#Scale#), #CenterY#, (10*#Scale#), (2*#Scale#) | Fill Color 255,228,196,200 Shape13=Rectangle (#CenterX# - 165*#Scale# + 12*20*#Scale#), #CenterY#, (10*#Scale#), (2*#Scale#) | Fill Color 255,255,240,200 Shape14=Rectangle (#CenterX# - 165*#Scale# + 13*20*#Scale#), #CenterY#, (10*#Scale#), (2*#Scale#) | Fill Color 135,206,250,200 Shape15=Rectangle (#CenterX# - 165*#Scale# + 14*20*#Scale#), #CenterY#, (10*#Scale#), (2*#Scale#) | Fill Color 176,224,230,200 Shape16=Rectangle (#CenterX# - 165*#Scale# + 15*20*#Scale#), #CenterY#, (10*#Scale#), (2*#Scale#) | Fill Color 240,248,255,200 X=0 Y=(#TextStartOffset# + #FontSizeTime# + 4*#Spacing# + #FontSizeWeekday# + #FontSizeDate#) DynamicVariables=1 [meterTitle] Meter=String X=#CenterX# Y=(#CenterY# + #TextStartOffset# + #FontSizeTime# + 4.5*#Spacing# + #FontSizeWeekday# + #FontSizeDate#) W=(200 * #Scale#) H=(30 * #Scale#) FontFace=#SearchFont# FontSize=(20 * #Scale#) FontColor=#SearchTextColor# StringStyle=Bold StringEffect=Shadow FontEffectColor=0,0,0,50 StringAlign=Center AntiAlias=1 ClipString=1 Text=Bing [meterSearch] Meter=String X=#CenterX# Y=(#CenterY# + #TextStartOffset# + #FontSizeTime# + #FontSizeWeekday# + #FontSizeDate# + #Spacing# * 6) W=(200 * #Scale#) H=(28 * #Scale#) FontFace=#SearchFont# FontSize=#SearchTextSize# FontColor=#SearchTextColor# StringStyle=Bold StringEffect=Shadow FontEffectColor=0,0,0,20 StringAlign=Center AntiAlias=1 ClipString=1 Text=搜索(点击输入回车输出)... ToolTipText=点击搜索 MouseOverAction=[!SetOption meterSearch FontColor "255,255,0"][!UpdateMeter meterSearch][!Redraw] MouseLeaveAction=[!SetOption meterSearch FontColor "#SearchTextColor#"][!UpdateMeter meterSearch][!Redraw] LeftMouseUpAction=[!CommandMeasure measureInput "ExecuteBatch 1"] ; ================================================== ; 文本输入测量器:弹出输入框并将用户输入传递给 Bing 搜索 ; ================================================== [measureInput] Measure=Plugin Plugin=InputText FontFace=#SearchFont# FontSize=#SearchTextSize# FontColor=0,0,0,255 SolidColor=255,255,255,255 StringStyle=Bold X=(#CenterX# - 94*#Scale#) Y=(#CenterY# + #TextStartOffset# + #FontSizeTime# + #FontSizeWeekday# + #FontSizeDate# + #Spacing# * 6) W=(188 * #Scale#) H=(30 * #Scale#) FocusDismiss=1 DefaultValue="" Command1=["https://www.bing.com/search?q=$UserInput$"] UpdateDivider=-1 ; ================================================== ; 霓虹表盘容器:使用径向渐变遮罩限制内部元素可见范围 ; ================================================== [MeterClockContainer] Meter=Shape X=0 Y=0 W=(#COut#*2) H=(#COut#*2) Shape=Ellipse #CCentre#,#COut#,#COut#,#COut# | StrokeWidth 0 | Fill RadialGradient ClockContGrad ClockContGrad=0,0,0,0,#COut#,#COut# | 0,0,0,0;0.0 | 0,0,0,0;(#CIn#/#COut#) | 0,0,0,250;((#CIn#+#COut#)/(2*#COut#)) | 0,0,0,0;1 DynamicVariables=1 ; ================================================== ; 霓虹发光环与刻度环:叠加在线性渐变背景上,形成炫彩表圈 ; ================================================== [MeterClockGlow] Meter=Shape X=0 Y=0 W=(#COut#*2) H=(#COut#*2) Shape=Ellipse #CCentre#,#COut#,#COut#,#COut# | StrokeWidth 0 | Fill LinearGradient ClockGlowGrad Shape2=Ellipse #CCentre#,#COut#,((#CIn#+#COut#)/2),((#CIn#+#COut#)/2) | Fill Color 0,0,0,1 | StrokeWidth (2*#Scale#) | StrokeColor #RingColor# ClockGlowGrad=#SetGrad# | #GlowColor1#;0.0 | #GlowColor2#;1.0 Container=MeterClockContainer DynamicVariables=1 ; ================================================== ; 秒针动态轨迹:随秒针移动绘制半透明红色弧线,营造拖尾效果 ; ================================================== [MeterClockTrail] Meter=Roundline X=#CCentre# Y=#COut# StartAngle=(Rad(270)) RotationAngle=(Rad(360)) LineStart=#ClockLineStart# LineLength=#ClockLineLength# Solid=1 LineColor=#SecTrailColor# MeasureName=MeasureSecondPercent AntiAlias=1 DynamicVariables=1 ; ================================================== ; 时钟指针组:使用统一变量控制长度,颜色区分明确 ; ================================================== [MeterHourHand] Meter=Shape X=0 Y=0 W=#CircleDiameter# H=#CircleDiameter# Shape=Line #CenterX#,#CenterY#,(#CenterX# + Cos(Rad([MeasureHourAngle])) * #HourHandLength#),(#CenterY# + Sin(Rad([MeasureHourAngle])) * #HourHandLength#) | StrokeWidth (5*#Scale#) | StrokeColor #HourHandColor# DynamicVariables=1 [MeterMinuteHand] Meter=Shape X=0 Y=0 W=#CircleDiameter# H=#CircleDiameter# Shape=Line #CenterX#,#CenterY#,(#CenterX# + Cos(Rad([MeasureMinuteAngle])) * #MinuteHandLength#),(#CenterY# + Sin(Rad([MeasureMinuteAngle])) * #MinuteHandLength#) | StrokeWidth (4*#Scale#) | StrokeColor #MinuteHandColor# DynamicVariables=1 [MeterSecondHand] Meter=Shape X=0 Y=0 W=#CircleDiameter# H=#CircleDiameter# Shape=Line #CenterX#,#CenterY#,(#CenterX# + Cos(Rad([MeasureSecAngle])) * #SecondHandLength#),(#CenterY# + Sin(Rad([MeasureSecAngle])) * #SecondHandLength#) | StrokeWidth (2*#Scale#) | StrokeColor #SecondHandColor# Shape2=Ellipse #CenterX#,#CenterY#,(5*#Scale#),(5*#Scale#) | Fill Color 255,0,0,200 Shape3=Ellipse #CenterX#,#CenterY#,(3*#Scale#),(3*#Scale#) | Fill Color 255,0,0,255 DynamicVariables=1Rainmeter 皮肤的桌面时钟
张小明
前端开发工程师
30分钟快速验证:构建Git合并冲突解决原型
快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容: 开发一个极简的Git合并原型系统,要求:1. 使用Mock数据模拟两个Git仓库 2. 实现基本的git merge --allow-unrelated-histories流程 3. 可视化显示合并前后变…
用Vuex快速构建应用原型:1小时开发Todo应用
快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容: 快速生成一个功能完整的Todo应用Vuex store。需求:1)添加/删除/完成Todo 2)分类过滤(全部/已完成/未完成) 3)本地存储持久化 4)统计信息(总数/完成数)。使用最简实现&a…
游戏多开必备:可可上号器实战应用指南
快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容: 创建一个可可上号器的使用教程项目,包含:1.安装和配置指南 2.添加和管理游戏账号的步骤 3.多账号切换演示 4.常见问题解决方案 5.安全使用建议。要求有图文…
EZREMOVE:AI如何简化代码重构与冗余清理
快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容: 开发一个基于AI的代码清理工具EZREMOVE,能够自动扫描代码库,识别未使用的变量、函数和依赖项。支持多种编程语言(如Python、JavaScript、Java&a…
揭秘Oracle数据库中的事务提交问题
在编程过程中,我们常常会遇到一些看似简单却容易忽略的问题,特别是在数据库操作中。今天我们要探讨的是在使用Oracle数据库时,一个常见但容易出错的场景:为什么在Java中使用JDBC执行SQL查询时,ResultSet.next()返回false,导致while循环不执行?通过一个具体的实例,我们来…
Ubuntu 24.04下的Python包管理新策略
引言 最近,在尝试在Ubuntu 24.04上安装Python包时,我遇到了一个新问题:无法通过pip --user安装包。原来,这是由于PEP 668的实施所致,该提案旨在避免系统包和用户安装包之间的冲突。在本文中,我将详细解释这一变化,并提供如何在新环境下管理Python包的几种方法。 问题描…