diff --git a/@Resources/AsciiArtFonts/7Segment.inc b/@Resources/AsciiArtFonts/7Segment.inc index 3b2b272..5fad0f1 100644 Binary files a/@Resources/AsciiArtFonts/7Segment.inc and b/@Resources/AsciiArtFonts/7Segment.inc differ diff --git a/@Resources/AsciiArtFonts/Embossed.inc b/@Resources/AsciiArtFonts/Embossed.inc index ab3eeff..05ca8bd 100644 Binary files a/@Resources/AsciiArtFonts/Embossed.inc and b/@Resources/AsciiArtFonts/Embossed.inc differ diff --git a/@Resources/AsciiArtFonts/Fade.inc b/@Resources/AsciiArtFonts/Fade.inc index d23be8c..02b3205 100644 Binary files a/@Resources/AsciiArtFonts/Fade.inc and b/@Resources/AsciiArtFonts/Fade.inc differ diff --git a/@Resources/AsciiArtFonts/Fade3D.inc b/@Resources/AsciiArtFonts/Fade3D.inc index 38572d1..70a8bb1 100644 Binary files a/@Resources/AsciiArtFonts/Fade3D.inc and b/@Resources/AsciiArtFonts/Fade3D.inc differ diff --git a/@Resources/AsciiArtFonts/Hashtag3D.inc b/@Resources/AsciiArtFonts/Hashtag3D.inc index 758ba79..4814af1 100644 Binary files a/@Resources/AsciiArtFonts/Hashtag3D.inc and b/@Resources/AsciiArtFonts/Hashtag3D.inc differ diff --git a/@Resources/AsciiArtFonts/Pop.inc b/@Resources/AsciiArtFonts/Pop.inc index b930303..13a3e5c 100644 Binary files a/@Resources/AsciiArtFonts/Pop.inc and b/@Resources/AsciiArtFonts/Pop.inc differ diff --git a/@Resources/Variables.inc b/@Resources/Variables.inc index 21ba414..93c01b5 100644 --- a/@Resources/Variables.inc +++ b/@Resources/Variables.inc @@ -4,7 +4,6 @@ AsciiFont=Fade3D FontSize=14 +FontWeight=700 FontColor=255,255,255 -TimeFormat="%H%M" - -;only HH:MM formats are supported \ No newline at end of file +TimeFormat="%H%M" \ No newline at end of file diff --git a/AsciiClock.ini b/AsciiClock.ini index 9af7826..5614684 100644 --- a/AsciiClock.ini +++ b/AsciiClock.ini @@ -13,53 +13,74 @@ Information=A clock skin that uses Ascii art fonts @include=#@#Variables.inc @include2=#@#AsciiArtFonts\#AsciiFont#.inc -;time------------------------------------------------------------- +;Time------------------------------------------------------------- [MeasureTime] Measure=Time Format=#TimeFormat# +OnChangeAction=!CommandMeasure MeasureLua "SetMeasures()" + +[MeasureLua] +Measure=Script +ScriptFile=AsciiClock.lua ;Digit Isolation-------------------------------------------------- -[MeasureHourFirst] +[Measure1Char] Measure=String -String=[MeasureTime] -RegExpSubstitute=1 -Substitute="^.{0}(.).*$":"\1" DynamicVariables=1 -[MeasureHourSecond] +[Measure2Char] Measure=String -String=[MeasureTime] -RegExpSubstitute=1 -Substitute="^.{1}(.).*$":"\1" DynamicVariables=1 -[MeasureMinuteFirst] +[Measure3Char] Measure=String -String=[MeasureTime] -RegExpSubstitute=1 -Substitute="^.{2}(.).*$":"\1" DynamicVariables=1 -[MeasureMinuteSecond] +[Measure4Char] Measure=String -String=[MeasureTime] -RegExpSubstitute=1 -Substitute="^.{3}(.).*$":"\1" DynamicVariables=1 +;[MeasureHourFirst] +;Measure=String +;String=[MeasureTime] +;RegExpSubstitute=1 +;Substitute="^.{0}(.).*$":"\1" +;DynamicVariables=1 + +;[MeasureHourSecond] +;Measure=String +;String=[MeasureTime] +;RegExpSubstitute=1 +;Substitute="^.{1}(.).*$":"\1" +;DynamicVariables=1 + +;[MeasureMinuteFirst] +;Measure=String +;String=[MeasureTime] +;RegExpSubstitute=1 +;Substitute="^.{2}(.).*$":"\1" +;DynamicVariables=1 + +;[MeasureMinuteSecond] +;Measure=String +;String=[MeasureTime] +;RegExpSubstitute=1 +;Substitute="^.{3}(.).*$":"\1" +;DynamicVariables=1 + ;Font Convertion-------------------------------------------------- -[MeasureMinuteFirstAscii] +[MeasureHourFirstAscii] Measure=String -String=[MeasureMinuteFirst] +String=[Measure1Char] Substitute=#AsciiFontFace# DynamicVariables=1 -[MeasureMinuteSecondAscii] +[MeasureHourSecondAscii] Measure=String -String=[MeasureMinuteSecond] +String=[Measure2Char] Substitute=#AsciiFontFace# DynamicVariables=1 @@ -69,18 +90,26 @@ String=Colon Substitute=#AsciiFontFace# DynamicVariables=1 -[MeasureHourFirstAscii] +[MeasureMinuteFirstAscii] Measure=String -String=[MeasureHourFirst] +String=[Measure3Char] Substitute=#AsciiFontFace# DynamicVariables=1 -[MeasureHourSecondAscii] +[MeasureMinuteSecondAscii] Measure=String -String=[MeasureHourSecond] +String=[Measure4Char] Substitute=#AsciiFontFace# DynamicVariables=1 +;this is the only way i can get this not to spit out an error every second + +[Measure1CharFix] +Measure=String +String=[Measure1Char] +Substitute=" ":"1" +DynamicVariables=1 + ;Meter Config----------------------------------------------------- [MeasureBlink] @@ -91,6 +120,7 @@ Formula=MeasureBlink = 0 ? 255 : 0 FontFace=Jetbrains Mono FontColor=#FontColor# FontSize=#FontSize# +FontWeight=#FontWeight# Padding=0,0,(#FontSize#*#AsciiFontPadding#),0 AntiAlias=1 X=R @@ -98,20 +128,23 @@ DynamicVariables=1 ;Meters----------------------------------------------------------- -[MeterHourFirst] +[MeterHourSecond] Meter=String MeterStyle=TextStyle -MeasureName=MeasureHourFirstAscii +X=((#Wmax#*2*#FontSize#)-[#W[&Measure2Char]]*#FontSize#) +MeasureName=MeasureHourSecondAscii -[MeterHourSecond] +[MeterHourFirst] Meter=String MeterStyle=TextStyle -MeasureName=MeasureHourSecondAscii +X=(-[#W[&Measure1CharFix]]*#FontSize#)r +MeasureName=MeasureHourFirstAscii [MeterColon] Meter=String MeterStyle=TextStyle FontColor=#FontColor#,[MeasureBlink] +X=(#Wmax#*2*#FontSize#) MeasureName=MeasureColonAscii [MeterMinuteFirst] diff --git a/AsciiClock.lua b/AsciiClock.lua new file mode 100644 index 0000000..67492d9 --- /dev/null +++ b/AsciiClock.lua @@ -0,0 +1,26 @@ +function Initialize() + + SetMeasures() + +end + +function SetMeasures() + + local _temp = 0 + TimeMeasure = SKIN:GetMeasure('MeasureTime') + TimeValue = TimeMeasure:GetStringValue() + + if string.len(TimeValue) == 3 then + + TimeValue = " "..TimeValue + + end + + for cha in string.gmatch(TimeValue, ".") do + + _temp = _temp + 1 + SKIN:Bang("!SetOption", "Measure".._temp.."Char", "String", cha) + + end + +end \ No newline at end of file diff --git a/README.md b/README.md index c2ee4b8..72136f9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![AsciiClockPreview](https://i.imgur.com/VIIu5M6.png "AsciiClockPreview") +![AsciiClockPreview](https://i.imgur.com/bsODC18.jpg "AsciiClockPreview")
@@ -42,8 +42,8 @@ Pop
 
 ## Features
  * 6 Custom Ascii art fonts
- * Supports HH:MM time format
- * Scaleable
+ * Supports HH:MM and H:MM time formats
+ * Customizable font width, scale, and color
 
 ## Installation
 To install manually, download and open the latest .rmskin file avalible in [releases](https://github.com/underscore7/AsciiClock/releases)
@@ -53,5 +53,5 @@ To install manually, download and open the latest .rmskin file avalible in [rele
  
 ## Credits
  * JetBrains Mono Font - [Jetbrains](https://www.jetbrains.com/lp/mono/)
- * Wallpaper in Preview Image - [Tuesday Temptation](https://www.pexels.com/photo/purple-and-blue-light-digital-wallpaper-3780104/)
+ * Wallpaper in Preview Image - [Adrien Olichon](https://www.pexels.com/photo/black-sand-dunes-2387793/)