forked from Shinonome/dots-hyprland
systray: (un)pin button, fix menu placecment (#3100)
This commit is contained in:
@@ -33,6 +33,14 @@ Singleton {
|
||||
function unpin(itemId) {
|
||||
Config.options.tray.pinnedItems = Config.options.tray.pinnedItems.filter(id => id !== itemId);
|
||||
}
|
||||
function isPinned(itemId) {
|
||||
for (var i = 0; i < root.pinnedItems.length; i++) {
|
||||
if (root.pinnedItems[i].id === itemId)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function togglePin(itemId) {
|
||||
var pins = Config.options.tray.pinnedItems;
|
||||
if (pins.includes(itemId)) {
|
||||
|
||||
Reference in New Issue
Block a user