-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Conversation
@@ -11,5 +11,5 @@ export const Time = () => | |||
className: "time", | |||
label: time.bind(), | |||
}), | |||
onClicked: () => Utils.execAsync("swaync-client -t"), | |||
on_clicked: () => App.toggleWindow("timemenu"), |
There was a problem hiding this comment.
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
ags/lib/option-rs.ts
Outdated
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export function SetupCssHotReload(dest: string) { | |
export function setupCssHotReload(dest: string) { |
// 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}`); | ||
}); | ||
}); |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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
ags/timemenu/icon.ts
Outdated
const icon = Option.from(app_entry) | ||
.andThen(iconAsOption) | ||
.orElse(() => iconAsOption(app_icon)) | ||
.unwrapOr(""); // TODO: Add some fallback icon here.; |
There was a problem hiding this comment.
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
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. |
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