nixos/home/gui/home.nix

42 lines
1.2 KiB
Nix
Raw Normal View History

2024-01-03 15:29:21 +08:00
{ pkgs
, lib
, config
, ... }: with lib; let
terminal = toString pkgs.alacritty;
in mkIf config.passthrough.gui {
wayland.windowManager.sway = {
enable = true;
config = {
modifier = "Mod4";
2024-01-03 15:38:52 +08:00
menu = "wofi -show drun -modi drun";
2024-01-03 15:29:21 +08:00
keybindings = let
modifier = config.wayland.windowManager.sway.config.modifier;
in mkOptionDefault {
XF86MonBrightnessUp = "light -A 5";
XF86MonBrightnessDown = "light -U 5";
"Control+Alt+l" = "${pkgs.swaylock}/bin/swaylock -c 000000";
"Print" = "exec ${pkgs.grim}/bin/grim - | ${pkgs.wl-clipboard}/bin/wl-copy";
"${modifier}+Print" = "exec ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.wl-clipboard}/bin/wl-copy";
"${modifier}+q" = "exec google-chrome-stable";
};
2024-01-03 15:38:52 +08:00
input."*".natural_scroll = "enabled";
input."type:touchpad".tap = "enabled";
output."*".bg = "${../../share/54345906_p0.jpg} fill";
2024-01-03 15:29:21 +08:00
};
};
2024-01-03 16:29:51 +08:00
# application menu setup
2024-01-03 15:29:21 +08:00
programs.wofi.enable = true;
programs.wofi.settings.mode = "drun";
programs.wofi.settings.allow_images = true;
2024-01-03 16:29:51 +08:00
# cursor theme
home.pointerCursor = {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
};
2024-01-03 15:29:21 +08:00
}