From c629977b4b075e26f63c55eb0008d3548f525a44 Mon Sep 17 00:00:00 2001 From: und_rscore <150409161+underscore7@users.noreply.github.com> Date: Sat, 11 Nov 2023 20:02:30 -0500 Subject: [PATCH] new stuff pog --- @Resources/AsciiArtFonts/7Segment.inc | Bin 1820 -> 1960 bytes @Resources/AsciiArtFonts/Embossed.inc | Bin 2408 -> 2560 bytes @Resources/AsciiArtFonts/Fade.inc | Bin 2100 -> 2252 bytes @Resources/AsciiArtFonts/Fade3D.inc | Bin 3048 -> 3200 bytes @Resources/AsciiArtFonts/Hashtag3D.inc | Bin 3064 -> 3216 bytes @Resources/AsciiArtFonts/Pop.inc | Bin 3242 -> 3386 bytes @Resources/Variables.inc | 5 +- AsciiClock.ini | 91 +++++++++++++++++-------- AsciiClock.lua | 26 +++++++ README.md | 8 +-- 10 files changed, 94 insertions(+), 36 deletions(-) create mode 100644 AsciiClock.lua diff --git a/@Resources/AsciiArtFonts/7Segment.inc b/@Resources/AsciiArtFonts/7Segment.inc index 3b2b27242451db82c4fb679dc14bbce3ab661438..5fad0f19dab4e12bf5521cc8c29140b3a7ba6729 100644 GIT binary patch delta 153 zcmbQkw}OAe0;YNo23rPG23`g(hHxOu0Ln5%5;a0%8zZqzkl3b3Y%?UbITG6viERL5 U^8l^QWk_VG010fK&s56-0I(zyga7~l delta 16 XcmZ3%KZkF_0;b6&Ok$gznA2DQGN1)D diff --git a/@Resources/AsciiArtFonts/Embossed.inc b/@Resources/AsciiArtFonts/Embossed.inc index ab3eeffcf8ed66eecb1da74c6b9a9c66cf821b34..05ca8bdcef1d206345fd55098192dfec6b295835 100644 GIT binary patch delta 165 zcmaDM)F86q3v;~(gDry@11|#?LpYFS0A(2h*(Ol75t0gHB(@0>+Z2gy24tH<^_nAz eTOf&B!q^f(YYku=AUl^Kk)Z;_-~5@mlobHenG}Zr delta 12 TcmZn=c_Fmn3-jh4mJ(I~BY*_* diff --git a/@Resources/AsciiArtFonts/Fade.inc b/@Resources/AsciiArtFonts/Fade.inc index d23be8c190bcacda5ab765e04b6d2941b51d6abc..02b3205eb60b0ba6bedcd02741a690416367df0d 100644 GIT binary patch delta 165 zcmdlYa7J*019QCxgDry@11|#?LpYFS0A(2h*(Ol75t0gHB(@0>+Z2gy24tH<^_nAz eTOf&B!q^f(YYku=AUl^Kk)Z;_-)ztPl?4E7`V+AL delta 16 YcmX>jxJ6)t1M_4NX0grhnD4Ow05bUn+W-In diff --git a/@Resources/AsciiArtFonts/Fade3D.inc b/@Resources/AsciiArtFonts/Fade3D.inc index 38572d12d5aa9b3530c780aa74115760f1a6294a..70a8bb119402ff65a179402db8a6490acbf9bf68 100644 GIT binary patch delta 165 zcmaDM-XOVQ0ZY9HgDry@11|#?LpYFS0A(2>i5daf7Ep0xAln?uHbD|MMPi#FvCWa# h7D#MMAlnjTjs(zJ0~iO$&Sgksr~vUd&u8&u2LP#{6Vw0z delta 16 XcmZpWd?CJJ0n6kP7O~BKtVZkrHAV$Z diff --git a/@Resources/AsciiArtFonts/Hashtag3D.inc b/@Resources/AsciiArtFonts/Hashtag3D.inc index 758ba79a13a12c89da2abba95ce6be6eca349701..4814af1b641aaba617ba167b57a1623ab89f698a 100644 GIT binary patch delta 165 zcmew%K0$KB0+xCY23rO*23`g(hHxOu0Ln5%5;X#{EuiAYK(;xQZGt3jio`ZUVw)qe hEs)rjK(-~w90{Pc1~3kgoy(BOPyym^p3f4=4gkJD6a)YO delta 16 XcmbOr`9ple0+z`oEMlAeSe@7bH%0}0 diff --git a/@Resources/AsciiArtFonts/Pop.inc b/@Resources/AsciiArtFonts/Pop.inc index b930303d1d0c3db0bc75c6f62c58132951f3060f..13a3e5c467f5bc911d0836ef515d1de87d2650ac 100644 GIT binary patch delta 178 zcmZ1_xl3xp2bOvd23rPm23`g(hHxOu0Ln5%5;a0%8zZqzkl3b3Y%?UbITG6fiERmE mO8~7kfN_BAT!uu33J`xYGwVXu$sMdblMUEKHt*p2#0UWQmKa6= delta 41 xcmdlbwMufs2Nr%_1}+9=24{vK1|J4D2Ia~7S)@15W9?#{ynsh!vj_JlMgZj#3vmDd 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/)