Compare commits

..

No commits in common. "a7fdacd25231a07f15351be616aad5bd4440fc6c" and "6f574f7b2dd5ccf80cd4063aaafee979a7e32bdf" have entirely different histories.

3 changed files with 5 additions and 89 deletions

View file

@ -1,81 +0,0 @@
import { Widget, Hyprland, Utils, Variable } from '../../imports.js';
const { Box, EventBox } = Widget;
const Revealed = Variable(true);
const Hovering = Variable(false);
import { Gesture } from './gesture.js';
export const Revealer = params => Box({
style: 'min-height: 1px',
vertical: true,
children: [
Widget.Revealer({
transition: 'slide_down',
setup: self => self.revealChild = true,
properties: [
['timeouts', []],
],
connections: [[Hyprland, self => {
Utils.execAsync('hyprctl activewindow -j')
.then(result => {
let client = JSON.parse(result);
if (client.fullscreen === Revealed.value) return;
Revealed.value = client.fullscreen;
if (Revealed.value) {
setTimeout(() => {
if (Revealed.value)
self.revealChild = false
}, 2000);
}
else {
self.revealChild = true;
}
}).catch(print);
}]],
child: Gesture({
onHover: () => Hovering.value = true,
onHoverLost: self => {
Hovering.value = false;
if (Revealed.value) {
setTimeout(() => {
if (!Hovering.value) {
self.get_parent().get_parent().children[1].revealChild = true;
self.get_parent().revealChild = false;
}
}, 2000);
}
},
...params,
}),
}),
Widget.Revealer({
connections: [[Revealed, self => {
if (Revealed.value) {
setTimeout(() => {
if (Revealed.value)
self.revealChild = true;
}, 2000);
}
else {
self.revealChild = false;
}
}]],
child: EventBox({
onHover: self => {
Hovering.value = true;
self.get_parent().get_parent().children[0].revealChild = true;
self.get_parent().revealChild = false;
},
child: Box({
style: 'min-height: 50px;',
}),
}),
}),
],
});

View file

@ -13,7 +13,7 @@ import { SysTray } from './systray.js';
import { BatteryIndicator } from './battery.js';
import { Brightness } from './brightness.js';
import { AudioIndicator } from './audio.js';
import { Revealer } from './fullscreen.js';
import { Gesture } from './gesture.js';
export const Bar = Window({
@ -21,7 +21,8 @@ export const Bar = Window({
layer: 'overlay',
anchor: 'top left right',
exclusive: true,
child: Revealer({
child: Gesture({
child: CenterBox({
className: 'transparent',
halign: 'fill',
@ -55,11 +56,7 @@ export const Bar = Window({
],
}),
centerWidget: Box({
children: [
CurrentWindow,
],
}),
centerWidget: CurrentWindow,
endWidget: Box({
halign: 'end',

View file

@ -72,7 +72,7 @@ export function updateClients(box) {
let clients = JSON.parse(result).filter(client => client.class)
box._workspaces.forEach(workspace => {
let fixed = workspace.child.child.get_children()[2].children[0];
let fixed = workspace.child.child.overlays[1].children[0];
let toRemove = fixed.get_children();
clients.filter(client => client.workspace.id == workspace._id).forEach(client => {