Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 29 Jul 2014, 15:13
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
ofclock - patched
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Thu 17 Oct 2013, 10:57    Post subject:  ofclock - patched  

ofclock - patched to:
* work with swallow in jwm
* spawn user command with left mouse click
* shift between clock & date by mouse wheel
* mid mouse click toggle seconds on/off
* right mouse click toggle 12/24h
* added user selected background color
* added user selected digits color

Attached patch used & pet package with static linked bin.
Code:
Usage: ofclock [option]

  -1, --12                   Display 12 hour time.
  -2, --24                   Display 24 hour time.
  -n, --nosecond             Don't display 'second'.
  -p, --position x,y         Position to display clock.
  -d, --display displayname  The X server to contact.
  -t, --title name           The name of the window.
  -b, --background color     The background color. Defaults "black"
  -f, --foreground color     The foreground color. Defaults "yellow"
  -e, --exec command         Mouse click command to run. Defaults "xcal"
  -s, --shift +/- hour       shift to another timezone.
  -h, --help                 Display this help.
ofclock_patched.png
 Description   
 Filesize   4.46 KB
 Viewed   233 Time(s)

ofclock_patched.png

ofclock-1.0.pet
Description 
pet

 Download 
Filename  ofclock-1.0.pet 
Filesize  55.87 KB 
Downloaded  115 Time(s) 
ofclock-1.0_various.diff.gz
Description 
gz

 Download 
Filename  ofclock-1.0_various.diff.gz 
Filesize  8.55 KB 
Downloaded  102 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
musher0


Joined: 04 Jan 2009
Posts: 4229
Location: Gatineau (Qc), Canada

PostPosted: Fri 01 Nov 2013, 09:00    Post subject:  

Hello, goingnuts.

ofclock is a digital clock only, right?

When the doc says it can launch "xcal" by default, do they mean "xcalc" or
"cal"? I don't have "xcal" on my Puppy.

Regards.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Fri 01 Nov 2013, 11:13    Post subject:  

I hard coded it as xcal (short for x-calendar). If you do not have xcal you could symlink whatever program you want ofclock to start on click to xcal (ln -s osmo xcal). But you could just call ofclock with "-e osmo" to get same result.
For me xcal is a script:
Code:
#!/bin/sh

case $1 in nm) m=$(date +%m | sed -e 's/0//g')
               y=$(date +%Y)
               let m=m+1
               [ $m = 13 ] && m=1 && let y=y+1
               export m=$m
               export y=$y
               rxvt -g 21x8 +sb -T "" -bg SteelBlue -cr SteelBlue -fg white -e sh -c 'cal $m $y|grep [S123];read r'
               ;;
            y) rxvt -g 66x38 +sb -T "" -bg SteelBlue -cr SteelBlue -fg white -e sh -c 'cal -y;read r'
               ;;
           ny) y=$(date +%Y)
               let y=y+1
               export y=$y
               rxvt -g 66x38 +sb -T "" -bg SteelBlue -cr SteelBlue -fg white -e sh -c 'cal -y $y;read r'
               ;;
            *) rxvt -g 21x8 +sb -T "" -bg SteelBlue -cr SteelBlue -fg white -e sh -c 'cal|grep [S123]|sed "2,9s/`date +%e`$/`setterm -reverse``date +%e``setterm -default`/"|sed "2,9s/`date +%e` /`setterm -reverse``date +%e``setterm -default` /";read r'
esac

And it looks like below called without additional flags:
xcal.png
 Description   
 Filesize   2.24 KB
 Viewed   124 Time(s)

xcal.png

Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0613s ][ Queries: 13 (0.0149s) ][ GZIP on ]