Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Tips and Tricks | Trucs et Astuces Having the calendar-icon in your dock display the current date
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Tips and Tricks | Trucs et Astuces

Subjects Author Language Messages Last message
[Locked] Having the calendar-icon in your dock display the current date
Page : 1 2 3 4
Royohboy English 61 Royohboy [Read]
22 October 2009 à 16:29

Royohboy, Saturday 17 October 2009 à 18:14


Subscription date : 14 September 2009
Messages : 24
Ppmt, that is really strange - I have no idea why this would happen.

On a different note, you can change the decoration of the desklet to 'default' just like with any other applet; I only chose 'non' as a preset because it looked best on my desktop. On yours 'default' would make for a more unified look, I think.

By the way, what is the applet at the bottom in that short film? Looks like a radar scope

ppmt, Saturday 17 October 2009 à 18:37


Subscription date : 29 November 2007
Messages : 3520
Hi,

I don't know what happened either

Yes I modified the look to use the default one. This video was done right after I got it back. I wanted to show the "bug" during the reload

The applet that looks like a radar is the System-Monitor one with Nochka's HAL applet.

http://www.glx-dock.org/bg_topic.php?t=3371

Je ne sais pas si la jauge est dans le dock ou si tu dois l'installer par contre

nochka85, Saturday 17 October 2009 à 21:03


Subscription date : 29 November 2007
Messages : 7408
The applet that looks like a radar is the System-Monitor one with Nochka's HAL applet.

http://www.glx-dock.org/bg_topic.php?t=3371


It's not on the ftp at this time ( <- It's not finished ) ... but you can grab it from my personal branch in launchpad -> https://code.launchpad.net/~nochka85/cairo-dock-plug-ins/gauges

Royohboy, Saturday 17 October 2009 à 22:28


Subscription date : 14 September 2009
Messages : 24
I have just followed your instructions in the other thread and checked it out from your personal BZR branch. Tres, tres cool, Nocka

BTW, I just noticed that GDeskCal, a neat little desktop calendar gadget, is a) written in python, and b) has exactly the code I need to work a "day-has-changed" message into Nochka's python script from the demo applet Now I only need to learn enough python to understand what I'm doing

nochka85, Saturday 17 October 2009 à 23:49


Subscription date : 29 November 2007
Messages : 7408
I have just followed your instructions in the other thread and checked it out from your personal BZR branch. Tres, tres cool, Nocka


Thanks .... but as I said : "It's not finished"

message into Nochka's python script from the demo applet Now I only need to learn enough python to understand what I'm doing


Arf ! The problem is that I don't know anything about Python ... the only thing I have done was to modify the python script from Fabounet to be able to remote a bash script

... But you can modify the "standard remote python script" for your applet as you want <- it's just a basic script for common applets ... and if you need more options , you're free to modify it as you want !

fabounet, Sunday 18 October 2009 à 04:29


Subscription date : 30 November 2007
Messages : 17118
good luck, I'm also learning Python when I have some free time

about the calendar dialog, I'm afraid you'll have to code it
the code is really easy, but can't be done through DBus.

A Python binding for the dock would be very convenient.

Royohboy, Sunday 18 October 2009 à 09:25


Subscription date : 14 September 2009
Messages : 24
fabounet :
A Python binding for the dock would be very convenient.

Especially as it seems you can get surprisingly far without really knowing what you're doing

ppmt, Sunday 18 October 2009 à 15:30


Subscription date : 29 November 2007
Messages : 3520
Fabounet,

Any idea why the dock is relocated after a reload?

see my video above

matttbe, Sunday 18 October 2009 à 23:12


Subscription date : 24 January 2009
Messages : 12573
ppmt :
Any idea why the dock is relocated after a reload?
I think that the process of the script isn't killed when CD is quit. (I've given more details on another topic )

