83 lines
2.2 KiB
Nix
83 lines
2.2 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
|
modifier = "Mod4";
|
|
left = "h";
|
|
down = "t";
|
|
up = "n";
|
|
right = "s";
|
|
|
|
cmds = rec {
|
|
kitty = config.programs.kitty.package + /bin/kitty;
|
|
rofi = config.programs.rofi.finalPackage + /bin/rofi;
|
|
playerctl = pkgs.playerctl + /bin/playerctl;
|
|
pamixer = pkgs.pamixer + /bin/pamixer;
|
|
|
|
term = "${kitty}";
|
|
menu = "${rofi} -show drun";
|
|
window-menu = "${rofi} -show window";
|
|
};
|
|
in {
|
|
imports = [ ./polybar.nix ];
|
|
|
|
home.packages = with pkgs; [ arandr autorandr ];
|
|
|
|
xsession.windowManager.i3 = {
|
|
enable = true;
|
|
|
|
config = {
|
|
inherit modifier;
|
|
|
|
window.border = 3;
|
|
|
|
gaps.inner = 16;
|
|
fonts = {
|
|
names = [ "Iosevka" ];
|
|
size = 12.0;
|
|
};
|
|
|
|
bars = [ ];
|
|
|
|
floating.criteria = [
|
|
{ window_role = "^EMsgComposer"; } # Evolution mail compose
|
|
{ class = "^Yubico Authenticator$"; }
|
|
];
|
|
|
|
keybindings = let mod = config.xsession.windowManager.i3.config.modifier;
|
|
in lib.mkOptionDefault {
|
|
"${mod}+Return" = "exec ${cmds.term}";
|
|
"${mod}+d" = "exec ${cmds.menu}";
|
|
"${mod}+Shift+d" = "exec ${cmds.window-menu}";
|
|
"${mod}+Shift+c" = "kill";
|
|
|
|
"${mod}+${left}" = "focus left";
|
|
"${mod}+${down}" = "focus down";
|
|
"${mod}+${up}" = "focus up";
|
|
"${mod}+${right}" = "focus right";
|
|
|
|
"${mod}+Shift+${left}" = "move left";
|
|
"${mod}+Shift+${down}" = "move down";
|
|
"${mod}+Shift+${up}" = "move up";
|
|
"${mod}+Shift+${right}" = "move right";
|
|
|
|
"${mod}+Ctrl+${left}" = "move workspace to output left";
|
|
"${mod}+Ctrl+${right}" = "move workspace to output right";
|
|
"${mod}+Ctrl+Left" = "move workspace to output left";
|
|
"${mod}+Ctrl+Right" = "move workspace to output right";
|
|
|
|
XF86AudioPlay = "exec ${cmds.playerctl} play-pause";
|
|
XF86AudioNext = "exec ${cmds.playerctl} next";
|
|
XF86AudioPrev = "exec ${cmds.playerctl} prev";
|
|
XF86AudioStop = "exec ${cmds.playerctl} stop";
|
|
XF86AudioRaiseVolume = "exec ${cmds.pamixer} --increase 5";
|
|
XF86AudioLowerVolume = "exec ${cmds.pamixer} --decrease 5";
|
|
};
|
|
};
|
|
};
|
|
|
|
services.betterlockscreen = {
|
|
enable = true;
|
|
inactiveInterval = 10;
|
|
};
|
|
}
|