prasanthrangan / hyprdots

// Aesthetic, dynamic and minimal dots for Arch hyprland
GNU General Public License v3.0
7.5k stars 867 forks source link

HDIPI scaling on xwayland applications is messed sometimes after restart #7

Closed haShinui closed 1 year ago

haShinui commented 1 year ago

Hello so I like this script a lot and the hyprland. So I first did a manual install of hyprland which failed miserably and then used this script. I turned out ok but I didnt like the look to much and I needed hdpi hyrpland and it worked okon there, same goes here. I stumbled upon this script and I liked the looks way more and I was setting it up trying to use my framework fingerprint, which works on my test hyprland with the other script and on kde. So no reason shouldnt work here, I did it the same as shown here and adding this line auth sufficient pam_fprintd.so on my test hyprland worked but not here. So I de installed and reinstalled it sddm-git and did fix it. I also encountered some problems with fprintd that once I enrolled it and use fprintd-verify I needed to do it in sudo privileges. I even changed the files like they look in my my test hyprland and did not help. I trying to figure out but I dont know the problem, if you have any Idea please help.

haShinui commented 1 year ago

Also how do I change that when I open a file sometimes it open in vscode, example is broot opens files in vscodium, after deinstall it doesnt open at all. I want to use vim export VISUAL=/usr/bin/vim and that code does not work for some reason, sae goes for export EDITOR=..... I also de installed vscodium and now not working at all.

prasanthrangan commented 1 year ago

Are you trying to open file in vim from dolphin? if so, you have to set the default terminal as kitty in ~/.config/kdeglobals as below

[General]
TerminalApplication=kitty

image

prasanthrangan commented 1 year ago

Regarding the HDPI scaling, are you using auto config? If so, you could try hardcoding the monitor variables as suggested in wiki - https://wiki.hyprland.org/Configuring/Monitors/

haShinui commented 1 year ago

Thanks, dolphine was the problem. Now its goes over vim. But I set the resolution at the beginning, I have framework laptop so resolution is a bit wierd, but still its weird that scaling is changing sometimes after restart. Here is part of my hyprland.conf: `# change monitor to hires, the last argument is the scale factor monitor=DP-1,highres,2256x1504@60,2

sets xwayland scale

exec-once=xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2 #

toolkit-specific scale

env = GDK_DPI_SCALE,0.5

env = GDK_SCALE,1.5

env = GDK_DPI_SCALE,0.5

env = XCURSOR_SIZE,32

env = MOZ_ENABLE_WAYLAND,1

See https://wiki.hyprland.org/Configuring/Keywords/ for more

Execute your favorite apps at launch

exec-once = ~/.config/hypr/xdg-portal-hyprland # reset XDPH for screenshare exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH exec-once = waybar # launch the system panel exec-once = blueman-applet # Systray app for BT exec-once = nm-applet --indicator # Systray app for Network/Wifi exec-once = dunst # start notification demon exec-once = /usr/lib/polkit-kde-authentication-agent-1 # authentication dialogue for GUI apps exec-once = ~/.config/swww/swwwallpaper.sh # start wallpaper daemon exec-once = easyeffects --gapplication-service

sets xwayland scale

exec-once=xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2

toolkit-specific scale

env = GDK_SCALE,2

env = GDK_DPI_SCALE,0.5

env = XCURSOR_SIZE,32

Source a file (multi-file configs)

source = ~/.config/hypr/myColors.conf

source = ~/.config/hypr/theme.conf `

haShinui commented 1 year ago

Also I have another question to waybar. So I wanted to configure the tray in the middle where it displays the windows your on and the name and logo of the application. First I want to customize the first thing is that when you are in the termnial it should show the logo, but when I have nvim open, it should instead show the nvim logo. With that I come to my second issue, how to I show the nvim logo when I use nvim, I am not sure how exactly I should do it. I got it working with waybar as show in screenshot. image Also the focus is on the right because I have started up waybar there. But when I try this (.*)nvim or (.*)nvim:(.*) it doesn't work. And my third qustion is to figure out if I can replace the arch logo when I have another application in use. If I figure any of these steps out on my own I will edit this post

prasanthrangan commented 1 year ago

maybe you could try this for waybar -

    "hyprland/window": {
        "format": "{}",
        "separate-outputs": true,
        "rewrite": {
            "tittu@kryptonite:(.*)": "  $1",
            "(.*) — Mozilla Firefox": " 󰈹 $1",
            "(.*)Mozilla Firefox": " 󰈹 Firefox",
            "(.*) - Visual Studio Code": " 󰨞 $1",
            "(.*)Visual Studio Code": " 󰨞 Code",
            "(.*) — Dolphin": " 󰉋 $1",
            "(.*)Spotify": " 󰓇 Spotify",
            "(.*)Steam": " 󰓓 Steam",
            "nvim(.*)": " 󰕷 $1"
          }
    },

230518_22h38m47s_screenshot

prasanthrangan commented 1 year ago

regarding the scaling, did this not work?

exec-once=xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2

you could raise this to hyprland git issues.

haShinui commented 1 year ago

So the exec-once=xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2 does work I think but sometimes after restart the scale is just off or even it gets blurry fore some reason, so hdpi not working. Also thanks for waybar, I almost figured it out. I have a question, is it possible to have the logo of firefox for example where the arch logo is, but If O have nothing open or an application thats not in the rewite array, then it has the Arch logo. I know jsonc is based on java script but I cant use IF statement or if its even possible, if you have any idea let me know.

haShinui commented 1 year ago

So I just commented almost all env variables, it still sometimes buggy but gonna live with it.