nixos-configs/modules/ags/config/widgets/bg-layer/main.tsx
matt1432 6ca0d7248b
All checks were successful
Discord / discord commits (push) Has been skipped
refactor: rename some flake attr directories
2024-12-16 15:51:41 -05:00

35 lines
1 KiB
TypeScript

import { Astal, Gdk } from 'astal/gtk3';
export default (
monitor = Gdk.Display.get_default()?.get_monitor(0) as Gdk.Monitor,
gradient = true,
) => {
return (
<window
name="bg-layer"
namespace="bg-layer"
gdkmonitor={monitor}
layer={Astal.Layer.BACKGROUND}
exclusivity={Astal.Exclusivity.IGNORE}
anchor={
Astal.WindowAnchor.TOP |
Astal.WindowAnchor.BOTTOM |
Astal.WindowAnchor.LEFT |
Astal.WindowAnchor.RIGHT
}
css={
gradient ?
`
background-image: -gtk-gradient (linear,
left top, left bottom,
from(rgba(0, 0, 0, 0.5)),
to(rgba(0, 0, 0, 0)));
` :
`
background-color: rgba(0, 0, 0, 0.4);
`
}
/>
);
};