feat(ags): add animations between DM and DE

This commit is contained in:
matt1432 2024-11-20 00:54:02 -05:00
parent ef23df4bb2
commit 44b73e7cae
5 changed files with 34 additions and 10 deletions
nixosModules/ags/config/widgets/bar

View file

@ -1,5 +1,5 @@
import { App, Astal, Gdk, Gtk, Widget } from 'astal/gtk3';
import { bind, Variable } from 'astal';
import { bind, idle, Variable } from 'astal';
import AstalHyprland from 'gi://AstalHyprland';
const Hyprland = AstalHyprland.get_default();
@ -65,7 +65,7 @@ export default ({
gdkmonitor?: Gdk.Monitor
} & Widget.WindowProps) => {
const monitor = get_hyprland_monitor_desc(gdkmonitor);
const BarVisible = Variable(true);
const BarVisible = Variable(false);
FullscreenState.subscribe((v) => {
BarVisible.set(!v.monitors.includes(monitor));
@ -183,5 +183,9 @@ export default ({
App.add_window(win);
idle(() => {
BarVisible.set(true);
});
return win;
};