Code Monkey home page Code Monkey logo

desktopclock's Introduction

๐Ÿ•’ DesktopClock

Release License

Animation
Context menu

A digital clock app for your Windows desktop that stays on screen, ready whenever you need it.

  • Right-click to access essential options like size, time zone, format, and theme, or to create new clocks.
  • Double-click to copy the time to your clipboard, and scroll while holding Ctrl to resize the clock.
  • "Advanced settings" provides additional configuration options using JSON format.
  • Includes a countdown mode to set a timer for any specific date.

Got an idea or found a bug? Submit an issue!

Discover More

Explore my other apps:

Network Monitor - View live network latency and bandwidth usage on your desktop like the clock.

JournalApp - Write notes & keep track of your mood, medications, and more with a versatile journaling app.

Credits

desktopclock's People

Contributors

danielchalmers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

desktopclock's Issues

Right Justification

I have another problem, but it doesn't always happen. This is with the latest 4.0 code from Github.

Sometimes I start the program and the time ends up too far to the right, with part of it off the right side of the screen. Or left of where I want it.

Or sometimes it will start in the position I want, but when the time changes it jumps over to a position to the right, or to the left. It usually happens while I'm not looking or it's under another window.

Here's an example of my setup file. You can probably use "Arial" instead of "Crewniverse" and still get the problem. Note also that I'm using a bog standard 1920x1080 monitor, so the positioning may not be the same as on your screen.

{
  "Format": "t",
  "CountdownFormat": "",
  "CountdownTo": "0001-01-01T00:00:00",
  "TimeZone": "",
  "FontFamily": "Crewniverse",
  "TextColor": "#FFFE97B5",
  "OuterColor": "#FFFFFFFF",
  "BackgroundEnabled": false,
  "BackgroundOpacity": 0.0,
  "BackgroundCornerRadius": 0.9,
  "OutlineThickness": 2.0,
  "Topmost": false,
  "ShowInTaskbar": false,
  "Height": 130,
  "RunOnStartup": true,
  "DragToMove": true,
  "RightAligned": true,
  "TipsShown": 0,
  "Placement": {
    "Length": 44,
    "Flags": 0,
    "ShowCommand": 1,
    "MinimizedPosition": {
      "X": -1,
      "Y": -1
    },
    "MaximizedPosition": {
      "X": -1,
      "Y": -1
    },
    "NormalBounds": {
      "Left": 1467,
      "Top": 814,
      "Right": 1915,
      "Bottom": 944
    }
  }
}

I have a theory about what is happening. When the digits of the time change, the resultant graphical representation of the time changes. It remains the same height, but with a large font (and an even larger outline) the width can change by quite a bit. Think of the difference in width of a zero vs a one, or going from "9:59" to "10:00".

Note also that I have set

"RightAligned": true,

I assume that this is supposed to position the time so that it is right justified. I want it to be close to the right side of the screen. What I suspect is that somewhere in the code the values of "Left" and "Right" are being re-calculated assuming that the time is to be left justified, ignoring this flag. Which would explain the right-left movement I'm getting. If the time is supposed to be right justified, the value of "Right" should never change, just "Left". And of course when it's left justified, "Left" should never change, just "Right".

That seems to be what the code in "Window_SizeChanged()" is trying to do.

    private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
    {
        if (_hasInitiallyChangedSize && e.WidthChanged && Settings.Default.RightAligned)
        {
            var previousRight = Left + e.PreviousSize.Width;
            Left = previousRight - ActualWidth;
        }

        // Use this to ignore the change when the window is loaded at the beginning.
        _hasInitiallyChangedSize = true;
    }

But maybe one of the flags you are checking is set wrong? Or shouldn't be checked?
Another theory: It might be calling this code more than once?

I tried messing around with the logic a little but it only made it worse. Just grasping at straws here.

Am I interpreting this correctly? Does this make sense?

Request: New Time Format

Love your DesktopClock.
The format I find most useful is Monday, November 27, 09:18 HOWEVER the military time (24 hour time confuses me.)

Could you PLEASE add a Format just like that one, but with AM/PM time?

Monday, November 27, 05:30 PM.

Thank you very much for considering this request.

always crashed while clicking "Settings..."

  1. As title.
  2. I have to re-do all the settings about font size, color, location... etc each time I restart my computer.
  3. My OS: Windows11 64bit HomeEdtition.

So, please help to fix it asap. thank you.

Request: Textures

I think it would be great to use a tiled bitmap instead of a colour, either for the background, or especially for the actual date or time. As I use large fonts, this would work well for me. I understand that this might not be a priority for you Daniel. You may just want a simple clock that sits there doing it's job.

BTW you may not be aware of a program for Linux named Variety. It works very differently from your DesktopClock, and a desktop clock is just one of it's many functions. But it is what inspired my interest in your project.

Totally Lost Noobie Here

So I'd like to put this clock on my desktop. However, I have no idea how to do this. I do have an account with GitHub but have no idea how to proceed. Can anyone guide me to a tutorial or explain how this is done?

