end-4 / dots-hyprland

Modern, feature-rich and accessible desktop configuration.
https://end-4.github.io/dots-hyprland-wiki/en/
GNU General Public License v3.0
3.34k stars 218 forks source link

[Issue] Sessionscreen interface display is misaligned when enable HiDPI #417

Closed Mooling0602 closed 2 months ago

Mooling0602 commented 3 months ago
alok-debnath commented 3 months ago

yes that happens with me too when I use higher scaling image

alok-debnath commented 3 months ago

Btw, this can be fixed if we use this pull request #336 (mainly this file .config/ags/variables.js). We just need to replace this on .config/ags/modules/session/sessionscreen.js

min-width: ${SCREEN_WIDTH}px;
min-height: ${SCREEN_HEIGHT}px;

with

min-width: ${SCREEN_REAL_WIDTH}px;
min-height: ${SCREEN_REAL_HEIGHT}px;

after importing those 2 variables from the mentioned file. @end-4 Is there any plans for merging that PR, not sure how it will behave on a multi monitor setup but it is working fine on my laptop

Mooling0602 commented 3 months ago

Btw, this can be fixed if we use this pull request #336 (mainly this file .config/ags/variables.js). We just need to replace this on .config/ags/modules/session/sessionscreen.js

min-width: ${SCREEN_WIDTH}px;
min-height: ${SCREEN_HEIGHT}px;

with

min-width: ${SCREEN_REAL_WIDTH}px;
min-height: ${SCREEN_REAL_HEIGHT}px;

after importing those 2 variables from the mentioned file. @end-4 Is there any plans for merging that PR, not sure how it will behave on a multi monitor setup but it is working fine on my laptop

But this not work for me, after importing those variables, I can just see a wallpaper and can't do anything.

Ate329 commented 3 months ago

Substitute SCREEN_WIDTH and SCREEN_HEIGHT in /.config/ags/variables.js with these two lines can solve the issue and that's how my problem was solved.

export const SCREEN_WIDTH = Number(exec(`bash -c "hyprctl monitors -j | gojq '.[].width / .[].scale' | awk '{print int($1+0.5)}'"`));
export const SCREEN_HEIGHT = Number(exec(`bash -c "hyprctl monitors -j | gojq '.[].height / .[].scale' | awk '{print int($1+0.5)}'"`));

See the this comment in the other issue for more details: https://github.com/end-4/dots-hyprland/issues/424#issuecomment-2065543053

end-4 commented 3 months ago

that fixed it for me when I adjust monitor scale let me know if it fixed it for you

Mooling0602 commented 3 months ago

that fixed it for me when I adjust monitor scale let me know if it fixed it for you

My installation was broken because of wrong changes by myself, I'll test it later after reinstalling.

Mooling0602 commented 2 months ago

that fixed it for me when I adjust monitor scale let me know if it fixed it for you

Works fine on my Surface Pro.