I propose to you an update (I hope it's an interesting update ) :
You have to replace your 'Calendar.conf' (~/.config/cairo-dock/current_theme/plug-ins/Calendar) by the file in the tarball.
So:
wget http://dl.getdropbox.com/u/257747/Cairo-Dock/Calendar.tar.gz
rm -r ~/.config/cairo-dock/third-party/Calendar
tar xzf Calendar.tar.gz -C ~/.config/cairo-dock/third-party/
killall Calendar
dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.Reboot
I think that the last dbus command may not work

Enjoy

http://uppix.net/d/4/0/419b0d1b6a0718c370628fa3c2d7b.png . http://uppix.net/f/2/f/421879d5284de1ae4d3d5d5f704b0.png


http://uppix.net/6/c/b/8bc3904e4217a6f22bf7e7926f388.png


@ Royohboy: It's your applet so if you don't want to have my modifications you're free! I have added a GNU-GPL3 licence. If you want to change it, don't be shy .
With your accord I will put this applet on the future 'cairo-dock-plug-ins-extras' branch

PS : You can see that it can be better with a monospace font.
@ Fab: is it possible to force to do that only with some dialogues?

ppmt, Monday 19 October 2009 à 03:40


Subscription date : 29 November 2007
Messages : 3520
The joy of Opensource

Matttbe: your calendar appearing when you click is nice but if you keep clicking it open 1 new one each time!

The problem of the Calendar process that is not dying is also still here

But I like the little calendar

Royohboy, Monday 19 October 2009 à 06:21


Subscription date : 14 September 2009
Messages : 24
Wow, I absolutely love it Great idea!

fabounet, Monday 19 October 2009 à 10:35


Subscription date : 30 November 2007
Messages : 17118
is it stil a DBus applet ? quite amazing !
is it possible to force to do that only with some dialogues?

with Qt the font selector can display only mono font (I've searched that recently )
with GTK it's not possible.
so the best is maybe to not propose to change the font, but only the size.

matttbe, Monday 19 October 2009 à 13:52


Subscription date : 24 January 2009
Messages : 12573
with Qt the font selector can display only mono font (I've searched that recently )
with GTK it's not possible.
so the best is maybe to not propose to change the font, but only the size.
I use dbus-send to display the calendar . So it uses the font as others dialogues. Is it possible to force to use a font? like
dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.ShowDialog string:"Cairo-Dock is great \!" int32:5 string:none string:none string:none string:monospace

fabounet, Monday 19 October 2009 à 14:06


Subscription date : 30 November 2007
Messages : 17118
I could, but I want to keep the API as simple as possible, even if it limits it.
the problem is you can't pass only some of the parameters like in C++, which makes the command quite complicated.

ppmt, Tuesday 20 October 2009 à 04:08


Subscription date : 29 November 2007
Messages : 3520
Matttbe: to come back to the modification you made...

I woke this morning to find that the Calendar had not been updated. it was still on the 18 rather than the 19.

I looked a bit at the code to try to understand.

We the dock is launched (action_on_init) the file icon.sh is executed and a new icon with today date is created....this is good

in parallel a script update_calendar is executed to launch the script icon.sh every 24 hours...isn't it strange because potentially the dock is launch at
lets say 22h00...so the icon is correct but the next update will be in 24 hours so you end up running a day late until the next 22h00...Or am I missing something

Then there is the crontab that reload the app every day at midnight. but most likely it is reloading with a worng icon file

I hope I am making sense....

matttbe, Tuesday 20 October 2009 à 13:27


Subscription date : 24 January 2009
Messages : 12573
Thanks, I found the bug :
    $ echo $((10-08))
bash: 10-08: valeur trop grande pour la base (error token is "08")
    $ echo $((10-8))
2

The tarball is update

ppmt, Wednesday 21 October 2009 à 12:38


Subscription date : 29 November 2007
Messages : 3520
I confirm. this morning was the 21st as forecasted

The only things left now are the process which doesn't die during a crash or a restart

and the fact that the applet changes its position after its reload.

matttbe, Wednesday 21 October 2009 à 13:40


Subscription date : 24 January 2009
Messages : 12573
The only things left now are the process which doesn't die during a crash or a restart
Yes it can be interresting to have the stop signal

Royohboy, Thursday 22 October 2009 à 12:33


Subscription date : 14 September 2009
Messages : 24
Matttbe, thank you so much for the great work on this applet

ppmt :
The only things left now are the process which doesn't die during a crash or a restart ...


This behaviour seems to be common to scripted applets: I have also tried the quick_rss_reader applet (it resides in ~/.config/cairo-dock/third-party/quick_rss_reader), and the process (quick_rss_reader) doesn't get stopped whenever I stop Cairo-Dock although I haven't even activated the applet in the C-D configuration screen. When I restart C-D it will start a new quick_rss_reader process without ever stopping the old one.

That means: Restart C-D 5 times => 5 instances of scriptet applets running, and, BTW, of all cild-processes.
I.e. for the calendar-applet that is

  • Calendar
  • update_calendar.sh
  • sleep


I have tried killing these processes by putting
kill `pidof -x Calendar'
kill `pidof update_calendar`

into action_on_stop(), but it seems as if this signal doesn't get sent.

fabounet, Thursday 22 October 2009 à 14:17


Subscription date : 30 November 2007
Messages : 17118
although I haven't even activated the applet in the C-D configuration screen

here is the problem I think, the applet is supposed to quit after it has registered if it can't get its object on the bus.
in the demo_python script I've tried this :
try:
applet_object = bus.get_object("org.cairodock.CairoDock",
"/org/cairodock/CairoDock/"+applet_name)
except dbus.DBusException:
print "the '"+applet_name+"' module has not been started"
sys.exit(2)


Edit : moreover the dock should detect the proces and not launch it 2 times
what are your debug output please ? (no need to add -l debug, they are direct printf)

Tips and Tricks | Trucs et Astuces

Subjects Author Language Messages Last message
[Locked] Having the calendar-icon in your dock display the current date
Page : 1 2 3 4
Royohboy English 61 Royohboy [Read]
22 October 2009 à 16:29


Glx-Dock / Cairo-Dock List of forums Tips and Tricks | Trucs et Astuces Having the calendar-icon in your dock display the current date Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.