Big refactor WIP
This commit is contained in:
192
users/daniel/configs/desktop/i3/default.nix
Normal file
192
users/daniel/configs/desktop/i3/default.nix
Normal file
@@ -0,0 +1,192 @@
|
||||
{ config, lib, pkgs, ...}:
|
||||
|
||||
let
|
||||
mod = "Mod4";
|
||||
in {
|
||||
|
||||
home.file = {
|
||||
"bin/scripts/goup" = {
|
||||
source = ./goup;
|
||||
executable = true;
|
||||
};
|
||||
"bin/scripts/godown" = {
|
||||
source = ./godown;
|
||||
executable = true;
|
||||
};
|
||||
};
|
||||
xsession = {
|
||||
enable = true;
|
||||
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
package = pkgs.i3-gaps;
|
||||
config = {
|
||||
bars = [
|
||||
{
|
||||
colors = {
|
||||
background = "#282A36";
|
||||
statusline = "#F8F8F2";
|
||||
separator = "#44475A";
|
||||
|
||||
activeWorkspace = {
|
||||
border = "#282A36";
|
||||
background = "#44475A";
|
||||
text = "#F8F8F2";
|
||||
};
|
||||
focusedWorkspace = {
|
||||
border = "#44475A";
|
||||
background = "#44475A";
|
||||
text = "#F8F8F2";
|
||||
};
|
||||
inactiveWorkspace = {
|
||||
border = "#282A36";
|
||||
background = "#282A36";
|
||||
text = "#BFBFBF";
|
||||
};
|
||||
urgentWorkspace = {
|
||||
border = "#FF5555";
|
||||
background = "#FF5555";
|
||||
text = "#F8F8F2";
|
||||
};
|
||||
bindingMode = {
|
||||
border = "#FF5555";
|
||||
background = "#FF5555";
|
||||
text = "#F8F8F2";
|
||||
};
|
||||
};
|
||||
fonts = {
|
||||
size = 11.0;
|
||||
};
|
||||
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs /home/daniel/.config/i3status-rust/config-main.toml";
|
||||
position = "top";
|
||||
}
|
||||
];
|
||||
colors = {
|
||||
focused = {
|
||||
border = "#6272A4";
|
||||
background = "#6272A4";
|
||||
text = "#F8F8F2";
|
||||
indicator = "#6272A4";
|
||||
childBorder = "#6272A4";
|
||||
};
|
||||
focusedInactive = {
|
||||
border = "#44475A";
|
||||
background = "#44475A";
|
||||
text = "#F8F8F2";
|
||||
indicator = "#44475A";
|
||||
childBorder = "#44475A";
|
||||
};
|
||||
unfocused = {
|
||||
border = "#282A36";
|
||||
background = "#282A36";
|
||||
text = "#BFBFBF";
|
||||
indicator = "#282A36";
|
||||
childBorder = "#282A36";
|
||||
};
|
||||
urgent = {
|
||||
border = "#44475A";
|
||||
background = "#FF5555";
|
||||
text = "#F8F8F2";
|
||||
indicator = "#FF5555";
|
||||
childBorder = "#FF5555";
|
||||
};
|
||||
placeholder = {
|
||||
border = "#282A36";
|
||||
background = "#282A36";
|
||||
text = "#F8F8F2";
|
||||
indicator = "#282A36";
|
||||
childBorder = "#282A36";
|
||||
};
|
||||
background = "#F8F8F2";
|
||||
};
|
||||
|
||||
defaultWorkspace = "workspace number 1";
|
||||
|
||||
floating = {
|
||||
modifier = mod;
|
||||
criteria = [
|
||||
{ instance = "pavucontrol"; }
|
||||
];
|
||||
};
|
||||
|
||||
focus = {
|
||||
followMouse = false;
|
||||
};
|
||||
|
||||
fonts = {
|
||||
names = [ "pango:monospace 8" ];
|
||||
style = "monospace";
|
||||
size = 8.0;
|
||||
};
|
||||
|
||||
gaps = {
|
||||
outer = lib.mkDefault 10;
|
||||
inner = lib.mkDefault 5;
|
||||
smartBorders = "on";
|
||||
};
|
||||
|
||||
keybindings = lib.mkOptionDefault {
|
||||
"${mod}+q" = "kill";
|
||||
"${mod}+d" = "exec rofi -show drun";
|
||||
|
||||
"${mod}+h" = "focus left";
|
||||
"${mod}+j" = "focus down";
|
||||
"${mod}+k" = "focus up";
|
||||
"${mod}+l" = "focus right";
|
||||
|
||||
"${mod}+Shift+h" = "move left";
|
||||
"${mod}+Shift+l" = "move right";
|
||||
|
||||
"${mod}+Tab" = "workspace back_and_forth";
|
||||
|
||||
"${mod}+b" = "split h";
|
||||
"${mod}+v" = "split v";
|
||||
"${mod}+Control+Return" = "exec --no-startup-id i3utils workspace new";
|
||||
"${mod}+Control+Shift+Return" = "exec --no-startup-id i3utils workspace new -b";
|
||||
"${mod}+Shift+Return" = "exec --no-startup-id i3utils workspace new -n, move next";
|
||||
|
||||
"${mod}+Control+j" = "exec --no-startup-id $HOME/bin/scripts/godown";
|
||||
"${mod}+Control+k" = "exec --no-startup-id $HOME/bin/scripts/goup";
|
||||
"${mod}+Control+h" = "exec --no-startup-id i3utils workspace new -b";
|
||||
|
||||
"${mod}+Shift+k" = "exec --no-startup-id i3utils window move prev";
|
||||
"${mod}+Shift+j" = "exec --no-startup-id i3utils window move next";
|
||||
|
||||
"${mod}+p" = "scratchpad show";
|
||||
|
||||
"${mod}+Escape" = "exec loginctl lock-session";
|
||||
|
||||
"XF86MonBrightnessUp" = "exec xbacklight -inc 10";
|
||||
"XF86MonBrightnessDown" = "exec xbacklight -dec 10";
|
||||
"XF86AudioMute" = "exec pamixer -t";
|
||||
"XF86AudioLowerVolume" = "exec pamixer -d 10";
|
||||
"XF86AudioRaiseVolume" = "exec pamixer -i 10";
|
||||
"XF86AudioPrev" = "exec playerctl previous";
|
||||
"XF86AudioPlay" = "exec playerctl play-pause";
|
||||
"XF86AudioNext" = "exec playerctl next";
|
||||
|
||||
"Mod1+Shift+4" = "exec flameshot gui -s -p ~/Pictures/screenshots";
|
||||
};
|
||||
|
||||
modifier = mod;
|
||||
|
||||
startup = [
|
||||
{ command = "$HOME/bin/scripts/flower"; always = true; }
|
||||
{ command = "feh --bg-fill $HOME/wallpapers/wallpaper.jpg"; always = false; }
|
||||
];
|
||||
|
||||
terminal = "kitty";
|
||||
|
||||
window = {
|
||||
border = lib.mkDefault 2;
|
||||
titlebar = false;
|
||||
commands = [
|
||||
{ command = "move position center #2116 46"; criteria = { class = "jetbrains-toolbox"; }; }
|
||||
{ command = "move scratchpad"; criteria = { instance = "spotify"; }; }
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user