Skip to content

HowTo: Change date time format on i3bar

Ken Gilmer edited this page Nov 2, 2019 · 1 revision

The date/time format on the i3 bar is defined by the Xresource key i3xrocks.date.format which is defined and set in /etc/regolith/styles/i3xrocks. In order to change the value, we could either just modify the value in that file, or copy them to the user directory and then customize them. The former approach is faster, but the modifications will be overwritten next time the regolith-styles package is updated, so the latter approach is better.

  1. Stage copies of Xresources in your user directory:
$ cp /etc/regolith/styles/root ~/.Xresources-regolith
$ mkdir ~/.Xresources.d
$ cp /etc/regolith/styles/i3xrocks ~/.Xresources.d/
  1. Modify the Xresource root to reference your user copy of the i3xrocks file by modifying ~/.Xresources-regolith to change the path of i3xrocks to the one you copied in the step above:
    #include "/home/<user-dir>/.Xresources.d/i3xrocks"
  2. Modify the actual date/time format to your liking in /home/<user-dir>/.Xresources.d/i3xrocks, for example: + %d-%m-%y %I:%M %p
  3. Log out and back in for the Xresource files to load.