diff --git a/home-profiles/desktop/.Xresources b/home-profiles/desktop/.Xresources index bb86d3f94954edfb152a90d6e71f254ed6f96794..45377b2048f5435d558d86540131ad9b01a05b34 100644 --- a/home-profiles/desktop/.Xresources +++ b/home-profiles/desktop/.Xresources @@ -40,3 +40,6 @@ xterm*foreground: lightgray ! terminal: dark background XTerm.vt100.reverseVideo: true + +! XWayland DPI Fix +Xft.dpi: 96 diff --git a/home-profiles/desktop/.config/sway/config b/home-profiles/desktop/.config/sway/config index b9fd9dc6278bb823dfba39c1969f3b54835201e8..37a560c9a0db74c9775c7320e7c81b5bd9bad9cf 100644 --- a/home-profiles/desktop/.config/sway/config +++ b/home-profiles/desktop/.config/sway/config @@ -67,6 +67,9 @@ exec CM_SELECTIONS=clipboard clipmenud #exec nm-applet --indicator exec redshift -m wayland +# Fix XWayland DPI +exec xrdb -load ~/.Xresources + # Share wayland socket with other users # This should allocate a free socket instead # Also requires passwordless sudo, so it's currently disabled diff --git a/nixos/layers/desktop.nix b/nixos/layers/desktop.nix index ecd0b2c1851531aadffb205bb474b136ddb4fc11..c20e2316918b5e8abe6068eb0ac3efc0902d427a 100644 --- a/nixos/layers/desktop.nix +++ b/nixos/layers/desktop.nix @@ -73,10 +73,8 @@ in }; - - programs.sway.enable = true; - programs.sway.extraPackages = with pkgs; [ swaylock swayidle xwayland kitty cool-retro-term ]; + programs.sway.extraPackages = with pkgs; [ swaylock swayidle xwayland kitty cool-retro-term xorg.xrdb ]; # QT_QPA_PLATFORM=wayland requires qt5.qtwayland in systemPackages programs.sway.extraSessionCommands = '' export SDL_VIDEODRIVER=wayland @@ -84,9 +82,9 @@ export QT_QPA_PLATFORM=wayland export QT_WAYLAND_DISABLE_WINDOWDECORATION="1" ''; environment.loginShellInit = '' -# start sway when logging in on tty1 -if [ "$USER" = jens ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ] && [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then -exec sway &> /run/user/$UID/sway_log -fi + # start sway when logging in on tty1 + if [ "$USER" = jens ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ] && [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then + exec sway &> /run/user/$UID/sway_log + fi ''; }