Home Events! Entrance Everyone Wiki Search Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
November 24, 2024 - @722.38 (what is this?)
Forum activity rating: Three Stars Posts: 42/1k.beats ~ Boop! The forum will close in 278.beats! Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts    Start New Topic
News: :ha: :pc: Hello Melonland! :pc: :happy:

+  MelonLand Forum
|-+  World Wild Web
| |-+  ☆ ∙ Showcase & Links
| | |-+  GNOME Swatch Clock


« previous next »
Pages: [1] Print
Author Topic: GNOME Swatch Clock  (Read 887 times)
Rol
Jr. Member
**


Silly Miltank

⛺︎ My Room

View Profile WWW

First 1000 Members!Joined 2023!
« on: April 29, 2023 @637.20 »

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/



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: April 29, 2023 @835.57 by Okato » Logged

Quote from: melooon
you: Hello fridge, I would like the milk please :cheesy:
fridge: Ooo u look so pretty, lemmy order more onions from Amazon
you: wait no! :drat:
fridge: i love you so much i ordered onions!


Memory
Guest
« Reply #1 on: May 08, 2023 @284.78 »

[removed by author]
« Last Edit: July 31, 2024 @620.22 by j » Logged
Icey!
Sr. Member ⚓︎
****


Icey/Iceys

⛺︎ My Room

View Profile WWW

First 1000 Members!Pro Bug Finder!OG! Joined 2021!High Speed Ozwomp!
« Reply #2 on: May 08, 2023 @321.37 »

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



:ozwomp: my beloved

Rol
Jr. Member
**


Silly Miltank

⛺︎ My Room

View Profile WWW

First 1000 Members!Joined 2023!
« Reply #3 on: May 08, 2023 @689.72 »

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

Quote from: melooon
you: Hello fridge, I would like the milk please :cheesy:
fridge: Ooo u look so pretty, lemmy order more onions from Amazon
you: wait no! :drat:
fridge: i love you so much i ordered onions!


Icey!
Sr. Member ⚓︎
****


Icey/Iceys

⛺︎ My Room

View Profile WWW

First 1000 Members!Pro Bug Finder!OG! Joined 2021!High Speed Ozwomp!
« Reply #4 on: May 09, 2023 @38.74 »

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



:ozwomp: my beloved

Pages: [1] Print 
« previous next »
 

Vaguely similar topics! (3)

Mimosa and the Clocktower - A Gamemaker project

Started by Historia-QBoard ⚽︎ ∙ Arcade ~ Post ur games!

Replies: 30
Views: 1841
Last post November 10, 2024 @95.66
by Historia-Q
Touch Grass - An Internet Time Clock

Started by erikhoudiniBoard ☆ ∙ Showcase & Links

Replies: 1
Views: 773
Last post May 15, 2024 @176.13
by Cobra!
Swatch dates?

Started by RolBoard ☌ ∙ Melon's Laboratory

Replies: 2
Views: 352
Last post October 16, 2024 @673.50
by asterhalloween

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies 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