102 lines
2.2 KiB
Nix
Executable file
102 lines
2.2 KiB
Nix
Executable file
{ lib, pkgs, ... }:
|
|
with lib;
|
|
with pkgs;
|
|
let
|
|
|
|
left = "h";
|
|
down = "j";
|
|
up = "k";
|
|
right = "l";
|
|
|
|
in {
|
|
imports = [ ./swayfx.nix ];
|
|
|
|
wayland.windowManager.sway = {
|
|
enable = true;
|
|
extraSessionCommands = ''
|
|
export SDL_VIDEODRIVER=wayland
|
|
export QT_QPA_PLATFORM=wayland
|
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
|
export XDG_CURRENT_DESKTOP=sway
|
|
export XDG_SESSION_TYPE=wayland
|
|
'';
|
|
extraConfig = "";
|
|
xwayland = true;
|
|
checkConfig = false;
|
|
package = pkgs.swayfx;
|
|
wrapperFeatures = {
|
|
base = true;
|
|
gtk = true;
|
|
};
|
|
systemd = {
|
|
enable = true;
|
|
#xdgAutostart = true;
|
|
#extraCommands = [
|
|
#];
|
|
#variables = [
|
|
#];
|
|
};
|
|
|
|
swaynag = {
|
|
enable = true;
|
|
settings = { };
|
|
};
|
|
|
|
config = {
|
|
|
|
output = {
|
|
eDP-1 = {
|
|
## Set HIDP scale (pixel integer scaling)
|
|
scale = "1";
|
|
};
|
|
};
|
|
|
|
defaultWorkspace = "workspace number 1";
|
|
|
|
## Use Wofi as menu
|
|
menu = "menu";
|
|
## Use kitty as default terminal
|
|
terminal = "kitty";
|
|
## Startup scripts and programs
|
|
startup = [ { command = "startup"; } { command = "kitty"; } ];
|
|
modifier = "Mod4";
|
|
floating = { modifier = "Mod4"; };
|
|
|
|
## Window and focus settings
|
|
window = { };
|
|
focus = {
|
|
followMouse = true;
|
|
mouseWarping = false;
|
|
newWindow = "smart";
|
|
};
|
|
|
|
keybindings = mkOptionDefault (import ./keybinds.nix { inherit pkgs; });
|
|
|
|
#modes = {
|
|
#resize = {
|
|
#Escape = "mode default";
|
|
#Return = "mode default";
|
|
#"${down}" = "resize grow height 10 px or 10 ppt";
|
|
#"${left}" = "resize shrink width 10 px or 10 ppt";
|
|
#"${right}" = "resize grow width 10 px or 10 ppt";
|
|
#"${up}" = "resize shrink height 10 px or 10 ppt";
|
|
#};
|
|
#};
|
|
|
|
};
|
|
};
|
|
|
|
home = {
|
|
packages = with pkgs; [ ];
|
|
|
|
sessionVariables = {
|
|
XDG_SESSION_TYPE = "wayland";
|
|
XDG_CURRENT_DESKTOP = "sway";
|
|
SDL_VIDEODRIVER = "wayland";
|
|
# needs qt5.qtwayland in systemPackages
|
|
QT_QPA_PLATFORM = "wayland";
|
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
|
};
|
|
};
|
|
|
|
}
|