You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why? Window takes a monitor property and uses a number to determine which monitor id should be used. It breaks the logical following for Hyprland.monitors to not be mapped via numbers, because it makes it harder to try and perform any kinds of connections or setup based on a specific monitor.
Example: I want to position my bar 1% from the top and left-right. Because I can't do this via GTK css nor (from what I can find) with ags as is, I need to use Hyprland.monitors["MONITOR"].width/.height to access the properties needed for calculation, then dynamically rewrite the Window.margin property. However, because I can only access the monitors with a "name", I now need to manually loop through to find id == 0, then get its width/height props. It's just strange, please make one or the other, preferrably numbers because thats more portable across systems (laptops have eDP-1, pcs have HDMI-A-1, and who knows what else, but numbers are consistent).
EDIT:
Scratch that I can't even access window.margin from a setup call haha, are there ways to accomplish what im trying to do here?
The text was updated successfully, but these errors were encountered:
It started out like that because the events emitted by Hyprland are by name, not id, but I agree that it makes more sense.
If you want to set margin from setup you have to use gtk-layer-shell directly for now, because just like ags.Widget, ags.Window is just a parser, have a look at the source for reference.
I am working on a new version where everything is subclassed so you will be able to use window.margin after construction too.
Did spot the source, will do, since the setup object is a Gtk.Window i should be able to directly use it in any Gtk functions. Thanks for the swift changes!
Why? Window takes a monitor property and uses a
number
to determine which monitor id should be used. It breaks the logical following for Hyprland.monitors to not be mapped via numbers, because it makes it harder to try and perform any kinds ofconnections
orsetup
based on a specific monitor.Example: I want to position my bar 1% from the top and left-right. Because I can't do this via GTK css nor (from what I can find) with ags as is, I need to use
Hyprland.monitors["MONITOR"].width/.height
to access the properties needed for calculation, then dynamically rewrite theWindow.margin
property. However, because I can only access the monitors with a "name", I now need to manually loop through to findid == 0
, then get its width/height props. It's just strange, please make one or the other, preferrably numbers because thats more portable across systems (laptops have eDP-1, pcs have HDMI-A-1, and who knows what else, but numbers are consistent).EDIT:
Scratch that I can't even access window.margin from a
setup
call haha, are there ways to accomplish what im trying to do here?The text was updated successfully, but these errors were encountered: