Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#1  2013-10-20 10:18:37

  prosze - Użytkownik

prosze
Użytkownik
Zarejestrowany: 2012-09-25

[solved] tint2 - krótszy format zapisu daty?

Witam!

Chciałbym skrócić formę zapisu daty na panelu tint2 z takiej

http://s21.postimg.org/ntvzf1v87/2013_10_20_095808_218x32_scrot.png

na taką

Kod:

09:58 @ nie 20 paź

Tak wygląda format zapisu daty w pliku konfiguracyjnym.

Kod:

#---------------------------------------------
# CLOCK
#---------------------------------------------
time1_format = %H:%M @ %A %d %B
time1_font = Visitor TT1 BRK 10

Dzięki za pomoc.

Ostatnio edytowany przez prosze (2013-10-20 12:15:37)

Offline

 

#2  2013-10-20 11:50:06

  svL - Użytkownik

svL
Użytkownik
Zarejestrowany: 2007-06-17

Re: [solved] tint2 - krótszy format zapisu daty?

Kod:

time1_format = %H:%M @ %a %d %b

"God, root, what is difference?"

Offline

 

#3  2013-10-20 12:02:14

  prosze - Użytkownik

prosze
Użytkownik
Zarejestrowany: 2012-09-25

Re: [solved] tint2 - krótszy format zapisu daty?

Dzięki za pomoc. Oczywiście, że działa. Dodatkowe pytanie.W jakim języku napisany jest tint2 ?

Offline

 

#4  2013-10-20 12:51:25

  dominbik - Członek DUG

dominbik
Członek DUG
Zarejestrowany: 2011-07-25

Re: [solved] tint2 - krótszy format zapisu daty?

Napisany jest w języku C. Dodatkowo jest jeszcze wersja tint2-svn, która wspiera np. launchery do aplikacji i kilka innych ficzerów,


http://img34.imageshack.us/img34/5092/zw9m.png http://img29.imageshack.us/img29/219/pibw.png

Offline

 

#5  2013-10-20 14:19:37

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Re: [solved] tint2 - krótszy format zapisu daty?

A co do samego formatu daty, to poniżej masz parametry:

Kod:

morfik:~$ date --help
Usage: date [OPTION]... [+FORMAT]
  or:  date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]
Display the current time in the given FORMAT, or set the system date.

Mandatory arguments to long options are mandatory for short options too.
  -d, --date=STRING         display time described by STRING, not 'now'
  -f, --file=DATEFILE       like --date once for each line of DATEFILE
  -I[TIMESPEC], --iso-8601[=TIMESPEC]  output date/time in ISO 8601 format.
                            TIMESPEC='date' for date only (the default),
                            'hours', 'minutes', 'seconds', or 'ns' for date
                            and time to the indicated precision.
  -r, --reference=FILE      display the last modification time of FILE
  -R, --rfc-2822            output date and time in RFC 2822 format.
                            Example: Mon, 07 Aug 2006 12:34:56 -0600
      --rfc-3339=TIMESPEC   output date and time in RFC 3339 format.
                            TIMESPEC='date', 'seconds', or 'ns' for
                            date and time to the indicated precision.
                            Date and time components are separated by
                            a single space: 2006-08-07 12:34:56-06:00
  -s, --set=STRING          set time described by STRING
  -u, --utc, --universal    print or set Coordinated Universal Time
      --help     display this help and exit
      --version  output version information and exit

FORMAT controls the output.  Interpreted sequences are:

  %%   a literal %
  %a   locale's abbreviated weekday name (e.g., Sun)
  %A   locale's full weekday name (e.g., Sunday)
  %b   locale's abbreviated month name (e.g., Jan)
  %B   locale's full month name (e.g., January)
  %c   locale's date and time (e.g., Thu Mar  3 23:05:25 2005)
  %C   century; like %Y, except omit last two digits (e.g., 20)
  %d   day of month (e.g., 01)
  %D   date; same as %m/%d/%y
  %e   day of month, space padded; same as %_d
  %F   full date; same as %Y-%m-%d
  %g   last two digits of year of ISO week number (see %G)
  %G   year of ISO week number (see %V); normally useful only with %V
  %h   same as %b
  %H   hour (00..23)
  %I   hour (01..12)
  %j   day of year (001..366)
  %k   hour, space padded ( 0..23); same as %_H
  %l   hour, space padded ( 1..12); same as %_I
  %m   month (01..12)
  %M   minute (00..59)
  %n   a newline
  %N   nanoseconds (000000000..999999999)
  %p   locale's equivalent of either AM or PM; blank if not known
  %P   like %p, but lower case
  %r   locale's 12-hour clock time (e.g., 11:11:04 PM)
  %R   24-hour hour and minute; same as %H:%M
  %s   seconds since 1970-01-01 00:00:00 UTC
  %S   second (00..60)
  %t   a tab
  %T   time; same as %H:%M:%S
  %u   day of week (1..7); 1 is Monday
  %U   week number of year, with Sunday as first day of week (00..53)
  %V   ISO week number, with Monday as first day of week (01..53)
  %w   day of week (0..6); 0 is Sunday
  %W   week number of year, with Monday as first day of week (00..53)
  %x   locale's date representation (e.g., 12/31/99)
  %X   locale's time representation (e.g., 23:13:48)
  %y   last two digits of year (00..99)
  %Y   year
  %z   +hhmm numeric time zone (e.g., -0400)
  %:z  +hh:mm numeric time zone (e.g., -04:00)
  %::z  +hh:mm:ss numeric time zone (e.g., -04:00:00)
  %:::z  numeric time zone with : to necessary precision (e.g., -04, +05:30)
  %Z   alphabetic time zone abbreviation (e.g., EDT)

