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 Sun 26 Oct 2014, 05:32
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 Posts_count  
Author Message
goingnuts

Joined: 07 Dec 2008
Posts: 781

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   246 Time(s)

ofclock_patched.png

ofclock-1.0.pet
Description 
pet

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

 Download 
Filename  ofclock-1.0_various.diff.gz 
Filesize  8.55 KB 
Downloaded  108 Time(s) 
Back to top
View user's profile Send_private_message Visit_website 
musher0


Joined: 04 Jan 2009
Posts: 4261
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_website 
goingnuts

Joined: 07 Dec 2008
Posts: 781

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   139 Time(s)

xcal.png

Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0551s ][ Queries: 12 (0.0092s) ][ GZIP on ]