Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a notification panel #18

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from
Draft

Conversation

exellentcoin26
Copy link
Collaborator

@exellentcoin26 exellentcoin26 commented Nov 13, 2024

It does not look good, nor does it have all the functionality it should have. I decided to create this PR because I no longer wanted to block the feature.

Closes #8

@@ -11,5 +11,5 @@ export const Time = () =>
className: "time",
label: time.bind(),
}),
onClicked: () => Utils.execAsync("swaync-client -t"),
on_clicked: () => App.toggleWindow("timemenu"),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a better name for the window would be notification-center, same for the file name

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lmao
(ps: why not name it option.ts?)

@@ -29,6 +29,7 @@ export let config = {
enable: opt<boolean>(true),
},
},
development: opt<boolean>(false),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe instead an environment variable could be used for this

@@ -0,0 +1,18 @@
export function SetupCssHotReload(dest: string) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export function SetupCssHotReload(dest: string) {
export function setupCssHotReload(dest: string) {

Comment on lines +38 to +54
// Set up hot reloading of styles.
Utils.monitorFile(`${App.configDir}/style.scss`, (_, event) => {
if (event !== 0) {
// Not a changed event.
return;
}

print("Hot reloading styles.");
Promise.resolve(compileStyles(dest))
.then((_) => {
App.resetCss();
App.applyCss(`${dest}/style.css`);
})
.catch((reason) => {
print(`Hot reloading error: ${reason}`);
});
});
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intend to include the code for hot reloading twice? (here and in the develop.ts file)

}

.timemenu {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also rename the style to notification-center

const icon = Option.from(app_entry)
.andThen(iconAsOption)
.orElse(() => iconAsOption(app_icon))
.unwrapOr(""); // TODO: Add some fallback icon here.;
Copy link
Owner

@AndreasHGK AndreasHGK Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GNOME uses application-x-executable-symbolic, i think that is probably the most appropriate. Im assuming this is the icon of the app sending the notification and not the custom icon provided in the notification itself.

EDIT: item-missing-symbolic is also nice, idk which one i prefer

@AndreasHGK
Copy link
Owner

It seems like this makes it so the service now always tries to be the notification daemon. This may be a problem if someone wants to use their own notification daemon. IMO there should be an option to disable mithril's notifications.

Currently in AGS impoting the notifications service registers the program as a notification daemon so this would have to be worked around.

@exellentcoin26 exellentcoin26 marked this pull request as draft November 17, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notification center
2 participants