mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2026-01-04 14:52:50 +00:00
ags steal
This commit is contained in:
27
desktops/hyprland/ags/windows/lib/popupwindow.js
Normal file
27
desktops/hyprland/ags/windows/lib/popupwindow.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import { App, Widget } from '../../imports.js';
|
||||
const { Revealer, Box, Window } = Widget;
|
||||
|
||||
|
||||
export default ({
|
||||
name,
|
||||
child,
|
||||
showClassName,
|
||||
hideClassName,
|
||||
...props
|
||||
}) => Window({
|
||||
name,
|
||||
popup: true,
|
||||
visible: false,
|
||||
layer: 'overlay',
|
||||
...props,
|
||||
|
||||
child: Box({
|
||||
className: `${showClassName} ${hideClassName}`,
|
||||
connections: [[App, (self, currentName, visible) => {
|
||||
if (currentName === name) {
|
||||
self.toggleClassName(hideClassName, !visible);
|
||||
}
|
||||
}]],
|
||||
child: child,
|
||||
}),
|
||||
});
|
||||
Reference in New Issue
Block a user