sway: center align titles, use vulkan renderer

This commit is contained in:
chayleaf 2023-02-21 16:36:44 +07:00
parent 9e1e6df979
commit 01c0995f38
2 changed files with 9 additions and 2 deletions

View file

@ -199,6 +199,9 @@ in
''; '';
wayland.windowManager.sway = { wayland.windowManager.sway = {
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
extraConfig = ''
title_align center
'';
config = let swayConfig = { config = let swayConfig = {
bars = [ bars = [
{ {
@ -289,6 +292,7 @@ in
bg = "~/var/wallpaper.jpg fill"; bg = "~/var/wallpaper.jpg fill";
# improved screen latency, apparently # improved screen latency, apparently
max_render_time = "2"; max_render_time = "2";
adaptive_sync = "on";
}; };
}; };
input = { input = {
@ -300,6 +304,7 @@ in
menu = "${rofiSway}/bin/rofi -show drun"; menu = "${rofiSway}/bin/rofi -show drun";
}; in commonConfig // swayConfig; }; in commonConfig // swayConfig;
extraSessionCommands = '' extraSessionCommands = ''
export WLR_RENDERER=vulkan
export SDL_VIDEODRIVER=wayland export SDL_VIDEODRIVER=wayland
export QT_QPA_PLATFORM=wayland export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
@ -328,8 +333,8 @@ in
]; ];
timeouts = [ timeouts = [
{ timeout = 300; { timeout = 300;
command = "${pkgs.sway}/bin/swaymsg \"output * dpms off\""; command = "${pkgs.sway}/bin/swaymsg \"output * power off\"";
resumeCommand = "${pkgs.sway}/bin/swaymsg \"output * dpms on\""; } resumeCommand = "${pkgs.sway}/bin/swaymsg \"output * power on\""; }
{ timeout = 600; { timeout = 600;
command = swaylock-start; } command = swaylock-start; }
]; ];

View file

@ -92,6 +92,8 @@ in {
video.hidpi.enable = true; video.hidpi.enable = true;
enableRedistributableFirmware = true; enableRedistributableFirmware = true;
opengl.driSupport32Bit = true; opengl.driSupport32Bit = true;
# sway WLR_RENDERER=vulkan
opengl.extraPackages = with pkgs; [ vulkan-validation-layers ];
}; };
services.tlp.settings = { services.tlp.settings = {