mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
fix sidebar pin (#203)
This commit is contained in:
parent
5ab9a16587
commit
5cae087bdb
2 changed files with 1 additions and 9 deletions
|
|
@ -5,7 +5,7 @@ export default () => PopupWindow({
|
||||||
focusable: true,
|
focusable: true,
|
||||||
anchor: ['left', 'top', 'bottom'],
|
anchor: ['left', 'top', 'bottom'],
|
||||||
name: 'sideleft',
|
name: 'sideleft',
|
||||||
// exclusivity: 'exclusive',
|
layer: 'top',
|
||||||
showClassName: 'sideleft-show',
|
showClassName: 'sideleft-show',
|
||||||
hideClassName: 'sideleft-hide',
|
hideClassName: 'sideleft-hide',
|
||||||
child: SidebarLeft(),
|
child: SidebarLeft(),
|
||||||
|
|
|
||||||
|
|
@ -102,22 +102,14 @@ const pinButton = Button({
|
||||||
self.toggleClassName('sidebar-pin-enabled', self.attribute.enabled);
|
self.toggleClassName('sidebar-pin-enabled', self.attribute.enabled);
|
||||||
|
|
||||||
const sideleftWindow = App.getWindow('sideleft');
|
const sideleftWindow = App.getWindow('sideleft');
|
||||||
const barWindow = App.getWindow('bar');
|
|
||||||
const cornerTopLeftWindow = App.getWindow('cornertl');
|
|
||||||
const sideleftContent = sideleftWindow.get_children()[0].get_children()[0].get_children()[1];
|
const sideleftContent = sideleftWindow.get_children()[0].get_children()[0].get_children()[1];
|
||||||
|
|
||||||
sideleftContent.toggleClassName('sidebar-pinned', self.attribute.enabled);
|
sideleftContent.toggleClassName('sidebar-pinned', self.attribute.enabled);
|
||||||
|
|
||||||
if (self.attribute.enabled) {
|
if (self.attribute.enabled) {
|
||||||
sideleftWindow.layer = 'bottom';
|
|
||||||
barWindow.layer = 'bottom';
|
|
||||||
cornerTopLeftWindow.layer = 'bottom';
|
|
||||||
sideleftWindow.exclusivity = 'exclusive';
|
sideleftWindow.exclusivity = 'exclusive';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sideleftWindow.layer = 'top';
|
|
||||||
barWindow.layer = 'top';
|
|
||||||
cornerTopLeftWindow.layer = 'top';
|
|
||||||
sideleftWindow.exclusivity = 'normal';
|
sideleftWindow.exclusivity = 'normal';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue