fix: try to fix ime in firefox

This commit is contained in:
ryan4yin
2023-05-15 18:58:52 +08:00
parent 2d60de8c72
commit 587d29656c
2 changed files with 20 additions and 1 deletions

View File

@@ -28,6 +28,13 @@
# allow fontconfig to discover fonts and configurations installed through home.packages
fonts.fontconfig.enable = true;
# set cursor size and dpi for 4k monitor
# this is for xwayland
xresources.properties = {
"Xcursor.size" = 16;
"Xft.dpi" = 160;
};
systemd.user.sessionVariables = {
"NIXOS_OZONE_WL" = "1"; # for any ozone-based browser & electron apps to run on wayland
"MOZ_ENABLE_WAYLAND" = "1"; # for firefox to run on wayland

View File

@@ -196,4 +196,16 @@ exec-once=~/.config/hypr/scripts/startup
windowrule=pseudo,fcitx # enable this will make fcitx5 works, but fcitx5-configtool will not work!
exec-once=cp ~/.config/fcitx5/profile-bak ~/.config/fcitx5/profile # restore fcitx5 profile manged by nixos
exec-once=fcitx5 -d --replace # start fcitx5 daemon
bind=ALT,E,exec,pkill fcitx5 -9;sleep 1;fcitx5 -d --replace; sleep 1;fcitx5-remote -r
bind=ALT,E,exec,pkill fcitx5 -9;sleep 1;fcitx5 -d --replace; sleep 1;fcitx5-remote -r
# -- Fix input method in vscode
exec-once = hyprctl setcursor "Bibata-Modern-Ice" 24
# 效果是 wayland 原生窗口缩放完全正常
# xwayland 窗口先渲染到 200% 再降到 hyprland config 里 monitor 设置的值,看上去和原生没啥区别
# 相比较一开始的方案输入法字体大小也正确了.唯一有点问题的可能是 xwayland 窗口下的鼠标指针大小不对
exec-once = xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
exec-once = xrdb -merge ~/.Xresources
# env = GDK_SCALE,2
env = XCURSOR_SIZE,48
env = XCURSOR_THEME,"Bibata-Modern-Ice"