This zone is sleeping right now! ZzzZZzzz

Better not disturb it! ~You go to the petrol station and buy a slushy instead, everything is cool!~

This area will open again in 000.beats!

(Learn about Swatch Time)

Some other zones are awake :^]


Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
Autumn, 05 Oct 2026 - @90.44
Forum Activity: Four Stars Random | Recent Posts | Guild Recents
News: Love is not possession  :4u: Guild Events: Halloween Watch-a-thon
Super News: ~~MelonLand's Halloween Profile Design Contest 2026~~
+  MelonLand Forum
|-+  Da Web Revival
| |-+  ☆ ∙ Things that exist!
| | |-+  GNOME Swatch Clock


« previous next »
Pages: [1] Print Embed
Author Topic: GNOME Swatch Clock  (Read 2209 times)
Rol
Full Member ⚓︎
***
View Profile WWW


⛺︎ My Room

Artifacts:
First 1000 Members!Joined 2023!
« on: Spring, 29 Apr 2023 @637 » Toggle Font Embed

I had mentioned I was making a Swatch Internet Time extension for GNOME, and now it's finally on the extension store.
I initially had made it pretty quickly, but I forgot to check if it was compliant with the guidelines  :drat: , so I fixed all that last night and submitted it again.

https://extensions.gnome.org/extension/5946/swatch-clock/

https://extensions.gnome.org/extension-data/screenshots/screenshot_5946.png

Additionally, a modified version of the script on the Wiki I made to make the code a bit more clean for the extension.
Code
function getSwatchTime() {
    const date = new Date();
    const [hours, minutes, seconds, milliseconds] = [
        (date.getUTCHours() + 1) % 24,
        date.getUTCMinutes(),
        date.getUTCSeconds(),
        date.getUTCMilliseconds()
    ];
    const timeInMilliseconds = ((hours * 60 + minutes) * 60 + seconds) * 1000 + milliseconds;
    const millisecondsPerBeat = 86400;
    const swatchTime = Math.abs(timeInMilliseconds / millisecondsPerBeat);
    return `@${swatchTime.toFixed(2)}`;
}

« Last Edit: Spring, 29 Apr 2023 @836 by Okato » Logged
Memory
Guest

« Reply #1 on: Spring, 08 May 2023 @285 » Embed

[removed by author]

« Last Edit: Summer, 31 Jul 2024 @620 by Memory » Logged
Memory
Guest

« Reply #2 on: Spring, 08 May 2023 @321 » Embed

I must ask, what is a Swatch Clock and what are it's use cases?

Logged
Rol
Full Member ⚓︎
***
View Profile WWW


⛺︎ My Room

Artifacts:
First 1000 Members!Joined 2023!
« Reply #3 on: Spring, 08 May 2023 @690 » Toggle Font Embed

this is really cool!!

would be extra cool to see if you could make it available for other systems like wayland, kde and dwm

in fact, i remember being inspired when i first saw this post to make something similar to work in tmux (because im an old-fashioned TTY user :P), which ive got here!

either way, nice work!!!
There isn't really much to it, other than a JavaScript function and the code that makes GNOME display it. It shouldn't be too hard to make for other desktops. Also, Wayland is a display server, not a desktop like KDE or DWM.

I must ask, what is a Swatch Clock and what are it's use cases?
There's a page on the wiki about Swatch Internet Time! It explains it pretty well.

Logged
Memory
Guest

« Reply #4 on: Spring, 09 May 2023 @039 » Embed

There's a page on the wiki about Swatch Internet Time! It explains it pretty well.

Oh I see, too bad it isn't used much.

Logged
Pages: [1] Print Embed 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | Send Feedback | Supporters ♥ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi
@000 Melon
Land
Forum Art Hub Chat Webring Explore Random Recent Tenement Arcade Want to Login or Join ? Web Craft Guide Graphic Catalogue Wiki Help I'm Lost! Link Land Newsletters Image Stream Minecraft: Online
Zap!
Passport Sites tamaNOTchi Asatte Add your site?
Aero Archive Onio Cafe 32 Bit Cafe Status Cafe