nixos-configs/modules/ags/config/widgets/bg-layer/index.tsx
matt1432 46e719f851
All checks were successful
Discord / discord commits (push) Has been skipped
refactor(ags): change main to index files
2024-12-19 18:04:12 -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);
`
}
/>
);
};