feat(ags): move closeWindowDelay to popup.ts
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
efa318d4d1
commit
47d1642e2e
5 changed files with 13 additions and 27 deletions
|
@ -5,8 +5,6 @@ import Bar from './ts/bar/binto.ts';
|
||||||
import { NotifPopups, NotifCenter } from './ts/notifications/binto.ts';
|
import { NotifPopups, NotifCenter } from './ts/notifications/binto.ts';
|
||||||
import Powermenu from './ts/powermenu.ts';
|
import Powermenu from './ts/powermenu.ts';
|
||||||
|
|
||||||
const closeWinDelay = 800;
|
|
||||||
|
|
||||||
|
|
||||||
// TODO: add OSD, workspace indicator and current window indicator
|
// TODO: add OSD, workspace indicator and current window indicator
|
||||||
export default {
|
export default {
|
||||||
|
@ -14,11 +12,6 @@ export default {
|
||||||
globalThis.Pointers = Pointers;
|
globalThis.Pointers = Pointers;
|
||||||
},
|
},
|
||||||
|
|
||||||
closeWindowDelay: {
|
|
||||||
'applauncher': closeWinDelay,
|
|
||||||
'notification-center': closeWinDelay,
|
|
||||||
'powermenu': closeWinDelay,
|
|
||||||
},
|
|
||||||
windows: [
|
windows: [
|
||||||
AppLauncher(),
|
AppLauncher(),
|
||||||
NotifCenter(),
|
NotifCenter(),
|
||||||
|
|
|
@ -50,7 +50,6 @@ class Tablet extends Service {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this.#listenOskState();
|
this.#listenOskState();
|
||||||
execAsync('squeekboard').catch(print);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#blockInputs() {
|
#blockInputs() {
|
||||||
|
|
|
@ -90,11 +90,16 @@ export class PopupWindow<
|
||||||
layer,
|
layer,
|
||||||
attribute,
|
attribute,
|
||||||
setup: () => {
|
setup: () => {
|
||||||
// Add way to make window open on startup
|
|
||||||
const id = App.connect('config-parsed', () => {
|
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) {
|
if (visible) {
|
||||||
App.openWindow(`${name}`);
|
App.openWindow(`${name}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This connection should always run only once
|
||||||
App.disconnect(id);
|
App.disconnect(id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -12,19 +12,8 @@ import QSettings from './ts/quick-settings/main.ts';
|
||||||
|
|
||||||
Setup();
|
Setup();
|
||||||
|
|
||||||
const closeWinDelay = 800;
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
closeWindowDelay: {
|
|
||||||
'applauncher': closeWinDelay,
|
|
||||||
'calendar': closeWinDelay,
|
|
||||||
'notification-center': closeWinDelay,
|
|
||||||
'osd': 300,
|
|
||||||
'osk': closeWinDelay,
|
|
||||||
'powermenu': closeWinDelay,
|
|
||||||
'quick-settings': closeWinDelay,
|
|
||||||
},
|
|
||||||
windows: [
|
windows: [
|
||||||
...Corners(),
|
...Corners(),
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,7 @@ in {
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
symlink = config.lib.file.mkOutOfStoreSymlink;
|
symlink = config.lib.file.mkOutOfStoreSymlink;
|
||||||
inherit (lib) optionalAttrs optionals;
|
inherit (lib) optionals;
|
||||||
|
|
||||||
cfgHypr = config.wayland.windowManager.hyprland;
|
|
||||||
in {
|
in {
|
||||||
programs.ags.enable = true;
|
programs.ags.enable = true;
|
||||||
|
|
||||||
|
@ -59,10 +57,12 @@ in {
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
settings = {
|
settings = {
|
||||||
exec-once = [
|
exec-once =
|
||||||
"ags"
|
[
|
||||||
"sleep 3; ags -r 'App.openWindow(\"applauncher\")'"
|
"ags"
|
||||||
];
|
"sleep 3; ags -r 'App.openWindow(\"applauncher\")'"
|
||||||
|
]
|
||||||
|
++ optionals isTouchscreen ["squeekboard"];
|
||||||
|
|
||||||
bindn = [",Escape, exec, ags run-js 'closeAll()'"];
|
bindn = [",Escape, exec, ags run-js 'closeAll()'"];
|
||||||
bind = [
|
bind = [
|
||||||
|
|
Loading…
Reference in a new issue