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, props: CenterBoxProps,
) => CenterBox({ ) => CenterBox({
...props, ...props,
// @ts-expect-error
vertical: true, vertical: true,
attribute: { attribute: {

View file

@ -38,11 +38,9 @@ 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',
@ -54,20 +52,12 @@ const Center = (
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({

Binary file not shown.

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