forked from Shinonome/dots-hyprland
allow hiding fake screen rounding when fullscreen (#579)
This commit is contained in:
@@ -50,12 +50,12 @@ const Windows = () => [
|
|||||||
forMonitors(Osk),
|
forMonitors(Osk),
|
||||||
forMonitors(Session),
|
forMonitors(Session),
|
||||||
...(userOptions.dock.enabled ? [forMonitors(Dock)] : []),
|
...(userOptions.dock.enabled ? [forMonitors(Dock)] : []),
|
||||||
...(userOptions.appearance.fakeScreenRounding ? [
|
...(userOptions.appearance.fakeScreenRounding !== 0 ? [
|
||||||
forMonitors((id) => Corner(id, 'top left', true)),
|
forMonitors((id) => Corner(id, 'top left', true)),
|
||||||
forMonitors((id) => Corner(id, 'top right', true)),
|
forMonitors((id) => Corner(id, 'top right', true)),
|
||||||
] : []),
|
] : []),
|
||||||
forMonitors((id) => Corner(id, 'bottom left', userOptions.appearance.fakeScreenRounding)),
|
forMonitors((id) => Corner(id, 'bottom left', userOptions.appearance.fakeScreenRounding !== 0)),
|
||||||
forMonitors((id) => Corner(id, 'bottom right', userOptions.appearance.fakeScreenRounding)),
|
forMonitors((id) => Corner(id, 'bottom right', userOptions.appearance.fakeScreenRounding !== 0)),
|
||||||
forMonitors(BarCornerTopleft),
|
forMonitors(BarCornerTopleft),
|
||||||
forMonitors(BarCornerTopright),
|
forMonitors(BarCornerTopright),
|
||||||
];
|
];
|
||||||
@@ -76,3 +76,4 @@ App.config({
|
|||||||
// Stuff that don't need to be toggled. And they're async so ugh...
|
// Stuff that don't need to be toggled. And they're async so ugh...
|
||||||
forMonitorsAsync(Bar);
|
forMonitorsAsync(Bar);
|
||||||
// Bar().catch(print); // Use this to debug the bar. Single monitor only.
|
// Bar().catch(print); // Use this to debug the bar. Single monitor only.
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ let configOptions = {
|
|||||||
'keyboardUseFlag': false, // Use flag emoji instead of abbreviation letters
|
'keyboardUseFlag': false, // Use flag emoji instead of abbreviation letters
|
||||||
'layerSmoke': false,
|
'layerSmoke': false,
|
||||||
'layerSmokeStrength': 0.2,
|
'layerSmokeStrength': 0.2,
|
||||||
'fakeScreenRounding': true,
|
'fakeScreenRounding': 1, // 0: None | 1: Always | 2: When not fullscreen
|
||||||
},
|
},
|
||||||
'apps': {
|
'apps': {
|
||||||
'bluetooth': "blueberry",
|
'bluetooth': "blueberry",
|
||||||
|
|||||||
@@ -1,7 +1,27 @@
|
|||||||
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
||||||
|
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||||
import { enableClickthrough } from "../.widgetutils/clickthrough.js";
|
import { enableClickthrough } from "../.widgetutils/clickthrough.js";
|
||||||
import { RoundedCorner } from "../.commonwidgets/cairo_roundedcorner.js";
|
import { RoundedCorner } from "../.commonwidgets/cairo_roundedcorner.js";
|
||||||
|
|
||||||
|
if(userOptions.appearance.fakeScreenRounding === 2) Hyprland.connect('event', (service, name, data) => {
|
||||||
|
if (name == 'fullscreen') {
|
||||||
|
const monitor = Hyprland.active.monitor.id;
|
||||||
|
if (data == '1') {
|
||||||
|
for (const window of App.windows) {
|
||||||
|
if (window.name.startsWith("corner") && window.name.endsWith(monitor)) {
|
||||||
|
App.closeWindow(window.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (const window of App.windows) {
|
||||||
|
if (window.name.startsWith("corner") && window.name.endsWith(monitor)) {
|
||||||
|
App.openWindow(window.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
export default (monitor = 0, where = 'bottom left', useOverlayLayer = true) => {
|
export default (monitor = 0, where = 'bottom left', useOverlayLayer = true) => {
|
||||||
const positionString = where.replace(/\s/, ""); // remove space
|
const positionString = where.replace(/\s/, ""); // remove space
|
||||||
return Widget.Window({
|
return Widget.Window({
|
||||||
@@ -14,4 +34,5 @@ export default (monitor = 0, where = 'bottom left', useOverlayLayer = true) => {
|
|||||||
child: RoundedCorner(positionString, { className: 'corner-black', }),
|
child: RoundedCorner(positionString, { className: 'corner-black', }),
|
||||||
setup: enableClickthrough,
|
setup: enableClickthrough,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user