nix/home/programs/sway.nix
2024-01-22 16:42:29 +00:00

51 lines
1 KiB
Nix

{
pkgs,
config,
...
}: let
term = "${config.programs.terminal}/bin/${config.programs.terminal.pname}";
modKeyName = config.windowManager.modifierKey;
modifier =
if modKeyName == "SUPER"
then "Mod4"
else if modKeyName == "ALT"
then "Mod1"
else null;
in {
imports = [
(import ./swaylock.nix)
(import ./swayidle.nix)
(import ./waybar.nix)
];
xdg.portal = {
enable = true;
configPackages = [pkgs.sway];
extraPortals = [pkgs.xdg-desktop-portal-wlr pkgs.xdg-desktop-portal-gtk];
};
wayland.windowManager.sway = {
enable = true;
config = {
inherit modifier;
bars = [];
input = {
"*" = {
xkb_layout = "gb";
xkb_options = "esperanto:qwerty,lv3:ralt_switch";
};
"type:touchpad".natural_scroll = "enabled";
};
};
};
services.mako.enable = true;
programs.waybar = {
enable = true;
settings = {
mainBar = {
modules-left = ["sway/workspaces" "sway/window"];
};
};
};
}