- i3-wm (sometimes called i3, either as a standalone or meta package)
- i3status
- i3bar
Open that file as root, and you should see something that looks like this:
Where it says time{format = "_"}, that is where the magic happens. The string supplied here is passed through a C function called strftime, which is the standard timestamp formatting tool across all Unix-like systems. The format they use with 24-hour clocks has the "%H" in the string. Find where it says "%H" inside of that string, and change it to "%l" to get the 12-hour time.
To see all of the options available, type "man strftime" at your terminal emulator.
The format I use across all of my bars and time-tools is "%a %b %_d %Y %H-> %l:%M:%S", which comes across like this:
Thanks so much for this! Just wanted to point out that you have a typo where it says "change it to %l to get the 24-hour time" it should say 12 hour time.
ReplyDeleteAnd for any lazy folks out there, add %p at the very end to get AM/PM.
Thanks for the heads up! After 2 years I finally change that 2 character typo. That's procrastination right there!
DeleteThanks author for the article and anonymous comment-er for essential addition.
ReplyDeleteAwesome! I'm still learning i3 (gaps) so tips like this help a great deal.
ReplyDeleteJust a note, don't edit /etc/i3status.conf! Copy it to ~/.i3tstatus.conf.
ReplyDeleteSee `man i3status` for more details :)
Mmm.. good to be here in your article or post, whatever, I think I should also work hard for my own website like I see some good and updated working in your site. 24 hour day clock
ReplyDeleteThis is pretty great. It got me actually wanting to mess with configs. I'm in the process of setting colors and I eventually want to do some further modifications for the a e s t h e t i c.
ReplyDeleteThanks for this. Still useful five years later.
ReplyDeleteThank you so much
ReplyDeletethanks this is still useful 9 years later lmao.. also note for any endeavour os users that use their i3 config the actually place to edit the time format is under ~/.config/i3/i3blocks.conf
ReplyDeleteactual*
Delete