[SOLVED] How do I add a simple calendar into taskbar or background of my wm.
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How do I add a simple calendar into taskbar or background of my wm.
I often use cal command in xterm to get calendar info, is there a better way to dock it into my taskbar, or into background of my windows(blackbox, fvwm, etc), sample codes are appreciated.
I often use cal command in xterm to get calendar info, is there a better way to dock it into my taskbar, or into background of my windows(blackbox, fvwm, etc), sample codes are appreciated.
I don't know how you would modify this for blackbox, but I use openbox with tint2. I also have zenity installed. This allows me to bring up a calendar dialog box.
In the tint2 area of the clock I added the following:
#!/bin/bash
# call_calendar.sh
# 02/12/10 - Chetamonye
# Pop up Calendar and/or run
# scheduling program
# run a program or use a web calendar
# add or remove '#' to just choose one.
CAL_GET=`zenity --calendar --text "Cancel to close. Ok to schedule an appt" --title "My Calendar"`
case $? in
0)
#sunbird ;; put program here and remove line below
google-chrome http://www.google.com/calendar/render ;;
1)
exit ;;
255)
echo "Box closed.";;
esac
If you click on cancel, it closes the calendar. If you click on OK, you go to your google calendar. It's a simple script so you should be able to modify it.
You could just change tint2 to call a script that pops up xterm and pass cal to it.
I know you where looking for better window manager integration... however an alternative is to utilize cal with ~/.bashrc. This way every time you login, you are presented with a nice output of cal.
i.e. my example ~/.bashrc
Code:
#!/bin/bash
#~/.bash_rc
cal -3
alias wpa="wpa_supplicant -B -iwlan0 -Dwext -c/etc/wpa_supplicant.conf"
Just make sure to create an accompanying ~/.bash_profile to go with it.
Code:
#!/bin/bash
#~/.bash_profile
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
Last edited by slugman; 07-12-2010 at 04:42 PM.
Reason: wups.. can't type
It would be somewhat abusing the program, since it's meant to tail files, but you could play around with making root-tail display a file containing the output of cal. If you wanted to use chetamonye's approach but didn't want to use zenity, Xdialog has a calendar widget, too. I'm sure there are many other routes. For instance, if you use gkrellm, you can bind a mini-xterm running cal or Xdialog/zenity or whatever to the clock button. Etc.
thanks for everyone's reply.
If I remembered correctly, Slackware used to have xcal which is much easier to dock it, but I can't find it anymore. I want everything original from slackware, so I don't have to use 3rd party software, and extreme lightweight on computer resource.
I don't know how you would modify this for blackbox, but I use openbox with tint2. I also have zenity installed. This allows me to bring up a calendar dialog box.
...
He could use kdialog instead zenity, thus he'll not need to install additional applications.
Hey number22..
you can use a complete calendar application.
first of all what's your window manager? Gnome?
Kde?
XFCE4?
or
local light weight one?
look......
its specific according to window manager.
you can download orag the calendar applicaition from the internet. then you can compile it,make it and add it to the taskbar.
thanks for everyone reply, I use blackbox, WM and fvwm(not so much this day), anyway, only use lightweight wm, and prefer using everything straight out box from Slackware, keep my system as lean as possible.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.