Compare commits

...

2 Commits

Author SHA1 Message Date
Amir Alexander Abdelbaki 357a19cb8c remigrating to custom monitor manager solution 2026-06-26 08:39:40 +02:00
Amir Alexander Abdelbaki 7016388210 fix(monitor-manager): account for scale when computing logical monitor size
logical_width/height now divide physical pixels by scale so the canvas
correctly represents the compositor's coordinate space (e.g. 3840px @1.5x
is 2560 logical px wide, not 3840).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 08:34:34 +02:00
3 changed files with 6 additions and 6 deletions

View File

@ -17,7 +17,7 @@
-- They are loaded in this specific order so that later modules can safely
-- depend on earlier ones (e.g., binds may reference programs launched by
-- autostart; input-device-exceptions builds on the global input baseline).
require("monitors") -- monitor layout, resolution, scale (managed by hyprmoncfg)
require("usr.monitors") -- monitor layout, resolution, scale (managed by hyprmoncfg)
require("usr.envvars") -- environment variables injected into every child process
require("usr.input") -- keyboard layout, mouse sensitivity, touchpad behaviour
require("usr.binds") -- all keybindings and mouse button bindings

View File

@ -58,7 +58,7 @@ hl.bind(mainMod .. " + ALT + F", hl.dsp.exec_cmd("wofi-calc"))
hl.bind(mainMod .. " + S", hl.dsp.exec_cmd("[tag +mixer] pavucontrol"))
hl.bind(mainMod .. " + U", hl.dsp.exec_cmd("[tag +centered-L] kitty btop"))
hl.bind(mainMod .. " + W", hl.dsp.exec_cmd("[tag +centered-L] kitty -e ~/.config/scripts/wallpaper-picker ~/Pictures"))
hl.bind(mainMod .. " + SHIFT + M", hl.dsp.exec_cmd("[tag +centered-L] kitty -e hyprmoncfg"))
hl.bind(mainMod .. " + SHIFT + M", hl.dsp.exec_cmd("[tag +centered-L] kitty -e ~/.config/scripts/monitor-manager"))
hl.bind(mainMod .. " + CTRL + R", hl.dsp.exec_cmd("[tag +centered-L] kitty -e ~/.config/scripts/amssh"))
hl.bind(mainMod .. " + F1", hl.dsp.exec_cmd("[tag +centered] kitty ~/.config/scripts/helpmenu.sh"))
hl.bind(mainMod .. " + CTRL + T", hl.dsp.exec_cmd("[tag +centered-S] kitty bash ~/.config/scripts/timer-pick"))

View File

@ -114,14 +114,14 @@ class MonitorState:
@property
def logical_width(self) -> int:
if (self.transform & 3) in (1, 3):
return self.height
return self.width
return round(self.height / self.scale)
return round(self.width / self.scale)
@property
def logical_height(self) -> int:
if (self.transform & 3) in (1, 3):
return self.width
return self.height
return round(self.width / self.scale)
return round(self.height / self.scale)
@property
def mode_str(self) -> str: