182 lines
4.9 KiB
Nix
182 lines
4.9 KiB
Nix
{ pkgs, lib, config, ... }:
|
||
let
|
||
mod = "Mod4";
|
||
term = "kitty";
|
||
color_bg = "#${config.color.background}";
|
||
color_fg = "#${config.color.foreground}";
|
||
color_active = "#${config.color.green}";
|
||
color_inactive = "#${config.color.cyan}";
|
||
color_indicator = "#${config.color.magenta}";
|
||
color_evil = "#${config.color.red}";
|
||
in {
|
||
home-manager.users.zoe.xsession.windowManager.i3.config = {
|
||
modifier = mod;
|
||
terminal = term;
|
||
menu =
|
||
"exec rofi -combi-modi window#drun#ssh -show-icons -show combi -modi combi";
|
||
fonts = {
|
||
names = [ "CaskaydiaCove Nerd Font" ];
|
||
size = 11.0;
|
||
};
|
||
|
||
colors = {
|
||
background = color_bg;
|
||
focused = {
|
||
background = color_bg;
|
||
border = color_active;
|
||
childBorder = color_active;
|
||
indicator = color_indicator;
|
||
text = color_fg;
|
||
};
|
||
focusedInactive = {
|
||
background = color_bg;
|
||
border = color_inactive;
|
||
childBorder = color_inactive;
|
||
indicator = color_indicator;
|
||
text = color_fg;
|
||
};
|
||
unfocused = {
|
||
background = color_bg;
|
||
border = color_inactive;
|
||
childBorder = color_inactive;
|
||
indicator = color_indicator;
|
||
text = color_fg;
|
||
};
|
||
urgent = {
|
||
background = color_bg;
|
||
border = color_evil;
|
||
childBorder = color_evil;
|
||
indicator = color_indicator;
|
||
text = color_fg;
|
||
};
|
||
};
|
||
|
||
keybindings = lib.mkOptionDefault {
|
||
# launch things
|
||
## calculator
|
||
"${mod}+c" = "exec rofi -show calc";
|
||
## emoji
|
||
"${mod}+period" = "exec rofimoji --action copy --prompt 🏳️⚧️";
|
||
|
||
# windows
|
||
## find mouse cursor
|
||
"${mod}+x" =
|
||
"exec find-cursor --color '#282828' -o 2 --outline-color '#EBDBB2'";
|
||
## switch to resize mode
|
||
"${mod}+r" = "mode resize";
|
||
"${mod}+m" = "mode media";
|
||
## 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";
|
||
## split
|
||
"${mod}+e" = "split toggle";
|
||
|
||
# extra keys
|
||
## audio
|
||
"XF86AudioMute" = "exec amixer set Master toggle";
|
||
"XF86AudioUnmute" = "exec amixer set Master toggle";
|
||
"XF86AudioMicMute" = "exec amixer set Capture toggle";
|
||
"XF86AudioMicUnmute" = "exec amixer set Capture toggle";
|
||
|
||
## brightness
|
||
"XF86MonBrightnessUp" = "exec /etc/nixos/i3/brightness.py 100+";
|
||
"XF86MonBrightnessDown" = "exec /etc/nixos/i3/brightness.py 100-";
|
||
|
||
## display
|
||
"XF86Display" = "exec arandr";
|
||
|
||
## wifi
|
||
"XF86WLAN" = "exec rfkill toggle wifi";
|
||
|
||
## tablet to next screen
|
||
"${mod}+p" = "exec xsetwacom set 'Wacom Intuos S 2 Pen stylus' MapToOutput next";
|
||
};
|
||
|
||
modes = {
|
||
resize = {
|
||
j = "resize grow height 10 px or 10 ppt";
|
||
Escape = "mode default";
|
||
l = "resize shrink width 10 px or 10 ppt";
|
||
Return = "mode default";
|
||
h = "resize grow width 10 px or 10 ppt";
|
||
k = "resize shrink height 10 px or 10 ppt";
|
||
};
|
||
media = {
|
||
Return = "mode default";
|
||
Escape = "mode default";
|
||
j = "exec --no-startup-id python3 /etc/nixos/i3/volume.py 5%-";
|
||
k = "exec --no-startup-id python3 /etc/nixos/i3/volume.py 5%+";
|
||
m = "exec --no-startup-id amixer set Master toggle";
|
||
c = "exec --no-startup-id kitty cmus";
|
||
v = "exec --no-startup-id mpv";
|
||
space = "exec python3 /etc/nixos/i3/play_pause.py";
|
||
};
|
||
};
|
||
|
||
window = {
|
||
titlebar = false;
|
||
border = 4;
|
||
};
|
||
gaps = {
|
||
inner = 16;
|
||
outer = 0;
|
||
};
|
||
|
||
bars = [{
|
||
position = "top";
|
||
command = "i3bar";
|
||
statusCommand =
|
||
"i3status-rs $HOME/.config/i3status-rust/config-main.toml";
|
||
fonts = {
|
||
names = [ "CaskaydiaCove Nerd Font" ];
|
||
size = 11.0;
|
||
};
|
||
colors = {
|
||
background = color_bg;
|
||
activeWorkspace = {
|
||
border = color_active;
|
||
background = color_bg;
|
||
text = color_active;
|
||
};
|
||
inactiveWorkspace = {
|
||
border = color_bg;
|
||
background = color_bg;
|
||
text = color_inactive;
|
||
};
|
||
focusedWorkspace = {
|
||
border = color_active;
|
||
background = color_active;
|
||
text = color_bg;
|
||
};
|
||
bindingMode = {
|
||
background = color_bg;
|
||
border = color_bg;
|
||
text = color_fg;
|
||
};
|
||
};
|
||
}];
|
||
|
||
startup = [
|
||
{
|
||
command = "--no-startup-id feh --bg-scale /etc/nixos/wallpaper.png";
|
||
always = true;
|
||
}
|
||
{
|
||
command = "picom --experimental-backends";
|
||
always = true;
|
||
}
|
||
{
|
||
command = "--no-startup-id autotiling";
|
||
always = true;
|
||
}
|
||
];
|
||
};
|
||
}
|