Added pagination to the notifications menu and a configurable limit to the amount of notifications spawned. (#199)
* Added notification pagination and pagination configuration options. fixes #171 * Added skip to end buttons * Update theme * Removed unused theme parts * Update pager colors * Theme auto-generator * Update label color in options for pager. * Updated themes * Added option to change footer background for notifications menu. * Changes to the Displayed Total options now update the menu. Bugfix
This commit is contained in:
@@ -9,7 +9,7 @@ import { CloseButton } from "./close/index.js";
|
||||
import { getPosition } from "lib/utils.js";
|
||||
const hyprland = await Service.import("hyprland");
|
||||
|
||||
const { position, timeout, cache_actions, monitor, active_monitor } = options.notifications;
|
||||
const { position, timeout, cache_actions, monitor, active_monitor, displayedTotal } = options.notifications;
|
||||
|
||||
|
||||
const curMonitor = Variable(monitor.value);
|
||||
@@ -47,7 +47,7 @@ export default () => {
|
||||
hexpand: true,
|
||||
setup: (self) => {
|
||||
self.hook(notifs, () => {
|
||||
return (self.children = notifs.popups.map((notif) => {
|
||||
return (self.children = notifs.popups.slice(0, displayedTotal.value).map((notif) => {
|
||||
return Widget.Box({
|
||||
class_name: "notification-card",
|
||||
vpack: "start",
|
||||
|
||||
Reference in New Issue
Block a user