forked from Shinonome/dots-hyprland
user config: add time format #307
This commit is contained in:
@@ -218,7 +218,7 @@ export default ({
|
||||
let notifTime = '';
|
||||
const messageTime = GLib.DateTime.new_from_unix_local(notifObject.time);
|
||||
if (messageTime.get_day_of_year() == GLib.DateTime.new_now_local().get_day_of_year())
|
||||
notifTime = messageTime.format('%H:%M');
|
||||
notifTime = messageTime.format(userOptions.time.format);
|
||||
else if (messageTime.get_day_of_year() == GLib.DateTime.new_now_local().get_day_of_year() - 1)
|
||||
notifTime = 'Yesterday';
|
||||
else
|
||||
|
||||
@@ -34,9 +34,9 @@ const BarClock = () => Widget.Box({
|
||||
children: [
|
||||
Widget.Label({
|
||||
className: 'bar-clock',
|
||||
label: GLib.DateTime.new_now_local().format("%H:%M"),
|
||||
setup: (self) => self.poll(5000, label => {
|
||||
label.label = GLib.DateTime.new_now_local().format("%H:%M");
|
||||
label: GLib.DateTime.new_now_local().format(userOptions.time.format),
|
||||
setup: (self) => self.poll(userOptions.time.interval, label => {
|
||||
label.label = GLib.DateTime.new_now_local().format(userOptions.time.format);
|
||||
}),
|
||||
}),
|
||||
Widget.Label({
|
||||
|
||||
@@ -17,9 +17,9 @@ const TimeAndDate = () => Box({
|
||||
Label({
|
||||
className: 'bg-time-clock',
|
||||
xalign: 0,
|
||||
label: GLib.DateTime.new_now_local().format("%H:%M"),
|
||||
setup: (self) => self.poll(5000, label => {
|
||||
label.label = GLib.DateTime.new_now_local().format("%H:%M");
|
||||
label: GLib.DateTime.new_now_local().format(userOptions.time.format),
|
||||
setup: (self) => self.poll(userOptions.time.interval, label => {
|
||||
label.label = GLib.DateTime.new_now_local().format(userOptions.time.format);
|
||||
}),
|
||||
}),
|
||||
Label({
|
||||
|
||||
Reference in New Issue
Block a user