| 1   2   | Next
maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Design (https://talk.maemo.org/forumdisplay.php?f=46)
-   -   Date on desktop? N900 (https://talk.maemo.org/showthread.php?t=46879)

biggzy 2010-03-08 22:25

Date on desktop? N900
 
Hi forum, is there any date app/widget for the n900 to display the date in dd/mm/yyyy format on the desktop? if not would some kind soul be able to code 1? thanx

noobmonkey 2010-03-08 22:30

Re: Date on desktop? N900
 
I think DCE Would do it with code - if there is a way to do it in terminal :D

HumanPenguin 2010-03-08 22:35

Re: Date on desktop? N900
 
date +%m/%d/%C%y

should work

EDIT: Just tested yep that works. Install Desktop command widget open its settings add cmd and type the above in the command field.

dsawhney 2010-03-08 22:36

Re: Date on desktop? N900
 
There is already a desktop widget for this - http://talk.maemo.org/showthread.php?t=44119

HumanPenguin 2010-03-08 22:50

Re: Date on desktop? N900
 
Quote:

Originally Posted by dsawhney (Post 560552)
There is already a desktop widget for this - http://talk.maemo.org/showthread.php?t=44119

That just displays a single calendar page with the day of the month so today is says 8

The ability to adjust it using date formats would be worth while. Maybe the option to include a background image of your choice

biggzy 2010-03-08 22:57

Re: Date on desktop? N900
 
The datetoday widget is nice but not what im looking for, just some plane text to show date as 01-01-2010 (maybe with color selection) and a setting for system background (the black semi-transparent background) or a custom image, that would be perfect.

biggzy 2010-03-08 23:01

Re: Date on desktop? N900
 
Quote:

Originally Posted by HumanPenguin (Post 560549)
date +%m/%d/%C%y

should work

EDIT: Just tested yep that works. Install Desktop command widget open its settings add cmd and type the above in the command field.

Hi HumanPenguin any chance of a screenshot of the above please? Thanx

noobmonkey 2010-03-08 23:01

Re: Date on desktop? N900
 
1 Attachment(s)
yup works fine:

noobmonkey 2010-03-08 23:02

Re: Date on desktop? N900
 
Quote:

Originally Posted by biggzy (Post 560575)
Hi HumanPenguin any chance of a screenshot of the above please? Thanx

lol, was beavering away as you typed that :D

biggzy 2010-03-08 23:17

Re: Date on desktop? N900
 
Thanx guys, that was what i wanted.

HumanPenguin 2010-03-09 12:56

Re: Date on desktop? N900
 
Quote:

Originally Posted by biggzy (Post 560589)
Thanx guys, that was what i wanted.

You can also change the size of the widget with a slider in settings. IE all that extra space in noobmonkeys screenshot is the default size of the widget you can shorten it and reduce the space taken. Very nice little widget by all acounts.

biggzy 2010-03-09 13:02

Re: Date on desktop? N900
 
iv also got some free memory widgets (rootfs, mass mem and mem card), is there any command to use so i can have 1 showing free RAM? thanx

http://img695.imageshack.us/img695/3...030913063x.png

Command to show free mass memory: df -h | awk ' $1 == "/dev/mmcblk0p1" {print $4"B"}'

Command to show free memory on mem card: df -h | awk ' $1 == "/dev/mmcblk1p1" {print $4"B"}'

noobmonkey 2010-03-09 13:02

Re: Date on desktop? N900
 
Quote:

Originally Posted by HumanPenguin (Post 561145)
You can also change the size of the widget with a slider in settings. IE all that extra space in noobmonkeys screenshot is the default size of the widget you can shorten it and reduce the space taken. Very nice little widget by all acounts.

hehe i just have it that size to match the others :D - removed it now because i don't need the date :D - thats what my watch is for ;)

Tis very customisable though :)

HumanPenguin 2010-03-09 13:38

Re: Date on desktop? N900
 
well there are a few ways to get free memory. the most useful for this widget would be

head -n 2 /proc/meminfo | tail -n 1

this will give you free mem in one line.

More informative is the command free that will give you more info on how it is allocated.

the command I gave is chopping one line out of the meminfo file. from an xterm type

cat /proc/meminfo

To see it all.

the field I have taken above is memfree. But I do not think that is very useful due to the way linux uses memory. Someone who knows more about the linux memory model nay be able to provide more useful info.

amorek13 2010-03-09 13:58

Re: Date on desktop? N900
 
would there be a command that could pull time form world clock so it could display on desktop using the desktop widget?

biggzy 2010-03-09 14:00

Re: Date on desktop? N900
 
Quote:

Originally Posted by HumanPenguin (Post 561181)
well there are a few ways to get free memory. the most useful for this widget would be

head -n 2 /proc/meminfo | tail -n 1

this will give you free mem in one line.

Thanx, works a treat, but is there anyway to show it without it displaying the words 'MemFree:' so it only displays the actual free ram in kb/mb and no text, thanx again.

HumanPenguin 2010-03-09 14:09

Re: Date on desktop? N900
 
yes but you will have to let me get to my home PC (very late UK time tonight.) To play with it.

If someone else comes up with it meanwhile cool.

Work PC is windows so cant really experiment much.

HumanPenguin 2010-03-09 14:45

Re: Date on desktop? N900
 
not the most elegent solution but it should work.

head -n 2 /proc/meminfo | tail -n 1 | fold -w 15 | tail -n 1

Basically we are cutting the line in half and selecting only the second half. This would be simpler with regular expressions but Id have to remind my self how to use all that again. Someone will prolly post with a easier solution.

HumanPenguin 2010-03-09 14:56

Re: Date on desktop? N900
 
Quote:

Originally Posted by amorek13 (Post 561196)
would there be a command that could pull time form world clock so it could display on desktop using the desktop widget?

Yes but you will need wget to be installed. (command line tool to pull in data over the web.)

this would give you a number of other useful features so I will look into it.

Point me to the site you would like the world clock info to come from and I will play tonight.

At some point I will look into writting my own widgets. But I think ill wait for the QT update in the UK. This way it will last through meego etc.

afaq 2010-03-09 16:00

Re: Date on desktop? N900
 
Ive tried the command for the date in the widget and i get an "invalid command" error on my widget.

i checked and i copied it correctly. anyone know what i could be doing wrong?

noobmonkey 2010-03-09 16:04

Re: Date on desktop? N900
 
have you tried running it in terminal (assuming you mean the date one?)

raverpol 2010-03-09 16:12

Re: Date on desktop? N900
 
hi
what is the command to show date in format with name of the month? :)
kriss