Thanks in advance.

Hide from Alt+Tab

Hello, Is it possible to hide DesktopClock while switching between windows with Alt+Tab?

DesktopClock.not.hidden.when.ALT+TAB.mp4

Clock is missing the last minute

I have tried DesktopClock 3.0.0 and 3.1.0 beta 2 but both versions show the same issue:
If I select the format "t" (09:00) it doesn't show the last minute:
image
If I select the format "T" everything is displayed completly/correctly:
image
How can I fix this?
This is the content of the settings file:

{
  "Format": "t",
  "CountdownFormat": "",
  "CountdownTo": "0001-01-01T00:00:00+00:00",
  "TimeZone": "",
  "FontFamily": "Consolas",
  "TextColor": "#FF212121",
  "OuterColor": "#FFF5F5F5",
  "BackgroundEnabled": false,
  "BackgroundOpacity": 0.9,
  "OutlineThickness": 0.2,
  "CornerRadius": 1.0,
  "Topmost": true,
  "ShowInTaskbar": false,
  "Height": 40,
  "RunOnStartup": true,
  "DragToMove": true,
  "RightAligned": false,
  "Placement": {
    "Length": 44,
    "Flags": 0,
    "ShowCommand": 1,
    "MinimizedPosition": {
      "X": -1,
      "Y": -1
    },
    "MaximizedPosition": {
      "X": -1,
      "Y": -1
    },
    "NormalBounds": {
      "Left": 1687,
      "Top": 5,
      "Right": 1800,
      "Bottom": 55
    }
  }
}

Clock resetting

First off, thank-you for your work on a useful utility :)

(quick edit, by moving the desktopclock.exe away from my C: drive root into another directory, the advanced settings button now brings up a notepad doc with the code, but it does not update with position, font & other personalisations)

I used the installclock.msi & set it up as I like, then clicked the start with PC. The clock does start with PC but each day the personalisations are reset, so each day it starts in the top left no matter where I position it & also the colour & background settings reset. The start with PC option is also unchecked at this point. Not sure if I am missing something obvious or of this is a helpful report. If I click on advanced settings, the option does nothing & results in no action. Let me know if you want a sysinfo or similiar.

Thanks

system tray

Just a suggestion for a future update: can you move the icon to the system tray on the bottom right hand side of the screen. Minor things, no idea if this is easy or convoluted.

Multimonitor issue

Hello,
A great tool, sir!
I have a small problem with my 3 monitor configuration. When DesktopClock starts automatically, it starts 3x, and I have to close the two extra clocks manually. So if you could fix this problem in your next update, that would be great. I would also appreciate the right alignment option in the menu (or docking to the side without overflowing).
thank you.

Fails to save settings when shutting down Windows 11

If I move the clock somewhere and set its color etc, it only remembers the setting if I close the window myself before shutting down the computer.

If I let the Windows shutdown sequence close the app, then it has default settings again next time I start it.

Missing am/pm with some fonts?

Finding odd behavior (Windows 11, version 3.0 of DesktopClock).

I have date format set to:
M/d h:mm tt

If I select some fonts (like Calibri), the space where am/pm should appear has space allocated for display but is just blank.

If I select other fonts (like Consolas) or use "M/d h:mm t" to just show a single character for a/p, it appears as expected.

Time from internet

Hi,
Thank you for your tool is very nice!
I need to take date time from internet and not from my pc. My pc takes date time from comany's server and it is uncorrect and also i can't change this setting.
It would be nice having this feature in your tool!
It's only an idea but i think could be useful to other people.

I have already modified the code taking time from this function

public static DateTime GetNistTime()
{
var myHttpWebRequest = (HttpWebRequest)WebRequest.Create("http://www.microsoft.com");
var response = myHttpWebRequest.GetResponse();
string todaysDates = response.Headers["date"];
return DateTime.ParseExact(todaysDates,
"ddd, dd MMM yyyy HH:mm:ss 'GMT'",
CultureInfo.InvariantCulture.DateTimeFormat,
DateTimeStyles.AssumeUniversal);
}

I modified the code to satisfied my needs but to integrate this function as a configurable feature it's a littel bit harder :)

Thanks!

Calendar week

Hello

Please add w for calendar week

For Example: HH:mm:ss -dddd, d MMM yyyy- w

Kind Regards

Peter

Request: Drop Shadow

I would like to request the option to have a drop shadow for the display.

I would like it to have options to set the colour and the transparency.
In an ideal world the ability to set how sharp or blurred the shadow is as well as the shadow depth/offset.

Here's hoping that it is feasible.

Of course if that is not tricky enough for you, if you were ever able to set multiple lines the ability to have independent line settings as well as a global shadow setting would be awesome.

How to install

There are no instructions on how to install. is there an executable file to start the installer or start the program?

New format - just the time, no pm or am

I'm good at knowing if the time is PM or AM. How about a time-only format (no date) that excludes the PM and AM, i.e 10:26? The extra characters get in the way of my positioning the clock advantageously. Please let me know if there's a way to do this with advanced settings.

