Custom Tray Notifies 1.5
This addon creates a nice looking window above your taskbar which can be filled with text, icons and other nice looking things./ctnotify
Creates, shows and deletes a notify./ctnotify -n
/ctnotify -n [name]
Creates a new notify with the name [name]. Needs to be called befor any other /ctnotify-alias is used.
Notes:
- Without setting the +d-flag at /ctnotify -o a notify won't be deleted after using it. So you don't have to create a new one every time.
- All notifies will be stored in the hash table "notify" for maximum speed.
- An existing notify can be edited as you want (if it is not shown - on-the-fly-editing may be added in the future). If you need two notifies with just different headlines creating two isn't needed. Instead create one and edit it.
/ctnotify -c
/ctnotify -c [name] [rgb value1] [rgb value2] [rgb value3] [rgb value4] [rgb value5]
Sets the colors of a notify.
Notes:
- Each of the five values is needed, if you don't apply a theme!
/ctnotify -t
/ctnotify -t [name] [theme name]
Applies a theme to the notify. [theme name] can be:
Notes:
- If using a theme /ctnotify -c isn't needed.
- First using /ctnotify -c and then /ctnotify -t (or other way round) will overwrite the first setting
- The future will bring more and own themes.
/ctnotify -i
/ctnotify -i [name] [+s] [icon path]
Adds an icon to the notify. If +s is set the icon will be small and displayed beneath the headline.
Notes:
- Optional
- At the moment there is no! good .ico-support, just bmp, png and jpg are displayed correctly.
- If +s is set you can choose an icon
- The icon must have the same background color as your notify for a good look.
/ctnotify -h
/ctnotify -h [name] [text]
Sets the headline text.
Notes:
- Optional
- If no headline text is set, no headline background will appear.
/ctnotify -s
/ctnotify -s [name] [text]
Sets the text.
Notes:
- Optional
- $cr in the text will create a line break
/ctnotify -o
/ctnotify -o [name] [n] (+dtfrl)
Changes some of the notifies options. [n] is the time the notify will appear on screen.
Notes:
- Optional.
- If [n] is 0 the notify won't close automaticly (just use with +l or +r set!)
- If +t, but no headline text is set, the time won't show up.
/ctnotify -l
/ctnotify -l [name] [n]
Changes the transparency of a notify to value [n].
Notes:
- Optional.
- [n] must be between 0 (invisible) and 255 (maximum visibility).
/ctnotify -m
/ctnotify -m [name] [data]
Stores some data in the notifies hash table which can be called later.
Notes:
- Optional.
- Everything can be used as data.
- The data will never be shown on the notify, but can be called later and will be given with the on click events.
/ctnotify
/ctnotify [name]
Will show the notify.
/ctnotify -d
/ctnotify -d [name]
Will delete the notify.
$ctget
ctget is an identifier that will return some information about the specified notify.$ctget(name/n)
If n is zero it will return the total numbers of notifies, if property open is set it will show the total number of open notifies.
If n is greater than zero or a specific name it will return the name.
Properties can be:
Click Signal
When you click left or right on a notify it will fire a signal with the following data:on *:signal:notify: { }
For example you can echo all returned data:
- on *:signal:notify: {
- echo -a NAME: $1
- echo -a MOUSE: $2 $+ x $+ $3
- echo -a CLICK: $4
- echo -a DATA: $5-
- }
Examples
1. A simple test
- alias ctnotifytest1 {
- ctnotify -n test1
- ctnotify -c test1 239,236,202 4,99,128 0,47,47 239,236,202 0,47,47
- ctnotify -h test1 Just for testing issues
- ctnotify -s test1 I'm a cool colored test. Close me by rightclicking!
- ctnotify -o test1 5 +dtfr
- ctnotify test1
- }
2. Putting some images into it!
- alias ctnotifytest2 {
- ctnotify -n test2
- ctnotify -t test2 StandardGreen
- ctnotify -h test2 Supporting icons now!
- ctnotify -o test2 5 +dtr
- ctnotify -i test2 hello.jpg
- ctnotify test2
- }
3. It's getting complicated
- on *:start: {
- ctnotify -n notice
- ctnotify -t notice StandardBlue
- ctnotify -i notice gfx\query.jpg
- ctnotify -h notice Notice Recieved
- ctnotify -o notice 5 +rt
- }
- on *:notice:*:*: {
- if (!$ctget(notify).open) {
- ctnotify -s notice $nick writes to you: $1-
- ctnotify -m $nick
- ctnotify notice
- }
- }
- on *:signal:notify: {
- if ($4 == left) { notice $5 Hey, i will be there for you soon! }
- }
Extra-Aliases
CTNotifies has some build-in aliases, that are needed for the creation. Maybe someone needs one or both of them, so their syntax is explained too./fade
/fade -ioc [@name] [speed] [start/end-value]
Fades a window in or out by setting it's transparency up or down.
[start/end-value] is the value, where the fading ends, e.g. if it ist 150 the window will have a transparency of 150 after fading. If you fade out it must be the actual transparency of the window.Switches are:
/drawgradient
/drawgradient [-nrh] [@window] [color1] [color2] [x y w h]
Draws a gradient from [color1] to [color2] in the rectangle specified by [x y w h].Switches are: