vividnightmare / g510s

Graphical utility for Logitech G510 and G510s keyboards on Linux.
GNU General Public License v3.0
20 stars 2 forks source link

Clock format should be configurable #11

Closed joe-mojo closed 4 years ago

joe-mojo commented 4 years ago

clock format is hard-coded, could you make it configurable ? (for clock : 12/24h, for date: the language and order of words) -> It could be 2 simple text aread with a link to the doc of time/date patterns ;)

vividnightmare commented 4 years ago

It supports both 12 and 24 hour formats by pressing the first button beneath the screen. You can also hide the date portion by pressing the second button.

As far as I'm aware, the date should follow your locale settings. Setting the LANG environment variable to your locale should translate properly. Unfortunately, this will not affect the menu items or the order in which the date elements are presented on the screen.

LANG=de_DE.utf8 g510s

Adding this to /etc/xdg/autostart/g510s.desktop should work.

Exec=env LANG=de_DE.utf8 /usr/bin/g510s

Changing the order of the date could be done using one of the other available keys, but I don't know what the order is supposed to be outside of my locale.

Additionally, this supports any and all screens supported by g15daemon. As such you could write a clock that meets your needs rather easily, or perhaps even find some existing ones. Or, modify the existing code here, which is built into the program so you have a default screen instead of just a blank screen or an additional dependency.

https://github.com/vividnightmare/g510s/blob/689d70571a4605b886237b77e75ed43077df9b5b/g510s-clock.c#L71