feat(ags): add updateTypes script
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
99ea57a669
commit
650a8c70fa
7 changed files with 37 additions and 33 deletions
|
@ -44,7 +44,6 @@ export const CoverArt = (
|
||||||
props: CenterBoxProps,
|
props: CenterBoxProps,
|
||||||
) => CenterBox({
|
) => CenterBox({
|
||||||
...props,
|
...props,
|
||||||
// @ts-expect-error
|
|
||||||
vertical: true,
|
vertical: true,
|
||||||
|
|
||||||
attribute: {
|
attribute: {
|
||||||
|
|
|
@ -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,
|
|
||||||
],
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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({
|
||||||
|
|
BIN
flake.lock
BIN
flake.lock
Binary file not shown.
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue