added media widget

This commit is contained in:
wt committed 2025-03-11 12:49:58 +07:00
1 parent 8ee6cd6b0e
commit ceda1adee3
4 files changed
+251 -46

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
import { App, Astal, Gtk, Gdk } from "astal/gtk3";
function close_all_menus(safe: string) {
const menuWindows = App.get_windows()
.filter((w) => {
if (w.name) {
return /.*menu/.test(w.name);
}
return false;
})
.map((window) => window.name);
menuWindows.forEach((window) => {
if (window && window != safe) {
App.get_window(window)?.set_visible(false);
}
});
// App.get_window("powermenu").set_visible(false);
// App.get_window("Media").set_visible(false);
}
export { close_all_menus };