By default, date pads numeric fields with zeroes.
The following optional flags may follow '%':

  -  (hyphen) do not pad the field
  _  (underscore) pad with spaces
  0  (zero) pad with zeros
  ^  use upper case if possible
  #  use opposite case if possible

After any flags comes an optional field width, as a decimal number;
then an optional modifier, which is either
E to use the locale's alternate representations if available, or
O to use the locale's alternate numeric symbols if available.

Examples:
Convert seconds since the epoch (1970-01-01 UTC) to a date
  $ date --date='@2147483647'

Show the time on the west coast of the US (use tzselect(1) to find TZ)
  $ TZ='America/Los_Angeles' date

Show the local time for 9AM next Friday on the west coast of the US
  $ date --date='TZ="America/Los_Angeles" 09:00 next Fri'

Report date bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report date translation bugs to <http://translationproject.org/team/>
For complete documentation, run: info coreutils 'date invocation'

Offline

 

#6  2013-10-20 14:55:41

  yossarian - Szczawiożerca

yossarian
Szczawiożerca
Skąd: Shangri-La
Zarejestrowany: 2011-04-25

Re: [solved] tint2 - krótszy format zapisu daty?

dominbik napisał(-a):

Napisany jest w języku C. Dodatkowo jest jeszcze wersja tint2-svn, która wspiera np. launchery do aplikacji i kilka innych ficzerów,

Ta wersja svn, to już od kilku lat jest normalną domyślną wersją.

tint2 (0.11+svn20110307-1) unstable; urgency=low

  * New upstream snapshot (Closes: #624792)
  * Remove power_now support patch (applied upstream)
  * Do not install tintwizard (it does not support config of SVN snapshot)
  * Also build a tint2-dbg package

— Sebastian Reichel <sre@debian.org>  Sun, 01 May 2011 19:35:32 +0200

Offline

 

#7  2013-10-20 15:48:23

  dominbik - Członek DUG

dominbik
Członek DUG
Zarejestrowany: 2011-07-25

Re: [solved] tint2 - krótszy format zapisu daty?

yossarian napisał(-a):

Ta wersja svn, to już od kilku lat jest normalną domyślną wersją.

A no to zależy to od dystrybucji. Na Archu to są dwie różne wersje.


http://img34.imageshack.us/img34/5092/zw9m.png http://img29.imageshack.us/img29/219/pibw.png

Offline

 

#8  2013-10-20 16:07:31

  yossarian - Szczawiożerca

yossarian
Szczawiożerca
Skąd: Shangri-La
Zarejestrowany: 2011-04-25

Re: [solved] tint2 - krótszy format zapisu daty?

dominbik napisał(-a):

A no to zależy to od dystrybucji. Na Archu to są dwie różne wersje.

No chyba, że tak :)

Offline

 

#9  2013-10-20 21:41:12

  prosze - Użytkownik

prosze
Użytkownik
Zarejestrowany: 2012-09-25

Re: [solved] tint2 - krótszy format zapisu daty?

Tak przypuszczałem, że tint2 napisany jest w C. Dlatego myślałem, że zmiana formatu daty nie będzie taka prosta. Jeszcze raz dzięki :)

Ostatnio edytowany przez prosze (2013-10-20 21:43:30)

Offline

 

#10  2013-10-20 22:14:32

  dominbik - Członek DUG

dominbik
Członek DUG
Zarejestrowany: 2011-07-25

Re: [solved] tint2 - krótszy format zapisu daty?

Wiesz jak na tyle opcji konfiguracja i tak jest dość łatwa i intuicyjna. To, że coś jest napisane w C nie znaczy, że musi być trudne w konfiguracji. Z tego co przeglądałem w Linuxie w C jest napisanych większość "fajnych" aplikacji - czytaj lekkie, szybkie && KISS


http://img34.imageshack.us/img34/5092/zw9m.png http://img29.imageshack.us/img29/219/pibw.png

Offline

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
Możesz wyłączyć AdBlock — tu nie ma reklam ;-)