diff --git a/flake.lock b/flake.lock index 9842a82..4ce7fcd 100644 --- a/flake.lock +++ b/flake.lock @@ -22,9 +22,30 @@ "type": "github" } }, + "anyrun": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs", + "systems": "systems" + }, + "locked": { + "lastModified": 1731186561, + "narHash": "sha256-+jwC6oo7yx40SowZW4SCpTlYS+e0mPKmIuXvsBFNw3g=", + "owner": "fufexan", + "repo": "anyrun", + "rev": "3bc08db41dec30cd4278597c1c4bd7cf66b15fe0", + "type": "github" + }, + "original": { + "owner": "fufexan", + "ref": "launch-prefix", + "repo": "anyrun", + "type": "github" + } + }, "apple-fonts": { "inputs": { - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "ny": "ny", "sf-arabic": "sf-arabic", "sf-armenian": "sf-armenian", @@ -232,6 +253,27 @@ } }, "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "anyrun", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { "inputs": { "nixpkgs-lib": [ "nixvim", @@ -252,7 +294,7 @@ "type": "github" } }, - "flake-parts_2": { + "flake-parts_3": { "inputs": { "nixpkgs-lib": [ "stylix", @@ -276,7 +318,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1731533236, @@ -525,9 +567,9 @@ "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems", + "systems": "systems_2", "xdph": "xdph" }, "locked": { @@ -671,7 +713,7 @@ "hyprpanel": { "inputs": { "ags": "ags", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1742270078, @@ -692,7 +734,7 @@ "hyprland": [ "hyprland" ], - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1741933157, @@ -788,7 +830,7 @@ }, "nixarr": { "inputs": { - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "vpnconfinement": "vpnconfinement", "website-builder": "website-builder" }, @@ -809,8 +851,8 @@ "nixcord": { "inputs": { "flake-compat": "flake-compat_2", - "nixpkgs": "nixpkgs_5", - "systems": "systems_3", + "nixpkgs": "nixpkgs_6", + "systems": "systems_4", "treefmt-nix": "treefmt-nix" }, "locked": { @@ -845,21 +887,37 @@ }, "nixpkgs": { "locked": { - "lastModified": 1740828860, - "narHash": "sha256-cjbHI+zUzK5CPsQZqMhE3npTyYFt9tJ3+ohcfaOF/WM=", - "owner": "nixos", + "lastModified": 1730200266, + "narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "303bd8071377433a2d8f76e684ec773d70c5b642", + "rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_10": { + "locked": { + "lastModified": 1741513245, + "narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { "locked": { "lastModified": 1741513245, "narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=", @@ -876,6 +934,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1740828860, + "narHash": "sha256-cjbHI+zUzK5CPsQZqMhE3npTyYFt9tJ3+ohcfaOF/WM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "303bd8071377433a2d8f76e684ec773d70c5b642", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1742069588, "narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=", @@ -891,7 +965,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1736344531, "narHash": "sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc+c2c=", @@ -907,7 +981,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1741402956, "narHash": "sha256-y2hByvBM03s9T2fpeLjW6iprbxnhV9mJMmSwCHc41ZQ=", @@ -923,7 +997,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1742169275, "narHash": "sha256-nkH2Edu9rClcsQp2PYBe8E6fp8LDPi2uDBQ6wyMdeXI=", @@ -939,7 +1013,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1735554305, "narHash": "sha256-zExSA1i/b+1NMRhGGLtNfFGXgLtgo+dcuzHzaWA6w3Q=", @@ -955,7 +1029,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1742069588, "narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=", @@ -971,7 +1045,7 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_9": { "locked": { "lastModified": 1742272065, "narHash": "sha256-ud8vcSzJsZ/CK+r8/v0lyf4yUntVmDq6Z0A41ODfWbE=", @@ -987,25 +1061,9 @@ "type": "github" } }, - "nixpkgs_9": { - "locked": { - "lastModified": 1741513245, - "narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixvim": { "inputs": { - "flake-parts": "flake-parts", + "flake-parts": "flake-parts_2", "nixpkgs": [ "nixpkgs" ], @@ -1027,7 +1085,7 @@ }, "nur": { "inputs": { - "flake-parts": "flake-parts_2", + "flake-parts": "flake-parts_3", "nixpkgs": [ "stylix", "nixpkgs" @@ -1108,6 +1166,7 @@ }, "root": { "inputs": { + "anyrun": "anyrun", "apple-fonts": "apple-fonts", "home-manager": "home-manager", "hyprland": "hyprland", @@ -1116,7 +1175,7 @@ "nixarr": "nixarr", "nixcord": "nixcord", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_8", "nixvim": "nixvim", "sops-nix": "sops-nix", "spicetify-nix": "spicetify-nix", @@ -1210,7 +1269,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_8" + "nixpkgs": "nixpkgs_9" }, "locked": { "lastModified": 1742239755, @@ -1231,7 +1290,7 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_5" + "systems": "systems_6" }, "locked": { "lastModified": 1742098581, @@ -1259,9 +1318,9 @@ "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", "home-manager": "home-manager_2", - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_10", "nur": "nur", - "systems": "systems_6", + "systems": "systems_7", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -1314,16 +1373,17 @@ }, "systems_3": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { - "id": "systems", - "type": "indirect" + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" } }, "systems_4": { @@ -1336,9 +1396,8 @@ "type": "github" }, "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" + "id": "systems", + "type": "indirect" } }, "systems_5": { @@ -1371,6 +1430,21 @@ "type": "github" } }, + "systems_7": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tinted-foot": { "flake": false, "locked": { @@ -1455,7 +1529,7 @@ }, "treefmt-nix": { "inputs": { - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1739829690, @@ -1572,7 +1646,7 @@ }, "zen-browser": { "inputs": { - "nixpkgs": "nixpkgs_10" + "nixpkgs": "nixpkgs_11" }, "locked": { "lastModified": 1742614294, diff --git a/flake.nix b/flake.nix index d0dd33c..8a365e0 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,7 @@ nixcord.url = "github:kaylorben/nixcord"; sops-nix.url = "github:Mic92/sops-nix"; nixarr.url = "github:rasmus-kirk/nixarr"; + anyrun.url = "github:fufexan/anyrun/launch-prefix"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/home/programs/shell/zsh.nix b/home/programs/shell/zsh.nix index 46e1c0f..ce0c20d 100644 --- a/home/programs/shell/zsh.nix +++ b/home/programs/shell/zsh.nix @@ -11,7 +11,11 @@ in { enable = true; enableCompletion = true; autosuggestion.enable = true; - syntaxHighlighting.enable = true; + syntaxHighlighting = { + enable = true; + highlighters = + [ "main" "brackets" "pattern" "cursor" "regexp" "root" "line" ]; + }; historySubstringSearch.enable = true; initExtraFirst = '' @@ -76,6 +80,8 @@ in { open = "${pkgs.xdg-utils}/bin/xdg-open"; icat = "${pkgs.kitty}/bin/kitty +kitten icat"; ssh = "kitty +kitten ssh"; + cat = + "bat --theme=base16 --color=always --paging=never --tabs=2 --wrap=never --plain"; wireguard-import = "nmcli connection import type wireguard file"; @@ -101,5 +107,78 @@ in { gaa = "git add ."; gcm = "git commit -m"; }; + + initExtra = '' + # search history based on what's typed in the prompt + autoload -U history-search-end + zle -N history-beginning-search-backward-end history-search-end + zle -N history-beginning-search-forward-end history-search-end + bindkey "^[OA" history-beginning-search-backward-end + bindkey "^[OB" history-beginning-search-forward-end + + # General completion behavior + zstyle ':completion:*' completer _extensions _complete _approximate + + # Use cache + zstyle ':completion:*' use-cache on + zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/.zcompcache" + + # Complete the alias + zstyle ':completion:*' complete true + + # Autocomplete options + zstyle ':completion:*' complete-options true + + # Completion matching control + zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + zstyle ':completion:*' keep-prefix true + + # Group matches and describe + zstyle ':completion:*' menu select + zstyle ':completion:*' list-grouped false + zstyle ':completion:*' list-separator ''' + zstyle ':completion:*' group-name ''' + zstyle ':completion:*' verbose yes + zstyle ':completion:*:matches' group 'yes' + zstyle ':completion:*:warnings' format '%F{red}%B-- No match for: %d --%b%f' + zstyle ':completion:*:messages' format '%d' + zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b' + zstyle ':completion:*:descriptions' format '[%d]' + + # Colors + zstyle ':completion:*' list-colors ''${(s.:.)LS_COLORS} + + # case insensitive tab completion + zstyle ':completion:*:*:cd:*' tag-order local-directories directory-stack path-directories + zstyle ':completion:*:*:cd:*:directory-stack' menu yes select + zstyle ':completion:*:-tilde-:*' group-order 'named-directories' 'path-directories' 'users' 'expand' + zstyle ':completion:*:*:-command-:*:*' group-order aliases builtins functions commands + zstyle ':completion:*' special-dirs true + zstyle ':completion:*' squeeze-slashes true + + # Sort + zstyle ':completion:*' sort false + zstyle ":completion:*:git-checkout:*" sort false + zstyle ':completion:*' file-sort modification + zstyle ':completion:*:eza' sort false + zstyle ':completion:complete:*:options' sort false + zstyle ':completion:files' sort false + + ${lib.optionalString config.services.gpg-agent.enable '' + gnupg_path=$(ls $XDG_RUNTIME_DIR/gnupg) + export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gnupg/$gnupg_path/S.gpg-agent.ssh" + ''} + + # Allow foot to pipe command output + function precmd { + if ! builtin zle; then + print -n "\e]133;D\e\\" + fi + } + function preexec { + print -n "\e]133;C\e\\" + } + + ''; }; } diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 937b21c..e0cd179 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -18,6 +18,7 @@ ../../home/programs/duckduckgo-colorscheme ../../home/programs/discord ../../home/programs/tailscale + ../../home/programs/anyrun # Scripts ../../home/scripts # All scripts diff --git a/hosts/laptop/variables.nix b/hosts/laptop/variables.nix index 44b5f79..220b8a6 100644 --- a/hosts/laptop/variables.nix +++ b/hosts/laptop/variables.nix @@ -1,7 +1,7 @@ { config, lib, ... }: { imports = [ # Choose your theme here: - ../../themes/nixy.nix + ../../themes/blue.nix ]; config.var = { diff --git a/themes/blue.nix b/themes/blue.nix new file mode 100644 index 0000000..fcece41 --- /dev/null +++ b/themes/blue.nix @@ -0,0 +1,93 @@ +{ lib, pkgs, config, ... }: { + + options.theme = lib.mkOption { + type = lib.types.attrs; + default = { + rounding = 8; + gaps-in = 10; + gaps-out = 10 * 2; + active-opacity = 0.92; + inactive-opacity = 0.88; + blur = true; + border-size = 2; + animation-speed = "fast"; # "fast" | "medium" | "slow" + fetch = "none"; # "nerdfetch" | "neofetch" | "pfetch" | "none" + textColorOnWallpaper = + config.lib.stylix.colors.base06; # Color of the text displayed on the wallpaper (Lockscreen, display manager, ...) + + bar = { # Hyprpanel + position = "top"; # "top" | "bottom" + transparent = true; + transparentButtons = false; + floating = true; + }; + }; + description = "Theme configuration options"; + }; + + config.stylix = { + enable = true; + + # See https://tinted-theming.github.io/tinted-gallery/ for more schemes + base16Scheme = { + base00 = "14171b"; # Default Background + base01 = + "0f1215"; # Lighter Background (Used for status bars, line number and folding marks) + base02 = "313244"; # Selection Background + base03 = "45475a"; # Comments, Invisibles, Line Highlighting + base04 = "585b70"; # Dark Foreground (Used for status bars) + base05 = "dee1e6"; # Default Foreground, Caret, Delimiters, Operators + base06 = "f5e0dc"; # Light Foreground (Not often used) + base07 = "b4befe"; # Light Background (Not often used) + base08 = + "f38ba8"; # Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted + base09 = + "fab387"; # Integers, Boolean, Constants, XML Attributes, Markup Link Url + base0A = "f9e2af"; # Classes, Markup Bold, Search Text Background + base0B = "a6e3a1"; # Strings, Inherited Class, Markup Code, Diff Inserted + base0C = + "94e2d5"; # Support, Regular Expressions, Escape Characters, Markup Quotes + base0D = + "BB96F5"; # Functions, Methods, Attribute IDs, Headings, Accent color + base0E = + "cba6f7"; # Keywords, Storage, Selector, Markup Italic, Diff Changed + base0F = + "f2cdcd"; # Deprecated, Opening/Closing Embedded Language Tags, e.g. + }; + + cursor = { + name = "phinger-cursors-light"; + package = pkgs.phinger-cursors; + size = 20; + }; + + fonts = { + monospace = { + package = pkgs.nerd-fonts.jetbrains-mono; + name = "JetBrains Mono Nerd Font"; + }; + sansSerif = { + package = pkgs.source-sans-pro; + name = "Source Sans Pro"; + }; + serif = config.stylix.fonts.sansSerif; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + sizes = { + applications = 13; + desktop = 13; + popups = 13; + terminal = 13; + }; + }; + + polarity = "dark"; + image = pkgs.fetchurl { + url = + "https://raw.githubusercontent.com/anotherhadi/nixy-wallpapers/refs/heads/main/wallpapers/studio.png"; + sha256 = "sha256-+YUsGNHsgiFW8y7n9HYLdf/qWlNXyQAOGaAQSIeptsY="; + }; + }; +}