Tweak notifications on AGS

This commit is contained in:
Thomas Avé 2024-10-14 16:58:55 +02:00
parent d675225c83
commit 55a3387697
3 changed files with 110 additions and 103 deletions

View File

@ -99,8 +99,16 @@ export function NotificationPopups(monitor = 0) {
function onNotified(_, /** @type {number} */ id) { function onNotified(_, /** @type {number} */ id) {
const n = notifications.getNotification(id) const n = notifications.getNotification(id)
if (n) if (n) {
list.children = [Notification(n), ...list.children] list.children = [Notification(n), ...list.children]
// Schedule a timeout to dismiss the notification
setTimeout(() => {
const n = notifications.getNotification(id)
if (n) { // if the notification is still there
n.dismiss()
}
}, notifications.popupTimeout)
}
} }
function onDismissed(_, /** @type {number} */ id) { function onDismissed(_, /** @type {number} */ id) {

View File

@ -13,7 +13,7 @@
]; ];
home.packages = with pkgs; [ home.packages = with pkgs; [
libreoffice onlyoffice-bin
telegram-desktop telegram-desktop
webcord webcord
devenv devenv

View File

@ -105,8 +105,7 @@
wget = ''wget --hsts-file = "$XDG_DATA_HOME/wget-hsts"''; wget = ''wget --hsts-file = "$XDG_DATA_HOME/wget-hsts"'';
python = "python3"; python = "python3";
vim = "nvim"; vim = "nvim";
v = '' v = ''echo $(pwd) > /tmp/oil_dir && nvim -c ':lua require("oil").open()' && cd "$(cat /tmp/oil_dir 2> /dev/null || pwd)"'';
nvim -c ':lua require("oil").open()' && cd "$(cat /tmp/oil_dir 2> /dev/null || pwd)"'';
cpr = cpr =
"rsync --archive -hh --partial --info = stats1,progress2 --modify-window = 1"; "rsync --archive -hh --partial --info = stats1,progress2 --modify-window = 1";
mvr = mvr =