Show Date/Time in Popup [excluding default theme] Thread last updated on 2007-11-02 15:38:29

Posted by member 387987 on 2007-10-30 23:16:16

I'd like to show the date/time in my popup menu on one of the themes I'm using, but it turns out, the only one it'll work on is the default theme. I need a clock, but I don't like rainmeter.

Posted by member 256241 on 2007-10-31 08:57:08 link

if you're using xPopup (which you should be), create an info label as an entry (read docs), then set the text to something like : time('ii:nn')]

Posted by member 1 on 2007-10-31 13:36:13 link

And you do realize that you don't have to use rainmeter to get a clock on your screen, there are other modules out there.

Posted by member 387987 on 2007-10-31 15:56:26 link

I'm using xPopup [I had to update ls to use the theme, and that was one of the things it downloaded when I first used the theme] but docs aren't available? What other modules could I use? I'm aware I could use anything, but I wouldn't like a third-party app when I could just use the system clock.

Posted by member 212670 on 2007-10-31 16:02:23 link

In the default popup, Litestep >> module docs. That's not available to you?

Posted by member 387987 on 2007-10-31 16:14:10 link

I've kinda customized my popup, but I didn't start editing it from scratch, I started from someone else's already customization. Care to explain what I need to do?

Posted by member 1 on 2007-10-31 16:51:16 link

Why would you remove the LiteStep docs folder from your Popup? UGH! It is in $LiteStepDir$modules\docs

Posted by member 387987 on 2007-10-31 16:56:36 link

:P I didn't think about where they'd actually be until I searched around in my dir. I found it, and found the code snippet, I have it working in a popup menu like so..

*Popup "Time" Folder
*Popup !info "[time('hh:nn:ss')]"
*Popup ~Folder


Thing is though.. the text doesn't center in any of my themes for the popup box, and the font doesn't follow. Where do I edit the settings for this?

--edit

Also, I would have everything perfect if I could get this centered/adjusted properly, but since I can have my tasks in the popup menu, is it possible to have system tray in there aswell?

Posted by member 1 on 2007-10-31 18:00:36 link

Yes...there is a theme that does that all already in the themes section...just can't remember the name of it.

Posted by member 212670 on 2007-10-31 21:10:20 link

Look up "hooking" in the xpopup manual.

Posted by member 387987 on 2007-10-31 21:46:57 link

Ok.. I looked up hooking. Just a tadbit confusing. ..I know Im being a drag but any help with the hooking? @Devil: I'd like to add the tray into my current theme, not use a new one.

Posted by member 212670 on 2007-10-31 23:55:37 link

Quick and dirty:

OTSMajorVersion 2
OTSMinorVersion 0

ThemeName "xTrayHook"
ThemeAuthor "xcal"

*NetLoadModule jdesk-0.73
*NetLoadModule xTray-1.0
*NetLoadModule xpopup-1.2.5

xTrayLoadInBox true

xTrayWidth 120
xTrayHeight 40

xTrayWrapCount 6

xTraySolidColors A6A6A6 FFFFFF
xTraySolidBevelSize 1

xPopupAutoMenuBreak true

xPopupEntryFontLeftBorder 18
xPopupEntryFontRightBorder 4
xPopupUseSolidColors true
xPopupSolidColors A6A6A6

*Popup "" !New !PopupTheme
*Popup !hook:0:0:120:40 !xTrayLSBoxHook %%!xTrayMove X Y%%
*Popup "Some Entry" !Alert "Some Entry"
*Popup ~New


Just stick that in a theme.rc in some folder in the folder where your themes are. Refresh your theme's list and pick it. Use shift + left click to bring up the menu with the tray in it. If you want the tray in your main menu, you'll have to add the hooking to your popup in your personal folder. Note: The xtray module MUST be loaded before xpopup for this to work.

Posted by member 32550 on 2007-11-01 05:46:39 link

Thing is though.. the text doesn't center in any of my themes for the popup box, and the font doesn't follow. Where do I edit the settings for this?

You can modify the text of the !info entries with the "Info" prefix.
Exactly the same way and settings as for the normal "Entry", "ActiveEntry", "Folder", ...

xPopupInfoFontLeftBorder 18
xPopupInfoFont...

Posted by member 387987 on 2007-11-01 07:42:42 link

Look guys, I'm not very good with code. xcal thx for that, but I'd like to be able to do it on a theme I'm already using, not an entirely new one. And do what ls-universe? Where's this infoprefix with the entry/activeentry?

Posted by member 212670 on 2007-11-01 10:14:43 link

You don't have to write a whole new theme... that was merely an example of how to do it, so you can compare it to the help file and understand what's going on and add it to the theme you're using.

Posted by member 1 on 2007-11-01 10:35:06 link

Yea...and honestly...if you can't look at a simple example like that and work it into what you are looking for...LS may not be for you. I don't mean to push you away...but that is a good example of someone actually going to extra mile to help someone out. Help really doesn't go much further beyond that...ever.

Posted by member 387987 on 2007-11-01 16:06:48 link

I don't just look at code and give up on it. I played with a bit more, realizing that the way you edited it was simliar to how 'entry' was already listed in theme.rc. I finally figured out where you guys were getting xTrayLoadinBox, and that was for a tray in my popup, not just editing the info tag. I'll look a bit more into the tray in popup thing, but I've learned to live without. Thanks again ;]

Posted by member 256241 on 2007-11-01 17:32:20 link

I edited my theme to have a tray in a popup, it was awesome. Great for minimalist themes. At first I hooked it into the popup, but I couldn't get !popuptasks and the tray to appear at the same time, so in the end I used xTaskbar to replace !popuptasks and xTray for the tray, then used a script to move/show/hide them together.

Posted by member 1 on 2007-11-01 19:13:04 link

You know you can just put !PopupTasks in your regular popup right? If you do that then you can link them all.

Posted by member 256241 on 2007-11-01 21:52:40 link

me? yeah, but I never found a way to have:

|----------------------------|
| tray
|----------------------------|
|
| tasks
|
|
|
-----------------------------|

as in, not have !popuptasks as a folder which you can open from the popup.

Posted by member 387987 on 2007-11-01 22:09:16 link

Sounds good. Let's figurrre it out.

Posted by member 1 on 2007-11-02 11:14:59 link

Update: Oops...wrong link...sorry. Here is the link to both themes. That is what I get for doin stuff whiel working.

LINK

LINK

Found the theme with all of that done.

Posted by member 387987 on 2007-11-02 15:38:29 link

Uhh what devil? Thats a pic.. umm without a tray in the popup. I tried looking for the name of the theme the pic was titled 'laserdesk doublevision' and didn't come up with anything..