This commit is contained in:
fqbn207
2025-01-14 21:46:52 +01:00
parent 647ad59367
commit 19e11f4629
9 changed files with 227 additions and 36 deletions

View File

@ -72,6 +72,11 @@ in
}; };
services = { services = {
xserver = {
enable = true;
displayManager.startx.enable = true;
windowManager.i3.enable = true;
};
libinput = { libinput = {
enable = true; enable = true;
}; };
@ -221,6 +226,7 @@ in
cava cava
vesktop vesktop
pacman pacman
wf-recorder
]; ];

View File

@ -2,7 +2,8 @@
{ {
imports = [ imports = [
./editors/nvim/default.nix ./editors/nvim/default.nix
./wm/sway/default.nix #./wm/sway/default.nix
./wm/i3/default.nix
./bash.nix ./bash.nix
./git.nix ./git.nix
./tmux.nix ./tmux.nix

View File

@ -18,38 +18,14 @@ in
./lsp.nix ./lsp.nix
./neotree.nix ./neotree.nix
./opts.nix ./opts.nix
./lualine.nix
./dev.nix ./dev.nix
./nonels.nix ./nonels.nix
./treesitter.nix ./treesitter.nix
]; ];
programs.nixvim = { programs.nixvim = {
enable = true; enable = true;
colorschemes.oxocarbon.enable = true;
plugins = { plugins = {
transparent = {
enable = false;
settings = {
groups = [
"Normal"
"NormalNC"
"CursorLine"
"StatusLine"
"StatusLineNC"
"EndOfBuffer"
];
exclude_groups = [ ];
extra_groups = [
"BufferLineTabClose"
"BufferLineBufferSelected"
"BufferLineFill"
"BufferLineBackground"
"BufferLineSeparator"
"BufferLineIndicatorSelected"
];
};
};
neocord = { neocord = {
enable = true; enable = true;
settings = { settings = {

View File

@ -0,0 +1,10 @@
{ config, pkgs, ... }:
{
programs.nixvim = {
plugins = {
lualine = {
enable = true;
};
};
};
}

View File

@ -16,13 +16,6 @@
map('v', '<Tab>', '>gv', opts) map('v', '<Tab>', '>gv', opts)
map('v', '<S-Tab>', '<gv', opts) map('v', '<S-Tab>', '<gv', opts)
vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' })
vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'none' })
vim.api.nvim_set_hl(0, 'FloatBorder', { bg = 'none' })
vim.api.nvim_set_hl(0, 'Pmenu', { bg = 'none' })
vim.cmd("highlight Pmenu guibg=NONE")
vim.opt.shiftwidth = 2 vim.opt.shiftwidth = 2
vim.opt.tabstop = 2 vim.opt.tabstop = 2
vim.opt.softtabstop = 2 vim.opt.softtabstop = 2
@ -37,9 +30,6 @@
}) })
vim.cmd [[ vim.cmd [[
hi VertSplit guibg=NONE guifg=#000000
set laststatus=0 ruler
set notermguicolors
cnoreabbrev W! w! cnoreabbrev W! w!
cnoreabbrev Q! q! cnoreabbrev Q! q!
cnoreabbrev Qall! qall! cnoreabbrev Qall! qall!

View File

@ -0,0 +1,28 @@
{ config, pkgs, ... }:
{
programs.alacritty = {
enable = true;
settings = {
window.dimensions = {
lines = 4;
columns = 200;
};
font = {
size = 17;
normal = {
family = "FantasqueSansMono";
style = "Regular";
};
};
terminal = {
shell = "tmux";
};
colors = {
primary = {
foreground = "#FFFFFF";
background = "#161616";
};
};
};
};
}

View File

@ -0,0 +1,11 @@
{ config, pkgs, ... }:
{
imports = [
./i3.nix
./alacritty.nix
];
home.file = {
".config/i3/i3status.conf".source = ./raw/i3status.conf;
};
}

114
modules/nix/wm/i3/i3.nix Normal file
View File

@ -0,0 +1,114 @@
{ config, pkgs, ... }:
{
xsession.windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
config = {
gaps = {
inner = 5;
outer = 5;
};
bars = [
{
command = "${pkgs.feh}/bin/feh --bg-fill ~/.wp/gruvbox-dark-blue.png; i3status -c ~/.config/i3/i3status.conf";
}
];
keybindings = {
# IMPORTANT STUFF #
"Mod4+Return" = "exec alacritty ";
"Mod4+space" = "exec ${pkgs.rofi}/bin/rofi -show run";
"Mod4+Q" = "kill";
"Mod4+Shift+R" = "restart";
"Mod4+Shift+S" = "exec ${pkgs.flameshot}/bin/flameshot gui";
# WINDOW STUFF #
"Mod4+Shift+space" = "floating toggle";
"Mod4+Shift+F" = "fullscreen toggle";
"Mod4+Left" = "focus left";
"Mod4+Down" = "focus down";
"Mod4+Up" = "focus up";
"Mod4+Right" = "focus right";
"Mod4+Ctrl+Right" = "resize shrink width 3 px or 3 ppt";
"Mod4+Ctrl+Down" = "resize grow height 3 px or 3 ppt";
"Mod4+Ctrl+Up" = "resize shrink height 3 px or 3 ppt";
"Mod4+Ctrl+Left" = "resize grow width 3 px or 3 ppt";
"Mod4+Shift+Left" = "move left";
"Mod4+Shift+Down" = "move down";
"Mod4+Shift+Up" = "move up";
"Mod4+Shift+Right" = "move right";
# WORKSPACES #
"Mod4+1" = "workspace number 1";
"Mod4+2" = "workspace number 2";
"Mod4+3" = "workspace number 3";
"Mod4+4" = "workspace number 4";
"Mod4+5" = "workspace number 5";
"Mod4+6" = "workspace number 6";
"Mod4+7" = "workspace number 7";
"Mod4+8" = "workspace number 8";
"Mod4+9" = "workspace number 9";
# MOVE WINDOW TO OTHER WS #
"Mod4+Shift+1" = "move container to workspace number 1";
"Mod4+Shift+2" = "move container to workspace number 2";
"Mod4+Shift+3" = "move container to workspace number 3";
"Mod4+Shift+4" = "move container to workspace number 4";
"Mod4+Shift+5" = "move container to workspace number 5";
"Mod4+Shift+6" = "move container to workspace number 6";
"Mod4+Shift+7" = "move container to workspace number 7";
"Mod4+Shift+8" = "move container to workspace number 8";
"Mod4+Shift+9" = "move container to workspace number 9";
# Audio
"XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
"XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
"XF86AudioMute" = "exec set-volume toggle-mute";
"XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl stop";
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
"XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%-";
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%+";
};
};
extraConfig = ''
bar {
position top
status_command i3status -c /home/fabian/.config/i3/i3status.conf
colors {
background #161616
statusline #FFFFFF
separator #FFFFFF
focused_workspace #458588 #458588 #ebdbb2
active_workspace #83a598 #83a598 #ebdbb2
inactive_workspace #504945 #504945 #ebdbb2
urgent_workspace #cc241d #cc241d #504945
}
}
set $bg #161616
set $red #cc241d
set $green #98971a
set $yellow #101010
set $blue #458588
set $purple #b16286
set $aqua #689d68
set $gray #a89984
set $darkgray #161616
floating_modifier Mod4
client.focused $green $green $darkgray $yellow $yellow
client.focused_inactive $darkgray $darkgray $yellow $purple $darkgray
client.unfocused $darkgray $darkgray $yellow $purple $darkgray
for_window [class="^.*"] border pixel 1
'';
};
}

View File

@ -0,0 +1,55 @@
general {
colors = true
color_good = "#98971a"
color_bad = "#cc241d"
color_degraded = "#fabd2f"
interval = 2
}
#order += "wireless wlp4s0"
order += "ethernet enp2s0f0u1"
#order += "battery all"
order += "memory"
order += "cpu_usage"
order += "volume master"
order += "tztime local"
volume master {
#format = "♪%volume"
device = "default"
mixer = "Master"
mixer_idx = 0
# termsyn font
format = "🔊 %volume"
}
cpu_usage {
format = "%usage CPU"
}
wireless wlp4s0 {
format_up = " (%quality) %ip "
format_down = " ☡ WiFi "
}
ethernet enp4s0 {
# termsyn font
format_up = "%ip"
#format_down = "eth0 "
}
memory {
format = "%used"
threshold_degraded = "10%"
format_degraded = "MEMORY: %free"
}
battery all {
format = "%percentage/%remaining"
}
tztime local {
# termsyn font
format = "%H:%M"
}