nord theme: i3

This commit is contained in:
itamar 2026-04-13 20:11:23 +03:00
parent ed4a7f3fae
commit 0bb6324afc
No known key found for this signature in database
GPG key ID: D8277CDCD4F544E9
10 changed files with 843 additions and 247 deletions

View file

@ -1,20 +1,274 @@
{ pkgs, ... }: { config, pkgs, lib, ... }:
{ {
home.packages = with pkgs; [
eza
bat
fd
ripgrep
fzf
zoxide
delta
grc
];
programs.bash = { programs.bash = {
enable = true; enable = true;
historyControl = [ "ignoredups" "erasedups" ];
historySize = 100000;
historyFileSize = 100000;
shellOptions = [
"autocd"
"cdspell"
"checkwinsize"
"globstar"
"histappend"
];
sessionVariables = {
BAT_THEME = "Nord";
FZF_DEFAULT_OPTS = lib.concatStringsSep " " [
"--color=bg+:#3B4252,bg:#2E3440,spinner:#81A1C1,hl:#616E88"
"--color=fg:#D8DEE9,header:#616E88,info:#81A1C1,pointer:#81A1C1"
"--color=marker:#81A1C1,fg+:#D8DEE9,prompt:#81A1C1,hl+:#81A1C1"
"--layout=reverse --border=rounded --prompt=' '"
];
FZF_DEFAULT_COMMAND = "fd --type f --hidden --follow --exclude .git";
EDITOR = "nvim";
VISUAL = "nvim";
PAGER = "bat --style=plain";
};
shellAliases = {
".." = "cd ..";
"..." = "cd ../..";
"...." = "cd ../../..";
ls = "eza --icons --group-directories-first";
ll = "eza --icons --group-directories-first -l --git";
la = "eza --icons --group-directories-first -la --git";
lt = "eza --icons --tree --level=2";
lta = "eza --icons --tree --level=2 -a";
cat = "bat --style=plain";
catn = "bat";
grep = "rg --color=auto";
find = "fd";
g = "git";
gs = "git status -sb";
gl = "git log --oneline --graph --decorate";
gd = "git diff";
gds = "git diff --staged";
gco = "git checkout";
gb = "git branch";
gp = "git push";
gpl = "git pull";
v = "nvim";
vi = "nvim";
vim = "nvim";
clr = "clear";
path = ''echo "$PATH" | tr ':' '\n' | bat --language=sh --style=plain'';
reload = "source ~/.bashrc";
};
initExtra = '' initExtra = ''
eval "$(starship init bash)" eval "$(zoxide init bash)"
alias cd='z'
eval "$(fzf --bash)"
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
export MANROFFOPT="-c"
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
mkcd() { mkdir -p "$1" && cd "$1"; }
fcd() {
local dir
dir=$(fd --type d --hidden --follow --exclude .git | \
fzf --preview 'eza --icons --tree --level=1 {}') && cd "$dir"
}
fv() {
local file
file=$(fzf --preview 'bat --color=always --style=numbers {}') && nvim "$file"
}
# extract — universal archive extractor
extract() {
case "$1" in
*.tar.bz2) tar xjf "$1" ;;
*.tar.gz) tar xzf "$1" ;;
*.tar.xz) tar xJf "$1" ;;
*.tar.zst) tar --zstd -xf "$1" ;;
*.bz2) bunzip2 "$1" ;;
*.gz) gunzip "$1" ;;
*.zip) unzip "$1" ;;
*.7z) 7z x "$1" ;;
*.rar) unrar x "$1" ;;
*) echo "extract: '$1' unknown archive format" ;;
esac
}
''; '';
}; };
programs.starship = { programs.starship = {
enable = true; enable = true;
enableBashIntegration = true;
settings = { settings = {
add_newline = true; format = lib.concatStrings [
"[](fg:#4C566A)"
"$os"
"$username"
"$hostname"
"$directory"
"$git_branch"
"$git_state"
"$git_status"
"$nix_shell"
"$python"
"$nodejs"
"$rust"
"$golang"
"$cmd_duration"
"\n"
"[](fg:#4C566A)"
"$character"
];
character = { character = {
success_symbol = "[](bold green)"; success_symbol = "[](bold fg:#88C0D0)";
error_symbol = "[](bold red)"; error_symbol = "[](bold fg:#BF616A)";
vicmd_symbol = "[](bold fg:#A3BE8C)";
}; };
os = {
disabled = false;
style = "fg:#81A1C1";
symbols = {
NixOS = " ";
Linux = " ";
Macos = " ";
Windows = " ";
};
};
username = {
show_always = false;
style_user = "bold fg:#D8DEE9";
style_root = "bold fg:#BF616A";
format = "[$user]($style) ";
};
hostname = {
ssh_only = true;
style = "bold fg:#81A1C1";
format = "[@$hostname]($style) ";
};
directory = {
style = "bold fg:#88C0D0";
read_only = " 󰌾";
read_only_style = "fg:#BF616A";
truncation_length = 4;
truncate_to_repo = true;
format = "[ 󰉋 $path]($style)[$read_only]($read_only_style) ";
substitutions = {
"~" = "󰋜 ";
};
};
git_branch = {
symbol = " ";
style = "fg:#A3BE8C";
format = "[on $symbol$branch]($style) ";
};
git_status = {
style = "fg:#EBCB8B";
format = "([$all_status$ahead_behind]($style) )";
ahead = "\${count}";
behind = "\${count}";
diverged = "\${ahead_count}\${behind_count}";
modified = "!";
staged = "+";
untracked = "?";
deleted = "";
};
git_state = {
style = "fg:#D08770";
format = "[$state( $progress_current/$progress_total)]($style) ";
};
nix_shell = {
disabled = false;
style = "fg:#81A1C1";
symbol = " ";
format = "[$symbol$state( \\($name\\))]($style) ";
impure_msg = "impure";
pure_msg = "pure";
};
cmd_duration = {
min_time = 2000;
style = "fg:#EBCB8B";
format = "[ $duration]($style) ";
show_notifications = false;
};
python = {
symbol = " ";
style = "fg:#EBCB8B";
format = "[$symbol$pyenv_prefix($version)(\\($virtualenv\\))]($style) ";
};
nodejs = {
symbol = " ";
style = "fg:#A3BE8C";
format = "[$symbol$version]($style) ";
};
rust = {
symbol = " ";
style = "fg:#D08770";
format = "[$symbol$version]($style) ";
};
golang = {
symbol = " ";
style = "fg:#88C0D0";
format = "[$symbol$version]($style) ";
};
};
};
programs.git = {
enable = true;
extraConfig = {
core.pager = "delta";
interactive.diffFilter = "delta --color-only";
delta = {
navigate = true;
light = false;
line-numbers = true;
syntax-theme = "Nord";
plus-style = "syntax #2d3f2d";
plus-emph-style = "syntax #3c5c3c";
minus-style = "syntax #3f2d2d";
minus-emph-style = "syntax #5c3c3c";
line-numbers-left-style = "#4C566A";
line-numbers-right-style = "#4C566A";
line-numbers-minus-style = "#BF616A";
line-numbers-plus-style = "#A3BE8C";
file-style = "bold #88C0D0";
hunk-header-style = "file line-number syntax";
};
merge.conflictstyle = "diff3";
diff.colorMoved = "default";
}; };
}; };
} }

