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 { App } from 'astal/gtk3';
|
||||||
|
|
||||||
import Greeter from '../widgets/greeter/main';
|
import Greeter from '../widgets/greeter/main';
|
||||||
|
@ -12,9 +12,7 @@ export default () => {
|
||||||
instanceName: 'greeter',
|
instanceName: 'greeter',
|
||||||
|
|
||||||
main: () => {
|
main: () => {
|
||||||
execAsync('hyprpaper').catch(() => { /**/ });
|
Greeter(subprocess('hyprpaper'));
|
||||||
|
|
||||||
Greeter();
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { App, Astal, Gdk, Gtk, Widget } from 'astal/gtk3';
|
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';
|
import AstalHyprland from 'gi://AstalHyprland';
|
||||||
const Hyprland = AstalHyprland.get_default();
|
const Hyprland = AstalHyprland.get_default();
|
||||||
|
@ -65,7 +65,7 @@ export default ({
|
||||||
gdkmonitor?: Gdk.Monitor
|
gdkmonitor?: Gdk.Monitor
|
||||||
} & Widget.WindowProps) => {
|
} & Widget.WindowProps) => {
|
||||||
const monitor = get_hyprland_monitor_desc(gdkmonitor);
|
const monitor = get_hyprland_monitor_desc(gdkmonitor);
|
||||||
const BarVisible = Variable(true);
|
const BarVisible = Variable(false);
|
||||||
|
|
||||||
FullscreenState.subscribe((v) => {
|
FullscreenState.subscribe((v) => {
|
||||||
BarVisible.set(!v.monitors.includes(monitor));
|
BarVisible.set(!v.monitors.includes(monitor));
|
||||||
|
@ -183,5 +183,9 @@ export default ({
|
||||||
|
|
||||||
App.add_window(win);
|
App.add_window(win);
|
||||||
|
|
||||||
|
idle(() => {
|
||||||
|
BarVisible.set(true);
|
||||||
|
});
|
||||||
|
|
||||||
return win;
|
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 { App, Astal, Gtk, Widget } from 'astal/gtk3';
|
||||||
|
|
||||||
import AstalGreet from 'gi://AstalGreet';
|
import AstalGreet from 'gi://AstalGreet';
|
||||||
|
|
||||||
|
import { centerCursor } from '../../lib';
|
||||||
|
|
||||||
export default () => {
|
|
||||||
|
export default (hyprpaper: InstanceType<typeof Process>) => {
|
||||||
const DEFAULT_NAME = 'matt';
|
const DEFAULT_NAME = 'matt';
|
||||||
const PARSED_INDEX = {
|
const PARSED_INDEX = {
|
||||||
name: 0,
|
name: 0,
|
||||||
|
@ -67,7 +69,12 @@ export default () => {
|
||||||
(_, res) => {
|
(_, res) => {
|
||||||
try {
|
try {
|
||||||
AstalGreet.login_finish(res);
|
AstalGreet.login_finish(res);
|
||||||
App.quit();
|
App.get_window('greeter')?.set_visible(false);
|
||||||
|
hyprpaper.kill();
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
App.quit();
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
response.label = JSON.stringify(error);
|
response.label = JSON.stringify(error);
|
||||||
|
@ -81,7 +88,16 @@ export default () => {
|
||||||
return (
|
return (
|
||||||
<window
|
<window
|
||||||
name="greeter"
|
name="greeter"
|
||||||
|
application={App}
|
||||||
keymode={Astal.Keymode.ON_DEMAND}
|
keymode={Astal.Keymode.ON_DEMAND}
|
||||||
|
visible={false}
|
||||||
|
setup={(self) => {
|
||||||
|
centerCursor();
|
||||||
|
setTimeout(() => {
|
||||||
|
self.visible = true;
|
||||||
|
password.grab_focus();
|
||||||
|
}, 1000);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<box
|
<box
|
||||||
vertical
|
vertical
|
||||||
|
|
|
@ -45,7 +45,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
layerrule = [
|
layerrule = [
|
||||||
"noanim, ^(?!win-).*"
|
"animation popin, ^(hyprpaper.*)"
|
||||||
|
"animation fade, ^(bg-layer.*)"
|
||||||
|
|
||||||
# Lockscreen blur
|
# Lockscreen blur
|
||||||
"blur, ^(blur-bg.*)"
|
"blur, ^(blur-bg.*)"
|
||||||
|
|
|
@ -52,6 +52,11 @@ self: {
|
||||||
shadow.enabled = false;
|
shadow.enabled = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
animation = [
|
||||||
|
"fadeLayersIn, 0"
|
||||||
|
"layers, 1, 4, default, popin 0%"
|
||||||
|
];
|
||||||
|
|
||||||
exec-once = [
|
exec-once = [
|
||||||
setupMonitors
|
setupMonitors
|
||||||
"agsGreeter &> /tmp/ags-greetd.log; hyprctl dispatch exit"
|
"agsGreeter &> /tmp/ags-greetd.log; hyprctl dispatch exit"
|
||||||
|
|
Loading…
Reference in a new issue