Browse Source

Add clock functionality and swap default time/date format strings

I set them to what I use because I'm an asshole.
master
Chris Guillott 8 years ago
parent
commit
18a9572482
  1. 3
      README.md
  2. 4
      i3lock.c

3
README.md

@ -31,6 +31,9 @@ Many little improvements have been made to i3lock over time:
- `--line-uses-ring`, `-r` -- the line between the inside and outer ring uses the ring color for its color
- `--line-uses-inside`, `-s` -- the line between the inside and outer ring uses the inside color for its color
- `-S, --screen` -- specifies which display to draw the unlock indicator on
- `-k, --clock` -- enables the clock display.
- `--timestr="%H:%M:%S"` -- allows custom overriding of the time format string. Accepts `strftime` formatting. Default is `"%H:%M:%S"`.
- `--datestr="%A, %m %Y"` -- allows custom overriding of the date format string. Accepts `strftime` formatting. Default is `"%A, %m %Y"`.
- All the colors have an alpha channel now. Please keep in mind that this was not intended when the program was originally written, so making things transparent that weren't before can make it look strange.
- You can specify whether i3lock should bell upon a wrong password.

4
i3lock.c

@ -72,8 +72,8 @@ bool show_clock = false;
I picked 32-length char arrays because some people might want really funky time formatters.
Who am I to judge?
*/
char time_format[32] = "%R\0";
char date_format[32] = "%a %m. %b\0";
char time_format[32] = "%H:%M:%S\0";
char date_format[32] = "%A, %m %Y\0";
uint32_t last_resolution[2];

Loading…
Cancel
Save