View file

@ -164,25 +164,31 @@ in
}; };
profiles.default = { profiles.default = {
userChrome = '' userChrome = ''
/* Catppuccin Mocha */ /* Nord Theme */
:root { :root {
--ctp-base: #1e1e2e; /* Polar Night - Dark backgrounds */
--ctp-mantle: #181825; --nord0: #2e3440;
--ctp-crust: #11111b; --nord1: #3b4252;
--ctp-surface0:#313244; --nord2: #434c5e;
--ctp-surface1:#45475a; --nord3: #4c566a;
--ctp-surface2:#585b70;
--ctp-overlay0:#6c7086; /* Snow Storm - Light text */
--ctp-overlay1:#7f849c; --nord4: #d8dee9;
--ctp-text: #cdd6f4; --nord5: #e5e9f0;
--ctp-subtext0:#a6adc8; --nord6: #eceff4;
--ctp-lavender:#b4befe;
--ctp-blue: #89b4fa; /* Frost - Accents */
--ctp-mauve: #cba6f7; --nord7: #8fbcbb;
--ctp-pink: #f38ba8; --nord8: #88c0d0;
--ctp-peach: #fab387; --nord9: #81a1c1;
--ctp-green: #a6e3a1; --nord10: #5e81ac;
--ctp-teal: #94e2d5;
/* Aurora - Colors */
--nord11: #bf616a;
--nord12: #d08770;
--nord13: #ebcb8b;
--nord14: #a3be8c;
--nord15: #b48ead;
} }
#main-window, #main-window,
@ -190,33 +196,33 @@ in
#TabsToolbar, #TabsToolbar,
#nav-bar, #nav-bar,
#PersonalToolbar { #PersonalToolbar {
background-color: var(--ctp-mantle) !important; background-color: var(--nord0) !important;
color: var(--ctp-text) !important; color: var(--nord6) !important;
border-color: var(--ctp-surface0) !important; border-color: var(--nord1) !important;
} }
.tabbrowser-tab .tab-background { .tabbrowser-tab .tab-background {
background-color: var(--ctp-surface0) !important; background-color: var(--nord1) !important;
border-radius: 6px !important; border-radius: 6px !important;
} }
.tabbrowser-tab[selected] .tab-background { .tabbrowser-tab[selected] .tab-background {
background-color: var(--ctp-base) !important; background-color: var(--nord2) !important;
} }
.tabbrowser-tab .tab-label { .tabbrowser-tab .tab-label {
color: var(--ctp-subtext0) !important; color: var(--nord4) !important;
} }
.tabbrowser-tab[selected] .tab-label { .tabbrowser-tab[selected] .tab-label {
color: var(--ctp-text) !important; color: var(--nord6) !important;
} }
.tabbrowser-tab[selected] .tab-background::before { .tabbrowser-tab[selected] .tab-background::before {
content: ""; content: "";
display: block; display: block;
height: 2px; height: 2px;
background: var(--ctp-mauve) !important; background: var(--nord8) !important;
border-radius: 2px 2px 0 0; border-radius: 2px 2px 0 0;
position: absolute; position: absolute;
top: 0; top: 0;
@ -225,66 +231,66 @@ in
} }
#urlbar-background { #urlbar-background {
background-color: var(--ctp-surface0) !important; background-color: var(--nord1) !important;
border-color: var(--ctp-surface1) !important; border-color: var(--nord2) !important;
border-radius: 8px !important; border-radius: 8px !important;
} }
#urlbar[focused] #urlbar-background { #urlbar[focused] #urlbar-background {
border-color: var(--ctp-mauve) !important; border-color: var(--nord8) !important;
box-shadow: 0 0 0 1px var(--ctp-mauve) !important; box-shadow: 0 0 0 1px var(--nord8) !important;
} }
#urlbar-input { #urlbar-input {
color: var(--ctp-text) !important; color: var(--nord6) !important;
} }
toolbar button, toolbar button,
toolbarbutton { toolbarbutton {
color: var(--ctp-text) !important; color: var(--nord6) !important;
} }
toolbar button:hover, toolbar button:hover,
toolbarbutton:hover { toolbarbutton:hover {
background-color: var(--ctp-surface1) !important; background-color: var(--nord2) !important;
border-radius: 4px !important; border-radius: 4px !important;
} }
#sidebar-box { #sidebar-box {
background-color: var(--ctp-mantle) !important; background-color: var(--nord0) !important;
color: var(--ctp-text) !important; color: var(--nord6) !important;
} }
menupopup, menupopup,
panel { panel {
background-color: var(--ctp-surface0) !important; background-color: var(--nord1) !important;
color: var(--ctp-text) !important; color: var(--nord6) !important;
border-color: var(--ctp-surface1) !important; border-color: var(--nord2) !important;
border-radius: 8px !important; border-radius: 8px !important;
} }
menuitem:hover { menuitem:hover {
background-color: var(--ctp-surface1) !important; background-color: var(--nord2) !important;
color: var(--ctp-text) !important; color: var(--nord6) !important;
border-radius: 4px !important; border-radius: 4px !important;
} }
#PersonalToolbar toolbarbutton { #PersonalToolbar toolbarbutton {
color: var(--ctp-subtext0) !important; color: var(--nord4) !important;
} }
#PersonalToolbar toolbarbutton:hover { #PersonalToolbar toolbarbutton:hover {
color: var(--ctp-text) !important; color: var(--nord6) !important;
background-color: var(--ctp-surface0) !important; background-color: var(--nord1) !important;
border-radius: 4px !important; border-radius: 4px !important;
} }
scrollbar { scrollbar {
background-color: var(--ctp-mantle) !important; background-color: var(--nord0) !important;
} }
scrollbar thumb { scrollbar thumb {
background-color: var(--ctp-surface2) !important; background-color: var(--nord3) !important;
border-radius: 4px !important; border-radius: 4px !important;
} }
''; '';

