mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2026-01-22 09:32:38 +00:00
feat: update ags
This commit is contained in:
26
home/desktops/hyprland/ags/js/misc/Clock.js
Normal file
26
home/desktops/hyprland/ags/js/misc/Clock.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import Widget from "resource:///com/github/Aylur/ags/widget.js";
|
||||
import GLib from "gi://GLib";
|
||||
|
||||
/**
|
||||
* @param {import('types/widgets/label').Props & {
|
||||
* format?: string,
|
||||
* interval?: number,
|
||||
* }} o
|
||||
*/
|
||||
export default ({
|
||||
format = "%H:%M:%S %B %e. %A",
|
||||
interval = 1000,
|
||||
...rest
|
||||
} = {}) =>
|
||||
Widget.Label({
|
||||
class_name: "clock",
|
||||
...rest,
|
||||
connections: [
|
||||
[
|
||||
interval,
|
||||
(label) =>
|
||||
(label.label =
|
||||
GLib.DateTime.new_now_local().format(format) || "wrong format"),
|
||||
],
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user