commit 18a9572482b9f93a1e0f7aed6f1af3e353a3ce69
parent 5e1de46792bdc92264c9ad847e10bf6ec2e89e53
Author: Chris Guillott <chris@techfo.xyz>
Date: Fri, 14 Oct 2016 21:18:30 -0400
Add clock functionality and swap default time/date format strings
I set them to what I use because I'm an asshole.
Diffstat:
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/README.md b/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.
diff --git a/i3lock.c b/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];