mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
80 lines
2.1 KiB
Nix
80 lines
2.1 KiB
Nix
{ pkgs, lib, config, options, ... }: {
|
|
options.mods.i3.enable = lib.mkEnableOption "enables i3";
|
|
|
|
config = lib.mkIf config.mods.i3.enable {
|
|
programs.rofi.enable = true;
|
|
|
|
programs.i3status = {
|
|
enable = true;
|
|
general.interval = 1;
|
|
modules = {
|
|
"volume master" = {
|
|
position = 1;
|
|
settings = {
|
|
format = "🔊 %volume";
|
|
format_muted = "🔇 %volume";
|
|
device = "default";
|
|
mixer = "Master";
|
|
mixer_idx = 0;
|
|
};
|
|
};
|
|
"tztime local".settings = {
|
|
format = "🗓 %Y-%m-%d %H:%M:%S ";
|
|
};
|
|
ipv6.enable = false;
|
|
"wireless _first_".enable = false;
|
|
"ethernet _first_".enable = false;
|
|
"battery all".enable = false;
|
|
"disk /".enable = false;
|
|
load.enable = false;
|
|
memory.enable = false;
|
|
};
|
|
};
|
|
|
|
xsession.windowManager.i3 = {
|
|
enable = true;
|
|
config = {
|
|
modifier = "Mod4";
|
|
terminal = "alacritty";
|
|
menu = "rofi -show drun";
|
|
|
|
window = {
|
|
titlebar = false;
|
|
hideEdgeBorders = "smart";
|
|
};
|
|
|
|
defaultWorkspace = "workspace number 1";
|
|
workspaceAutoBackAndForth = true;
|
|
focus.wrapping = "yes";
|
|
|
|
keybindings = let
|
|
modifier = config.xsession.windowManager.i3.config.modifier;
|
|
in lib.mkOptionDefault {
|
|
"${modifier}+h" = "focus left";
|
|
"${modifier}+j" = "focus down";
|
|
"${modifier}+k" = "focus up";
|
|
"${modifier}+l" = "focus right";
|
|
};
|
|
|
|
bars = let
|
|
stylix_bar = {
|
|
mode = "dock";
|
|
hiddenState = "hide";
|
|
position = "bottom";
|
|
statusCommand = "${lib.getExe pkgs.i3status}";
|
|
command = "${pkgs.i3}/bin/i3bar";
|
|
workspaceButtons = true;
|
|
workspaceNumbers = true;
|
|
trayOutput = "primary";
|
|
} // config.lib.stylix.i3.bar;
|
|
in [
|
|
stylix_bar
|
|
];
|
|
# bars = [
|
|
# options.xsession.windowManager.i3.config.default
|
|
# config.lib.stylix.i3.bar
|
|
# ];
|
|
};
|
|
};
|
|
};
|
|
}
|