Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
a Summer night - @100.88
Activity rating: Three Stars Posts & Arts: 44/1k.beats ~ Boop! The forum will close in 900.beats! Random | Recent Posts | Guild Recents
News: :sleep: These are fast times on the World Wide Web~ Guild Events: There are no events!

+  MelonLand Forum
|-+  Projects & Art
| |-+  ☆ ∙ Web Projects
| | |-+  GNOME Swatch Clock


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


Silly Miltank
⛺︎ My Room

Artifacts:
First 1000 Members!Joined 2023!
« on: a Spring day » 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: a Spring night 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 https://i.imgur.com/uZLjwdg.png
you: wait no! :drat:
fridge: i love you so much i ordered onions!


https://virosm.net/microbar.png
Memory
Guest

« Reply #1 on: a Spring night » Embed

[removed by author]

« Last Edit: a Summer day by Memory » Logged
Memory
Guest

« Reply #2 on: a Spring day » Embed

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

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


Silly Miltank
⛺︎ My Room

Artifacts:
First 1000 Members!Joined 2023!
« Reply #3 on: a Spring day » 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

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 https://i.imgur.com/uZLjwdg.png
you: wait no! :drat:
fridge: i love you so much i ordered onions!


https://virosm.net/microbar.png
Memory
Guest

« Reply #4 on: a Spring night » 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 MelonLand Editor Recent Edits Tenement Arcade Want to Login or Join ? Forum Art Hub Chat Webring Web Guides Graphics Catalogue Wiki Newsletters Image Stream
Melon's Sites TamaNotchi Textures PixelSea GifyPet MoMG Ozwomp Online Loom Videos Leaky Webring Melonking
Tools Melon Software ArtHub Embed Maker ML Passports
Outlinks Frutiger Aero Forum Onio Club m15o's Web Services 32Bit Cafe iMood Webrings Internet Phone Book HTML Energy Declarations Hackers & Designers
Zap!
Minecraft: Online
Join: craft.melonking.net