Schturman 2010-03-09 16:12

Re: Date on desktop? N900
 
Quote:

Originally Posted by biggzy (Post 561154)
iv also got some free memory widgets (rootfs, mass mem and mem card), is there any command to use so i can have 1 showing free RAM? thanx

http://img695.imageshack.us/img695/3...030913063x.png

Command to show free mass memory: df -h | awk ' $1 == "/dev/mmcblk0p1" {print $4"B"}'

Command to show free memory on mem card: df -h | awk ' $1 == "/dev/mmcblk1p1" {print $4"B"}'

Hi
What the command for this format of date: 9 Mar 2010 ?
Thanks.

afaq 2010-03-09 16:15

Re: Date on desktop? N900
 
run this in terminal:

date +%m/%d/%C%y

get the message: date +%m/%d/%C%y: not found

HumanPenguin 2010-03-09 16:22

Re: Date on desktop? N900
 
Quote:

Originally Posted by afaq (Post 561372)
run this in terminal:

date +%m/%d/%C%y

get the message: date +%m/%d/%C%y: not found

my guess from the response would be that you are missing a space between the date and the +

afaq 2010-03-09 16:26

Re: Date on desktop? N900
 
that was it! thanks

HumanPenguin 2010-03-09 16:27

Re: Date on desktop? N900
 
Quote:

