LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-12-2010, 01:09 PM   #1
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 278
Blog Entries: 7

Rep: Reputation: Disabled
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.
 
Old 07-12-2010, 02:08 PM   #2
chetamonye
LQ Newbie
 
Registered: Dec 2006
Posts: 22

Rep: Reputation: 1
Quote:
Originally Posted by number22 View Post
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:

Code:
    clock_lclick_command = /home/whatever/call_calendar.sh
This calls the following:

Code:
#!/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.

Hope this helps.


Chet
 
Old 07-12-2010, 04:41 PM   #3
slugman
Member
 
Registered: Jun 2010
Location: AZ
Distribution: Slackware
Posts: 106

Rep: Reputation: 1
well

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
 
Old 07-12-2010, 06:38 PM   #4
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
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.
 
Old 07-13-2010, 06:06 AM   #5
gapan
Member
 
Registered: Feb 2007
Posts: 378

Rep: Reputation: 163Reputation: 163
I'm sure you can also use conky for this.
 
Old 07-13-2010, 08:35 AM   #6
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 278

Original Poster
Blog Entries: 7

Rep: Reputation: Disabled
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.
 
Old 07-13-2010, 08:50 AM   #7
jovanoti
LQ Newbie
 
Registered: Mar 2010
Distribution: Slackware
Posts: 25

Rep: Reputation: 2
Quote:
Originally Posted by chetamonye View Post
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.
 
Old 07-13-2010, 08:57 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
Hi,

You can add in ~/.xinitrc, something like:
Code:
xterm -hold  -geometry 20x8-0+0 -e cal
 
1 members found this post helpful.
Old 07-13-2010, 09:08 AM   #9
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 278

Original Poster
Blog Entries: 7

Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi,

You can add in ~/.xinitrc, something like:
Code:
xterm -hold  -geometry 20x8-0+0 -e cal
thanks a lot, how do I make it automatic update everyday?
 
Old 07-13-2010, 09:27 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
You can use a cronjob that runs every midnight+1min.
If you know the pid you can use, something like "kill -HUP <xterm-pid>"
 
Old 07-13-2010, 05:45 PM   #11
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,357

Rep: Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739
Another approach is to run the 'orage' calendar application. It can be set up to always appear on your desktop.
 
Old 07-13-2010, 06:24 PM   #12
baxzius
Member
 
Registered: Jan 2010
Location: India
Distribution: ubuntu
Posts: 134
Blog Entries: 1

Rep: Reputation: 21
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.
 
Old 07-13-2010, 07:37 PM   #13
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,272
Blog Entries: 28

Rep: Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124
Check out dock apps. I use a couple in Fluxbox and they do what I need them to.
 
Old 07-13-2010, 08:40 PM   #14
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 278

Original Poster
Blog Entries: 7

Rep: Reputation: Disabled
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.
 
Old 07-14-2010, 08:51 PM   #15
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,272
Blog Entries: 28

Rep: Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124
number22, dockapps should work fine with blackbox and its cousins.

http://blackboxwm.sourceforge.net/ManPages/blackbox

Here's a screenshot of my Fluxbox with gkrellm running as a dock app in the Fluxbox slit.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] KOrganizer won't let me add a remote calendar on Debian testing sleeping Linux - Software 2 08-26-2009 08:29 AM
LXer: Add encryption into Google Calendar with Firefox extensions LXer Syndicated Linux News 0 07-19-2008 01:30 AM
gnome taskbar background problem techhead89 Linux - Software 1 09-25-2007 08:20 AM
Problems with Calendar add on for Thunderbird nbcohen Linux - Software 4 06-13-2007 04:22 PM
lost taskbar, and apps running in background spooge Linux - General 5 04-12-2002 06:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration