From 0bb6324afc56547ab20e81ce5ff6146214661a3c Mon Sep 17 00:00:00 2001 From: laniakea Date: Mon, 13 Apr 2026 20:11:23 +0300 Subject: [PATCH] nord theme: i3 --- navi/navi/bash.nix | 264 +++++++++++++++++++++++++++++++++++++- navi/navi/browser.nix | 98 ++++++++------- navi/navi/bspwm.nix | 56 --------- navi/navi/default.nix | 4 +- navi/navi/emacs.nix | 46 +++++++ navi/navi/i3.nix | 279 +++++++++++++++++++++++++++++++++++++++++ navi/navi/keyboard.nix | 47 ------- navi/navi/packages.nix | 9 +- navi/navi/polybar.nix | 239 ++++++++++++++++++++++------------- navi/navi/terminal.nix | 48 ++++++- 10 files changed, 843 insertions(+), 247 deletions(-) delete mode 100644 navi/navi/bspwm.nix create mode 100644 navi/navi/emacs.nix create mode 100644 navi/navi/i3.nix diff --git a/navi/navi/bash.nix b/navi/navi/bash.nix index 050ab66..638876d 100644 --- a/navi/navi/bash.nix +++ b/navi/navi/bash.nix @@ -1,20 +1,274 @@ -{ pkgs, ... }: +{ config, pkgs, lib, ... }: + { + home.packages = with pkgs; [ + eza + bat + fd + ripgrep + fzf + zoxide + delta + grc + ]; + programs.bash = { 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 = '' - 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 = { enable = true; + enableBashIntegration = true; + 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 = { - success_symbol = "[❯](bold green)"; - error_symbol = "[❯](bold red)"; + success_symbol = "[❄](bold fg:#88C0D0)"; + 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"; + }; + }; } diff --git a/navi/navi/browser.nix b/navi/navi/browser.nix index e44c56b..7e92940 100644 --- a/navi/navi/browser.nix +++ b/navi/navi/browser.nix @@ -164,25 +164,31 @@ in }; profiles.default = { userChrome = '' - /* Catppuccin Mocha */ + /* Nord Theme */ :root { - --ctp-base: #1e1e2e; - --ctp-mantle: #181825; - --ctp-crust: #11111b; - --ctp-surface0:#313244; - --ctp-surface1:#45475a; - --ctp-surface2:#585b70; - --ctp-overlay0:#6c7086; - --ctp-overlay1:#7f849c; - --ctp-text: #cdd6f4; - --ctp-subtext0:#a6adc8; - --ctp-lavender:#b4befe; - --ctp-blue: #89b4fa; - --ctp-mauve: #cba6f7; - --ctp-pink: #f38ba8; - --ctp-peach: #fab387; - --ctp-green: #a6e3a1; - --ctp-teal: #94e2d5; + /* Polar Night - Dark backgrounds */ + --nord0: #2e3440; + --nord1: #3b4252; + --nord2: #434c5e; + --nord3: #4c566a; + + /* Snow Storm - Light text */ + --nord4: #d8dee9; + --nord5: #e5e9f0; + --nord6: #eceff4; + + /* Frost - Accents */ + --nord7: #8fbcbb; + --nord8: #88c0d0; + --nord9: #81a1c1; + --nord10: #5e81ac; + + /* Aurora - Colors */ + --nord11: #bf616a; + --nord12: #d08770; + --nord13: #ebcb8b; + --nord14: #a3be8c; + --nord15: #b48ead; } #main-window, @@ -190,33 +196,33 @@ in #TabsToolbar, #nav-bar, #PersonalToolbar { - background-color: var(--ctp-mantle) !important; - color: var(--ctp-text) !important; - border-color: var(--ctp-surface0) !important; + background-color: var(--nord0) !important; + color: var(--nord6) !important; + border-color: var(--nord1) !important; } .tabbrowser-tab .tab-background { - background-color: var(--ctp-surface0) !important; + background-color: var(--nord1) !important; border-radius: 6px !important; } .tabbrowser-tab[selected] .tab-background { - background-color: var(--ctp-base) !important; + background-color: var(--nord2) !important; } .tabbrowser-tab .tab-label { - color: var(--ctp-subtext0) !important; + color: var(--nord4) !important; } .tabbrowser-tab[selected] .tab-label { - color: var(--ctp-text) !important; + color: var(--nord6) !important; } .tabbrowser-tab[selected] .tab-background::before { content: ""; display: block; height: 2px; - background: var(--ctp-mauve) !important; + background: var(--nord8) !important; border-radius: 2px 2px 0 0; position: absolute; top: 0; @@ -225,66 +231,66 @@ in } #urlbar-background { - background-color: var(--ctp-surface0) !important; - border-color: var(--ctp-surface1) !important; + background-color: var(--nord1) !important; + border-color: var(--nord2) !important; border-radius: 8px !important; } #urlbar[focused] #urlbar-background { - border-color: var(--ctp-mauve) !important; - box-shadow: 0 0 0 1px var(--ctp-mauve) !important; + border-color: var(--nord8) !important; + box-shadow: 0 0 0 1px var(--nord8) !important; } #urlbar-input { - color: var(--ctp-text) !important; + color: var(--nord6) !important; } toolbar button, toolbarbutton { - color: var(--ctp-text) !important; + color: var(--nord6) !important; } toolbar button:hover, toolbarbutton:hover { - background-color: var(--ctp-surface1) !important; + background-color: var(--nord2) !important; border-radius: 4px !important; } #sidebar-box { - background-color: var(--ctp-mantle) !important; - color: var(--ctp-text) !important; + background-color: var(--nord0) !important; + color: var(--nord6) !important; } menupopup, panel { - background-color: var(--ctp-surface0) !important; - color: var(--ctp-text) !important; - border-color: var(--ctp-surface1) !important; + background-color: var(--nord1) !important; + color: var(--nord6) !important; + border-color: var(--nord2) !important; border-radius: 8px !important; } menuitem:hover { - background-color: var(--ctp-surface1) !important; - color: var(--ctp-text) !important; + background-color: var(--nord2) !important; + color: var(--nord6) !important; border-radius: 4px !important; } #PersonalToolbar toolbarbutton { - color: var(--ctp-subtext0) !important; + color: var(--nord4) !important; } #PersonalToolbar toolbarbutton:hover { - color: var(--ctp-text) !important; - background-color: var(--ctp-surface0) !important; + color: var(--nord6) !important; + background-color: var(--nord1) !important; border-radius: 4px !important; } scrollbar { - background-color: var(--ctp-mantle) !important; + background-color: var(--nord0) !important; } scrollbar thumb { - background-color: var(--ctp-surface2) !important; + background-color: var(--nord3) !important; border-radius: 4px !important; } ''; @@ -394,4 +400,4 @@ in ]; }; }; -} +} \ No newline at end of file diff --git a/navi/navi/bspwm.nix b/navi/navi/bspwm.nix deleted file mode 100644 index 93ed2f4..0000000 --- a/navi/navi/bspwm.nix +++ /dev/null @@ -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 ]; -} diff --git a/navi/navi/default.nix b/navi/navi/default.nix index 22853bb..06384b2 100644 --- a/navi/navi/default.nix +++ b/navi/navi/default.nix @@ -13,9 +13,9 @@ ./launcher.nix ./keyboard.nix ./bash.nix - ./bspwm.nix + ./emacs.nix + ./i3.nix ./notifications.nix - ./polybar.nix ./screen-lock.nix ./shell.nix ./gtk-qt.nix diff --git a/navi/navi/emacs.nix b/navi/navi/emacs.nix new file mode 100644 index 0000000..d429149 --- /dev/null +++ b/navi/navi/emacs.nix @@ -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)) + ''; + }; +} diff --git a/navi/navi/i3.nix b/navi/navi/i3.nix new file mode 100644 index 0000000..58da163 --- /dev/null +++ b/navi/navi/i3.nix @@ -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 + ]; +} diff --git a/navi/navi/keyboard.nix b/navi/navi/keyboard.nix index d91a9fd..1d4a693 100644 --- a/navi/navi/keyboard.nix +++ b/navi/navi/keyboard.nix @@ -8,69 +8,28 @@ services.sxhkd = { enable = true; keybindings = { - # terminal emulator "super + Return" = "alacritty"; - # program launcher "super + @space" = "rofi -show drun"; - # quit/restart bspwm "super + alt + {q,r}" = "bspc {quit,wm -r}"; - - # close and kill "super + {_,shift + }w" = "bspc node -{c,k}"; - - # alternate between the tiled and monocle layout "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"; - - # swap the current node and the biggest node "super + g" = "bspc node -s biggest"; - - # set the window state "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}"; - - # focus the node in the given direction "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}"; - - # focus the next/previous node in the current desktop "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"; - - # focus the last node/desktop "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}'"; - - # preselect the direction "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}"; - - # cancel the preselection for the focused node "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"; - - # move a floating window "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}"; - #### MULTIMEDIA KEYS #### - "XF86Audio{Prev,Next,Play}" = "mpc -q {prev,next,toggle}"; "XF86Audio{Raise,Lower}Volume" = "pulsemixer --change-volume {+,-}5"; @@ -78,18 +37,12 @@ "XF86AudioMute" = "pulsemixer --toggle-mute"; "XF86AudioMicMute" = "pulsemixer --id source-42 --toggle-mute"; - - # Launch programs "alt + 1" = "firefox"; "alt + 2" = "Discord"; "alt + 3" = "nemo"; - - # Brightness control "XF86MonBrightness{Up,Down}" = "light -{A,U} 10"; - - # Screenshoting "super + shift + s" = "maim -s | xclip -selection clipboard -t image/png"; "Print" = "maim | xclip -selection clipboard -t image/png && notify-send 'maim' 'Screenshot captured'"; diff --git a/navi/navi/packages.nix b/navi/navi/packages.nix index 3cedd29..84f802c 100644 --- a/navi/navi/packages.nix +++ b/navi/navi/packages.nix @@ -11,9 +11,10 @@ # killall xclip maim - calc sage nim zig gcc gnumake gnupg ghc idris2 python3 vim unzip wget - # htop - ranger + calc sage nim zig gcc gnumake gnupg ghc idris2 python3 vim unzip wget nerd-fonts.iosevka + htop fastfetch pfetch chromium + ranger elan cava vscode + # pulsemixer tree # fzf @@ -34,5 +35,7 @@ # sd # discord ]; + + } diff --git a/navi/navi/polybar.nix b/navi/navi/polybar.nix index 661e5fd..fa58e1d 100644 --- a/navi/navi/polybar.nix +++ b/navi/navi/polybar.nix @@ -4,109 +4,176 @@ enable = true; package = pkgs.polybarFull; script = '' - polybar leftbar & - polybar centerbar & - polybar rightbar & + polybar top & + polybar bottom & ''; config = { "colors" = { - base = "#24273a"; - mantle = "#1e2030"; - surface0 = "#363a4f"; - surface1 = "#494d64"; - text = "#cad3f5"; - mauve = "#c6a0f6"; - red = "#ed8796"; - maroon = "#ee99a0"; - green = "#a6da95"; - peach = "#f5a97f"; - sapphire = "#7dc4e4"; - yellow = "#eed49f"; + bg = "#050a05"; + fg = "#00ff41"; + dim = "#007a1f"; + ghost = "#1a3a1a"; + cyan = "#00ffcc"; + yellow = "#aaff00"; + red = "#ff3030"; + bright = "#39ff14"; }; + "section/base" = { - height = 20; - offset-y = 2; - background = "\${colors.base}"; - foreground = "\${colors.text}"; - border-color = "\${colors.mauve}"; - border-size = 2; - font-0 = "Iosevka:size=15;2"; - font-1 = "Iosevka:size=14;2"; - wm-restack = "bspwm"; + width = "100%"; + height = 22; + background = "\${colors.bg}"; + foreground = "\${colors.fg}"; + border-color = "\${colors.ghost}"; + border-bottom-size = 1; + font-0 = "Iosevka:size=10;2"; + padding-left = 1; + padding-right = 1; + module-margin-left = 1; + module-margin-right = 1; + wm-restack = "bspwm"; + cursor-click = "pointer"; }; - "bar/leftbar" = { - "inherit" = "section/base"; - modules-left = "bspwm"; - offset-x = 10; - width = 221; + + "bar/top" = { + "inherit" = "section/base"; + modules-left = "pulseaudio memory cpu"; + modules-center = "date"; + modules-right = "filesystem"; }; + + "bar/bottom" = { + "inherit" = "section/base"; + bottom = true; + modules-left = "mpd"; + modules-center = "bspwm"; + modules-right = "powermenu"; + }; + + # ── Workspaces ──────────────────────────────────────────────── "module/bspwm" = { - type = "internal/bspwm"; - label-active = "%index%"; - label-active-background = "\${colors.mauve}"; - label-active-foreground = "\${colors.base}"; - label-active-padding = 1; - label-empty = "%index%"; - label-empty-padding = 1; - label-occupied = "%index%"; - label-occupied-background = "\${colors.surface0}"; - label-occupied-padding = 1; - label-urgent = "%index%"; - label-urgent-background = "\${colors.red}"; - label-urgent-foreground = "\${colors.base}"; - label-urgent-padding = 1; + type = "internal/bspwm"; + pin-workspaces = true; + enable-click = true; + enable-scroll = false; + label-active = "%index%"; + label-active-underline = "\${colors.bright}"; + label-active-padding = 2; + label-occupied = "%index%"; + label-occupied-underline = "\${colors.dim}"; + label-occupied-padding = 2; + label-empty = "%index%"; + label-empty-foreground = "\${colors.ghost}"; + label-empty-padding = 2; + label-urgent = "%index%"; + label-urgent-foreground = "\${colors.red}"; + label-urgent-padding = 2; }; - "bar/centerbar" = { - "inherit" = "section/base"; - modules-center = "mpd"; - offset-x = "50%:-175"; - width = 350; - }; - "module/mpd".type = "internal/mpd"; - "bar/rightbar" = { - "inherit" = "section/base"; - modules-right = "xkeyboard cpu memory pulseaudio date"; - offset-x = "100%:-460"; - width = 450; - }; - "module/xkeyboard" = { - type = "internal/xkeyboard"; - format-foreground = "\${colors.maroon}"; - format-padding = 1; + + # ── MPD ─────────────────────────────────────────────────────── + "module/mpd" = { + type = "internal/mpd"; + host = "127.0.0.1"; + port = 6600; + interval = 2; + format-online = " "; + label-song = "%artist% - %title%"; + label-song-foreground = "\${colors.cyan}"; + label-song-maxlen = 50; + label-song-ellipsis = true; + icon-play = ">"; + icon-pause = "||"; + icon-stop = "[]"; + format-online-foreground = "\${colors.cyan}"; + format-offline = "mpd: offline"; + format-offline-foreground = "\${colors.ghost}"; }; + + # ── CPU ─────────────────────────────────────────────────────── "module/cpu" = { - type = "internal/cpu"; - format-foreground = "\${colors.green}"; - format-padding = 1; - label = " %percentage%%"; + type = "internal/cpu"; + interval = 2; + format-prefix = "cpu: "; + format-prefix-foreground = "\${colors.dim}"; + label = "%percentage%%"; }; + + # ── Memory ──────────────────────────────────────────────────── "module/memory" = { - type = "internal/memory"; - format-foreground = "\${colors.peach}"; - format-padding = 1; - label = " %percentage_used%%"; + type = "internal/memory"; + interval = 3; + format-prefix = "mem: "; + format-prefix-foreground = "\${colors.dim}"; + label = "%percentage_used%%"; }; + + # ── Filesystem ──────────────────────────────────────────────── + "module/filesystem" = { + type = "internal/fs"; + interval = 25; + mount-0 = "/"; + format-mounted = ""; + label-mounted = "disk: %percentage_used%%"; + format-unmounted = "disk: N/A"; + }; + + # ── Volume ──────────────────────────────────────────────────── "module/pulseaudio" = { - type = "internal/pulseaudio"; - format-muted-background = "\${colors.red}"; - format-muted-foreground = "\${colors.base}"; - format-muted-padding = 1; - format-volume = " "; - format-volume-foreground = "\${colors.sapphire}"; - format-volume-padding = 1; - label-muted = "MUTED"; - ramp-volume-0 = ""; - ramp-volume-1 = ""; - ramp-volume-2 = ""; + type = "internal/pulseaudio"; + use-ui-max = false; + format-volume = ""; + format-volume-prefix = "audio: "; + format-volume-prefix-foreground = "\${colors.dim}"; + label-volume = "%percentage%%"; + label-muted = "muted"; + label-muted-foreground = "\${colors.ghost}"; + format-muted-prefix = "audio: "; + format-muted-prefix-foreground = "\${colors.dim}"; }; + + # ── Clock ───────────────────────────────────────────────────── "module/date" = { - type = "internal/date"; - date = "%d"; - date-alt = "%A"; - time = "%H:%M"; - format-foreground = "\${colors.yellow}"; - format-padding = 1; - label = "%date% %time%"; + type = "internal/date"; + interval = 1; + date = "%d.%m.%Y"; + time = "%H:%M:%S"; + label = "%time% - %date%"; + format-foreground = "\${colors.yellow}"; + }; + + # ── 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; }; }; }; diff --git a/navi/navi/terminal.nix b/navi/navi/terminal.nix index a335b0f..951e8da 100644 --- a/navi/navi/terminal.nix +++ b/navi/navi/terminal.nix @@ -1,14 +1,58 @@ { pkgs, ... }: - { programs.alacritty = { enable = true; settings = { env.WINIT_X11_SCALE_FACTOR = "1"; font = { - normal.family = "Iosevka"; + normal.family = "Iosevka Nerd Font"; 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"; + }; + }; }; }; }