Originally Posted by Schturman (Post 561367)
Hi
What the command for this format of date: 9 Mar 2010 ?
Thanks.

date +%d %b %C%y

or

date +%d %B %C%y

for 9 March 2010

raverpol 2010-03-09 16:33

Re: Date on desktop? N900
 
Quote:

Originally Posted by HumanPenguin (Post 561387)

date +%d %B %C%y

for 9 March 2010

doesn't work :( all I have now is 09

raverpol 2010-03-09 16:37

Re: Date on desktop? N900
 
Flip Calendar :) http://talk.maemo.org/showthread.php...400#post561400

HumanPenguin 2010-03-09 16:38

Re: Date on desktop? N900
 
Quote:

Originally Posted by raverpol (Post 561365)
hi
what is the command to show date in format with name of the month? :)
kriss

The IP is done using a different widget. in maemo extras I think. Not sure of the name of the top of my head.

TA-t3 2010-03-09 16:40

Re: Date on desktop? N900
 
Quote:

doesn't work all I have now is 09
Try this:
Code:

date "+%-d %B %C%y"

raverpol 2010-03-09 16:42

Re: Date on desktop? N900
 
Quote:

Originally Posted by TA-t3 (Post 561410)
Try this:
Code:

date "+%-d %B %C%y"

works fine :)

HumanPenguin 2010-03-09 16:42

Re: Date on desktop? N900
 
Quote:

Originally Posted by raverpol (Post 561399)
doesn't work :( all I have now is 09

ah sorry thats what comes from doing this of the top of my nogin.

The issue is the spaces after the +

the following will work

date +'%d %b %C%y'

EDIT i missed the space between date and + fixed

TA-t3 2010-03-09 16:45

Re: Date on desktop? N900
 
@HumanPenguin: You need to add '-' after the '%' to avoid it getting padded with leading zeroes. I.e. the difference between

09 March 2010 and
9 March 2010 is the '-' in %-d

Also, the string must be quoted or it won't be passed to 'date' correctly.

HumanPenguin 2010-03-09 16:46

Re: Date on desktop? N900
 
Quote:

Originally Posted by raverpol (Post 561404)

Very nice. pity you have no N900. Would be exactly what is wanted for Maemo5

raverpol 2010-03-09 16:52

Re: Date on desktop? N900
 
Quote:

Originally Posted by HumanPenguin (Post 561420)
Very nice. pity you have no N900. Would be exactly what is wanted for Maemo5

oh yeah, I didn't noticed hehe :)

HumanPenguin 2010-03-09 16:54

Re: Date on desktop? N900
 
Quote:

Originally Posted by raverpol (Post 561430)
oh yeah, I didn't noticed hehe :)

I keep meaning to play with the scratchbox set up. Maybe Ill have a go at porting this this weekend. Just to see what it takes.

when I have some time Ill look though all the developer advice and see how much work it is.

Schturman 2010-03-09 16:56

Re: Date on desktop? N900
 
Quote:

Originally Posted by TA-t3 (Post 561410)
Try this:
Code:

date "+%-d %B %C%y"

Now it's works :D
Thanks

raverpol 2010-03-09 17:07

Re: Date on desktop? N900
 
Quote:

Originally Posted by biggzy (Post 561154)
Command to show free mass memory: df -h | awk ' $1 == "/dev/mmcblk0p1" {print $4"B"}'

Command to show free memory on mem card: df -h | awk ' $1 == "/dev/mmcblk1p1" {print $4"B"}'

nice commands but sth wrong with them :( I put them as u wrote here but all time I have Invalid Command as reply

biggzy 2010-03-09 17:17

Re: Date on desktop? N900
 
Quote:

Originally Posted by raverpol (Post 561456)
nice commands but sth wrong with them :( I put them as u wrote here but all time I have Invalid Command as reply

They should work ok, did you copy n paste? If so make sure its on 1 line.


| 1   2   | Next
All times are GMT. The time now is 09:36.

vBulletin® Version 3.8.8