feat(ags): move closeWindowDelay to popup.ts
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-02-05 10:37:56 -05:00
parent efa318d4d1
commit 47d1642e2e
5 changed files with 13 additions and 27 deletions

View file

@ -5,8 +5,6 @@ import Bar from './ts/bar/binto.ts';
import { NotifPopups, NotifCenter } from './ts/notifications/binto.ts';
import Powermenu from './ts/powermenu.ts';
const closeWinDelay = 800;
// TODO: add OSD, workspace indicator and current window indicator
export default {
@ -14,11 +12,6 @@ export default {
globalThis.Pointers = Pointers;
},
closeWindowDelay: {
'applauncher': closeWinDelay,
'notification-center': closeWinDelay,
'powermenu': closeWinDelay,
},
windows: [
AppLauncher(),
NotifCenter(),

View file

@ -50,7 +50,6 @@ class Tablet extends Service {
constructor() {
super();
this.#listenOskState();
execAsync('squeekboard').catch(print);
}
#blockInputs() {

View file

@ -90,11 +90,16 @@ export class PopupWindow<
layer,
attribute,
setup: () => {
// Add way to make window open on startup
const id = App.connect('config-parsed', () => {
// Set close delay dynamically
App.closeWindowDelay[name] = transition_duration;
// Add way to make window open on startup
if (visible) {
App.openWindow(`${name}`);
}
// This connection should always run only once
App.disconnect(id);
});

View file

@ -12,19 +12,8 @@ import QSettings from './ts/quick-settings/main.ts';
Setup();
const closeWinDelay = 800;
export default {
closeWindowDelay: {
'applauncher': closeWinDelay,
'calendar': closeWinDelay,
'notification-center': closeWinDelay,
'osd': 300,
'osk': closeWinDelay,
'powermenu': closeWinDelay,
'quick-settings': closeWinDelay,
},
windows: [
...Corners(),

View file

@ -19,9 +19,7 @@ in {
...
}: let
symlink = config.lib.file.mkOutOfStoreSymlink;
inherit (lib) optionalAttrs optionals;
cfgHypr = config.wayland.windowManager.hyprland;
inherit (lib) optionals;
in {
programs.ags.enable = true;
@ -59,10 +57,12 @@ in {
wayland.windowManager.hyprland = {
settings = {
exec-once = [
"ags"
"sleep 3; ags -r 'App.openWindow(\"applauncher\")'"
];
exec-once =
[
"ags"
"sleep 3; ags -r 'App.openWindow(\"applauncher\")'"
]
++ optionals isTouchscreen ["squeekboard"];
bindn = [",Escape, exec, ags run-js 'closeAll()'"];
bind = [