View file

@ -1,56 +0,0 @@
{ pkgs, lib, ... }:
{
xsession = {
enable = true;
windowManager.bspwm = {
enable = true;
monitors."*" = [ "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" ];
settings = {
normal_border_color = "#6E738D";
focused_border_color = "#f5bde6";
border_width = 2;
window_gap = 2;
};
rules."Zathura".state = "tiled";
startupPrograms = [ "feh --bg-fill ~/Pictures/wp.png" ];
};
};
services.sxhkd = {
enable = true;
keybindings = {
"super + d" = "rofi -show drun";
"super + Return" = "alacritty";
"super + w" = "bspc node -c";
"super + 1" = "bspc desktop -f '^1'";
"super + 2" = "bspc desktop -f '^2'";
"super + 3" = "bspc desktop -f '^3'";
"super + 4" = "bspc desktop -f '^4'";
"super + 5" = "bspc desktop -f '^5'";
"super + 6" = "bspc desktop -f '^6'";
"super + 7" = "bspc desktop -f '^7'";
"super + 8" = "bspc desktop -f '^8'";
"super + 9" = "bspc desktop -f '^9'";
"super + 0" = "bspc desktop -f '^10'";
"super + shift + 1" = "bspc node -d '^1'";
"super + shift + 2" = "bspc node -d '^2'";
"super + shift + 3" = "bspc node -d '^3'";
"super + shift + 4" = "bspc node -d '^4'";
"super + shift + 5" = "bspc node -d '^5'";
"super + shift + 6" = "bspc node -d '^6'";
"super + shift + 7" = "bspc node -d '^7'";
"super + shift + 8" = "bspc node -d '^8'";
"super + shift + 9" = "bspc node -d '^9'";
"super + shift + 0" = "bspc node -d '^10'";
"super + h" = "bspc node -f west";
"super + j" = "bspc node -f south";
"super + k" = "bspc node -f north";
"super + l" = "bspc node -f east";
"super + shift + h" = "bspc node -s west";
"super + shift + j" = "bspc node -s south";
"super + shift + k" = "bspc node -s north";
"super + shift + l" = "bspc node -s east";
"super + shift + r" = "bspc wm -r";
};
};
home.packages = with pkgs; [ rofi feh ];
}

