2024-04-13 13:03:32 +02:00
|
|
|
{pkgs, lib, config, ... }:
|
|
|
|
with lib; let
|
2024-04-13 15:38:42 +02:00
|
|
|
cfg = config.modules.programs.i3;
|
|
|
|
username = config.modules.other.system.username;
|
2024-04-13 13:03:32 +02:00
|
|
|
mod = "Mod4";
|
|
|
|
in {
|
2024-04-13 15:38:42 +02:00
|
|
|
options.modules.programs.i3.enable = mkEnableOption "i3";
|
2024-04-13 13:03:32 +02:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.xserver = {
|
|
|
|
enable = true;
|
|
|
|
xkb.layout = "de";
|
|
|
|
};
|
|
|
|
xsession.windowManager.i3 = {
|
|
|
|
enable = true;
|
|
|
|
config = {
|
|
|
|
modifier = mod;
|
|
|
|
terminal = "alacritty";
|
|
|
|
fonts ={
|
|
|
|
names = [ "JetBrains Mono" "pango:monospace"];
|
|
|
|
size = 12;
|
|
|
|
style = "Bold Semi-Condensed";
|
|
|
|
};
|
|
|
|
keybindings = lib.mkOptionDefault {
|
|
|
|
# Run stuff
|
|
|
|
"${mod}+d" = "exec --no-startup-id ${pkgs.dmenu}/bin/dmenu_run";
|
|
|
|
"${mod}+Return" = "exec --no-startup-id alacritty";
|
|
|
|
"${mod}+Shift+q" = "kill";
|
|
|
|
# Focus
|
|
|
|
"${mod}+h" = "focus left";
|
|
|
|
"${mod}+j" = "focus down";
|
|
|
|
"${mod}+k" = "focus up";
|
|
|
|
"${mod}+l" = "focus right";
|
|
|
|
# Move
|
|
|
|
"${mod}+Shift+h" = "move left";
|
|
|
|
"${mod}+Shift+j" = "move down";
|
|
|
|
"${mod}+Shift+k" = "move up";
|
|
|
|
"${mod}+Shift+l" = "move right";
|
|
|
|
"XF86RaiseVolume" = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ && $refresh_i3status";
|
|
|
|
# Toggle stuff
|
|
|
|
"${mod}+f" = "fullscreen toggle";
|
|
|
|
};
|
|
|
|
window = {
|
|
|
|
titlebar = false;
|
|
|
|
border = 3;
|
|
|
|
hideEdgeBorders = true;
|
|
|
|
};
|
|
|
|
floating = {
|
|
|
|
titlebar = false;
|
|
|
|
};
|
|
|
|
bars = [
|
|
|
|
{
|
|
|
|
position = "bottom";
|
|
|
|
statusCommand = "${pkgs.i3status}/bin/i3status";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
startup ={
|
|
|
|
command =
|
|
|
|
"xrandr --output HDMI-1 --rotate normal --output DP-2 --rotate normal --left-of HDMI-1 --output HDMI-0 --right-of HDMI-1";
|
|
|
|
#"dex --autostart --environment i3";
|
|
|
|
#"nm-applet";
|
|
|
|
#"keepassxc";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|