Setting Requests

Here are some settings I highly recommend adding in a future version of DesktopClock. While I really appreciate how it works, I really can't help but think there are some features that are missing for the DesktopClock, in order to be my new go-to portable clock app on Windows 11. Two of them to be more specific. So listen closely, and take notes, Daniel!

  • Disable Dragging (This way, the clock stays in the position even when you click on it. However, its right-click menu should still be accessible when Disable Dragging is enabled at anytime.)

  • Text Alignment Settings (Left, Center, and Right). This setting is pretty important. Because, let's say I want to display the current time in the right text alignment without a leading 0 sometimes (i.e., H:nn). This way, the numbers don't move when, say for example, the clock hits 10:00 AM, or 10:00 in 24-hr. format.

Pre-release without signed author

I cannot install pre-release as they are not signed and I have no administrator privileges:
image
Can you change this for future builds please?
Microsoft Store is blocked for me as well.

Support for multi-line date format

Would it be possible to support multi-line dates?

If I try putting a newline character in a date it just cuts off the second line.

I'd like to have a taller display that includes the day of the month and the time on separate lines.

Formatting to include the time and or custom text..

It would be nice to have the ability to see the time and selected time zone, especially with multiple clocks. Perhaps an even easier solution would be to include the ability to input custom text. I did try to poke around the advanced settings file but it would not allow for additional text. Thanks so much for this awesome app. A real time saver! ;)

example: someTextHere Sunday, Jan 29, 10:05:02

DesktopClock.exe V4.1.0 does not open in Windows 11 - File deemed as a threat

While I could not use or even download completely the file DesktopClock.exe (even when indicating that it was safe), I was able to successfully download the .msi file with Edge browser (not Chrome) after insisting that I keep it.
Something in those files triggers the threat protect mecanism.
Be that as it may, I was finally able to install DesktopClock with the .msi file.
However, the "Show background" feature does not work. The background is always there whether I toggle or not the Show Background.
In the settings file, changing the "BackgroundEnabled": from true to false, does not change anything.
I had to put the "BackgroundOpacity": to 0.0,
Thank you for your kind assistance.

Large "OutlineThickness" is clipped

First thanks for an excellent piece of software.

I'm using version 3.1.0.0 built from the unmodified source code today (Nov 1/2023).

I want a large digital clock with a large "blobby" white outline (yeah I know, I'm weird). Your program works really well for this, except it clips the outline at the top and left when "OutlineThickness" is set to more than about "1.0". I would like to use an outline of 3.0 or so.

I am using the "Crewniverse" font. Changing to the "Consolas" font fixes the problem, but the reason I chose your program (beside it being open source) is that it lets me set the font to what I want.

Here's an example:

image

I fiddled with the "DesktopClock.settings" with no effect. Maybe this is an basic limitation of the program right now?

Here's my "DesktopClock.settings":

{
  "Format": "t",
  "CountdownFormat": "",
  "CountdownTo": "0001-01-01T00:00:00+00:00",
  "TimeZone": "",
  "FontFamily": "Crewniverse",
  "TextColor": "#FF7458D3",
  "OuterColor": "#FFFFFFFF",
  "BackgroundEnabled": false,
  "BackgroundOpacity": 0.0,
  "OutlineThickness": 3.0,
  "CornerRadius": 3.0,
  "Topmost": false,
  "ShowInTaskbar": false,
  "Height": 160,
  "RunOnStartup": true,
  "DragToMove": true,
  "RightAligned": false,
  "Placement": {
    "Length": 44,
    "Flags": 0,
    "ShowCommand": 1,
    "MinimizedPosition": {
      "X": -1,
      "Y": -1
    },
    "MaximizedPosition": {
      "X": -1,
      "Y": -1
    },
    "NormalBounds": {
      "Left": 1228,
      "Top": 780,
      "Right": 1902,
      "Bottom": 940
    }
  }
}

Thanks for any assistance.

t

Rounded corners

Is there any way to disable the rounded corners on the background? If not, could it be added to the config file? When placing the clock in the corner of the screen it would look better without them.

On top of the Toolbar

It would be nice if the clock would be also on the top of the toolbar ( it stays that way till there is open anything else.

The MONTH and DAY could be in CAPITOL LETTERS or like in Sentence Month Day
And maybe it would be better without separation marks , . ...but in front of the hour it could be -

Cannot start the Desktop Clock App V4.0 or install it with the msi file in Windows 11

For some reason, while I can install previous versions on my computer (Windows 11), when i try to start the DesktopClock.exe V.4
or the install.desktopClock.msi nothing happens.
I just cannot install or use the latest version while I can do it with previous versions.
I love your App. Your assistance would be appreciated.
PS I even disabled Norton 360.

Show/Hide Desktop

The command for hide desktop (Win + D) hides the clock.

Sometimes showing after hiding doesn't show all apps if it's been a while, so the clock completely disappears.

downoad Desktopclock

How can I download Desktopclock? There is no visible download button. And I am not even very old.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.