From 01c0995f38dc1f17f5ff48fefd5dbd50a7c6116b Mon Sep 17 00:00:00 2001 From: chayleaf Date: Tue, 21 Feb 2023 16:36:44 +0700 Subject: [PATCH] sway: center align titles, use vulkan renderer --- home/common/i3-sway.nix | 9 +++++++-- system/hosts/nixmsi.nix | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/home/common/i3-sway.nix b/home/common/i3-sway.nix index ee61d28..ddab576 100644 --- a/home/common/i3-sway.nix +++ b/home/common/i3-sway.nix @@ -199,6 +199,9 @@ in ''; wayland.windowManager.sway = { wrapperFeatures.gtk = true; + extraConfig = '' + title_align center + ''; config = let swayConfig = { bars = [ { @@ -289,6 +292,7 @@ in bg = "~/var/wallpaper.jpg fill"; # improved screen latency, apparently max_render_time = "2"; + adaptive_sync = "on"; }; }; input = { @@ -300,6 +304,7 @@ in menu = "${rofiSway}/bin/rofi -show drun"; }; in commonConfig // swayConfig; extraSessionCommands = '' + export WLR_RENDERER=vulkan export SDL_VIDEODRIVER=wayland export QT_QPA_PLATFORM=wayland export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 @@ -328,8 +333,8 @@ in ]; timeouts = [ { timeout = 300; - command = "${pkgs.sway}/bin/swaymsg \"output * dpms off\""; - resumeCommand = "${pkgs.sway}/bin/swaymsg \"output * dpms on\""; } + command = "${pkgs.sway}/bin/swaymsg \"output * power off\""; + resumeCommand = "${pkgs.sway}/bin/swaymsg \"output * power on\""; } { timeout = 600; command = swaylock-start; } ]; diff --git a/system/hosts/nixmsi.nix b/system/hosts/nixmsi.nix index a2c4505..198c816 100644 --- a/system/hosts/nixmsi.nix +++ b/system/hosts/nixmsi.nix @@ -92,6 +92,8 @@ in { video.hidpi.enable = true; enableRedistributableFirmware = true; opengl.driSupport32Bit = true; + # sway WLR_RENDERER=vulkan + opengl.extraPackages = with pkgs; [ vulkan-validation-layers ]; }; services.tlp.settings = {