mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2025-10-10 12:51:54 +05:30
15 lines
363 B
TypeScript
15 lines
363 B
TypeScript
import { App } from "astal/gtk4";
|
|
import { WINDOW_NAME } from "./widgets/bar";
|
|
|
|
export const reqHandler = (req: string, res: (res: any) => void) => {
|
|
switch (req) {
|
|
case "toggle-bar":
|
|
const win = App.get_window(WINDOW_NAME);
|
|
win?.is_visible() ? win.hide() : win?.set_visible(true);
|
|
break;
|
|
|
|
default:
|
|
res("uknown command");
|
|
}
|
|
};
|