feat(ags): add updateTypes script
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-01-14 20:52:30 -05:00
parent 99ea57a669
commit 650a8c70fa
7 changed files with 80 additions and 88 deletions

View file

@ -44,7 +44,6 @@ export const CoverArt = (
props: CenterBoxProps, props: CenterBoxProps,
) => CenterBox({ ) => CenterBox({
...props, ...props,
// @ts-expect-error
vertical: true, vertical: true,
attribute: { attribute: {

View file

@ -38,36 +38,26 @@ const Center = (
children: [ children: [
CenterBox({ CenterBox({
// @ts-expect-error
vertical: true, vertical: true,
children: [ start_widget: Box({
Box({ class_name: 'metadata',
class_name: 'metadata', vertical: true,
vertical: true, hpack: 'start',
hpack: 'start', vpack: 'center',
vpack: 'center', hexpand: true,
hexpand: true,
children: [ children: [
mpris.TitleLabel(player), mpris.TitleLabel(player),
mpris.ArtistLabel(player), mpris.ArtistLabel(player),
], ],
}), }),
null,
null,
],
}), }),
CenterBox({ CenterBox({
// @ts-expect-error
vertical: true, vertical: true,
children: [ center_widget: mpris.PlayPauseButton(player, colors),
null,
mpris.PlayPauseButton(player, colors),
null,
],
}), }),
], ],

View file

@ -37,8 +37,8 @@ const NotificationIcon = (notif: NotifObj) => {
console.log(box); console.log(box);
}; };
if (notif._appEntry && Applications.query(notif._appEntry).length > 0) { if (notif.app_entry && Applications.query(notif.app_entry).length > 0) {
const app = Applications.query(notif._appEntry)[0]; const app = Applications.query(notif.app_entry)[0];
let wmClass = app.app.get_string('StartupWMClass'); let wmClass = app.app.get_string('StartupWMClass');
@ -109,13 +109,13 @@ const NotificationIcon = (notif: NotifObj) => {
let icon = 'dialog-information-symbolic'; let icon = 'dialog-information-symbolic';
if (lookUpIcon(notif._appIcon)) { if (lookUpIcon(notif.app_icon)) {
icon = notif._appIcon; icon = notif.app_icon;
} }
if (notif._appEntry && lookUpIcon(notif._appEntry)) { if (notif.app_entry && lookUpIcon(notif.app_entry)) {
icon = notif._appEntry; icon = notif.app_entry;
} }
@ -158,7 +158,7 @@ export const Notification = ({
'Spotify', 'Spotify',
]; ];
if (BlockedApps.find((app) => app === notif._appName)) { if (BlockedApps.find((app) => app === notif.app_name)) {
notif.close(); notif.close();
return; return;

View file

@ -47,11 +47,11 @@ const LCTRL_CODE = 29;
// Types // Types
import { Variable as Var } from 'types/variable.ts'; import { Variable as Var } from 'types/variable.ts';
type Key = { type Key = {
keytype: 'normal', keytype: string,
label: string, label: string,
labelShift?: string, labelShift?: string,
labelAltGr?: string, labelAltGr?: string,
shape: 'normal' | 'modkey', shape: string,
keycode: number keycode: number
}; };

View file

@ -9,7 +9,6 @@ import CursorBox from './misc/cursorbox.ts';
const PowermenuWidget = () => CenterBox({ const PowermenuWidget = () => CenterBox({
class_name: 'powermenu', class_name: 'powermenu',
// @ts-expect-error
vertical: false, vertical: false,
start_widget: CursorBox({ start_widget: CursorBox({

View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1705256758, "lastModified": 1705273764,
"narHash": "sha256-e6cybelQaZAK31zpnFjLciA4bAQvlFFVmh+Ob0H27QE=", "narHash": "sha256-qWHrCYk7IZhXhfkOESazhRwpSH85yJvOrOjBfmxE0QI=",
"owner": "Aylur", "owner": "Aylur",
"repo": "ags", "repo": "ags",
"rev": "d243a45872b36f286044becdfe6223890d504e5d", "rev": "3fce4efcc25c981c552eb58108d01d64e7033e14",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -497,11 +497,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1705169127, "lastModified": 1705269478,
"narHash": "sha256-j9OEtNxOIPWZWjbECVMkI1TO17SzlpHMm0LnVWKOR/g=", "narHash": "sha256-j7Rp8Y3ckBHOlIzqe0g2+/BVce9SU/dVtn4Eb0rMuY4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "f2942f3385f1b35cc8a1abb03a45e29c9cb4d3c8", "rev": "846200eb574faa2af808ed02e653c2b8ed51fd71",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -542,11 +542,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1705253252, "lastModified": 1705277009,
"narHash": "sha256-u3gEnjPq5zJR+/bJXHFw1gH7MB3ovj5bHFe3f7Pb2eo=", "narHash": "sha256-foKe6AfJ1HyjXOyaCpCIcsc08Nbyz00u7NV3QbQe0gA=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "b6516bad0281efb55195e8db180aa2dcaf8b98e4", "rev": "dcd7a92b01a360bbe7afa7299604c4040abb4c62",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -582,7 +582,11 @@
}, },
"hyprlang": { "hyprlang": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "nixpkgs": [
"hyprland",
"xdph",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1704287638, "lastModified": 1704287638,
@ -684,7 +688,7 @@
}, },
"nh": { "nh": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1705251288, "lastModified": 1705251288,
@ -704,7 +708,7 @@
"inputs": { "inputs": {
"flake-parts": "flake-parts_6", "flake-parts": "flake-parts_6",
"nix-github-actions": "nix-github-actions", "nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs_6", "nixpkgs": "nixpkgs_5",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
@ -747,14 +751,14 @@
"nix-gaming": { "nix-gaming": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_5", "flake-parts": "flake-parts_5",
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1705242731, "lastModified": 1705281520,
"narHash": "sha256-gfuMbiOPlPpl48jH8hGPY/zfaS3OTjdVN2cn450RTBg=", "narHash": "sha256-lCKjL4GBNw74xLTd36OajeHw212S4mhKhRW2cLhCkfA=",
"owner": "fufexan", "owner": "fufexan",
"repo": "nix-gaming", "repo": "nix-gaming",
"rev": "c41c0e5e4fbf942046512760dfa31e88c61d4347", "rev": "88d3fa859bb4baa2dff23f5546c0843bb51dca6e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -792,11 +796,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1705201750, "lastModified": 1705282324,
"narHash": "sha256-0umjkDiAoXDsIhaFlIIhKFTX/q7sMhfzvhNuY6wFdZo=", "narHash": "sha256-LnURMA7yCM5t7et9O2+2YfGQh0FKAfE5GyahNDDzJVM=",
"owner": "Mic92", "owner": "Mic92",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "274a40dbf8be212697f3988471a4473987f8a886", "rev": "49aaeecf41ae0a0944e2c627cb515bcde428a1d1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -807,7 +811,7 @@
}, },
"nix-melt": { "nix-melt": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1704764047, "lastModified": 1704764047,
@ -851,16 +855,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1702645756, "lastModified": 1701263465,
"narHash": "sha256-qKI6OR3TYJYQB3Q8mAZ+DG4o/BR9ptcv9UnRV2hzljc=", "narHash": "sha256-lNXUIlkfyDyp9Ox21hr+wsEf/IBklLvb6bYcyeXbdRc=",
"owner": "nixos", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "40c3c94c241286dd2243ea34d3aef8a488f9e4d0", "rev": "50aa30a13c4ab5e7ba282da460a3e3d44e9d0eb3",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixos-23.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -935,7 +939,7 @@
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"lib-aggregate": "lib-aggregate", "lib-aggregate": "lib-aggregate",
"nix-eval-jobs": "nix-eval-jobs", "nix-eval-jobs": "nix-eval-jobs",
"nixpkgs": "nixpkgs_7" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1705080950, "lastModified": 1705080950,
@ -952,22 +956,6 @@
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1701263465,
"narHash": "sha256-lNXUIlkfyDyp9Ox21hr+wsEf/IBklLvb6bYcyeXbdRc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "50aa30a13c4ab5e7ba282da460a3e3d44e9d0eb3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1704842529, "lastModified": 1704842529,
"narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=", "narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=",
@ -983,7 +971,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1688590700, "lastModified": 1688590700,
"narHash": "sha256-ZF055rIUP89cVwiLpG5xkJzx00gEuuGFF60Bs/LM3wc=", "narHash": "sha256-ZF055rIUP89cVwiLpG5xkJzx00gEuuGFF60Bs/LM3wc=",
@ -999,7 +987,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_5": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1705133751, "lastModified": 1705133751,
"narHash": "sha256-rCIsyE80jgiOU78gCWN3A0wE0tR2GI5nH6MlS+HaaSQ=", "narHash": "sha256-rCIsyE80jgiOU78gCWN3A0wE0tR2GI5nH6MlS+HaaSQ=",
@ -1015,7 +1003,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_6": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1703134684, "lastModified": 1703134684,
"narHash": "sha256-SQmng1EnBFLzS7WSRyPM9HgmZP2kLJcPAz+Ug/nug6o=", "narHash": "sha256-SQmng1EnBFLzS7WSRyPM9HgmZP2kLJcPAz+Ug/nug6o=",
@ -1031,7 +1019,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_7": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1704722960, "lastModified": 1704722960,
"narHash": "sha256-mKGJ3sPsT6//s+Knglai5YflJUF2DGj7Ai6Ynopz0kI=", "narHash": "sha256-mKGJ3sPsT6//s+Knglai5YflJUF2DGj7Ai6Ynopz0kI=",
@ -1047,7 +1035,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_8": { "nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1689850295, "lastModified": 1689850295,
"narHash": "sha256-fUYf6WdQlhd2H+3aR8jST5dhFH1d0eE22aes8fNIfyk=", "narHash": "sha256-fUYf6WdQlhd2H+3aR8jST5dhFH1d0eE22aes8fNIfyk=",
@ -1133,11 +1121,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1705263290, "lastModified": 1705279394,
"narHash": "sha256-KdeOMVfM7Ih/HdlUnNCyOl3Zw1q8lTpOOAK0ilM6nrM=", "narHash": "sha256-EaNfnCH9eXNrVptaoaqogaxILP1/C+lFFygJl3AxOuY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "e29cbed55ca5a2cf117662bd9179a85476184ff6", "rev": "902398e334b8e93403ab3ecb7b25d3c59f054224",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1148,7 +1136,7 @@
}, },
"nurl": { "nurl": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_8" "nixpkgs": "nixpkgs_7"
}, },
"locked": { "locked": {
"lastModified": 1704764151, "lastModified": 1704764151,
@ -1284,7 +1272,7 @@
"nix-index-db": "nix-index-db", "nix-index-db": "nix-index-db",
"nix-melt": "nix-melt", "nix-melt": "nix-melt",
"nix-on-droid": "nix-on-droid", "nix-on-droid": "nix-on-droid",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_4",
"nixpkgs-wayland": "nixpkgs-wayland", "nixpkgs-wayland": "nixpkgs-wayland",
"nms": "nms", "nms": "nms",
"nur": "nur", "nur": "nur",
@ -1563,11 +1551,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1704400467, "lastModified": 1704659450,
"narHash": "sha256-IsEAKBCorRlN53FwFAMbyGLRsPVu/ZrWEJtCwykPds8=", "narHash": "sha256-3lyoUVtUWz1LuxbltAtkJSK2IlVXmKhxCRU2/0PYCms=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"rev": "1c802128f6cc3db29a8ef01552b1a22f894eeefd", "rev": "6a5de92769d5b7038134044053f90e7458f6a197",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -39,6 +39,22 @@ in {
## gui ## gui
pavucontrol # TODO: replace with ags widget pavucontrol # TODO: replace with ags widget
(writeShellApplication {
name = "updateTypes";
runtimeInputs = [ nodejs_18 typescript git ];
text = ''
if [[ -d /tmp/ags-types ]]; then
rm -r /tmp/ags-types
fi
rm -r ~/.config/ags/types
git clone https://github.com/Aylur/ags.git /tmp/ags-types
/tmp/ags-types/example/starter-config/setup.sh
rm -r /tmp/ags-types
'';
})
]) ])
++ (optionals isTouchscreen (with pkgs; [ ++ (optionals isTouchscreen (with pkgs; [
lisgd lisgd