165 lines
4.1 KiB
Nix
165 lines
4.1 KiB
Nix
{ pkgs, lib, ... }:
|
||
let
|
||
mod = "Mod4";
|
||
term = "kitty";
|
||
color_bg = "#f9f5d7";
|
||
color_fg = "#3c3836";
|
||
color_active = "#79740e";
|
||
color_inactive = "#8f3f71";
|
||
color_indicator = "#af3a03";
|
||
color_evil = "#9d0006";
|
||
in
|
||
{
|
||
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
|
||
## 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";
|
||
};
|
||
|
||
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 playerctl play-pause";
|
||
};
|
||
};
|
||
|
||
window = {
|
||
titlebar = false;
|
||
border = 2;
|
||
};
|
||
gaps = {
|
||
inner = 6;
|
||
outer = 6;
|
||
};
|
||
|
||
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 autotiling"; always = true; }
|
||
{ command = "--no-startup-id feh --bg-scale /etc/nixos/wallpaper.png"; always = true; }
|
||
];
|
||
}
|