View file

@ -13,9 +13,9 @@
./launcher.nix ./launcher.nix
./keyboard.nix ./keyboard.nix
./bash.nix ./bash.nix
./bspwm.nix ./emacs.nix
./i3.nix
./notifications.nix ./notifications.nix
./polybar.nix
./screen-lock.nix ./screen-lock.nix
./shell.nix ./shell.nix
./gtk-qt.nix ./gtk-qt.nix

46
navi/navi/emacs.nix Normal file
View file

@ -0,0 +1,46 @@
{ pkgs, ... }:
{
programs.emacs = {
enable = true;
extraPackages = epkgs: [
epkgs.nord-theme
epkgs.nerd-icons
epkgs.nerd-icons-dired
epkgs.nerd-icons-ibuffer
epkgs.nerd-icons-completion
];
extraConfig = ''
(load-theme 'nord t)
(set-face-attribute 'default nil
:family "Iosevka Nerd Font"
:height 140)
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(fringe-mode 8)
(setq inhibit-startup-screen t)
(setq-default
indent-tabs-mode nil
tab-width 2
fill-column 80)
(global-display-line-numbers-mode 1)
(column-number-mode 1)
(show-paren-mode 1)
(electric-pair-mode 1)
(delete-selection-mode 1)
(global-hl-line-mode 1)
(require 'nerd-icons)
(add-hook 'dired-mode-hook #'nerd-icons-dired-mode)
(add-hook 'ibuffer-mode-hook #'nerd-icons-ibuffer-mode)
(with-eval-after-load 'marginalia
(nerd-icons-completion-mode 1))
'';
};
}

279
navi/navi/i3.nix Normal file
View file

@ -0,0 +1,279 @@
{ pkgs, lib, ... }:
let
mod = "Mod4"; # Super/Windows key
alt = "Mod1"; # Alt key (for convenience)
in
{
home.pointerCursor = {
package = pkgs.adwaita-icon-theme;
name = "Adwaita";
size = 24;
x11.enable = true;
gtk.enable = true;
};
home.file.".fehbg".text = ''
#!/bin/sh
feh --no-fehbg --bg-scale ~/Pictures/wp.png
'';
home.file.".fehbg".executable = true;
xsession = {
enable = true;
initExtra = ''
# Set wallpaper
${pkgs.feh}/bin/feh --no-fehbg --bg-scale ~/Pictures/wp.png &
# Start compositor for transparency and smooth rendering
${pkgs.picom}/bin/picom -b &
# Start notification daemon
${pkgs.dunst}/bin/dunst &
# Start network manager applet
${pkgs.networkmanagerapplet}/bin/nm-applet &
# Set keyboard repeat rate
xset r rate 250 40
'';
windowManager.i3 = {
enable = true;
package = pkgs.i3; # Use i3-gaps for window gaps
config = {
modifier = mod;
terminal = "${pkgs.alacritty}/bin/alacritty";
fonts = {
names = [ "Iosevka Nerd Font" ];
size = 11.0;
};
gaps = {
inner = 8;
outer = 4;
smartGaps = true;
};
window = {
border = 2;
titlebar = false;
};
focus = {
followMouse = true;
mouseWarping = true;
};
# Default workspace layout
workspaceLayout = "default";
keybindings = lib.mkForce {
# --- Applications ---
"${mod}+Return" = "exec ${pkgs.alacritty}/bin/alacritty";
"${alt}+Return" = "exec ${pkgs.alacritty}/bin/alacritty";
"${mod}+Shift+Return" = "exec ${pkgs.alacritty}/bin/alacritty --class floating";
"${mod}+d" = "exec ${pkgs.rofi}/bin/rofi -show drun -show-icons";
"${mod}+Shift+d" = "exec ${pkgs.rofi}/bin/rofi -show run";
"${alt}+1" = "exec firefox";
"${alt}+2" = "exec discord";
"${mod}+Shift+s" = "exec ${pkgs.maim}/bin/maim -s | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png";
"${mod}+Shift+Print" = "exec ${pkgs.maim}/bin/maim | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png";
"${mod}+Shift+x" = "exec ${pkgs.i3lock}/bin/i3lock -c 000000";
"${mod}+q" = "kill";
"${mod}+f" = "fullscreen toggle";
"${mod}+Shift+f" = "floating toggle";
"${mod}+space" = "focus mode_toggle";
"${mod}+Shift+space" = "move container to workspace current, floating toggle";
"${mod}+h" = "focus left";
"${mod}+j" = "focus down";
"${mod}+k" = "focus up";
"${mod}+l" = "focus right";
"${mod}+Left" = "focus left";
"${mod}+Down" = "focus down";
"${mod}+Up" = "focus up";
"${mod}+Right" = "focus right";
# Move windows
"${mod}+Shift+h" = "move left";
"${mod}+Shift+j" = "move down";
"${mod}+Shift+k" = "move up";
"${mod}+Shift+l" = "move right";
"${mod}+Shift+Left" = "move left";
"${mod}+Shift+Down" = "move down";
"${mod}+Shift+Up" = "move up";
"${mod}+Shift+Right" = "move right";
# --- Workspaces ---
"${mod}+1" = "workspace number 1";
"${mod}+2" = "workspace number 2";
"${mod}+3" = "workspace number 3";
"${mod}+4" = "workspace number 4";
"${mod}+5" = "workspace number 5";
"${mod}+6" = "workspace number 6";
"${mod}+7" = "workspace number 7";
"${mod}+8" = "workspace number 8";
"${mod}+9" = "workspace number 9";
"${mod}+0" = "workspace number 10";
"${mod}+Shift+1" = "move container to workspace number 1";
"${mod}+Shift+2" = "move container to workspace number 2";
"${mod}+Shift+3" = "move container to workspace number 3";
"${mod}+Shift+4" = "move container to workspace number 4";
"${mod}+Shift+5" = "move container to workspace number 5";
"${mod}+Shift+6" = "move container to workspace number 6";
"${mod}+Shift+7" = "move container to workspace number 7";
"${mod}+Shift+8" = "move container to workspace number 8";
"${mod}+Shift+9" = "move container to workspace number 9";
"${mod}+Shift+0" = "move container to workspace number 10";
# --- Layout ---
"${mod}+b" = "split h";
"${mod}+v" = "split v";
"${mod}+e" = "layout toggle split";
"${mod}+w" = "layout tabbed";
"${mod}+s" = "layout stacking";
"${mod}+a" = "focus parent";
"${mod}+r" = "mode resize";
# --- System ---
"${mod}+Shift+e" = "exec i3-nagbar -t warning -m 'Exit i3?' -b 'Yes' 'i3-msg exit'";
"${mod}+Shift+r" = "restart";
"${mod}+Shift+c" = "reload";
};
modes = {
resize = {
"h" = "resize shrink width 10 px or 10 ppt";
"j" = "resize grow height 10 px or 10 ppt";
"k" = "resize shrink height 10 px or 10 ppt";
"l" = "resize grow width 10 px or 10 ppt";
"Left" = "resize shrink width 10 px or 10 ppt";
"Down" = "resize grow height 10 px or 10 ppt";
"Up" = "resize shrink height 10 px or 10 ppt";
"Right" = "resize grow width 10 px or 10 ppt";
"Escape" = "mode default";
"Return" = "mode default";
};
};
floating = {
modifier = mod;
criteria = [
{ title = "Picture-in-Picture"; }
{ class = "floating"; }
{ class = "Pavucontrol"; }
{ class = "Nm-connection-editor"; }
];
};
# Assign apps to workspaces (optional)
assigns = {
"1" = [{ class = "^Firefox$"; }];
"2" = [{ class = "^discord$"; }];
"10" = [{ class = "^Spotify$"; }];
};
startup = [
{
command = "systemctl --user import-environment DISPLAY XAUTHORITY";
notification = false;
}
{
command = "dbus-update-activation-environment --all";
notification = false;
}
];
colors = {
focused = {
border = "#81a1c1";
background = "#81a1c1";
text = "#2e3440";
indicator = "#81a1c1";
childBorder = "#81a1c1";
};
focusedInactive = {
border = "#4c566a";
background = "#4c566a";
text = "#d8dee9";
indicator = "#4c566a";
childBorder = "#4c566a";
};
unfocused = {
border = "#3b4252";
background = "#3b4252";
text = "#d8dee9";
indicator = "#3b4252";
childBorder = "#3b4252";
};
urgent = {
border = "#bf616a";
background = "#bf616a";
text = "#2e3440";
indicator = "#bf616a";
childBorder = "#bf616a";
};
};
bars = [
{
position = "bottom";
statusCommand = "${pkgs.i3status}/bin/i3status";
fonts = {
names = [ "Iosevka Nerd Font" ];
size = 11.0;
};
colors = {
background = "#2e3440";
statusline = "#d8dee9";
separator = "#4c566a";
focusedWorkspace = {
border = "#81a1c1";
background = "#81a1c1";
text = "#2e3440";
};
activeWorkspace = {
border = "#4c566a";
background = "#4c566a";
text = "#d8dee9";
};
inactiveWorkspace = {
border = "#3b4252";
background = "#3b4252";
text = "#d8dee9";
};
urgentWorkspace = {
border = "#bf616a";
background = "#bf616a";
text = "#2e3440";
};
};
}
];
};
};
};
home.packages = with pkgs; [
feh
picom
dunst
rofi
i3lock
i3status
networkmanagerapplet
maim
xclip
];
}

View file

@ -8,69 +8,28 @@
services.sxhkd = { services.sxhkd = {
enable = true; enable = true;
keybindings = { keybindings = {
# terminal emulator
"super + Return" = "alacritty"; "super + Return" = "alacritty";
# program launcher
"super + @space" = "rofi -show drun"; "super + @space" = "rofi -show drun";
# quit/restart bspwm
"super + alt + {q,r}" = "bspc {quit,wm -r}"; "super + alt + {q,r}" = "bspc {quit,wm -r}";
# close and kill
"super + {_,shift + }w" = "bspc node -{c,k}"; "super + {_,shift + }w" = "bspc node -{c,k}";
# alternate between the tiled and monocle layout
"super + m" = "bspc desktop -l next"; "super + m" = "bspc desktop -l next";
# send the newest marked node to the newest preselected node
"super + y" = "bspc node newest.marked.local -n newest.!automatic.local"; "super + y" = "bspc node newest.marked.local -n newest.!automatic.local";
# swap the current node and the biggest node
"super + g" = "bspc node -s biggest"; "super + g" = "bspc node -s biggest";
# set the window state
"super + {t,shift + t,s,f}" = "bspc node -t {tiled,pseudo_tiled,floating,fullscreen}"; "super + {t,shift + t,s,f}" = "bspc node -t {tiled,pseudo_tiled,floating,fullscreen}";
# set the node flags
"super + ctrl + {m,x,y,z}" = "bspc node -g {marked,locked,sticky,private}"; "super + ctrl + {m,x,y,z}" = "bspc node -g {marked,locked,sticky,private}";
# focus the node in the given direction
"super + {_,shift + }{h,j,k,l}" = "bspc node -{f,s} {west,south,north,east}"; "super + {_,shift + }{h,j,k,l}" = "bspc node -{f,s} {west,south,north,east}";
# focus the node for the given path jump
"super + {p,b,comma,period}" = "bspc node -f @{parent,brother,first,second}"; "super + {p,b,comma,period}" = "bspc node -f @{parent,brother,first,second}";
# focus the next/previous node in the current desktop
"super + {_,shift + }c" = "bspc node -f {next,prev}.local.!hidden.window"; "super + {_,shift + }c" = "bspc node -f {next,prev}.local.!hidden.window";
# focus the next/previous desktop in the current monitor
"super + bracket{left,right}" = "bspc desktop -f {prev,next}.local.!hidden.window"; "super + bracket{left,right}" = "bspc desktop -f {prev,next}.local.!hidden.window";
# focus the last node/desktop
"super + {grave,Tab}" = "bspc {node,desktop} -f last"; "super + {grave,Tab}" = "bspc {node,desktop} -f last";
# focus or send to the given desktop
"super + {_,shift + }{1-9,0}" = "bspc {desktop -f,node -d} '{1-9,10}'"; "super + {_,shift + }{1-9,0}" = "bspc {desktop -f,node -d} '{1-9,10}'";
# preselect the direction
"super + ctrl + {h,j,k,l}" = "bspc node -p {west,south,north,east}"; "super + ctrl + {h,j,k,l}" = "bspc node -p {west,south,north,east}";
# preselect the ratio
"super + ctrl + {1-9}" = "bspc node -o 0.{1-9}"; "super + ctrl + {1-9}" = "bspc node -o 0.{1-9}";
# cancel the preselection for the focused node
"super + ctrl + space" = "bspc node -p cancel"; "super + ctrl + space" = "bspc node -p cancel";
# cancel the preselection for the focused desktop
"super + ctrl + shift + space" = "bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel"; "super + ctrl + shift + space" = "bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel";
# move a floating window
"super + {Left,Down,Up,Right}" = "bspc node -v {-20 0,0 20,0 -20,20 0}"; "super + {Left,Down,Up,Right}" = "bspc node -v {-20 0,0 20,0 -20,20 0}";
# Rotate tree
"super + shift + {d,a}" = "bspc node @/ -C {forward,backward}"; "super + shift + {d,a}" = "bspc node @/ -C {forward,backward}";
#### MULTIMEDIA KEYS ####
"XF86Audio{Prev,Next,Play}" = "mpc -q {prev,next,toggle}"; "XF86Audio{Prev,Next,Play}" = "mpc -q {prev,next,toggle}";
"XF86Audio{Raise,Lower}Volume" = "pulsemixer --change-volume {+,-}5"; "XF86Audio{Raise,Lower}Volume" = "pulsemixer --change-volume {+,-}5";
@ -78,18 +37,12 @@
"XF86AudioMute" = "pulsemixer --toggle-mute"; "XF86AudioMute" = "pulsemixer --toggle-mute";
"XF86AudioMicMute" = "pulsemixer --id source-42 --toggle-mute"; "XF86AudioMicMute" = "pulsemixer --id source-42 --toggle-mute";
# Launch programs
"alt + 1" = "firefox"; "alt + 1" = "firefox";
"alt + 2" = "Discord"; "alt + 2" = "Discord";
"alt + 3" = "nemo"; "alt + 3" = "nemo";
# Brightness control
"XF86MonBrightness{Up,Down}" = "light -{A,U} 10"; "XF86MonBrightness{Up,Down}" = "light -{A,U} 10";
# Screenshoting
"super + shift + s" = "maim -s | xclip -selection clipboard -t image/png"; "super + shift + s" = "maim -s | xclip -selection clipboard -t image/png";
"Print" = "maim | xclip -selection clipboard -t image/png && notify-send 'maim' 'Screenshot captured'"; "Print" = "maim | xclip -selection clipboard -t image/png && notify-send 'maim' 'Screenshot captured'";

View file

@ -11,9 +11,10 @@
# killall # killall
xclip xclip
maim maim
calc sage nim zig gcc gnumake gnupg ghc idris2 python3 vim unzip wget calc sage nim zig gcc gnumake gnupg ghc idris2 python3 vim unzip wget nerd-fonts.iosevka
# htop htop fastfetch pfetch chromium
ranger ranger elan cava vscode
# pulsemixer # pulsemixer
tree tree
# fzf # fzf
@ -34,5 +35,7 @@
# sd # sd
# discord # discord
]; ];
} }

View file

@ -4,109 +4,176 @@
enable = true; enable = true;
package = pkgs.polybarFull; package = pkgs.polybarFull;
script = '' script = ''
polybar leftbar & polybar top &
polybar centerbar & polybar bottom &
polybar rightbar &
''; '';
config = { config = {
"colors" = { "colors" = {
base = "#24273a"; bg = "#050a05";
mantle = "#1e2030"; fg = "#00ff41";
surface0 = "#363a4f"; dim = "#007a1f";
surface1 = "#494d64"; ghost = "#1a3a1a";
text = "#cad3f5"; cyan = "#00ffcc";
mauve = "#c6a0f6"; yellow = "#aaff00";
red = "#ed8796"; red = "#ff3030";
maroon = "#ee99a0"; bright = "#39ff14";
green = "#a6da95";
peach = "#f5a97f";
sapphire = "#7dc4e4";
yellow = "#eed49f";
}; };
"section/base" = { "section/base" = {
height = 20; width = "100%";
offset-y = 2; height = 22;
background = "\${colors.base}"; background = "\${colors.bg}";
foreground = "\${colors.text}"; foreground = "\${colors.fg}";
border-color = "\${colors.mauve}"; border-color = "\${colors.ghost}";
border-size = 2; border-bottom-size = 1;
font-0 = "Iosevka:size=15;2"; font-0 = "Iosevka:size=10;2";
font-1 = "Iosevka:size=14;2"; padding-left = 1;
padding-right = 1;
module-margin-left = 1;
module-margin-right = 1;
wm-restack = "bspwm"; wm-restack = "bspwm";
cursor-click = "pointer";
}; };
"bar/leftbar" = {
"bar/top" = {
"inherit" = "section/base"; "inherit" = "section/base";
modules-left = "bspwm"; modules-left = "pulseaudio memory cpu";
offset-x = 10; modules-center = "date";
width = 221; modules-right = "filesystem";
}; };
"bar/bottom" = {
"inherit" = "section/base";
bottom = true;
modules-left = "mpd";
modules-center = "bspwm";
modules-right = "powermenu";
};
# ── Workspaces ────────────────────────────────────────────────
"module/bspwm" = { "module/bspwm" = {
type = "internal/bspwm"; type = "internal/bspwm";
pin-workspaces = true;
enable-click = true;
enable-scroll = false;
label-active = "%index%"; label-active = "%index%";
label-active-background = "\${colors.mauve}"; label-active-underline = "\${colors.bright}";
label-active-foreground = "\${colors.base}"; label-active-padding = 2;
label-active-padding = 1;
label-empty = "%index%";
label-empty-padding = 1;
label-occupied = "%index%"; label-occupied = "%index%";
label-occupied-background = "\${colors.surface0}"; label-occupied-underline = "\${colors.dim}";
label-occupied-padding = 1; label-occupied-padding = 2;
label-empty = "%index%";
label-empty-foreground = "\${colors.ghost}";
label-empty-padding = 2;
label-urgent = "%index%"; label-urgent = "%index%";
label-urgent-background = "\${colors.red}"; label-urgent-foreground = "\${colors.red}";
label-urgent-foreground = "\${colors.base}"; label-urgent-padding = 2;
label-urgent-padding = 1;
}; };
"bar/centerbar" = {
"inherit" = "section/base"; # ── MPD ───────────────────────────────────────────────────────
modules-center = "mpd"; "module/mpd" = {
offset-x = "50%:-175"; type = "internal/mpd";
width = 350; host = "127.0.0.1";
}; port = 6600;
"module/mpd".type = "internal/mpd"; interval = 2;
"bar/rightbar" = { format-online = "<toggle> <label-song>";
"inherit" = "section/base"; label-song = "%artist% - %title%";
modules-right = "xkeyboard cpu memory pulseaudio date"; label-song-foreground = "\${colors.cyan}";
offset-x = "100%:-460"; label-song-maxlen = 50;
width = 450; label-song-ellipsis = true;
}; icon-play = ">";
"module/xkeyboard" = { icon-pause = "||";
type = "internal/xkeyboard"; icon-stop = "[]";
format-foreground = "\${colors.maroon}"; format-online-foreground = "\${colors.cyan}";
format-padding = 1; format-offline = "mpd: offline";
format-offline-foreground = "\${colors.ghost}";
}; };
# ── CPU ───────────────────────────────────────────────────────
"module/cpu" = { "module/cpu" = {
type = "internal/cpu"; type = "internal/cpu";
format-foreground = "\${colors.green}"; interval = 2;
format-padding = 1; format-prefix = "cpu: ";
format-prefix-foreground = "\${colors.dim}";
label = "%percentage%%"; label = "%percentage%%";
}; };
# ── Memory ────────────────────────────────────────────────────
"module/memory" = { "module/memory" = {
type = "internal/memory"; type = "internal/memory";
format-foreground = "\${colors.peach}"; interval = 3;
format-padding = 1; format-prefix = "mem: ";
format-prefix-foreground = "\${colors.dim}";
label = "%percentage_used%%"; label = "%percentage_used%%";
}; };
# ── Filesystem ────────────────────────────────────────────────
"module/filesystem" = {
type = "internal/fs";
interval = 25;
mount-0 = "/";
format-mounted = "<label-mounted>";
label-mounted = "disk: %percentage_used%%";
format-unmounted = "disk: N/A";
};
# ── Volume ────────────────────────────────────────────────────
"module/pulseaudio" = { "module/pulseaudio" = {
type = "internal/pulseaudio"; type = "internal/pulseaudio";
format-muted-background = "\${colors.red}"; use-ui-max = false;
format-muted-foreground = "\${colors.base}"; format-volume = "<label-volume>";
format-muted-padding = 1; format-volume-prefix = "audio: ";
format-volume = "<ramp-volume> <label-volume>"; format-volume-prefix-foreground = "\${colors.dim}";
format-volume-foreground = "\${colors.sapphire}"; label-volume = "%percentage%%";
format-volume-padding = 1; label-muted = "muted";
label-muted = "MUTED"; label-muted-foreground = "\${colors.ghost}";
ramp-volume-0 = ""; format-muted-prefix = "audio: ";
ramp-volume-1 = ""; format-muted-prefix-foreground = "\${colors.dim}";
ramp-volume-2 = "";
}; };
# ── Clock ─────────────────────────────────────────────────────
"module/date" = { "module/date" = {
type = "internal/date"; type = "internal/date";
date = "%d"; interval = 1;
date-alt = "%A"; date = "%d.%m.%Y";
time = "%H:%M"; time = "%H:%M:%S";
label = "%time% - %date%";
format-foreground = "\${colors.yellow}"; format-foreground = "\${colors.yellow}";
format-padding = 1; };
label = "%date% %time%";
# ── Power menu ────────────────────────────────────────────────
"module/powermenu" = {
type = "custom/menu";
expand-right = true;
format-spacing = 1;
label-open = "power";
label-open-foreground = "\${colors.dim}";
label-close = "cancel";
label-close-foreground = "\${colors.dim}";
label-separator = " | ";
label-separator-foreground = "\${colors.ghost}";
menu-0-0 = "reboot";
menu-0-0-exec = "menu-open-1";
menu-0-1 = "poweroff";
menu-0-1-exec = "menu-open-2";
menu-0-2 = "sleep";
menu-0-2-exec = "menu-open-3";
menu-1-0 = "reboot";
menu-1-0-exec = "reboot";
menu-1-1 = "cancel";
menu-1-1-exec = "menu-open-0";
menu-2-0 = "poweroff";
menu-2-0-exec = "poweroff";
menu-2-1 = "cancel";
menu-2-1-exec = "menu-open-0";
menu-3-0 = "sleep";
menu-3-0-exec = "systemctl suspend";
menu-3-1 = "cancel";
menu-3-1-exec = "menu-open-0";
};
"settings" = {
screenchange-reload = true;
}; };
}; };
}; };

