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 37 additions and 33 deletions

View file

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

View file

@ -38,11 +38,9 @@ const Center = (
children: [
CenterBox({
// @ts-expect-error
vertical: true,
children: [
Box({
start_widget: Box({
class_name: 'metadata',
vertical: true,
hpack: 'start',
@ -54,20 +52,12 @@ const Center = (
mpris.ArtistLabel(player),
],
}),
null,
null,
],
}),
CenterBox({
// @ts-expect-error
vertical: true,
children: [
null,
mpris.PlayPauseButton(player, colors),
null,
],
center_widget: mpris.PlayPauseButton(player, colors),
}),
],

View file

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

View file

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

View file

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

Binary file not shown.

View file

@ -39,6 +39,22 @@ in {
## gui
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; [
lisgd