MACRO: Display Large Text Notification v1.3

I just uploaded v1.1a, to fix a typo in the HTML file.

If you're wondering how this got past my testing, it's because I tested with the HTML file from my "development" folder, and forgot to copy it into the KM Action. D'OH!

A big thank you to @2326685899kk for spotting the error, and even going through the effort of tracking it down in the HTML file!

3 Likes

Sorry it has taken me so long to test v1.1a.

It is working quite well.

Thank you.

1 Like

I just uploaded v1.2, which allows fractional values (i.e. 0.5).

You can find it in the first post in this topic.

Dan, you are a genius. Fantastic ! Exactly what I was looking for. Incredible. Will replace all my text displays and notifications.

1 Like

Is there a way apart from a very long time to keep the text displayed until either the close X button or escape is pressed (no timer) ?
The rationale is that if it is something that has to be done, I close the window only after the task is completed.
thank you Dan

Yes - set the Timer Duration to 0. :slight_smile:

It's actually mentioned in the documentation, but it's OK that you asked. I just wanted to mention it in case the docs could answer other questions for you.

1 Like

Yes, you are right. I missed it and I'm sorry. I am going to read the docs again. Thanks again very much

Hi @DanThomas - This is great and very nice to use. Is there a setting for sharp corners or rounded corners? I thought there wasn't as it's not mentioned in the parameters. But your visual seems to show a mixture of the two types?

Looking at the image again, it looks like the rounded corners are proportional to the box size? Would there be a way to have a parameter set the absolute size of the rounded corners?

In the "Display Large Text Notification" macro, there's an action near the top named "Write HTML to temp file":

image

Inside it, it looks something like this:

image

The line above, highlighted in red, is the one that adds the rounded corners. Either delete that line, or comment it out like this:

#container {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	background: rgba(0, 0, 255, 0.8);
/*	  border-radius: 2vmax; */
	color: yellow;
}

That will do it.

If you'd prefer to make it optional, let me know and I can give you some ideas of how to do that.

1 Like

Thanks. I will take a look.

Thanks for this great macro @DanThomas, I've been using it successfully for a little while but wondered if you could help with this question?

I wanted to display some results from a macro is a simple column format, so I separated the data with TAB characters in a variable. If I use KM's "Display text in a window" action the tabs are preserved and the data displays in the columns as I expected, but if I pass the variable to the Display Large Text Notification subroutine it loses the tab formatting - it appears that tabs and multiple spaces are converted to a single space when displayed in the notification.

Is there a setting I'm missing to preserve tabs and multiple spaces? If not, is there a trick to formatting the text passed to the subroutine to preserve the display in columns? Or is it something that's not supported?

No, it's not currently supported. I'll think about it, but don't hold your breath. :joy: It's more complicated than you might think.

1 Like

Thank you for this Dan very helpful and so many times I have wanted something like this and had hit and miss results with 3rd party plug-ins that end up not showing up on other computers that I have Keyboard Maestro installed on at a later date.

You have so many things that enhance Keyboard Maestro I hope you and Peter can work more together directly.

1 Like

I don't work directly with him. And sometimes I wonder if I hadn't written some of the things I've written, he would have added them to KM in a more native way. LOL.

1 Like

I have wondered the same thing, if all the things you have written to enhance Keyboard Maestro was implemented they we would probably be on Keyboard Maestro 16 at this point haha. I do love that Peter is so methodical on what he does implement. I hope he has someone to work with and pass on his application to and let it live for decades to come!

4 Likes

While @DanThomas cogitates, you can (probably -- only quickly tested) spoof this yourself.

In the text you want to use, replace multiple spaces with multiple %00a0% -- the KM token for a Unicode "non-breaking space". Replace any tabs with four %00a0% tokens. Then pass the converted text to Dan's subroutine.

This isn't the same a "proper" tabs, with their alignment, but it will allow greater separation than a single space. You could go further and, with a monospaced font, add enough nbsps to correctly pad out the text -- running your text through a shell script action using column then replacing the spaces as above should do it (he said, waving hands vaguely...).

3 Likes

Thanks @Nige_S, that's a viable workaround. I'm displaying a short list of filenames followed by dates, but if I change it around and put the dates first they will all take up the same amount of space with a monospaced font, and then a few non-breaking spaces will allow the start of the filenames to align vertically and it will be much more readable.

This is great, @DanThomas, thank you!

I quickly solved for my use case by changing these two macros to show the system clipboard, either in the upper right, or right in the center of everything. (I often want to read my clipboard.) I like the design and positioning capabilities that go beyond the native functionality.

DRTC: Display Clipboard Large Text Notification Right Upper Hand Corner
DCTC: Display Clipboard Large Text Notification Center

Display Large CLIPBOARD Text Notification Macros.kmmacros (28.1 KB)

2 Likes

Thanks for posting though I am not sure I follow what you have done. Is there supose to be subroutines that are included with this? It got me thinking though about PasteBot and building a clipboard manager sequencer that you could have a pallet that you could copy repeatedly and see the contents of the clipboard in a growing window like "Paste From Sequential Queue". Learning about repeated keystrokes

hello @DanThomas
Since i have been using the macro multiple times a day, I ran into an issue, which is the inability to 1- drag 2- resize the notification.
Drag is useful when multiple notes happen to overlap or when I am working and want to remove the notification from my front window in which I am working or when the note in hiding part of the front window I am working in, and I want to come back to it later.
Resize is useful when I am working, see the notification and want to set it aside on my screen as a small reminder.
Both are possible in the display text in window action.
Would you consider adding those 2 features if you deem the effort worthwhile ?
thank you