dmedvinsky / gsimplecal

Simple and lightweight GTK calendar (BSD license)
http://dmedvinsky.github.io/gsimplecal
Other
197 stars 19 forks source link

Work with tray (feature request) #16

Closed SemenMartynov closed 11 years ago

SemenMartynov commented 11 years ago

Can you make the opportunity to work with the system tray (click - show, click - hide)? Then it would be possible to use with xmonad + xmobar + trayer.

dmedvinsky commented 11 years ago

Doesn't the <action> directive of xmobar solve the problem? See the readme for more info.

E.g. you can have <action=gsimplecal>%date%</action> in your xmobar template. That's how I do it anyway.

SemenMartynov commented 11 years ago

It definitely solves! Thank you very much!

notfoss commented 11 years ago

Hi, I would love to have this feature too. Unfortunately, I don't use xmonad, rather I use i3.

My setup is a bit more complex --> conky piped to i3bar. Clock is managed using conky. I don't think conky, when used in such a way, can react to click events.

On the other hand, i3 does provide an integrated tray. If gsimplecal could reside in the tray (and show a clock as well), it would be great.

I totally understand if you are unwilling to implement this. Anyway, thanks for a simple and lightweight calendar.

Edit: Well, I managed to get gsimplecal to pop on a click event thanks to the following bash script by kaszak696, on Arch Linux forums.

https://bbs.archlinux.org/viewtopic.php?pid=1327304#p1327304

dmedvinsky commented 11 years ago

Sorry for not getting to you in a timely fashion, I kind of missed the notification. Anyway, I don't think that's the feature that should be implemented in gsimplecal, because having a tray icon means running continuously, and gsimplecal was designed to only be running when the calendar is actually shown, and upon running it again, it just closes previous instance (to simplify the toggling functionality). Probably if you want a calendar with tray icon, you should take a look at orage.

By the way, I'm not sure why that bash script you have linked requires storing the PID and all that jazz:

if [[ $CAL_PID -eq 0 ]] 
then
    gsimplecal &
    CAL_PID=$!
else
    kill $CAL_PID
    CAL_PID=0
fi

In theory, this is kind of handled by gsimplecal.

notfoss commented 11 years ago

Thanks for the reply.

I guess it is good that gsimplecal is not constantly running and only triggered when we want to, because I found that it consumes nearly 30 MB of memory, which is probably because of gtk2.

As for orage, it is a bit too featureful for my needs. gsimplecal does the job fine.

About the script, I don't think the guy who wrote it knows much about gsimplecal. So maybe that's the reason. I am looking to clean it up a bit myself.

Thanks again.

dmedvinsky commented 11 years ago

I found that it consumes nearly 30 MB of memory, which is probably because of gtk2

Yeah, that probably is GTK, which also means it is mostly shared memory. So if you run any other software that uses GTK2, that memory is only used once, even though it may be counted by some process viewers in total memory usage for each process.