View file

@ -1,14 +1,58 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
programs.alacritty = { programs.alacritty = {
enable = true; enable = true;
settings = { settings = {
env.WINIT_X11_SCALE_FACTOR = "1"; env.WINIT_X11_SCALE_FACTOR = "1";
font = { font = {
normal.family = "Iosevka"; normal.family = "Iosevka Nerd Font";
size = 14; size = 14;
}; };
colors = {
primary = {
background = "#2E3440";
foreground = "#D8DEE9";
dim_foreground = "#A5AFBA";
};
cursor = {
text = "#2E3440";
cursor = "#D8DEE9";
};
vi_mode_cursor = {
text = "#2E3440";
cursor = "#D8DEE9";
};
normal = {
black = "#3B4252";
red = "#BF616A";
green = "#A3BE8C";
yellow = "#EBCB8B";
blue = "#81A1C1";
magenta = "#B48EAD";
cyan = "#88C0D0";
white = "#E5E9F0";
};
bright = {
black = "#4C566A";
red = "#BF616A";
green = "#A3BE8C";
yellow = "#EBCB8B";
blue = "#81A1C1";
magenta = "#B48EAD";
cyan = "#8FBCBB";
white = "#ECEFF4";
};
dim = {
black = "#373E4D";
red = "#94545D";
green = "#809575";
yellow = "#B29E75";
blue = "#68809A";
magenta = "#8C738A";
cyan = "#6D96A5";
white = "#ADB3BB";
};
};
}; };
}; };
} }