feat(ags): add animations between DM and DE
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
ef23df4bb2
commit
44b73e7cae
5 changed files with 34 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
import { execAsync } from 'astal';
|
||||
import { subprocess } from 'astal';
|
||||
import { App } from 'astal/gtk3';
|
||||
|
||||
import Greeter from '../widgets/greeter/main';
|
||||
|
@ -12,9 +12,7 @@ export default () => {
|
|||
instanceName: 'greeter',
|
||||
|
||||
main: () => {
|
||||
execAsync('hyprpaper').catch(() => { /**/ });
|
||||
|
||||
Greeter();
|
||||
Greeter(subprocess('hyprpaper'));
|
||||
},
|
||||
});
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
import { idle, readFile } from 'astal';
|
||||
import { idle, readFile, Process } from 'astal';
|
||||
import { App, Astal, Gtk, Widget } from 'astal/gtk3';
|
||||
|
||||
import AstalGreet from 'gi://AstalGreet';
|
||||
|
||||
import { centerCursor } from '../../lib';
|
||||
|
||||
export default () => {
|
||||
|
||||
export default (hyprpaper: InstanceType<typeof Process>) => {
|
||||
const DEFAULT_NAME = 'matt';
|
||||
const PARSED_INDEX = {
|
||||
name: 0,
|
||||
|
@ -67,7 +69,12 @@ export default () => {
|
|||
(_, res) => {
|
||||
try {
|
||||
AstalGreet.login_finish(res);
|
||||
App.get_window('greeter')?.set_visible(false);
|
||||
hyprpaper.kill();
|
||||
|
||||
setTimeout(() => {
|
||||
App.quit();
|
||||
}, 500);
|
||||
}
|
||||
catch (error) {
|
||||
response.label = JSON.stringify(error);
|
||||
|
@ -81,7 +88,16 @@ export default () => {
|
|||
return (
|
||||
<window
|
||||
name="greeter"
|
||||
application={App}
|
||||
keymode={Astal.Keymode.ON_DEMAND}
|
||||
visible={false}
|
||||
setup={(self) => {
|
||||
centerCursor();
|
||||
setTimeout(() => {
|
||||
self.visible = true;
|
||||
password.grab_focus();
|
||||
}, 1000);
|
||||
}}
|
||||
>
|
||||
<box
|
||||
vertical
|
||||
|
|
|
@ -45,7 +45,8 @@
|
|||
};
|
||||
|
||||
layerrule = [
|
||||
"noanim, ^(?!win-).*"
|
||||
"animation popin, ^(hyprpaper.*)"
|
||||
"animation fade, ^(bg-layer.*)"
|
||||
|
||||
# Lockscreen blur
|
||||
"blur, ^(blur-bg.*)"
|
||||
|
|
|
@ -52,6 +52,11 @@ self: {
|
|||
shadow.enabled = false;
|
||||
};
|
||||
|
||||
animation = [
|
||||
"fadeLayersIn, 0"
|
||||
"layers, 1, 4, default, popin 0%"
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
setupMonitors
|
||||
"agsGreeter &> /tmp/ags-greetd.log; hyprctl dispatch exit"
|
||||
|
|
Loading…
Reference in a new issue