diff --git a/.config/ags/modules/.commonwidgets/notification.js b/.config/ags/modules/.commonwidgets/notification.js index 251320db..c8c4ffb3 100644 --- a/.config/ags/modules/.commonwidgets/notification.js +++ b/.config/ags/modules/.commonwidgets/notification.js @@ -222,7 +222,7 @@ export default ({ else if (messageTime.get_day_of_year() == GLib.DateTime.new_now_local().get_day_of_year() - 1) notifTime = 'Yesterday'; else - notifTime = messageTime.format('%d/%m'); + notifTime = messageTime.format(userOptions.time.dateFormat); const notifTextSummary = Label({ xalign: 0, className: 'txt-small txt-semibold titlefont', diff --git a/.config/ags/modules/bar/normal/system.js b/.config/ags/modules/bar/normal/system.js index ba0e4acf..d7b0d909 100644 --- a/.config/ags/modules/bar/normal/system.js +++ b/.config/ags/modules/bar/normal/system.js @@ -45,9 +45,9 @@ const BarClock = () => Widget.Box({ }), Widget.Label({ className: 'txt-smallie', - label: GLib.DateTime.new_now_local().format("%A, %d/%m"), - setup: (self) => self.poll(5000, label => { - label.label = GLib.DateTime.new_now_local().format("%A, %d/%m"); + label: GLib.DateTime.new_now_local().format(userOptions.time.dateFormatLong), + setup: (self) => self.poll(userOptions.time.dateInterval, (label) => { + label.label = GLib.DateTime.new_now_local().format(userOptions.time.dateFormatLong); }), }), ], diff --git a/.config/ags/modules/desktopbackground/timeandlaunches.js b/.config/ags/modules/desktopbackground/timeandlaunches.js index 4a4f19a3..f0e0214b 100644 --- a/.config/ags/modules/desktopbackground/timeandlaunches.js +++ b/.config/ags/modules/desktopbackground/timeandlaunches.js @@ -25,9 +25,9 @@ const TimeAndDate = () => Box({ Label({ className: 'bg-time-date', xalign: 0, - label: GLib.DateTime.new_now_local().format("%A, %d/%m/%Y"), - setup: (self) => self.poll(5000, label => { - label.label = GLib.DateTime.new_now_local().format("%A, %d/%m/%Y"); + label: GLib.DateTime.new_now_local().format(userOptions.time.dateFormatLong), + setup: (self) => self.poll(userOptions.time.dateInterval, (label) => { + label.label = GLib.DateTime.new_now_local().format(userOptions.time.dateFormatLong); }), }), ] diff --git a/.config/ags/user_options.js b/.config/ags/user_options.js index 84b7f01a..2be90931 100644 --- a/.config/ags/user_options.js +++ b/.config/ags/user_options.js @@ -44,6 +44,9 @@ let userConfigOptions = { // For seconds, add "%S" and set interval to 1000 'format': "%H:%M", 'interval': 5000, + 'dateFormatLong': "%A, %d/%m", // On bar + 'dateInterval': 5000, + 'dateFormat': "%d/%m", // On notif time }, 'weather': { 'city': "",