add: clipboard history widget
This commit is contained in:
@ -9,8 +9,8 @@ export const hideWindow = (self: Gtk.Window, keyval: number) => {
|
||||
const keys = ["quick_settings"].includes(self.name)
|
||||
? [Gdk.KEY_Escape]
|
||||
: [
|
||||
Gdk.KEY_Escape,
|
||||
Gdk.KEY_Super_L,
|
||||
Gdk.KEY_Escape,
|
||||
Gdk.KEY_Super_L,
|
||||
Gdk.KEY_Super_R
|
||||
];
|
||||
|
||||
@ -21,4 +21,12 @@ export const openOnButton = (event: Gdk.ButtonEvent, keyval: number) => (action:
|
||||
if (event.get_button() !== keyval) return;
|
||||
|
||||
action();
|
||||
}
|
||||
}
|
||||
|
||||
export const limit = <T>(list: T[], max: number) => list.filter((_, i) => i <= (max - 1));
|
||||
export const skip = <T>(list: T[], items: number) => list.filter((_, i) => {
|
||||
if (items < 0) items = 0;
|
||||
if (items > (list.length - 1)) items = list.length;
|
||||
|
||||
return i > (items - 1);
|
||||
});
|
Reference in New Issue
Block a user