Compare commits
No commits in common. "master" and "black-and-white" have entirely different histories.
master
...
black-and-
97 changed files with 3436 additions and 1512 deletions
39
Makefile
39
Makefile
|
|
@ -1,44 +1,77 @@
|
|||
###############################################################################
|
||||
# 🛠️ NixOS & System Management Commands
|
||||
#
|
||||
# These commands help manage the system configuration using Nix flakes.
|
||||
###############################################################################
|
||||
|
||||
.PHONY: copy-config deploy home upgrade debug up upp test history repl clean gc-sudo gc gcboot
|
||||
|
||||
# 🛑 Utility function: copy ~/nixos to /etc/nixos
|
||||
copy-config:
|
||||
sudo rm -rf /etc/nixos/*
|
||||
sudo cp -r ~/nixos/* /etc/nixos/
|
||||
|
||||
# 🚀 Deploy the current system configuration and make it the default on boot.
|
||||
# Usage: make deploy
|
||||
deploy: copy-config
|
||||
sudo nixos-rebuild switch --flake .#nixos
|
||||
sudo nixos-rebuild switch --flake /etc/nixos
|
||||
|
||||
# 🏡 Same as `deploy`, but with a custom flake target (e.g., for home-manager).
|
||||
# Usage: make home
|
||||
home: copy-config
|
||||
sudo nixos-rebuild switch --flake /etc/nixos#nixos
|
||||
|
||||
# ⬆️ Upgrade system packages and apply the latest flake changes.
|
||||
# Usage: make upgrade
|
||||
upgrade: copy-config
|
||||
sudo nixos-rebuild switch --upgrade --flake .
|
||||
sudo nixos-rebuild switch --upgrade --flake /etc/nixos
|
||||
|
||||
# 🐛 Like `deploy`, but with verbose logs and error traces for debugging.
|
||||
# Usage: make debug
|
||||
debug: copy-config
|
||||
sudo nixos-rebuild switch --flake /etc/nixos --show-trace --verbose
|
||||
|
||||
# 🌐 Update all flake inputs to their latest versions.
|
||||
# Usage: make up
|
||||
up:
|
||||
sudo nix flake update --flake .
|
||||
sudo nix flake update --flake /etc/nixos
|
||||
|
||||
# 🔍 Update a specific flake input (e.g., `make upp i=home-manager`)
|
||||
# Usage: make upp i=home-manager
|
||||
upp:
|
||||
nix flake update ~/nixos/${i}
|
||||
|
||||
# 🧪 Test the configuration without setting it as the default boot entry.
|
||||
# Usage: make test
|
||||
test: copy-config
|
||||
sudo nixos-rebuild test --flake /etc/nixos
|
||||
|
||||
# 🕓 Show system profile history.
|
||||
# Usage: make history
|
||||
history:
|
||||
nix profile history --profile /nix/var/nix/profiles/system
|
||||
|
||||
# 💻 Launch the Nix REPL with nixpkgs from the flake.
|
||||
# Usage: make repl
|
||||
repl:
|
||||
nix repl -f flake:nixpkgs
|
||||
|
||||
# 🧹 Clean up system profile history older than 1 day.
|
||||
# Usage: make clean
|
||||
clean:
|
||||
sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 1d
|
||||
|
||||
# 🧼 Collect and delete old garbage as root.
|
||||
# Usage: make gc-sudo
|
||||
gc-sudo:
|
||||
sudo nix-collect-garbage -d
|
||||
|
||||
# 🧽 Same as above, but for the current user.
|
||||
# Usage: make gc
|
||||
gc:
|
||||
nix-collect-garbage -d
|
||||
|
||||
# 🥾 Boot into a specific configuration without switching immediately.
|
||||
# Usage: make gcboot
|
||||
gcboot:
|
||||
sudo /run/current-system/bin/switch-to-configuration boot
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ my minimal barless nixos configuration.
|
|||
|
||||
## showcase
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
yes, my configuration is better than yours.
|
||||
|
|
|
|||
449
flake.lock
generated
449
flake.lock
generated
|
|
@ -1,126 +1,6 @@
|
|||
{
|
||||
"nodes": {
|
||||
"base16": {
|
||||
"inputs": {
|
||||
"fromYaml": "fromYaml"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1755819240,
|
||||
"narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=",
|
||||
"owner": "SenchoPens",
|
||||
"repo": "base16.nix",
|
||||
"rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "SenchoPens",
|
||||
"repo": "base16.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-fish": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1765809053,
|
||||
"narHash": "sha256-XCUQLoLfBJ8saWms2HCIj4NEN+xNsWBlU1NrEPcQG4s=",
|
||||
"owner": "tomyun",
|
||||
"repo": "base16-fish",
|
||||
"rev": "86cbea4dca62e08fb7fd83a70e96472f92574782",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tomyun",
|
||||
"repo": "base16-fish",
|
||||
"rev": "86cbea4dca62e08fb7fd83a70e96472f92574782",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-helix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1760703920,
|
||||
"narHash": "sha256-m82fGUYns4uHd+ZTdoLX2vlHikzwzdu2s2rYM2bNwzw=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-helix",
|
||||
"rev": "d646af9b7d14bff08824538164af99d0c521b185",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-helix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-vim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1732806396,
|
||||
"narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-vim",
|
||||
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-vim",
|
||||
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"beaker-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1773884524,
|
||||
"narHash": "sha256-1dnlofWaxI/YRID+WPz2jHZNDyloBubDt/bAQk9ePLU=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "abc598baf15d6f8a4de395a27ba34b1e769558e1",
|
||||
"revCount": 21,
|
||||
"shallow": false,
|
||||
"type": "git",
|
||||
"url": "https://git.bwaaa.monster/beaker"
|
||||
},
|
||||
"original": {
|
||||
"shallow": false,
|
||||
"type": "git",
|
||||
"url": "https://git.bwaaa.monster/beaker"
|
||||
}
|
||||
},
|
||||
"firefox-gnome-theme": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1775176642,
|
||||
"narHash": "sha256-2veEED0Fg7Fsh81tvVDNYR6SzjqQxa7hbi18Jv4LWpM=",
|
||||
"owner": "rafaelmardojai",
|
||||
"repo": "firefox-gnome-theme",
|
||||
"rev": "179704030c5286c729b5b0522037d1d51341022c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rafaelmardojai",
|
||||
"repo": "firefox-gnome-theme",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1749398372,
|
||||
"narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixvim",
|
||||
|
|
@ -128,11 +8,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769996383,
|
||||
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
|
||||
"lastModified": 1765835352,
|
||||
"narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
|
||||
"rev": "a34fae9c08a15ad73f295041fec82323541400a9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -141,60 +21,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_3": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"stylix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1775087534,
|
||||
"narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fromYaml": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1731966426,
|
||||
"narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
|
||||
"owner": "SenchoPens",
|
||||
"repo": "fromYaml",
|
||||
"rev": "106af9e2f715e2d828df706c386a685698f3223b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "SenchoPens",
|
||||
"repo": "fromYaml",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gnome-shell": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1767737596,
|
||||
"narHash": "sha256-eFujfIUQDgWnSJBablOuG+32hCai192yRdrNHTv0a+s=",
|
||||
"owner": "GNOME",
|
||||
"repo": "gnome-shell",
|
||||
"rev": "ef02db02bf0ff342734d525b5767814770d85b49",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "GNOME",
|
||||
"repo": "gnome-shell",
|
||||
"rev": "ef02db02bf0ff342734d525b5767814770d85b49",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -202,11 +28,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1775683737,
|
||||
"narHash": "sha256-oBYyowo6yfgb95Z78s3uTnAd9KkpJpwzjJbfnpLaM2Y=",
|
||||
"lastModified": 1766949189,
|
||||
"narHash": "sha256-t4lRzHDaAvSNIPcZO4NrjnfeYv+Yvr2BUWkUnoCbuzs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "7ba4ee4228ed36123c7cb75d50524b43514ef992",
|
||||
"rev": "398bc87bc89fc05a3c3731884b16e819c52e2b00",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -215,35 +41,13 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"mangowm": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"scenefx": "scenefx"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1775461179,
|
||||
"narHash": "sha256-4vvuk6tl8M2wuW3VJU9Uwc3HCrL95cSJImEODNNQEy8=",
|
||||
"owner": "mangowm",
|
||||
"repo": "mango",
|
||||
"rev": "e83a9dff820ce2215ecbbbea7d617d24d0825174",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mangowm",
|
||||
"repo": "mango",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1775728626,
|
||||
"narHash": "sha256-EhIPCT/tFqqPt4DMQZAUJj953GOZMjlBZq91zj/XWsk=",
|
||||
"lastModified": 1766902047,
|
||||
"narHash": "sha256-5hlaevYkLMeR2+6WThInVkWl0F35ioE4027kXVsglEE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0c33d38e5790d4bbf65f0a7f1ac7fe58d2e361f4",
|
||||
"rev": "652f1b042e5fa87705fb952aad193cefc18446f5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -253,132 +57,50 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1748740939,
|
||||
"narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "656a64127e9d791a334452c6b6606d17539476e2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1775036866,
|
||||
"narHash": "sha256-ByAX1LkhCwZ94+KnFAmnJSMAvui7kgCxjHgUHsWAbfI=",
|
||||
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
|
||||
"type": "tarball",
|
||||
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre972949.6201e203d095/nixexprs.tar.xz"
|
||||
"lastModified": 1766651565,
|
||||
"narHash": "sha256-QEhk0eXgyIqTpJ/ehZKg9IKS7EtlWxF3N7DXy42zPfU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3e2499d5539c16d0d173ba53552a4ff8547f4539",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1775745046,
|
||||
"narHash": "sha256-NveNW324sm4uTo5tkoMlTH+wX95J8ZW5sFC6MozMM6g=",
|
||||
"owner": "elisiei",
|
||||
"repo": "nixvim",
|
||||
"rev": "526d737a8d78af80d870b5b602674959d7385c84",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "elisiei",
|
||||
"repo": "nixvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"inputs": {
|
||||
"flake-parts": [
|
||||
"stylix",
|
||||
"flake-parts"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"stylix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1775228139,
|
||||
"narHash": "sha256-ebbeHmg+V7w8050bwQOuhmQHoLOEOfqKzM1KgCTexK4=",
|
||||
"lastModified": 1766941632,
|
||||
"narHash": "sha256-QB8XEoY5D2iRYntcKzJ5wlvgpqqQSe0P0h5CvBO/rUk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "601971b9c89e0304561977f2c28fa25e73aa7132",
|
||||
"repo": "nixvim",
|
||||
"rev": "ff75a5d3cc674391814c4703464ea1a3db204078",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"repo": "nixvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"omnisearch": {
|
||||
"inputs": {
|
||||
"beaker-src": "beaker-src",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1774755469,
|
||||
"narHash": "sha256-sO6h2JLu7eaxILkHQgdAo7oDc8soqJbIShzlzH79tUw=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "6b8a278b4f2973391b256eedf6add3d6a3516bc0",
|
||||
"revCount": 79,
|
||||
"type": "git",
|
||||
"url": "https://git.elisiei.xyz/elisiei/omnisearch"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.elisiei.xyz/elisiei/omnisearch"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"mangowm": "mangowm",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixvim": "nixvim",
|
||||
"omnisearch": "omnisearch",
|
||||
"spicetify-nix": "spicetify-nix",
|
||||
"stylix": "stylix"
|
||||
}
|
||||
},
|
||||
"scenefx": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"mangowm",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750785057,
|
||||
"narHash": "sha256-tGX6j4W91rcb+glXJo43sjPI9zQvPotonknG1BdihR4=",
|
||||
"owner": "wlrfx",
|
||||
"repo": "scenefx",
|
||||
"rev": "3a6cfb12e4ba97b43326357d14f7b3e40897adfc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "wlrfx",
|
||||
"repo": "scenefx",
|
||||
"type": "github"
|
||||
"spicetify-nix": "spicetify-nix"
|
||||
}
|
||||
},
|
||||
"spicetify-nix": {
|
||||
|
|
@ -387,11 +109,11 @@
|
|||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1775421933,
|
||||
"narHash": "sha256-JkEbzFDFTsUlVtHEzA8Y4r3O9LInhb96eOCbtGjGnbM=",
|
||||
"lastModified": 1766897356,
|
||||
"narHash": "sha256-oKp9luuuXuMoUwpGUKUdt0G7lZGovcyOEI3guG0rNCw=",
|
||||
"owner": "Gerg-L",
|
||||
"repo": "spicetify-nix",
|
||||
"rev": "ec8d73085fdf807d55765335dc8126e14e7b2096",
|
||||
"rev": "6b49c4094e93629af2fcf789e0897450f57e2551",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -400,40 +122,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"stylix": {
|
||||
"inputs": {
|
||||
"base16": "base16",
|
||||
"base16-fish": "base16-fish",
|
||||
"base16-helix": "base16-helix",
|
||||
"base16-vim": "base16-vim",
|
||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||
"flake-parts": "flake-parts_3",
|
||||
"gnome-shell": "gnome-shell",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nur": "nur",
|
||||
"systems": "systems_3",
|
||||
"tinted-kitty": "tinted-kitty",
|
||||
"tinted-schemes": "tinted-schemes",
|
||||
"tinted-tmux": "tinted-tmux",
|
||||
"tinted-zed": "tinted-zed"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1775244614,
|
||||
"narHash": "sha256-eVKt8wpQqg6Hq/UdHQkV1izXGloGQxdlE4SSk9/X27s=",
|
||||
"owner": "MrSom3body-contrib",
|
||||
"repo": "stylix",
|
||||
"rev": "20adcebacda98b176e7ecc4b988c5cbef57bd2f4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "MrSom3body-contrib",
|
||||
"ref": "fix/foot-theme",
|
||||
"repo": "stylix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
|
|
@ -463,85 +151,6 @@
|
|||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-kitty": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1735730497,
|
||||
"narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-kitty",
|
||||
"rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-kitty",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-schemes": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1772661346,
|
||||
"narHash": "sha256-4eu3LqB9tPqe0Vaqxd4wkZiBbthLbpb7llcoE/p5HT0=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "schemes",
|
||||
"rev": "13b5b0c299982bb361039601e2d72587d6846294",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "schemes",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-tmux": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1772934010,
|
||||
"narHash": "sha256-x+6+4UvaG+RBRQ6UaX+o6DjEg28u4eqhVRM9kpgJGjQ=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-tmux",
|
||||
"rev": "c3529673a5ab6e1b6830f618c45d9ce1bcdd829d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-tmux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-zed": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1772909925,
|
||||
"narHash": "sha256-jx/5+pgYR0noHa3hk2esin18VMbnPSvWPL5bBjfTIAU=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-zed",
|
||||
"rev": "b4d3a1b3bcbd090937ef609a0a3b37237af974df",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-zed",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
|
|||
42
flake.nix
42
flake.nix
|
|
@ -12,40 +12,13 @@
|
|||
|
||||
# nvim
|
||||
nixvim = {
|
||||
url = "github:elisiei/nixvim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# stylix (thx esteban)
|
||||
stylix = {
|
||||
url = "github:MrSom3body-contrib/stylix/fix/foot-theme";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# mango
|
||||
mangowm = {
|
||||
url = "github:mangowm/mango";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# omnisearch
|
||||
omnisearch = {
|
||||
url = "git+https://git.elisiei.xyz/elisiei/omnisearch";
|
||||
url = "github:nix-community/nixvim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
stylix,
|
||||
spicetify-nix,
|
||||
nixvim,
|
||||
mangowm,
|
||||
omnisearch,
|
||||
...
|
||||
}:
|
||||
inputs@{ nixpkgs, home-manager, ... }:
|
||||
{
|
||||
nixosConfigurations = {
|
||||
nixos = nixpkgs.lib.nixosSystem {
|
||||
|
|
@ -54,19 +27,10 @@
|
|||
modules = [
|
||||
./nixos/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
omnisearch.nixosModules.default
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.elisiei = {
|
||||
imports = [
|
||||
./home/home.nix
|
||||
spicetify-nix.homeManagerModules.spicetify
|
||||
stylix.homeModules.stylix
|
||||
nixvim.homeModules.nixvim
|
||||
mangowm.hmModules.mango
|
||||
];
|
||||
};
|
||||
home-manager.users.elisiei = import ./home/home.nix;
|
||||
home-manager.backupFileExtension = "hm-backup";
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,9 @@
|
|||
imports = [
|
||||
./packages.nix
|
||||
|
||||
# wm
|
||||
./modules/wm/mango/default.nix
|
||||
# hyprland
|
||||
# ./modules/hyprland/default.nix
|
||||
./modules/wm/sway/default.nix
|
||||
|
||||
# editors
|
||||
./modules/ide/nvim/default.nix
|
||||
|
|
@ -13,15 +14,14 @@
|
|||
|
||||
# shell stuff
|
||||
./modules/shell/bash/default.nix
|
||||
# ./modules/shell/nushell/default.nix
|
||||
./modules/shell/direnv/default.nix
|
||||
./modules/shell/fish/default.nix
|
||||
|
||||
# user stuff
|
||||
./modules/user/direnv/default.nix
|
||||
./modules/user/tofi/default.nix
|
||||
./modules/user/dunst/default.nix
|
||||
./modules/user/git/default.nix
|
||||
./modules/user/stylix/default.nix
|
||||
./modules/user/firefox/default.nix
|
||||
./modules/user/spotify/default.nix
|
||||
];
|
||||
|
||||
home.username = "elisiei";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
plugins.which-key = {
|
||||
programs.micro = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -4,12 +4,3 @@ vim.o.undofile = true
|
|||
vim.o.undodir = vim.fn.expand("~/.local/state/nvim/undo")
|
||||
vim.diagnostic.config({ signs = false })
|
||||
vim.print("loaded extra config.lua file ;)")
|
||||
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
callback = function(args)
|
||||
local bt = vim.bo[args.buf].buftype
|
||||
if bt == "prompt" then
|
||||
vim.b[args.buf].minicompletion_disable = true
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,34 +1,74 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
|
||||
# my most preciated config, well documented if you want to use it.
|
||||
# inspired by https://github.com/xhuyz/nixvim
|
||||
|
||||
{
|
||||
imports = [ inputs.nixvim.homeModules.nixvim ];
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
|
||||
imports = [
|
||||
# plugins
|
||||
./plugins/basics.nix
|
||||
./plugins/completion.nix
|
||||
./plugins/extra.nix
|
||||
./plugins/files.nix
|
||||
./plugins/git.nix
|
||||
./plugins/icons.nix
|
||||
./plugins/notify.nix
|
||||
./plugins/pairs.nix
|
||||
./plugins/statusline.nix
|
||||
./plugins/starter.nix
|
||||
./plugins/snippets.nix
|
||||
./plugins/which-key.nix
|
||||
# ./plugins/aerial.nix
|
||||
./plugins/autopairs.nix
|
||||
./plugins/blink.nix
|
||||
./plugins/dashboard.nix
|
||||
./plugins/hlchunk.nix
|
||||
./plugins/lualine.nix
|
||||
./plugins/neo-tree.nix
|
||||
./plugins/snacks.nix
|
||||
./plugins/toggleterm.nix
|
||||
./plugins/treesitter.nix
|
||||
./plugins/term.nix
|
||||
./plugins/telescope.nix
|
||||
./plugins/conform.nix
|
||||
./plugins/treesj.nix
|
||||
./plugins/web-devicons.nix
|
||||
./plugins/yanky.nix
|
||||
|
||||
# theme
|
||||
./theme.nix
|
||||
|
||||
# lsp
|
||||
./lsp/default.nix
|
||||
|
||||
# keymaps
|
||||
./keymaps.nix
|
||||
|
||||
# options
|
||||
./options.nix
|
||||
./lsp/fidget.nix
|
||||
./lsp/lsp.nix
|
||||
./lsp/roslyn.nix
|
||||
];
|
||||
|
||||
globals.mapleader = " ";
|
||||
|
||||
opts = {
|
||||
number = true;
|
||||
relativenumber = false;
|
||||
colorcolumn = "0";
|
||||
shiftwidth = 2;
|
||||
tabstop = 2;
|
||||
wrap = false;
|
||||
swapfile = false; # undotree
|
||||
backup = false; # undotree
|
||||
undofile = true;
|
||||
hlsearch = false;
|
||||
incsearch = true;
|
||||
termguicolors = true;
|
||||
scrolloff = 8;
|
||||
signcolumn = "no";
|
||||
updatetime = 50;
|
||||
foldlevelstart = 99;
|
||||
};
|
||||
|
||||
clipboard = {
|
||||
register = "unnamedplus";
|
||||
};
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
# formatters
|
||||
stylua
|
||||
nixfmt-rfc-style
|
||||
|
||||
# linters
|
||||
golangci-lint
|
||||
shellcheck
|
||||
];
|
||||
|
||||
extraConfigLua = builtins.readFile ./config.lua;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,92 +0,0 @@
|
|||
{
|
||||
keymaps = [
|
||||
{
|
||||
action = "<cmd>Neotree focus<CR>";
|
||||
key = "<leader>e";
|
||||
}
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"i"
|
||||
"t"
|
||||
];
|
||||
key = "<C-k>";
|
||||
action = "<cmd>wincmd k<cr>";
|
||||
options = {
|
||||
desc = "Move to window above";
|
||||
noremap = true;
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"i"
|
||||
"t"
|
||||
];
|
||||
key = "<C-j>";
|
||||
action = "<cmd>wincmd j<cr>";
|
||||
options = {
|
||||
desc = "Move to window below";
|
||||
noremap = true;
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"i"
|
||||
"t"
|
||||
];
|
||||
key = "<C-h>";
|
||||
action = "<cmd>wincmd h<cr>";
|
||||
options = {
|
||||
desc = "Move to window left";
|
||||
noremap = true;
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"i"
|
||||
"t"
|
||||
];
|
||||
key = "<C-l>";
|
||||
action = "<cmd>wincmd l<cr>";
|
||||
options = {
|
||||
desc = "Move to window right";
|
||||
noremap = true;
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
|
||||
# telescope
|
||||
{
|
||||
action = "<cmd>Telescope live_grep<CR>";
|
||||
key = "<leader>ts";
|
||||
}
|
||||
{
|
||||
action = "<cmd>Telescope find_files<CR>";
|
||||
key = "<leader>tf";
|
||||
}
|
||||
{
|
||||
action = "<cmd>Telescope git_commits<CR>";
|
||||
key = "<leader>tc";
|
||||
}
|
||||
{
|
||||
action = "<cmd>Telescope oldfiles<CR>";
|
||||
key = "<leader>th";
|
||||
}
|
||||
{
|
||||
action = "<cmd>Telescope buffers<CR>";
|
||||
key = "<leader>tb";
|
||||
}
|
||||
{
|
||||
action = "<cmd>Telescope colorscheme<CR>";
|
||||
key = "<leader>ch";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
plugins.lsp.servers.elixirls = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
}
|
||||
10
home/modules/ide/nvim/lsp/fidget.nix
Normal file
10
home/modules/ide/nvim/lsp/fidget.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
plugins.fidget = {
|
||||
enable = true;
|
||||
settings.progress = {
|
||||
suppress_on_insert = true;
|
||||
ignore_done_already = true;
|
||||
poll_rate = 1;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
plugins.lsp.servers.gopls = {
|
||||
enable = true;
|
||||
filetypes = [
|
||||
"go"
|
||||
"mod"
|
||||
"sum"
|
||||
];
|
||||
};
|
||||
}
|
||||
18
home/modules/ide/nvim/lsp/langs/c.nix
Normal file
18
home/modules/ide/nvim/lsp/langs/c.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{
|
||||
plugins = {
|
||||
lsp.servers = {
|
||||
clangd.enable = true;
|
||||
cmake.enable = true;
|
||||
};
|
||||
|
||||
conform-nvim.settings = {
|
||||
formatters_by_ft = {
|
||||
c = [ "clang_format" ];
|
||||
cpp = [ "clang_format" ];
|
||||
cmake = [ "cmake-format" ];
|
||||
};
|
||||
formatters.cmake-format.command = lib.getExe pkgs.cmake-format;
|
||||
};
|
||||
};
|
||||
}
|
||||
5
home/modules/ide/nvim/lsp/langs/default.nix
Normal file
5
home/modules/ide/nvim/lsp/langs/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports =
|
||||
with builtins;
|
||||
map (fn: ./${fn}) (filter (fn: fn != "default.nix") (attrNames (readDir ./.)));
|
||||
}
|
||||
23
home/modules/ide/nvim/lsp/langs/go.nix
Normal file
23
home/modules/ide/nvim/lsp/langs/go.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{
|
||||
plugins = {
|
||||
lsp.servers = {
|
||||
gopls = {
|
||||
enable = true;
|
||||
filetypes = [
|
||||
"go"
|
||||
];
|
||||
};
|
||||
};
|
||||
conform-nvim.settings = {
|
||||
formatters_by_ft = {
|
||||
go = [ "gofmt" ];
|
||||
};
|
||||
formatters = {
|
||||
gofmt = {
|
||||
command = lib.getExe pkgs.go + " fmt";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
12
home/modules/ide/nvim/lsp/langs/lua.nix
Normal file
12
home/modules/ide/nvim/lsp/langs/lua.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
plugins = {
|
||||
lsp.servers.lua_ls.enable = true;
|
||||
conform-nvim.settings = {
|
||||
formatters_by_ft.lua = [ "stylua" ];
|
||||
formatters.stylua = {
|
||||
# if a command is string then it will execute the system's stylua binary
|
||||
command = "stylua";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
13
home/modules/ide/nvim/lsp/langs/nix.nix
Normal file
13
home/modules/ide/nvim/lsp/langs/nix.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
plugins = {
|
||||
lsp.servers = {
|
||||
nixd = {
|
||||
enable = true;
|
||||
cmd = [ "nixd" ];
|
||||
rootMarkers = [
|
||||
"require('lspconfig.util').root_pattern('.nixd.json', 'flake.nix', '.git')"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
5
home/modules/ide/nvim/lsp/langs/vue.nix
Normal file
5
home/modules/ide/nvim/lsp/langs/vue.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
plugins = {
|
||||
lsp.servers.vue_ls.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,11 +1,9 @@
|
|||
{
|
||||
imports = [
|
||||
./nixd.nix
|
||||
./go.nix
|
||||
./v.nix
|
||||
./web.nix
|
||||
./elixir.nix
|
||||
];
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./langs/default.nix ];
|
||||
plugins = {
|
||||
lsp = {
|
||||
enable = true;
|
||||
|
|
@ -63,8 +61,18 @@
|
|||
};
|
||||
};
|
||||
lsp-lines.enable = true;
|
||||
lsp-format = {
|
||||
enable = true;
|
||||
};
|
||||
lsp-format.enable = true;
|
||||
helm.enable = true;
|
||||
};
|
||||
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
roslyn-nvim
|
||||
];
|
||||
extraPackages = with pkgs; [
|
||||
roslyn-ls
|
||||
nixfmt-rfc-style
|
||||
svelte-language-server
|
||||
typescript-language-server
|
||||
typescript
|
||||
];
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
plugins.lsp = {
|
||||
servers = {
|
||||
nixd.enable = true;
|
||||
};
|
||||
};
|
||||
plugins.lsp-format = {
|
||||
settings = {
|
||||
go = {
|
||||
exclude = ["gopls"];
|
||||
force = true;
|
||||
order = ["goimports" "gopls"];
|
||||
sync = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
extraPackages = with pkgs; [
|
||||
gopls
|
||||
gotools
|
||||
];
|
||||
}
|
||||
17
home/modules/ide/nvim/lsp/roslyn.nix
Normal file
17
home/modules/ide/nvim/lsp/roslyn.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{
|
||||
lsp.servers.roslyn_ls = {
|
||||
enable = true;
|
||||
|
||||
config = {
|
||||
cmd = [
|
||||
"${lib.getExe' pkgs.roslyn-ls "Microsoft.CodeAnalysis.LanguageServer"}"
|
||||
"--logLevel"
|
||||
"Information"
|
||||
"--extensionLogDirectory"
|
||||
"fs.joinpath(uv.os_tmpdir() \"roslyn_ls/logs\")"
|
||||
"--stdio"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
plugins.lsp = {
|
||||
servers = {
|
||||
v_analyzer = {
|
||||
enable = true;
|
||||
package = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
plugins.lsp = {
|
||||
servers = {
|
||||
svelte = {
|
||||
enable = true;
|
||||
};
|
||||
ts_ls = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
{
|
||||
globalOpts = {
|
||||
number = true;
|
||||
relativenumber = false;
|
||||
signcolumn = "yes";
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
tabstop = 4;
|
||||
shiftwidth = 4;
|
||||
softtabstop = 0;
|
||||
expandtab = true;
|
||||
smarttab = true;
|
||||
clipboard = "unnamedplus";
|
||||
cursorline = true;
|
||||
ruler = true;
|
||||
gdefault = true;
|
||||
scrolloff = 5;
|
||||
};
|
||||
|
||||
opts = {
|
||||
foldenable = true;
|
||||
foldmethod = "expr";
|
||||
foldexpr = "v:lua.vim.treesitter.foldexpr()";
|
||||
foldtext = "";
|
||||
foldlevel = 99;
|
||||
foldlevelstart = 99;
|
||||
foldcolumn = "0";
|
||||
};
|
||||
|
||||
userCommands = {
|
||||
Q.command = "q";
|
||||
Q.bang = true;
|
||||
Wq.command = "q";
|
||||
Wq.bang = true;
|
||||
WQ.command = "q";
|
||||
WQ.bang = true;
|
||||
W.command = "q";
|
||||
W.bang = true;
|
||||
};
|
||||
|
||||
globals.mapleader = " ";
|
||||
|
||||
extraConfigLua = builtins.readFile ./config.lua;
|
||||
}
|
||||
63
home/modules/ide/nvim/plugins/aerial.nix
Normal file
63
home/modules/ide/nvim/plugins/aerial.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
plugins.aerial = {
|
||||
enable = true;
|
||||
autoLoad = true;
|
||||
settings = {
|
||||
attach_mode = "global";
|
||||
backends = [
|
||||
"treesitter"
|
||||
"lsp"
|
||||
"markdown"
|
||||
"man"
|
||||
];
|
||||
disable_max_lines = 5000;
|
||||
highlight_on_hover = true;
|
||||
ignore = {
|
||||
filetypes = [
|
||||
"gomod"
|
||||
];
|
||||
};
|
||||
keymaps = {
|
||||
"<2-LeftMouse>" = "actions.jump";
|
||||
"<C-j>" = "actions.down_and_scroll";
|
||||
"<C-k>" = "actions.up_and_scroll";
|
||||
"<C-s>" = "actions.jump_split";
|
||||
"<C-v>" = "actions.jump_vsplit";
|
||||
"<CR>" = "actions.jump";
|
||||
"?" = "actions.show_help";
|
||||
H = "actions.tree_close_recursive";
|
||||
L = "actions.tree_open_recursive";
|
||||
O = "actions.tree_toggle_recursive";
|
||||
"[[" = "actions.prev_up";
|
||||
"]]" = "actions.next_up";
|
||||
"g?" = "actions.show_help";
|
||||
h = "actions.tree_close";
|
||||
l = "actions.tree_open";
|
||||
o = "actions.tree_toggle";
|
||||
p = "actions.scroll";
|
||||
q = "actions.close";
|
||||
zA = "actions.tree_toggle_recursive";
|
||||
zC = "actions.tree_close_recursive";
|
||||
zM = "actions.tree_close_all";
|
||||
zO = "actions.tree_open_recursive";
|
||||
zR = "actions.tree_open_all";
|
||||
zX = "actions.tree_sync_folds";
|
||||
za = "actions.tree_toggle";
|
||||
zc = "actions.tree_close";
|
||||
zm = "actions.tree_decrease_fold_level";
|
||||
zo = "actions.tree_open";
|
||||
zr = "actions.tree_increase_fold_level";
|
||||
zx = "actions.tree_sync_folds";
|
||||
"{" = "actions.prev";
|
||||
"}" = "actions.next";
|
||||
};
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader>o";
|
||||
mode = [ "n" ];
|
||||
action = "<cmd>AerialToggle<CR>";
|
||||
}
|
||||
];
|
||||
}
|
||||
11
home/modules/ide/nvim/plugins/autopairs.nix
Normal file
11
home/modules/ide/nvim/plugins/autopairs.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
plugins.nvim-autopairs = {
|
||||
enable = true;
|
||||
settings = {
|
||||
disable_filetype = [
|
||||
"TelescopePrompt"
|
||||
"vim"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
plugins.mini-basics = {
|
||||
enable = true;
|
||||
settings = {
|
||||
autocommands = {
|
||||
basic = true;
|
||||
relnum_in_visual_mode = false;
|
||||
};
|
||||
mappings = {
|
||||
basic = true;
|
||||
move_with_alt = false;
|
||||
option_toggle_prefix = "\\";
|
||||
windows = false;
|
||||
};
|
||||
options = {
|
||||
basic = true;
|
||||
extra_ui = false;
|
||||
win_borders = "auto";
|
||||
};
|
||||
silent = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
95
home/modules/ide/nvim/plugins/blink.nix
Normal file
95
home/modules/ide/nvim/plugins/blink.nix
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
{
|
||||
plugins = {
|
||||
blink-cmp = {
|
||||
enable = true;
|
||||
setupLspCapabilities = true;
|
||||
|
||||
settings = {
|
||||
keymap.preset = "super-tab";
|
||||
signature.enabled = true;
|
||||
|
||||
sources = {
|
||||
default = [
|
||||
"lsp"
|
||||
"buffer"
|
||||
"path"
|
||||
"snippets"
|
||||
];
|
||||
|
||||
providers = {
|
||||
lsp.score_offset = 4;
|
||||
};
|
||||
};
|
||||
|
||||
appearance = {
|
||||
nerd_font_variant = "mono";
|
||||
kind_icons = {
|
||||
Text = "";
|
||||
Method = "";
|
||||
Function = "";
|
||||
Constructor = "";
|
||||
Field = "";
|
||||
Variable = "";
|
||||
Property = "";
|
||||
Class = "";
|
||||
Interface = "";
|
||||
Struct = "";
|
||||
Module = "";
|
||||
Unit = "";
|
||||
Value = "";
|
||||
Enum = "";
|
||||
EnumMember = "";
|
||||
Keyword = "";
|
||||
Constant = "";
|
||||
Snippet = "";
|
||||
Color = "";
|
||||
File = "";
|
||||
Reference = "";
|
||||
Folder = "";
|
||||
Event = "";
|
||||
Operator = "";
|
||||
TypeParameter = "";
|
||||
Error = "";
|
||||
Warning = "";
|
||||
Information = "";
|
||||
Hint = "";
|
||||
};
|
||||
};
|
||||
|
||||
completion = {
|
||||
menu = {
|
||||
border = "none";
|
||||
draw = {
|
||||
gap = 1;
|
||||
treesitter = [ "lsp" ];
|
||||
columns = [
|
||||
{ __unkeyed-1 = "label"; }
|
||||
{
|
||||
__unkeyed-1 = "kind_icon";
|
||||
__unkeyed-2 = "kind";
|
||||
gap = 1;
|
||||
}
|
||||
{ __unkeyed-1 = "source_name"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
trigger.show_in_snippet = false;
|
||||
|
||||
documentation = {
|
||||
auto_show = true;
|
||||
window.border = "single";
|
||||
};
|
||||
|
||||
accept.auto_brackets.enabled = false;
|
||||
|
||||
performance = {
|
||||
debounce_ms = 80;
|
||||
throttle_ms = 50;
|
||||
max_view_entries = 20;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
{
|
||||
plugins = {
|
||||
blink-cmp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
appearance.use_nvim_cmp_as_default = true;
|
||||
completion = {
|
||||
list.selection.preselect = false;
|
||||
documentation = {
|
||||
auto_show = true;
|
||||
};
|
||||
ghost_text.enabled = true;
|
||||
};
|
||||
signature = {
|
||||
enabled = true;
|
||||
};
|
||||
sources = {
|
||||
default = [
|
||||
"lsp"
|
||||
"path"
|
||||
"snippets"
|
||||
"buffer"
|
||||
];
|
||||
providers = {
|
||||
lsp.score_offset = 3;
|
||||
path.score_offset = 2;
|
||||
snippets.score_offset = 2;
|
||||
buffer.score_offset = 1;
|
||||
};
|
||||
};
|
||||
keymap = {
|
||||
preset = "enter";
|
||||
"<Tab>" = [
|
||||
"select_next"
|
||||
"fallback"
|
||||
];
|
||||
"<S-Tab>" = [
|
||||
"select_prev"
|
||||
"fallback"
|
||||
];
|
||||
"<C-n>" = [
|
||||
"snippet_forward"
|
||||
"fallback"
|
||||
];
|
||||
"<C-p>" = [
|
||||
"snippet_backward"
|
||||
"fallback"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
blink-compat.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
plugins.conform-nvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
format_on_save = {
|
||||
lsp_fallback = true;
|
||||
timeout_ms = 500;
|
||||
};
|
||||
|
||||
formatters_by_ft = {
|
||||
nix = ["nixfmt"];
|
||||
go = ["goimports"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
nixfmt
|
||||
gopls
|
||||
gotools
|
||||
];
|
||||
}
|
||||
|
||||
86
home/modules/ide/nvim/plugins/dashboard.nix
Normal file
86
home/modules/ide/nvim/plugins/dashboard.nix
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
{
|
||||
plugins.dashboard = {
|
||||
enable = true;
|
||||
autoLoad = true;
|
||||
|
||||
settings = {
|
||||
theme = "doom";
|
||||
|
||||
config = {
|
||||
header = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
" ⢀⣴⡾⠃⠄⠄⠄⠄⠄⠈⠺⠟⠛⠛⠛⠛⠻⢿⣿⣿⣿⣿⣶⣤⡀ "
|
||||
" ⢀⣴⣿⡿⠁⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⣸⣿⣿⣿⣿⣿⣿⣿⣷ "
|
||||
" ⣴⣿⡿⡟⡼⢹⣷⢲⡶⣖⣾⣶⢄⠄⠄⠄⠄⠄⢀⣼⣿⢿⣿⣿⣿⣿⣿⣿⣿ "
|
||||
" ⣾⣿⡟⣾⡸⢠⡿⢳⡿⠍⣼⣿⢏⣿⣷⢄⡀⠄⢠⣾⢻⣿⣸⣿⣿⣿⣿⣿⣿⣿ "
|
||||
" ⣡⣿⣿⡟⡼⡁⠁⣰⠂⡾⠉⢨⣿⠃⣿⡿⠍⣾⣟⢤⣿⢇⣿⢇⣿⣿⢿⣿⣿⣿⣿⣿ "
|
||||
" ⣱⣿⣿⡟⡐⣰⣧⡷⣿⣴⣧⣤⣼⣯⢸⡿⠁⣰⠟⢀⣼⠏⣲⠏⢸⣿⡟⣿⣿⣿⣿⣿⣿ "
|
||||
" ⣿⣿⡟⠁⠄⠟⣁⠄⢡⣿⣿⣿⣿⣿⣿⣦⣼⢟⢀⡼⠃⡹⠃⡀⢸⡿⢸⣿⣿⣿⣿⣿⡟ "
|
||||
" ⣿⣿⠃⠄⢀⣾⠋⠓⢰⣿⣿⣿⣿⣿⣿⠿⣿⣿⣾⣅⢔⣕⡇⡇⡼⢁⣿⣿⣿⣿⣿⣿⢣ "
|
||||
" ⣿⡟⠄⠄⣾⣇⠷⣢⣿⣿⣿⣿⣿⣿⣿⣭⣀⡈⠙⢿⣿⣿⡇⡧⢁⣾⣿⣿⣿⣿⣿⢏⣾ "
|
||||
" ⣿⡇⠄⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⢻⠇⠄⠄⢿⣿⡇⢡⣾⣿⣿⣿⣿⣿⣏⣼⣿ "
|
||||
" ⣿⣷⢰⣿⣿⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⢰⣧⣀⡄⢀⠘⡿⣰⣿⣿⣿⣿⣿⣿⠟⣼⣿⣿ "
|
||||
" ⢹⣿⢸⣿⣿⠟⠻⢿⣿⣿⣿⣿⣿⣿⣿⣶⣭⣉⣤⣿⢈⣼⣿⣿⣿⣿⣿⣿⠏⣾⣹⣿⣿ "
|
||||
" ⢸⠇⡜⣿⡟⠄⠄⠄⠈⠙⣿⣿⣿⣿⣿⣿⣿⣿⠟⣱⣻⣿⣿⣿⣿⣿⠟⠁⢳⠃⣿⣿⣿ "
|
||||
" ⣰⡗⠹⣿⣄⠄⠄⠄⢀⣿⣿⣿⣿⣿⣿⠟⣅⣥⣿⣿⣿⣿⠿⠋ ⣾⡌⢠⣿⡿⠃ "
|
||||
" ⠜⠋⢠⣷⢻⣿⣿⣶⣾⣿⣿⣿⣿⠿⣛⣥⣾⣿⠿⠟⠛⠉ "
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
|
||||
center = [
|
||||
{
|
||||
icon = " ";
|
||||
desc = "find files";
|
||||
action = "lua Snacks.picker.files()";
|
||||
key = "f";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
desc = "projects";
|
||||
action = "lua Snacks.picker.projects()";
|
||||
key = "p";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
desc = "grep";
|
||||
action = "lua Snacks.picker.grep()";
|
||||
key = "s";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
desc = "todos";
|
||||
action = "lua Snacks.picker.todo_comments()";
|
||||
key = "t";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
desc = "ragequit";
|
||||
action = "qa";
|
||||
key = "x";
|
||||
}
|
||||
];
|
||||
|
||||
footer = [ "~elisiei" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
extraConfigLua = ''
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "DashboardReady",
|
||||
callback = function()
|
||||
vim.b.miniindentscope_disable = true
|
||||
end,
|
||||
})
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
plugins.mini-extra = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
{
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
settings = {
|
||||
sources = [
|
||||
"filesystem"
|
||||
"buffers"
|
||||
"git_status"
|
||||
];
|
||||
default_component_configs = {
|
||||
indent = {
|
||||
with_expanders = true;
|
||||
expander_collapsed = "";
|
||||
expander_expanded = "";
|
||||
expander_highlight = "NeoTreeExpander";
|
||||
};
|
||||
};
|
||||
};
|
||||
enable_diagnostics = true;
|
||||
enable_git_status = true;
|
||||
enable_modified_markers = true;
|
||||
enable_refresh_on_write = true;
|
||||
open_files_in_last_window = true;
|
||||
open_files_do_not_replace_types = [
|
||||
"terminal"
|
||||
"Trouble"
|
||||
"trouble"
|
||||
"qf"
|
||||
"Outline"
|
||||
];
|
||||
filesystem = {
|
||||
bind_to_cwd = false;
|
||||
follow_current_file = {
|
||||
enabled = true;
|
||||
};
|
||||
use_libuv_file_watcher = true;
|
||||
};
|
||||
event_handlers = {
|
||||
file_moved = ''
|
||||
function(data)
|
||||
require("snacks.rename").on_rename_file(data.source, data.destination)
|
||||
end
|
||||
'';
|
||||
file_renamed = ''
|
||||
function(data)
|
||||
require("snacks.rename").on_rename_file(data.source, data.destination)
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
plugins.mini-git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
command = {
|
||||
split = "horizontal";
|
||||
};
|
||||
job = {
|
||||
timeout = 20000;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
46
home/modules/ide/nvim/plugins/hlchunk.nix
Normal file
46
home/modules/ide/nvim/plugins/hlchunk.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
plugins.hlchunk = {
|
||||
enable = true;
|
||||
autoLoad = true;
|
||||
settings = {
|
||||
blank = {
|
||||
enable = false;
|
||||
};
|
||||
chunk = {
|
||||
chars = {
|
||||
horizontal_line = "─";
|
||||
left_bottom = "╰";
|
||||
left_top = "╭";
|
||||
right_arrow = "─";
|
||||
vertical_line = "│";
|
||||
};
|
||||
enable = true;
|
||||
exclude_filetypes = {
|
||||
lazyterm = true;
|
||||
neo-tree = true;
|
||||
};
|
||||
style = {
|
||||
fg = "#91bef0";
|
||||
};
|
||||
use_treesitter = true;
|
||||
};
|
||||
indent = {
|
||||
chars = [
|
||||
"│"
|
||||
];
|
||||
exclude_filetypes = {
|
||||
lazyterm = true;
|
||||
neo-tree = true;
|
||||
};
|
||||
style = {
|
||||
fg = "#45475a";
|
||||
};
|
||||
use_treesitter = false;
|
||||
};
|
||||
line_num = {
|
||||
style = "#91bef0";
|
||||
use_treesitter = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
plugins.mini-icons = {
|
||||
enable = true;
|
||||
mockDevIcons = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
plugins.mini-keymap = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
97
home/modules/ide/nvim/plugins/lualine.nix
Normal file
97
home/modules/ide/nvim/plugins/lualine.nix
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
{
|
||||
plugins.lualine = {
|
||||
enable = true;
|
||||
settings = {
|
||||
options = {
|
||||
globalstatus = true;
|
||||
extensions = [
|
||||
"fzf"
|
||||
"neo-tree"
|
||||
];
|
||||
disabledFiletypes = {
|
||||
statusline = [
|
||||
"startup"
|
||||
"alpha"
|
||||
];
|
||||
};
|
||||
theme = "lackluster";
|
||||
};
|
||||
sections = {
|
||||
lualine_a = [
|
||||
{
|
||||
__unkeyed-1 = "mode";
|
||||
icon = "";
|
||||
}
|
||||
];
|
||||
lualine_b = [
|
||||
{
|
||||
__unkeyed-1 = "branch";
|
||||
icon = "";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "diff";
|
||||
symbols = {
|
||||
added = " ";
|
||||
modified = " ";
|
||||
removed = " ";
|
||||
};
|
||||
}
|
||||
];
|
||||
lualine_c = [
|
||||
{
|
||||
__unkeyed-1 = "diagnostics";
|
||||
sources = [ "nvim_lsp" ];
|
||||
symbols = {
|
||||
error = " ";
|
||||
warn = " ";
|
||||
info = " ";
|
||||
hint = " ";
|
||||
};
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "navic";
|
||||
}
|
||||
];
|
||||
lualine_x = [
|
||||
{
|
||||
__unkeyed-1 = "filetype";
|
||||
icon_only = true;
|
||||
separator = "";
|
||||
padding = {
|
||||
left = 1;
|
||||
right = 0;
|
||||
};
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "filename";
|
||||
path = 1;
|
||||
}
|
||||
{
|
||||
__unkeyed-1.__raw = ''
|
||||
function()
|
||||
local icon = " "
|
||||
local status = require("copilot.api").status.data
|
||||
return icon .. (status.message or " ")
|
||||
end,
|
||||
|
||||
cond = function()
|
||||
local ok, clients = pcall(vim.lsp.get_clients, { name = "copilot", bufnr = 0 })
|
||||
return ok and #clients > 0
|
||||
end,
|
||||
'';
|
||||
}
|
||||
];
|
||||
lualine_y = [
|
||||
{
|
||||
__unkeyed-1 = "progress";
|
||||
}
|
||||
];
|
||||
lualine_z = [
|
||||
{
|
||||
__unkeyed-1 = "location";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
139
home/modules/ide/nvim/plugins/neo-tree.nix
Normal file
139
home/modules/ide/nvim/plugins/neo-tree.nix
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
{
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
settings = {
|
||||
sources = [
|
||||
"filesystem"
|
||||
"buffers"
|
||||
"git_status"
|
||||
];
|
||||
enable_diagnostics = true;
|
||||
enable_git_status = true;
|
||||
enable_modified_markers = true;
|
||||
enable_refresh_on_write = true;
|
||||
open_files_in_last_window = true;
|
||||
open_files_do_not_replace_types = [
|
||||
"terminal"
|
||||
"Trouble"
|
||||
"trouble"
|
||||
"qf"
|
||||
"Outline"
|
||||
];
|
||||
filesystem = {
|
||||
bind_to_cwd = false;
|
||||
follow_current_file = {
|
||||
enabled = true;
|
||||
};
|
||||
use_libuv_file_watcher = true;
|
||||
};
|
||||
window.mappings = {
|
||||
"l" = "open";
|
||||
"h" = "close_node";
|
||||
"<space>" = "none";
|
||||
"Y" = {
|
||||
__raw = ''
|
||||
function(state)
|
||||
local node = state.tree:get_node()
|
||||
local path = node:get_id()
|
||||
vim.fn.setreg("+", path, "c")
|
||||
end
|
||||
'';
|
||||
desc = "Copy Path to Clipboard";
|
||||
};
|
||||
"O" = {
|
||||
__raw = ''
|
||||
function(state)
|
||||
vim.ui.open(state.tree:get_node().path)
|
||||
end
|
||||
'';
|
||||
desc = "Open with System Application";
|
||||
};
|
||||
};
|
||||
default_component_configs = {
|
||||
indent = {
|
||||
with_expanders = true;
|
||||
expander_collapsed = "";
|
||||
expander_expanded = "";
|
||||
expander_highlight = "NeoTreeExpander";
|
||||
};
|
||||
|
||||
git_status.symbols = {
|
||||
unstaged = "";
|
||||
staged = "";
|
||||
};
|
||||
|
||||
icon = {
|
||||
folder_closed = "";
|
||||
folder_open = "";
|
||||
folder_empty = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
event_handlers = {
|
||||
file_moved = ''
|
||||
function(data)
|
||||
require("snacks.rename").on_rename_file(data.source, data.destination)
|
||||
end
|
||||
'';
|
||||
file_renamed = ''
|
||||
function(data)
|
||||
require("snacks.rename").on_rename_file(data.source, data.destination)
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader>fe";
|
||||
mode = [ "n" ];
|
||||
action.__raw = ''
|
||||
function()
|
||||
require("neo-tree.command").execute({
|
||||
toggle = true,
|
||||
dir = vim.fn.getcwd()
|
||||
})
|
||||
end
|
||||
'';
|
||||
options.desc = "Explorer NeoTree (cwd)";
|
||||
}
|
||||
{
|
||||
key = "<leader>e";
|
||||
mode = [ "n" ];
|
||||
action = "<leader>fe";
|
||||
options.remap = true;
|
||||
options.desc = "Explorer NeoTree (cwd)";
|
||||
}
|
||||
{
|
||||
key = "<leader>ge";
|
||||
mode = [ "n" ];
|
||||
action.__raw = ''
|
||||
function()
|
||||
require("neo-tree.command").execute({
|
||||
source = "git_status",
|
||||
toggle = true
|
||||
})
|
||||
end
|
||||
'';
|
||||
options.desc = "Git Explorer";
|
||||
}
|
||||
{
|
||||
key = "<leader>be";
|
||||
mode = [ "n" ];
|
||||
action.__raw = ''
|
||||
function()
|
||||
require("neo-tree.command").execute({
|
||||
source = "buffers",
|
||||
toggle = true
|
||||
})
|
||||
end
|
||||
'';
|
||||
options.desc = "Buffer Explorer";
|
||||
}
|
||||
{
|
||||
key = "<C-h>";
|
||||
mode = [ "n" ];
|
||||
action = "<cmd>Neotree source=filesystem focus<CR>";
|
||||
options.desc = "switch focus";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
plugins.mini-notify = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
plugins.mini-pairs = {
|
||||
enable = true;
|
||||
settings = {
|
||||
modes = {
|
||||
command = true;
|
||||
insert = true;
|
||||
terminal = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
45
home/modules/ide/nvim/plugins/snacks.nix
Normal file
45
home/modules/ide/nvim/plugins/snacks.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
plugins.snacks = {
|
||||
enable = true;
|
||||
autoLoad = true;
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader>ff";
|
||||
mode = [ "n" ];
|
||||
action = "<cmd>lua Snacks.picker.files()<CR>";
|
||||
options.desc = "Find files";
|
||||
}
|
||||
{
|
||||
key = "<leader>fb";
|
||||
mode = [ "n" ];
|
||||
action = "<cmd>lua Snacks.picker.buffers()<CR>";
|
||||
options.desc = "Find buffers";
|
||||
}
|
||||
{
|
||||
key = "<leader>gl";
|
||||
mode = [ "n" ];
|
||||
action = "<cmd>lua Snacks.picker.git_log()<CR>";
|
||||
options.desc = "Git log";
|
||||
}
|
||||
{
|
||||
key = "<leader>gs";
|
||||
mode = [ "n" ];
|
||||
action = "<cmd>lua Snacks.picker.git_status()<CR>";
|
||||
options.desc = "Git status";
|
||||
}
|
||||
{
|
||||
key = "<leader>uC";
|
||||
mode = [ "n" ];
|
||||
action = "<cmd>lua Snacks.picker.colorschemes()<CR>";
|
||||
options.desc = "Colorschemes";
|
||||
}
|
||||
{
|
||||
key = "<leader>:";
|
||||
mode = [ "n" ];
|
||||
action = "<cmd>lua Snacks.picker.command_history()<CR>";
|
||||
options.desc = "Command history";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
plugins.mini-snippets = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
{
|
||||
plugins.mini-starter = {
|
||||
enable = true;
|
||||
settings = {
|
||||
autoopen = true;
|
||||
evaluate_single = true;
|
||||
header = ''
|
||||
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢸⣿⣿⣷⣜⢿⣧⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡄⠻⣿⣿⣿⣿⣦⠄⠄
|
||||
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⣿⣿⣿⣿⣮⡻⣷⡙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣿⣿⣆⠙⣿⣿⣿⣿⣧⠄
|
||||
⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⣿⣿⣿⣿⣿⣿⣧⢸⣿⣿⣿⡘⢿⣮⡛⣷⡙⢿⣿⡏⢻⣿⣿⣿⣧⠙⢿⣿⣿⣷⠘⢿⣿⣆⢿⣿⣿⣿⣿⣆
|
||||
⣿⣿⣿⣿⣿⣿⣿⣿⡿⠐⣿⣿⣿⣿⣿⣿⠃⠄⢣⠻⣿⣧⠄⠙⢷⡀⠙⢦⡙⢿⡄⠹⣿⣿⣿⣇⠄⠻⣿⣿⣇⠈⢻⣿⡎⢿⣿⣿⣿⣿
|
||||
⣿⣿⣿⣿⣿⣿⣿⣿⡇⠄⣿⣿⣿⣿⣿⠋⠄⣼⣆⢧⠹⣿⣆⠄⠈⠛⣄⠄⢬⣒⠙⠂⠈⢿⣿⣿⡄⠄⠈⢿⣿⡀⠄⠙⣿⠘⣿⣿⣿⣿
|
||||
⣿⣿⣿⣿⣿⣿⣿⣿⡇⠄⣿⣿⣿⣿⠏⢀⣼⣿⣿⣎⠁⠐⢿⠆⠄⠄⠈⠢⠄⠙⢷⣤⡀⠄⠙⠿⠷⠄⠄⠄⠹⠇⠄⠄⠘⠄⢸⣿⣿⣿
|
||||
⣿⣿⣿⣿⣿⣿⣿⣿⠄⠄⢻⣿⣿⠏⢀⣾⣿⣿⣿⣿⡦⠄⠄⡘⢆⠄⠄⠄⠄⠄⠄⠙⠻⡄⠄⠄⠉⡆⠄⠄⠄⠑⠄⢠⡀⠄⠄⣿⡿⣿
|
||||
⣿⣿⣿⣿⣿⣿⣿⣿⠄⠄⢸⣿⠋⣰⣿⣿⡿⢟⣫⣵⣾⣷⡄⢻⣄⠁⠄⠄⠠⣄⠄⠄⠄⠈⠂⠄⠄⠈⠄⠱⠄⠄⠄⠄⢷⢀⣠⣽⡇⣿
|
||||
⣿⣿⣿⣿⣿⣿⣿⣿⡄⠄⠄⢁⣚⣫⣭⣶⣾⣿⣿⣿⣿⣿⣿⣦⣽⣷⣄⠄⠄⠘⢷⣄⠄⠄⠄⠄⣠⠄⠄⠄⠄⠈⠉⠈⠻⢸⣿⣿⡇⣿
|
||||
⣿⣿⣿⣿⣿⣿⣿⣿⡇⠄⢠⣾⣿⣿⣿⣿⣿⡿⠿⠿⠟⠛⠿⣿⣿⣿⣿⣷⣤⣤⣤⣿⣷⣶⡶⠋⢀⡠⡐⢒⢶⣝⢿⡟⣿⢸⣿⣿⡃⣿
|
||||
⣿⣿⣿⢹⣿⢿⣿⣿⣷⢠⣿⣿⣿⣿⣯⠷⠐⠋⠋⠛⠉⠁⠛⠛⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⡏⠊⡼⢷⢱⣿⡾⡷⣿⢸⡏⣿⢰⣿
|
||||
⣿⣿⣿⢸⣿⡘⡿⣿⣿⠎⣿⠟⠋⢁⡀⡠⣒⡤⠬⢭⣖⢝⢷⣶⣬⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⢃⢔⠭⢵⣣⣿⠓⢵⣿⢸⢃⡇⢸⣿
|
||||
⣿⣿⣿⡄⣿⡇⠄⡘⣿⣷⡸⣴⣾⣿⢸⢱⢫⡞⣭⢻⡼⡏⣧⢿⣿⣿⣿⣿⣿⣿⣿⡿⣿⢿⡿⣿⣧⣕⣋⣉⣫⣵⣾⣿⡏⢸⠸⠁⢸⡏
|
||||
⣿⣿⣿⡇⠸⣷⠄⠈⠘⢿⣧⠹⣹⣿⣸⡼⣜⢷⣕⣪⡼⣣⡟⣾⣿⣿⢯⡻⣟⢯⡻⣿⣮⣷⣝⢮⣻⣿⢿⣿⣝⣿⣿⢿⣿⢀⠁⠄⢸⠄
|
||||
⣿⣿⡿⣇⠄⠹⡆⠄⠄⠈⠻⣧⠩⣊⣷⠝⠮⠕⠚⠓⠚⣩⣤⣝⢿⣿⣯⡿⣮⣷⣿⣾⣿⢻⣿⣿⣿⣾⣷⣽⣿⣿⣿⣿⡟⠄⠄⠄⠄⢸
|
||||
⠹⣿⡇⢹⠄⠄⠐⠄⠄⠄⠄⠈⠣⠉⡻⣟⢿⣝⢿⣝⠿⡿⣷⣝⣷⣝⣿⣿⣿⣿⣿⣿⣿⣧⢹⣿⣿⣿⣿⣿⣿⣿⣿⡟⣠⠄⠄⠄⠄⠈
|
||||
⠄⠘⠇⠄⠄⠄⠄⠄⠄⠄⠄⠄⠠⣌⠈⢳⢝⣮⣻⣿⣿⣮⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠄⠄⠄⠄⢀
|
||||
⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢻⣷⣤⣝⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠄⠄⠄⠄⣼
|
||||
⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⢿⣿⣿⣿⣿⣿⣿⣿⠏⠄⠄⠄⠄⣰⢩
|
||||
⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢻⣿⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⠛⠋⠉⠉⠉⠄⠄⠄⠄⣸⣿⣿⣿⣿⡿⠃⠄⠄⠄⠄⣰⣿⣧
|
||||
⣷⡀⠄⠈⢦⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢻⣯⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⣤⣤⣶⣶⣶⣶⣾⣿⣿⣿⣿⡿⠋⠄⠄⠄⠄⠄⣰⣿⣿⣿
|
||||
⣿⣿⣦⡱⣌⢻⣦⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠄⠄⠄⠄⠄⠄⢰⣿⣿⣿⣿
|
||||
⣿⣿⣿⣿⣿⣷⣿⣿⣦⣐⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠉⠛⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣫⡔⢀⣴⠄⠄⠄⡼⣠⣿⣿⣿⣿⣿
|
||||
⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠉⠉⠉⠙⠛⢛⣛⣛⣭⣾⣿⣴⣿⢇⣤⣦⣾⣿⣿⣿⣿⣿⣿⣿
|
||||
⣿⣿⣿⣿⣿⣿⣿⠟⠁⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠈⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
plugins.mini-statusline = {
|
||||
enable = true;
|
||||
settings = {
|
||||
use_icons = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
plugins.telescope = {
|
||||
enable = true;
|
||||
extensions = {
|
||||
fzf-native = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
plugins.toggleterm = {
|
||||
enable = true;
|
||||
settings = {
|
||||
direction = "float";
|
||||
float_opts = {
|
||||
border = "single";
|
||||
height = 30;
|
||||
width = 130;
|
||||
};
|
||||
shell = "fish";
|
||||
open_mapping = "[[<c-t>]]";
|
||||
};
|
||||
};
|
||||
}
|
||||
33
home/modules/ide/nvim/plugins/toggleterm.nix
Normal file
33
home/modules/ide/nvim/plugins/toggleterm.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
plugins.toggleterm = {
|
||||
enable = true;
|
||||
settings = {
|
||||
direction = "float";
|
||||
float_opts = {
|
||||
border = "curved";
|
||||
height = 30;
|
||||
width = 130;
|
||||
};
|
||||
open_mapping = "[[<c-t>]]";
|
||||
autochdir = true;
|
||||
auto_scroll = true;
|
||||
close_on_exit = true;
|
||||
insert_mappings = true;
|
||||
shell = "fish";
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
key = "<C-t>";
|
||||
mode = [
|
||||
"n"
|
||||
"t"
|
||||
];
|
||||
action = "<cmd>ToggleTerm<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
noremap = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
@ -1,31 +1,32 @@
|
|||
{pkgs, ...}: {
|
||||
extraPackages = [pkgs.tree-sitter];
|
||||
|
||||
plugins.treesitter = {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
plugins = {
|
||||
treesitter = {
|
||||
enable = true;
|
||||
|
||||
grammarPackages = pkgs.vimPlugins.nvim-treesitter.passthru.allGrammars;
|
||||
|
||||
settings = {
|
||||
textobjects.enable = true;
|
||||
|
||||
indent = {
|
||||
enable = true;
|
||||
};
|
||||
highlight = {
|
||||
enable = true;
|
||||
|
||||
disable = ''
|
||||
function(lang, bufnr)
|
||||
return vim.api.nvim_buf_line_count(bufnr) > 10000
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
incremental_selection = {
|
||||
enable = true;
|
||||
nixvimInjections = true;
|
||||
grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
||||
};
|
||||
|
||||
indent = {
|
||||
treesitter-context = {
|
||||
enable = false;
|
||||
};
|
||||
|
||||
treesitter-textobjects = {
|
||||
enable = true;
|
||||
settings.select = {
|
||||
enable = true;
|
||||
lookahead = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
25
home/modules/ide/nvim/plugins/treesj.nix
Normal file
25
home/modules/ide/nvim/plugins/treesj.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
plugins.treesj = {
|
||||
enable = true;
|
||||
autoLoad = true;
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader>m";
|
||||
mode = [
|
||||
"n"
|
||||
];
|
||||
action = "<cmd>TSJToggle<CR>";
|
||||
}
|
||||
{
|
||||
key = "<leader>s";
|
||||
mode = [ "n" ];
|
||||
action = "<cmd>TSJSplit<CR>";
|
||||
}
|
||||
{
|
||||
key = "<leader>j";
|
||||
mode = [ "n" ];
|
||||
action = "<cmd>TSJJoin<CR>";
|
||||
}
|
||||
];
|
||||
}
|
||||
10
home/modules/ide/nvim/plugins/web-devicons.nix
Normal file
10
home/modules/ide/nvim/plugins/web-devicons.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
plugins.web-devicons = {
|
||||
enable = true;
|
||||
autoLoad = true;
|
||||
settings = {
|
||||
color_icons = true;
|
||||
strict = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
139
home/modules/ide/nvim/plugins/yanky.nix
Normal file
139
home/modules/ide/nvim/plugins/yanky.nix
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
plugins = {
|
||||
sqlite-lua.enable = true;
|
||||
|
||||
yanky = {
|
||||
enable = true;
|
||||
|
||||
lazyLoad = {
|
||||
settings = {
|
||||
keys = lib.mkIf config.plugins.lz-n.enable [
|
||||
{
|
||||
__unkeyed-1 = "<leader>fy";
|
||||
__unkeyed-2 = "<cmd>Telescope yank_history<cr>";
|
||||
desc = "Paste from yanky history";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "y";
|
||||
__unkeyed-2 = "<Plug>(YankyYank)";
|
||||
mode = [
|
||||
"n"
|
||||
"x"
|
||||
];
|
||||
desc = "Yank text";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "p";
|
||||
__unkeyed-2 = "<Plug>(YankyPutAfter)";
|
||||
mode = [
|
||||
"n"
|
||||
"x"
|
||||
];
|
||||
desc = "Put yanked text after cursor";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "P";
|
||||
__unkeyed-2 = "<Plug>(YankyPutBefore)";
|
||||
mode = [
|
||||
"n"
|
||||
"x"
|
||||
];
|
||||
desc = "Put yanked text before cursor";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "gp";
|
||||
__unkeyed-2 = "<Plug>(YankyGPutAfter)";
|
||||
mode = [
|
||||
"n"
|
||||
"x"
|
||||
];
|
||||
desc = "Put yanked text after selection";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "gP";
|
||||
__unkeyed-2 = "<Plug>(YankyGPutBefore)";
|
||||
mode = [
|
||||
"n"
|
||||
"x"
|
||||
];
|
||||
desc = "Put yanked text before selection";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<c-p>";
|
||||
__unkeyed-2 = "<Plug>(YankyPreviousEntry)";
|
||||
desc = "Select previous entry through yank history";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<c-n>";
|
||||
__unkeyed-2 = "<Plug>(YankyNextEntry)";
|
||||
desc = "Select next entry through yank history";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "]p";
|
||||
__unkeyed-2 = "<Plug>(YankyPutIndentAfterLinewise)";
|
||||
desc = "Put indented after cursor (linewise)";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "[p";
|
||||
__unkeyed-2 = "<Plug>(YankyPutIndentBeforeLinewise)";
|
||||
desc = "Put indented before cursor (linewise)";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "]P";
|
||||
__unkeyed-2 = "<Plug>(YankyPutIndentAfterLinewise)";
|
||||
desc = "Put indented after cursor (linewise)";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "[P";
|
||||
__unkeyed-2 = "<Plug>(YankyPutIndentBeforeLinewise)";
|
||||
desc = "Put indented before cursor (linewise)";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = ">p";
|
||||
__unkeyed-2 = "<Plug>(YankyPutIndentAfterShiftRight)";
|
||||
desc = "Put and indent right";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<p";
|
||||
__unkeyed-2 = "<Plug>(YankyPutIndentAfterShiftLeft)";
|
||||
desc = "Put and indent left";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = ">P";
|
||||
__unkeyed-2 = "<Plug>(YankyPutIndentBeforeShiftRight)";
|
||||
desc = "Put before and indent right";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<P";
|
||||
__unkeyed-2 = "<Plug>(YankyPutIndentBeforeShiftLeft)";
|
||||
desc = "Put before and indent left";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "=p";
|
||||
__unkeyed-2 = "<Plug>(YankyPutAfterFilter)";
|
||||
desc = "Put after applying a filter";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "=P";
|
||||
__unkeyed-2 = "<Plug>(YankyPutBeforeFilter)";
|
||||
desc = "Put before applying a filter";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
settings = {
|
||||
ring = {
|
||||
history_length = 100;
|
||||
storage = "sqlite";
|
||||
storage_path.__raw = "vim.fn.stdpath('data') .. '/databases/yanky.db'";
|
||||
sync_with_numbered_registers = true;
|
||||
cancel_event = "update";
|
||||
ignore_registers = [ "_" ];
|
||||
update_register_on_cycle = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
7
home/modules/ide/nvim/theme.nix
Normal file
7
home/modules/ide/nvim/theme.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
colorschemes = {
|
||||
tokyonight = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableNushellIntegration = true;
|
||||
silent = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -74,8 +74,6 @@ alias gss='git status -s'
|
|||
#compdef _git gss=git-status
|
||||
alias ga='git add'
|
||||
#compdef _git ga=git-add
|
||||
alias gav 'git add --verbose'
|
||||
#compdef _git gav=git-add
|
||||
alias gm='git merge'
|
||||
#compdef _git gm=git-merge
|
||||
alias grh='git reset HEAD'
|
||||
|
|
|
|||
|
|
@ -1,32 +1,11 @@
|
|||
# set prompt
|
||||
fish_config prompt choose minimalist
|
||||
|
||||
# setup direnv
|
||||
direnv hook fish | source
|
||||
|
||||
# set theme
|
||||
source ~/.config/fish/themes/bw.fish
|
||||
|
||||
# set aliases
|
||||
source ~/.config/fish/aliases/git.fish
|
||||
|
||||
# path
|
||||
fish_add_path -g ~/bin ~/go/bin ~/.config/v-analyzer/bin
|
||||
|
||||
# custom
|
||||
function vir
|
||||
set dest (command vir $argv)
|
||||
and cd $dest
|
||||
end
|
||||
|
||||
# prompt functions
|
||||
function git_branch
|
||||
set -l branch (git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
||||
if test $status -eq 0
|
||||
echo ' ( '$branch')'
|
||||
else
|
||||
echo ""
|
||||
end
|
||||
end
|
||||
|
||||
function nix_shell
|
||||
if test -n "$IN_NIX_SHELL"
|
||||
echo " (nix)"
|
||||
else
|
||||
echo ""
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file.".config/fish/themes".source = ./themes;
|
||||
home.file.".config/fish/aliases".source = ./aliases;
|
||||
# note: grompt was installed manually, once grompt is available in nixpkgs,
|
||||
# this will change.
|
||||
home.file.".config/grompt.json".source = ./grompt.json;
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
package = pkgs.fishMinimal;
|
||||
|
|
@ -12,7 +10,6 @@
|
|||
shellAliases = {
|
||||
nv = "nvim";
|
||||
cls = "clear";
|
||||
unfetch = "unfetch -distro=eyes -art-dir=/home/elisiei/.config/unfetch -pkg=nix -fields=title,separator,os,kernel,uptime,shell,terminal,memory,packages";
|
||||
};
|
||||
|
||||
functions = {
|
||||
|
|
@ -20,12 +17,11 @@
|
|||
body = "__fish_default_command_not_found_handler $argv[1]";
|
||||
onEvent = "fish_command_not_found";
|
||||
};
|
||||
|
||||
fish_greeting = {
|
||||
body = "";
|
||||
};
|
||||
fish_prompt = {
|
||||
body = "grompt";
|
||||
};
|
||||
|
||||
gitignore = "curl -sL https://www.gitignore.io/api/$argv";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
[
|
||||
"fg:yellow",
|
||||
"${spwd}",
|
||||
"fg:green",
|
||||
"exec:fish -c 'git_branch'",
|
||||
{
|
||||
"git_status_noclean": ["fg:red", " (+)"]
|
||||
},
|
||||
{
|
||||
"git_status_clean": []
|
||||
},
|
||||
"fg:blue",
|
||||
"exec:fish -c 'nix_shell'",
|
||||
"fg:green",
|
||||
": "
|
||||
]
|
||||
|
||||
31
home/modules/shell/fish/themes/bw.fish
Normal file
31
home/modules/shell/fish/themes/bw.fish
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/fish
|
||||
|
||||
set -l fg ffffff # primary foreground
|
||||
set -l fg_dim bbbbbb # dim text
|
||||
set -l fg_faint 888888 # comments / autosuggestions
|
||||
set -l fg_dark 666666 # secondary elements
|
||||
set -l bg_sel 333333 # selection background
|
||||
set -l bg_match 2a2a2a # search match background
|
||||
set -l error ffffff # errors
|
||||
|
||||
set -g fish_color_normal $fg
|
||||
set -g fish_color_command $fg --bold
|
||||
set -g fish_color_keyword $fg --bold
|
||||
set -g fish_color_quote $fg_dim
|
||||
set -g fish_color_redirection $fg
|
||||
set -g fish_color_end $fg
|
||||
set -g fish_color_option $fg_dim
|
||||
set -g fish_color_error $error --reverse
|
||||
set -g fish_color_param $fg
|
||||
set -g fish_color_comment $fg_faint
|
||||
set -g fish_color_selection --background=$bg_sel
|
||||
set -g fish_color_search_match --background=$bg_match
|
||||
set -g fish_color_operator $fg
|
||||
set -g fish_color_escape $fg_dim
|
||||
set -g fish_color_autosuggestion $fg_faint
|
||||
|
||||
set -g fish_pager_color_progress $fg_faint
|
||||
set -g fish_pager_color_prefix $fg --bold
|
||||
set -g fish_pager_color_completion $fg
|
||||
set -g fish_pager_color_description $fg_faint
|
||||
set -g fish_pager_color_selected_background --background=$bg_sel
|
||||
37
home/modules/shell/fish/themes/kanagawa.fish
Normal file
37
home/modules/shell/fish/themes/kanagawa.fish
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/fish
|
||||
|
||||
# Kanagawa Fish shell theme
|
||||
# A template was taken and modified from Tokyonight:
|
||||
# https://github.com/folke/tokyonight.nvim/blob/main/extras/fish_tokyonight_night.fish
|
||||
set -l foreground DCD7BA normal
|
||||
set -l selection 2D4F67 brcyan
|
||||
set -l comment 727169 brblack
|
||||
set -l red C34043 red
|
||||
set -l orange FF9E64 brred
|
||||
set -l yellow C0A36E yellow
|
||||
set -l green 76946A green
|
||||
set -l purple 957FB8 magenta
|
||||
set -l cyan 7AA89F cyan
|
||||
set -l pink D27E99 brmagenta
|
||||
|
||||
# Syntax Highlighting Colors
|
||||
set -g fish_color_normal $foreground
|
||||
set -g fish_color_command $cyan
|
||||
set -g fish_color_keyword $pink
|
||||
set -g fish_color_quote $yellow
|
||||
set -g fish_color_redirection $foreground
|
||||
set -g fish_color_end $orange
|
||||
set -g fish_color_error $red
|
||||
set -g fish_color_param $purple
|
||||
set -g fish_color_comment $comment
|
||||
set -g fish_color_selection --background=$selection
|
||||
set -g fish_color_search_match --background=$selection
|
||||
set -g fish_color_operator $green
|
||||
set -g fish_color_escape $pink
|
||||
set -g fish_color_autosuggestion $comment
|
||||
|
||||
# Completion Pager Colors
|
||||
set -g fish_pager_color_progress $comment
|
||||
set -g fish_pager_color_prefix $cyan
|
||||
set -g fish_pager_color_completion $foreground
|
||||
set -g fish_pager_color_description $comment
|
||||
37
home/modules/shell/fish/themes/tokyonight_night.fish
Normal file
37
home/modules/shell/fish/themes/tokyonight_night.fish
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/fish
|
||||
|
||||
# tokyonight color palette
|
||||
set -l foreground c0caf5
|
||||
set -l selection 283457
|
||||
set -l comment 565f89
|
||||
set -l red f7768e
|
||||
set -l orange ff9e64
|
||||
set -l yellow e0af68
|
||||
set -l green 9ece6a
|
||||
set -l purple 9d7cd8
|
||||
set -l cyan 7dcfff
|
||||
set -l pink bb9af7
|
||||
|
||||
# syntax highlighting colors
|
||||
set -g fish_color_normal $foreground
|
||||
set -g fish_color_command $cyan
|
||||
set -g fish_color_keyword $pink
|
||||
set -g fish_color_quote $yellow
|
||||
set -g fish_color_redirection $foreground
|
||||
set -g fish_color_end $orange
|
||||
set -g fish_color_option $pink
|
||||
set -g fish_color_error $red
|
||||
set -g fish_color_param $purple
|
||||
set -g fish_color_comment $comment
|
||||
set -g fish_color_selection --background=$selection
|
||||
set -g fish_color_search_match --background=$selection
|
||||
set -g fish_color_operator $green
|
||||
set -g fish_color_escape $pink
|
||||
set -g fish_color_autosuggestion $comment
|
||||
|
||||
# completion pager colors
|
||||
set -g fish_pager_color_progress $comment
|
||||
set -g fish_pager_color_prefix $cyan
|
||||
set -g fish_pager_color_completion $foreground
|
||||
set -g fish_pager_color_description $comment
|
||||
set -g fish_pager_color_selected_background --background=$selection
|
||||
103
home/modules/shell/nushell/config.nu
Normal file
103
home/modules/shell/nushell/config.nu
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
use std repeat
|
||||
|
||||
$env.EDITOR = "nvim"
|
||||
|
||||
const config_path = $nu.default-config-dir | path join "config";
|
||||
const aliases_path = $config_path | path join "aliases";
|
||||
const completions_path = $config_path | path join "completions";
|
||||
const hooks_path = $config_path | path join "hooks";
|
||||
const scripts_path = $config_path | path join "scripts";
|
||||
const themes_path = $config_path | path join "themes";
|
||||
|
||||
# register aliases
|
||||
source ($aliases_path | path join "git.nu");
|
||||
|
||||
# register completions
|
||||
source ($completions_path | path join "git.nu");
|
||||
source ($completions_path | path join "make.nu");
|
||||
|
||||
# register hooks
|
||||
source ($hooks_path | path join "did_you_mean.nu")
|
||||
|
||||
# register scripts
|
||||
source ($scripts_path | path join "nufetch.nu")
|
||||
|
||||
# register themes
|
||||
source ($themes_path | path join "tokyo-night.nu")
|
||||
|
||||
$env.PATH = ($env.PATH |
|
||||
append /home/elisiei/bin |
|
||||
append /home/elisiei/go/bin
|
||||
)
|
||||
|
||||
$env.COLORTERM = "truecolor"
|
||||
|
||||
$env.config = {
|
||||
buffer_editor: "nvim"
|
||||
edit_mode: "vi"
|
||||
show_banner: false
|
||||
}
|
||||
|
||||
def create_left_prompt [] {
|
||||
# path
|
||||
let folder_name = (
|
||||
$env.PWD
|
||||
| str replace $env.HOME "~"
|
||||
| split row "/"
|
||||
| each {|it| $it }
|
||||
| str join "/"
|
||||
| $in
|
||||
)
|
||||
|
||||
let folder = $"($folder_name)"
|
||||
let folder_colored = (
|
||||
$folder | ansi gradient --fgstart '0xA0B6A0' --fgend '0x6C94DC'
|
||||
)
|
||||
|
||||
let path_segment = $"(ansi bo)($folder_colored)(ansi reset)"
|
||||
|
||||
# git
|
||||
let git_segment = (
|
||||
if (do -i { git rev-parse --is-inside-work-tree } | complete | get exit_code) == 0 {
|
||||
let branch = (do -i { git branch --show-current } | complete | get stdout | str trim)
|
||||
let changes = (do -i { git status --porcelain } | complete | get stdout | str trim)
|
||||
let status = if ($changes | is-empty) { "" } else { $" (ansi bo)(ansi '#FF6E7F')[!]" }
|
||||
$"(ansi i)on(ansi reset) (ansi bo)(ansi '#FBDBB6') ($branch)(ansi reset)($status)(ansi reset)"
|
||||
} else {
|
||||
""
|
||||
}
|
||||
)
|
||||
|
||||
# nix shell
|
||||
let nix_segment = (
|
||||
if ($env | columns | any {|c| $c == "IN_NIX_SHELL" }) and ($env.IN_NIX_SHELL | default "" | str trim | is-not-empty) {
|
||||
$"(ansi i)via(ansi reset) (ansi bo)(ansi '#A4CCB1')nix(ansi reset)"
|
||||
} else {
|
||||
""
|
||||
}
|
||||
)
|
||||
|
||||
# all
|
||||
[$path_segment $git_segment $nix_segment]
|
||||
| where {|x| not ($x | is-empty) }
|
||||
| str join " "
|
||||
}
|
||||
|
||||
|
||||
$env.PROMPT_COMMAND = { || create_left_prompt }
|
||||
$env.PROMPT_COMMAND_RIGHT = { || }
|
||||
|
||||
$env.PROMPT_INDICATOR_VI_INSERT = { || ": " }
|
||||
$env.PROMPT_INDICATOR_VI_NORMAL = { || "! " }
|
||||
|
||||
$env.PROMPT_MULTILINE_INDICATOR = { || "::: " }
|
||||
|
||||
$env.PROMPT_INDICATOR = { ||
|
||||
let last_exit_code = $env.LAST_EXIT_CODE
|
||||
let indicator = if ($last_exit_code == 0) {
|
||||
$"(ansi cyan)❯(ansi reset)"
|
||||
} else {
|
||||
$"(ansi red)❯(ansi reset)"
|
||||
}
|
||||
$"\n($indicator) "
|
||||
}
|
||||
246
home/modules/shell/nushell/config/aliases/git.nu
Normal file
246
home/modules/shell/nushell/config/aliases/git.nu
Normal file
|
|
@ -0,0 +1,246 @@
|
|||
# returns the name of the current branch
|
||||
export def git_current_branch [] {
|
||||
^git rev-parse --abbrev-ref HEAD
|
||||
}
|
||||
|
||||
export def git_main_branch [] {
|
||||
git remote show origin
|
||||
| lines
|
||||
| str trim
|
||||
| find --regex 'HEAD .*?[:: ].+'
|
||||
| first
|
||||
| ansi strip
|
||||
| str replace --regex 'HEAD .*?[:: ]\s*(.+)' '$1'
|
||||
}
|
||||
|
||||
#
|
||||
# Aliases
|
||||
# (sorted alphabetically)
|
||||
#
|
||||
|
||||
export alias ga = git add
|
||||
export alias gaa = git add --all
|
||||
export alias gapa = git add --patch
|
||||
export alias gau = git add --update
|
||||
export alias gav = git add --verbose
|
||||
export alias gap = git apply
|
||||
export alias gapt = git apply --3way
|
||||
|
||||
export alias gb = git branch
|
||||
export alias gba = git branch --all
|
||||
export alias gbd = git branch --delete
|
||||
export alias gbD = git branch --delete --force
|
||||
export alias gbl = git blame -b -w
|
||||
export alias gbm = git branch --move
|
||||
export alias gbmc = git branch --move (git_current_branch)
|
||||
export alias gbnm = git branch --no-merged
|
||||
export alias gbr = git branch --remote
|
||||
export alias gbs = git bisect
|
||||
export alias gbsb = git bisect bad
|
||||
export alias gbsg = git bisect good
|
||||
export alias gbsn = git bisect new
|
||||
export alias gbso = git bisect old
|
||||
export alias gbsr = git bisect reset
|
||||
export alias gbss = git bisect start
|
||||
|
||||
export alias gc = git commit --verbose
|
||||
export alias gc! = git commit --verbose --amend
|
||||
export alias gcn = git commit --verbose --no-edit
|
||||
export alias gcn! = git commit --verbose --no-edit --amend
|
||||
export alias gca = git commit --verbose --all
|
||||
export alias gca! = git commit --verbose --all --amend
|
||||
export alias gcan! = git commit --verbose --all --no-edit --amend
|
||||
export alias gcans! = git commit --verbose --all --signoff --no-edit --amend
|
||||
export def gcam [message: string] {
|
||||
git commit --all --message $message
|
||||
}
|
||||
export def gcsm [message: string] {
|
||||
git commit --all --signoff $message
|
||||
}
|
||||
export alias gcas = git commit --all --signoff
|
||||
export def gcasm [message: string] {
|
||||
git commit --all --signoff --message $message
|
||||
}
|
||||
export alias gcb = git checkout -b
|
||||
export alias gcd = git checkout develop
|
||||
export alias gcf = git config --list
|
||||
export alias gcl = git clone --recurse-submodules
|
||||
export alias gclean = git clean --interactive -d
|
||||
export def gpristine [] {
|
||||
git reset --hard
|
||||
git clean -d --force -x
|
||||
}
|
||||
export alias gcm = git checkout (git_main_branch)
|
||||
export def gcmsg [message: string] {
|
||||
git commit --message $message
|
||||
}
|
||||
export alias gco = git checkout
|
||||
export alias gcor = git checkout --recurse-submodules
|
||||
export alias gcount = git shortlog --summary --numbered
|
||||
export alias gcp = git cherry-pick
|
||||
export alias gcpa = git cherry-pick --abort
|
||||
export alias gcpc = git cherry-pick --continue
|
||||
export alias gcs = git commit --gpg-sign
|
||||
export alias gcss = git commit --gpg-sign --signoff
|
||||
export def gcssm [message: string] {
|
||||
git commit --gpg-sign --signoff --message $message
|
||||
}
|
||||
export alias gd = git diff
|
||||
export alias gdca = git diff --cached
|
||||
export alias gdcw = git diff --cached --word-diff
|
||||
export alias gdct = git describe --tags (git rev-list --tags --max-count=1)
|
||||
export alias gds = git diff --staged
|
||||
export alias gdt = git diff-tree --no-commit-id --name-only -r
|
||||
export alias gdup = git diff @{upstream}
|
||||
export alias gdw = git diff --word-diff
|
||||
|
||||
export alias gf = git fetch
|
||||
export alias gfa = git fetch --all --prune
|
||||
export alias gfo = git fetch origin
|
||||
|
||||
export alias gg = git gui citool
|
||||
export alias gga = git gui citool --amend
|
||||
|
||||
export alias ghh = git help
|
||||
|
||||
export alias gignore = git update-index --assume-unchanged
|
||||
|
||||
export alias gl = git log
|
||||
export alias glg = git log --stat
|
||||
export alias glgp = git log --stat --patch
|
||||
export alias glgg = git log --graph
|
||||
export alias glgga = git log --graph --decorate --all
|
||||
export alias glgm = git log --graph --max-count=10
|
||||
export alias glo = git log --oneline --decorate
|
||||
export alias glod = git log --graph $'--pretty=%Cred%h%Creset -%C(char lp)auto(char rp)%d%Creset %s %Cgreen(char lp)%ad(char rp) %C(char lp)bold blue(char rp)<%an>%Creset'
|
||||
export alias glods = git log --graph $'--pretty=%Cred%h%Creset -%C(char lp)auto(char rp)%d%Creset %s %Cgreen(char lp)%ad(char rp) %C(char lp)bold blue(char rp)<%an>%Creset' --date=short
|
||||
export alias glog = git log --oneline --decorate --graph
|
||||
export alias gloga = git log --oneline --decorate --graph --all
|
||||
export alias glol = git log --graph $'--pretty=%Cred%h%Creset -%C(char lp)auto(char rp)%d%Creset %s %Cgreen(char lp)%ar(char rp) %C(char lp)bold blue(char rp)<%an>%Creset'
|
||||
export alias glola = git log --graph $'--pretty=%Cred%h%Creset -%C(char lp)auto(char rp)%d%Creset %s %Cgreen(char lp)%ar(char rp) %C(char lp)bold blue(char rp)<%an>%Creset' --all
|
||||
export alias glols = git log --graph $'--pretty=%Cred%h%Creset -%C(char lp)auto(char rp)%d%Creset %s %Cgreen(char lp)%ar(char rp) %C(char lp)bold blue(char rp)<%an>%Creset' --stat
|
||||
|
||||
export alias gm = git merge
|
||||
export alias gmtl = git mergetool --no-prompt
|
||||
export alias gmtlvim = git mergetool --no-prompt --tool=vimdiff
|
||||
export alias gma = git merge --abort
|
||||
export def gmom [] {
|
||||
let main = (git_main_branch)
|
||||
git merge $"origin/($main)"
|
||||
}
|
||||
|
||||
export alias gp = git push
|
||||
export alias gpd = git push --dry-run
|
||||
export alias gpf = git push --force-with-lease
|
||||
export alias gpf! = git push --force
|
||||
export alias gpl = git pull
|
||||
export def gpoat [] {
|
||||
git push origin --all; git push origin --tags
|
||||
}
|
||||
export alias gpod = git push origin --delete
|
||||
export alias gpodc = git push origin --delete (git_current_branch)
|
||||
def "nu-complete git pull rebase" [] {
|
||||
["false","true","merges","interactive"]
|
||||
}
|
||||
export def gpr [rebase_type: string@"nu-complete git pull rebase"] {
|
||||
git pull --rebase $rebase_type
|
||||
}
|
||||
export alias gpu = git push upstream
|
||||
export alias gpv = git push --verbose
|
||||
|
||||
export alias gr = git remote
|
||||
export alias gpra = git pull --rebase --autostash
|
||||
export alias gprav = git pull --rebase --autostash --verbose
|
||||
export alias gprv = git pull --rebase --verbose
|
||||
export alias gpsup = git push --set-upstream origin (git_current_branch)
|
||||
export alias gra = git remote add
|
||||
export alias grb = git rebase
|
||||
export alias grba = git rebase --abort
|
||||
export alias grbc = git rebase --continue
|
||||
export alias grbd = git rebase develop
|
||||
export alias grbi = git rebase --interactive
|
||||
export alias grbm = git rebase (git_main_branch)
|
||||
export alias grbo = git rebase --onto
|
||||
export alias grbs = git rebase --skip
|
||||
export alias grev = git revert
|
||||
export alias grh = git reset
|
||||
export alias grhh = git reset --hard
|
||||
export alias groh = git reset $"origin/(git_current_branch)" --hard
|
||||
export alias grm = git rm
|
||||
export alias grmc = git rm --cached
|
||||
export def grmv [remote: string, new_name: string] {
|
||||
git remote rename $remote $new_name
|
||||
}
|
||||
export def grrm [remote: string] {
|
||||
git remote remove $remote
|
||||
}
|
||||
export alias grs = git restore
|
||||
export def grset [remote: string, url: string] {
|
||||
git remote set-url $remote $url
|
||||
}
|
||||
export alias grss = git restore --source
|
||||
export alias grst = git restore --staged
|
||||
export alias grt = cd (git rev-parse --show-toplevel or echo .)
|
||||
export alias gru = git reset --
|
||||
export alias grup = git remote update
|
||||
export alias grv = git remote --verbose
|
||||
|
||||
export alias gsb = git status --short --branch
|
||||
export alias gsd = git svn dcommit
|
||||
export alias gsh = git show
|
||||
export alias gshs = git show -s
|
||||
export alias gsi = git submodule init
|
||||
export alias gsps = git show --pretty=short --show-signature
|
||||
export alias gsr = git svn rebase
|
||||
export alias gss = git status --short
|
||||
export alias gst = git status
|
||||
|
||||
export alias gsta = git stash push
|
||||
export alias gstaa = git stash apply
|
||||
export alias gstc = git stash clear
|
||||
export alias gstd = git stash drop
|
||||
export alias gstl = git stash list
|
||||
export alias gstp = git stash pop
|
||||
export alias gsts = git stash show --text
|
||||
export alias gstu = gsta --include-untracked
|
||||
export alias gstall = git stash --all
|
||||
export alias gsu = git submodule update
|
||||
export alias gsw = git switch
|
||||
export alias gswc = git switch --create
|
||||
|
||||
export alias gts = git tag --sign
|
||||
export def gtv [] {
|
||||
git tag | lines | sort
|
||||
}
|
||||
export alias glum = git pull upstream (git_main_branch)
|
||||
|
||||
export alias gunignore = git update-index --no-assume-unchanged
|
||||
export def gup [rebase_type: string@"nu-complete git pull rebase"] {
|
||||
git pull --rebase $rebase_type
|
||||
}
|
||||
export alias gupv = git pull --rebase --verbose
|
||||
export alias gupa = git pull --rebase --autostash
|
||||
export alias gupav = git pull --rebase --autostash --verbose
|
||||
|
||||
export alias gwch = git whatchanged -p --abbrev-commit --pretty=medium
|
||||
|
||||
export alias gwt = git worktree
|
||||
export def gwta [path: path, branch?: string] {
|
||||
if $branch != null {
|
||||
git worktree add $path $branch
|
||||
} else {
|
||||
git worktree add $path
|
||||
}
|
||||
}
|
||||
export alias gwtls = git worktree list
|
||||
export alias gwtmv = git worktree move
|
||||
export def gwtm [worktree: string] {
|
||||
git worktree remove $worktree
|
||||
}
|
||||
|
||||
export alias gam = git am
|
||||
export alias gamc = git am --continue
|
||||
export alias gams = git am --skip
|
||||
export alias gama = git am --abort
|
||||
export alias gamscp = git am --show-current-patch
|
||||
|
||||
985
home/modules/shell/nushell/config/completions/git.nu
Normal file
985
home/modules/shell/nushell/config/completions/git.nu
Normal file
|
|
@ -0,0 +1,985 @@
|
|||
# nu-version: 0.102.0
|
||||
|
||||
module git-completion-utils {
|
||||
export const GIT_SKIPABLE_FLAGS = ['-v', '--version', '-h', '--help', '-p', '--paginate', '-P', '--no-pager', '--no-replace-objects', '--bare']
|
||||
|
||||
# Helper function to append token if non-empty
|
||||
def append-non-empty [token: string]: list<string> -> list<string> {
|
||||
if ($token | is-empty) { $in } else { $in | append $token }
|
||||
}
|
||||
|
||||
# Split a string to list of args, taking quotes into account.
|
||||
# Code is copied and modified from https://github.com/nushell/nushell/issues/14582#issuecomment-2542596272
|
||||
export def args-split []: string -> list<string> {
|
||||
# Define our states
|
||||
const STATE_NORMAL = 0
|
||||
const STATE_IN_SINGLE_QUOTE = 1
|
||||
const STATE_IN_DOUBLE_QUOTE = 2
|
||||
const STATE_ESCAPE = 3
|
||||
const WHITESPACES = [" " "\t" "\n" "\r"]
|
||||
|
||||
# Initialize variables
|
||||
mut state = $STATE_NORMAL
|
||||
mut current_token = ""
|
||||
mut result: list<string> = []
|
||||
mut prev_state = $STATE_NORMAL
|
||||
|
||||
# Process each character
|
||||
for char in ($in | split chars) {
|
||||
if $state == $STATE_ESCAPE {
|
||||
# Handle escaped character
|
||||
$current_token = $current_token + $char
|
||||
$state = $prev_state
|
||||
} else if $char == '\' {
|
||||
# Enter escape state
|
||||
$prev_state = $state
|
||||
$state = $STATE_ESCAPE
|
||||
} else if $state == $STATE_NORMAL {
|
||||
if $char == "'" {
|
||||
$state = $STATE_IN_SINGLE_QUOTE
|
||||
} else if $char == '"' {
|
||||
$state = $STATE_IN_DOUBLE_QUOTE
|
||||
} else if ($char in $WHITESPACES) {
|
||||
# Whitespace in normal state means token boundary
|
||||
$result = $result | append-non-empty $current_token
|
||||
$current_token = ""
|
||||
} else {
|
||||
$current_token = $current_token + $char
|
||||
}
|
||||
} else if $state == $STATE_IN_SINGLE_QUOTE {
|
||||
if $char == "'" {
|
||||
$state = $STATE_NORMAL
|
||||
} else {
|
||||
$current_token = $current_token + $char
|
||||
}
|
||||
} else if $state == $STATE_IN_DOUBLE_QUOTE {
|
||||
if $char == '"' {
|
||||
$state = $STATE_NORMAL
|
||||
} else {
|
||||
$current_token = $current_token + $char
|
||||
}
|
||||
}
|
||||
}
|
||||
# Handle the last token
|
||||
$result = $result | append-non-empty $current_token
|
||||
# Return the result
|
||||
$result
|
||||
}
|
||||
|
||||
# Get changed files which can be restored by `git checkout --`
|
||||
export def get-changed-files []: nothing -> list<string> {
|
||||
^git status -uno --porcelain=2 | lines
|
||||
| where $it =~ '^1 [.MD]{2}'
|
||||
| each { split row ' ' -n 9 | last }
|
||||
}
|
||||
|
||||
# Get files which can be retrieved from a branch/commit by `git checkout <tree-ish>`
|
||||
export def get-checkoutable-files []: nothing -> list<string> {
|
||||
# Relevant statuses are .M", "MM", "MD", ".D", "UU"
|
||||
^git status -uno --porcelain=2 | lines
|
||||
| where $it =~ '^1 ([.MD]{2}|UU)'
|
||||
| each { split row ' ' -n 9 | last }
|
||||
}
|
||||
|
||||
export def get-all-git-local-refs []: nothing -> list<record<ref: string, obj: string, upstream: string, subject: string>> {
|
||||
^git for-each-ref --format '%(refname:lstrip=2)%09%(objectname:short)%09%(upstream:remotename)%(upstream:track)%09%(contents:subject)' refs/heads | lines | parse "{ref}\t{obj}\t{upstream}\t{subject}"
|
||||
}
|
||||
|
||||
export def get-all-git-remote-refs []: nothing -> list<record<ref: string, obj: string, subject: string>> {
|
||||
^git for-each-ref --format '%(refname:lstrip=2)%09%(objectname:short)%09%(contents:subject)' refs/remotes | lines | parse "{ref}\t{obj}\t{subject}"
|
||||
}
|
||||
|
||||
# Get local branches, remote branches which can be passed to `git merge`
|
||||
export def get-mergable-sources []: nothing -> list<record<value: string, description: string>> {
|
||||
let local = get-all-git-local-refs | each {|x| {value: $x.ref description: $'Branch, Local, ($x.obj) ($x.subject), (if ($x.upstream | is-not-empty) { $x.upstream } else { "no upstream" } )'} } | insert style 'light_blue'
|
||||
let remote = get-all-git-remote-refs | each {|x| {value: $x.ref description: $'Branch, Remote, ($x.obj) ($x.subject)'} } | insert style 'blue_italic'
|
||||
$local | append $remote
|
||||
}
|
||||
}
|
||||
|
||||
def "nu-complete git available upstream" [] {
|
||||
^git branch --no-color -a | lines | each { |line| $line | str replace '* ' "" | str trim }
|
||||
}
|
||||
|
||||
def "nu-complete git remotes" [] {
|
||||
^git remote | lines | each { |line| $line | str trim }
|
||||
}
|
||||
|
||||
def "nu-complete git log" [] {
|
||||
^git log --pretty=%h | lines | each { |line| $line | str trim }
|
||||
}
|
||||
|
||||
# Yield all existing commits in descending chronological order.
|
||||
def "nu-complete git commits all" [] {
|
||||
^git rev-list --all --remotes --pretty=oneline | lines | parse "{value} {description}"
|
||||
}
|
||||
|
||||
# Yield commits of current branch only. This is useful for e.g. cut points in
|
||||
# `git rebase`.
|
||||
def "nu-complete git commits current branch" [] {
|
||||
^git log --pretty="%h %s" | lines | parse "{value} {description}"
|
||||
}
|
||||
|
||||
# Yield local branches like `main`, `feature/typo_fix`
|
||||
def "nu-complete git local branches" [] {
|
||||
^git branch --no-color | lines | each { |line| $line | str replace '* ' "" | str replace '+ ' "" | str trim }
|
||||
}
|
||||
|
||||
# Yield remote branches like `origin/main`, `upstream/feature-a`
|
||||
def "nu-complete git remote branches with prefix" [] {
|
||||
^git branch --no-color -r | lines | parse -r '^\*?(\s*|\s*\S* -> )(?P<branch>\S*$)' | get branch | uniq
|
||||
}
|
||||
|
||||
# Yield local and remote branch names which can be passed to `git merge`
|
||||
def "nu-complete git mergable sources" [] {
|
||||
use git-completion-utils *
|
||||
let branches = get-mergable-sources
|
||||
{
|
||||
options: {
|
||||
case_sensitive: false,
|
||||
completion_algorithm: prefix,
|
||||
sort: false,
|
||||
},
|
||||
completions: $branches
|
||||
}
|
||||
}
|
||||
|
||||
def "nu-complete git switch" [] {
|
||||
use git-completion-utils *
|
||||
let branches = get-mergable-sources
|
||||
{
|
||||
options: {
|
||||
case_sensitive: false,
|
||||
completion_algorithm: prefix,
|
||||
sort: false,
|
||||
},
|
||||
completions: $branches
|
||||
}
|
||||
}
|
||||
|
||||
def "nu-complete git checkout" [context: string, position?:int] {
|
||||
use git-completion-utils *
|
||||
let preceding = $context | str substring ..$position
|
||||
# See what user typed before, like 'git checkout a-branch a-path'.
|
||||
# We exclude some flags from previous tokens, to detect if a branch name has been used as the first argument.
|
||||
# FIXME: This method is still naive, though.
|
||||
let prev_tokens = $preceding | str trim | args-split | where ($it not-in $GIT_SKIPABLE_FLAGS)
|
||||
# In these scenarios, we suggest only file paths, not branch:
|
||||
# - After '--'
|
||||
# - First arg is a branch
|
||||
# If before '--' is just 'git checkout' (or its alias), we suggest "dirty" files only (user is about to reset file).
|
||||
if $prev_tokens.2? == '--' {
|
||||
return (get-changed-files)
|
||||
}
|
||||
if '--' in $prev_tokens {
|
||||
return (get-checkoutable-files)
|
||||
}
|
||||
# Already typed first argument.
|
||||
if ($prev_tokens | length) > 2 and $preceding ends-with ' ' {
|
||||
return (get-checkoutable-files)
|
||||
}
|
||||
# The first argument can be local branches, remote branches, files and commits
|
||||
# Get local and remote branches
|
||||
let branches = get-mergable-sources
|
||||
let files = (get-checkoutable-files) | wrap value | insert description 'File' | insert style green
|
||||
let commits = ^git rev-list -n 400 --remotes --oneline | lines | split column -n 2 ' ' value description | upsert description {|x| $'Commit, ($x.value) ($x.description)' } | insert style 'light_cyan_dimmed'
|
||||
{
|
||||
options: {
|
||||
case_sensitive: false,
|
||||
completion_algorithm: prefix,
|
||||
sort: false,
|
||||
},
|
||||
completions: [...$branches, ...$files, ...$commits]
|
||||
}
|
||||
}
|
||||
|
||||
# Arguments to `git rebase --onto <arg1> <arg2>`
|
||||
def "nu-complete git rebase" [] {
|
||||
(nu-complete git local branches)
|
||||
| parse "{value}"
|
||||
| insert description "local branch"
|
||||
| append (nu-complete git remote branches with prefix
|
||||
| parse "{value}"
|
||||
| insert description "remote branch")
|
||||
| append (nu-complete git commits all)
|
||||
}
|
||||
|
||||
def "nu-complete git stash-list" [] {
|
||||
git stash list | lines | parse "{value}: {description}"
|
||||
}
|
||||
|
||||
def "nu-complete git tags" [] {
|
||||
^git tag --no-color | lines
|
||||
}
|
||||
|
||||
# See `man git-status` under "Short Format"
|
||||
# This is incomplete, but should cover the most common cases.
|
||||
const short_status_descriptions = {
|
||||
".D": "Deleted"
|
||||
".M": "Modified"
|
||||
"!" : "Ignored"
|
||||
"?" : "Untracked"
|
||||
"AU": "Staged, not merged"
|
||||
"MD": "Some modifications staged, file deleted in work tree"
|
||||
"MM": "Some modifications staged, some modifications untracked"
|
||||
"R.": "Renamed"
|
||||
"UU": "Both modified (in merge conflict)"
|
||||
}
|
||||
|
||||
def "nu-complete git files" [] {
|
||||
let relevant_statuses = ["?",".M", "MM", "MD", ".D", "UU"]
|
||||
^git status -uall --porcelain=2
|
||||
| lines
|
||||
| each { |$it|
|
||||
if $it starts-with "1 " {
|
||||
$it | parse --regex "1 (?P<short_status>\\S+) (?:\\S+\\s?){6} (?P<value>\\S+)"
|
||||
} else if $it starts-with "2 " {
|
||||
$it | parse --regex "2 (?P<short_status>\\S+) (?:\\S+\\s?){6} (?P<value>\\S+)"
|
||||
} else if $it starts-with "u " {
|
||||
$it | parse --regex "u (?P<short_status>\\S+) (?:\\S+\\s?){8} (?P<value>\\S+)"
|
||||
} else if $it starts-with "? " {
|
||||
$it | parse --regex "(?P<short_status>.{1}) (?P<value>.+)"
|
||||
} else {
|
||||
{ short_status: 'unknown', value: $it }
|
||||
}
|
||||
}
|
||||
| flatten
|
||||
| where $it.short_status in $relevant_statuses
|
||||
| insert "description" { |e| $short_status_descriptions | get $e.short_status}
|
||||
}
|
||||
|
||||
def "nu-complete git built-in-refs" [] {
|
||||
[HEAD FETCH_HEAD ORIG_HEAD]
|
||||
}
|
||||
|
||||
def "nu-complete git refs" [] {
|
||||
nu-complete git local branches
|
||||
| parse "{value}"
|
||||
| insert description Branch
|
||||
| append (nu-complete git tags | parse "{value}" | insert description Tag)
|
||||
| append (nu-complete git built-in-refs)
|
||||
}
|
||||
|
||||
def "nu-complete git files-or-refs" [] {
|
||||
nu-complete git local branches
|
||||
| parse "{value}"
|
||||
| insert description Branch
|
||||
| append (nu-complete git files | where description == "Modified" | select value)
|
||||
| append (nu-complete git tags | parse "{value}" | insert description Tag)
|
||||
| append (nu-complete git built-in-refs)
|
||||
}
|
||||
|
||||
def "nu-complete git subcommands" [] {
|
||||
^git help -a | lines | where $it starts-with " " | parse -r '\s*(?P<value>[^ ]+) \s*(?P<description>\w.*)'
|
||||
}
|
||||
|
||||
def "nu-complete git add" [] {
|
||||
nu-complete git files
|
||||
}
|
||||
|
||||
def "nu-complete git pull rebase" [] {
|
||||
["false","true","merges","interactive"]
|
||||
}
|
||||
|
||||
def "nu-complete git merge strategies" [] {
|
||||
['ort', 'octopus']
|
||||
}
|
||||
|
||||
def "nu-complete git merge strategy options" [] {
|
||||
['ours', 'theirs']
|
||||
}
|
||||
|
||||
|
||||
# Check out git branches and files
|
||||
export extern "git checkout" [
|
||||
...targets: string@"nu-complete git checkout" # name of the branch or files to checkout
|
||||
--conflict: string # conflict style (merge or diff3)
|
||||
--detach(-d) # detach HEAD at named commit
|
||||
--force(-f) # force checkout (throw away local modifications)
|
||||
--guess # second guess 'git checkout <no-such-branch>' (default)
|
||||
--ignore-other-worktrees # do not check if another worktree is holding the given ref
|
||||
--ignore-skip-worktree-bits # do not limit pathspecs to sparse entries only
|
||||
--merge(-m) # perform a 3-way merge with the new branch
|
||||
--orphan: string # new unparented branch
|
||||
--ours(-2) # checkout our version for unmerged files
|
||||
--overlay # use overlay mode (default)
|
||||
--overwrite-ignore # update ignored files (default)
|
||||
--patch(-p) # select hunks interactively
|
||||
--pathspec-from-file: string # read pathspec from file
|
||||
--progress # force progress reporting
|
||||
--quiet(-q) # suppress progress reporting
|
||||
--recurse-submodules # control recursive updating of submodules
|
||||
--theirs(-3) # checkout their version for unmerged files
|
||||
--track(-t) # set upstream info for new branch
|
||||
-b # create and checkout a new branch
|
||||
-B: string # create/reset and checkout a branch
|
||||
-l # create reflog for new branch
|
||||
]
|
||||
|
||||
export extern "git reset" [
|
||||
...targets: string@"nu-complete git checkout" # name of commit, branch, or files to reset to
|
||||
--hard # reset HEAD, index and working tree
|
||||
--keep # reset HEAD but keep local changes
|
||||
--merge # reset HEAD, index and working tree
|
||||
--mixed # reset HEAD and index
|
||||
--patch(-p) # select hunks interactively
|
||||
--quiet(-q) # be quiet, only report errors
|
||||
--soft # reset only HEAD
|
||||
--pathspec-from-file: string # read pathspec from file
|
||||
--pathspec-file-nul # with --pathspec-from-file, pathspec elements are separated with NUL character
|
||||
--no-refresh # skip refreshing the index after reset
|
||||
--recurse-submodules: string # control recursive updating of submodules
|
||||
--no-recurse-submodules # don't recurse into submodules
|
||||
]
|
||||
|
||||
# Download objects and refs from another repository
|
||||
export extern "git fetch" [
|
||||
repository?: string@"nu-complete git remotes" # name of the branch to fetch
|
||||
--all # Fetch all remotes
|
||||
--append(-a) # Append ref names and object names to .git/FETCH_HEAD
|
||||
--atomic # Use an atomic transaction to update local refs.
|
||||
--depth: int # Limit fetching to n commits from the tip
|
||||
--deepen: int # Limit fetching to n commits from the current shallow boundary
|
||||
--shallow-since: string # Deepen or shorten the history by date
|
||||
--shallow-exclude: string # Deepen or shorten the history by branch/tag
|
||||
--unshallow # Fetch all available history
|
||||
--update-shallow # Update .git/shallow to accept new refs
|
||||
--negotiation-tip: string # Specify which commit/glob to report while fetching
|
||||
--negotiate-only # Do not fetch, only print common ancestors
|
||||
--dry-run # Show what would be done
|
||||
--write-fetch-head # Write fetched refs in FETCH_HEAD (default)
|
||||
--no-write-fetch-head # Do not write FETCH_HEAD
|
||||
--force(-f) # Always update the local branch
|
||||
--keep(-k) # Keep downloaded pack
|
||||
--multiple # Allow several arguments to be specified
|
||||
--auto-maintenance # Run 'git maintenance run --auto' at the end (default)
|
||||
--no-auto-maintenance # Don't run 'git maintenance' at the end
|
||||
--auto-gc # Run 'git maintenance run --auto' at the end (default)
|
||||
--no-auto-gc # Don't run 'git maintenance' at the end
|
||||
--write-commit-graph # Write a commit-graph after fetching
|
||||
--no-write-commit-graph # Don't write a commit-graph after fetching
|
||||
--prefetch # Place all refs into the refs/prefetch/ namespace
|
||||
--prune(-p) # Remove obsolete remote-tracking references
|
||||
--prune-tags(-P) # Remove any local tags that do not exist on the remote
|
||||
--no-tags(-n) # Disable automatic tag following
|
||||
--refmap: string # Use this refspec to map the refs to remote-tracking branches
|
||||
--tags(-t) # Fetch all tags
|
||||
--recurse-submodules: string # Fetch new commits of populated submodules (yes/on-demand/no)
|
||||
--jobs(-j): int # Number of parallel children
|
||||
--no-recurse-submodules # Disable recursive fetching of submodules
|
||||
--set-upstream # Add upstream (tracking) reference
|
||||
--submodule-prefix: string # Prepend to paths printed in informative messages
|
||||
--upload-pack: string # Non-default path for remote command
|
||||
--quiet(-q) # Silence internally used git commands
|
||||
--verbose(-v) # Be verbose
|
||||
--progress # Report progress on stderr
|
||||
--server-option(-o): string # Pass options for the server to handle
|
||||
--show-forced-updates # Check if a branch is force-updated
|
||||
--no-show-forced-updates # Don't check if a branch is force-updated
|
||||
-4 # Use IPv4 addresses, ignore IPv6 addresses
|
||||
-6 # Use IPv6 addresses, ignore IPv4 addresses
|
||||
]
|
||||
|
||||
# Push changes
|
||||
export extern "git push" [
|
||||
remote?: string@"nu-complete git remotes", # the name of the remote
|
||||
...refs: string@"nu-complete git local branches" # the branch / refspec
|
||||
--all # push all refs
|
||||
--atomic # request atomic transaction on remote side
|
||||
--delete(-d) # delete refs
|
||||
--dry-run(-n) # dry run
|
||||
--exec: string # receive pack program
|
||||
--follow-tags # push missing but relevant tags
|
||||
--force-with-lease # require old value of ref to be at this value
|
||||
--force(-f) # force updates
|
||||
--ipv4(-4) # use IPv4 addresses only
|
||||
--ipv6(-6) # use IPv6 addresses only
|
||||
--mirror # mirror all refs
|
||||
--no-verify # bypass pre-push hook
|
||||
--porcelain # machine-readable output
|
||||
--progress # force progress reporting
|
||||
--prune # prune locally removed refs
|
||||
--push-option(-o): string # option to transmit
|
||||
--quiet(-q) # be more quiet
|
||||
--receive-pack: string # receive pack program
|
||||
--recurse-submodules: string # control recursive pushing of submodules
|
||||
--repo: string # repository
|
||||
--set-upstream(-u) # set upstream for git pull/status
|
||||
--signed: string # GPG sign the push
|
||||
--tags # push tags (can't be used with --all or --mirror)
|
||||
--thin # use thin pack
|
||||
--verbose(-v) # be more verbose
|
||||
]
|
||||
|
||||
# Pull changes
|
||||
export extern "git pull" [
|
||||
remote?: string@"nu-complete git remotes", # the name of the remote
|
||||
...refs: string@"nu-complete git local branches", # the branch / refspec
|
||||
--rebase(-r): string@"nu-complete git pull rebase", # rebase current branch on top of upstream after fetching
|
||||
--quiet(-q) # suppress output during transfer and merge
|
||||
--verbose(-v) # be more verbose
|
||||
--commit # perform the merge and commit the result
|
||||
--no-commit # perform the merge but do not commit the result
|
||||
--edit(-e) # edit the merge commit message
|
||||
--no-edit # use the auto-generated merge commit message
|
||||
--cleanup: string # specify how to clean up the merge commit message
|
||||
--ff # fast-forward if possible
|
||||
--no-ff # create a merge commit in all cases
|
||||
--gpg-sign(-S) # GPG-sign the resulting merge commit
|
||||
--no-gpg-sign # do not GPG-sign the resulting merge commit
|
||||
--log: int # include log messages from merged commits
|
||||
--no-log # do not include log messages from merged commits
|
||||
--signoff # add Signed-off-by trailer
|
||||
--no-signoff # do not add Signed-off-by trailer
|
||||
--stat(-n) # show a diffstat at the end of the merge
|
||||
--no-stat # do not show a diffstat at the end of the merge
|
||||
--squash # produce working tree and index state as if a merge happened
|
||||
--no-squash # perform the merge and commit the result
|
||||
--verify # run pre-merge and commit-msg hooks
|
||||
--no-verify # do not run pre-merge and commit-msg hooks
|
||||
--strategy(-s): string # use the given merge strategy
|
||||
--strategy-option(-X): string # pass merge strategy-specific option
|
||||
--verify-signatures # verify the tip commit of the side branch being merged
|
||||
--no-verify-signatures # do not verify the tip commit of the side branch being merged
|
||||
--summary # show a summary of the merge
|
||||
--no-summary # do not show a summary of the merge
|
||||
--autostash # create a temporary stash entry before the operation
|
||||
--no-autostash # do not create a temporary stash entry before the operation
|
||||
--allow-unrelated-histories # allow merging histories without a common ancestor
|
||||
--no-rebase # do not rebase the current branch on top of the upstream branch
|
||||
--all # fetch all remotes
|
||||
--append(-a) # append fetched refs to existing contents of FETCH_HEAD
|
||||
--atomic # use an atomic transaction to update local refs
|
||||
--depth: int # limit fetching to the specified number of commits
|
||||
--deepen: int # deepen the history by the specified number of commits
|
||||
--shallow-since: string # deepen or shorten the history since a specified date
|
||||
--shallow-exclude: string # exclude commits reachable from a specified branch or tag
|
||||
--unshallow # convert a shallow repository to a complete one
|
||||
--update-shallow # update .git/shallow with new refs
|
||||
--tags(-t) # fetch all tags from the remote
|
||||
--jobs(-j): int # number of parallel children for fetching
|
||||
--set-upstream # add upstream (tracking) reference
|
||||
--upload-pack: string # specify non-default path for upload-pack on the remote
|
||||
--progress # force progress status even if stderr is not a terminal
|
||||
--server-option(-o): string # transmit the given string to the server
|
||||
]
|
||||
|
||||
# Switch between branches and commits
|
||||
export extern "git switch" [
|
||||
switch?: string@"nu-complete git switch" # name of branch to switch to
|
||||
--create(-c) # create a new branch
|
||||
--detach(-d): string@"nu-complete git log" # switch to a commit in a detached state
|
||||
--force-create(-C): string # forces creation of new branch, if it exists then the existing branch will be reset to starting point
|
||||
--force(-f) # alias for --discard-changes
|
||||
--guess # if there is no local branch which matches then name but there is a remote one then this is checked out
|
||||
--ignore-other-worktrees # switch even if the ref is held by another worktree
|
||||
--merge(-m) # attempts to merge changes when switching branches if there are local changes
|
||||
--no-guess # do not attempt to match remote branch names
|
||||
--no-progress # do not report progress
|
||||
--no-recurse-submodules # do not update the contents of sub-modules
|
||||
--no-track # do not set "upstream" configuration
|
||||
--orphan: string # create a new orphaned branch
|
||||
--progress # report progress status
|
||||
--quiet(-q) # suppress feedback messages
|
||||
--recurse-submodules # update the contents of sub-modules
|
||||
--track(-t) # set "upstream" configuration
|
||||
]
|
||||
|
||||
# Apply the change introduced by an existing commit
|
||||
export extern "git cherry-pick" [
|
||||
commit?: string@"nu-complete git commits all" # The commit ID to be cherry-picked
|
||||
--edit(-e) # Edit the commit message prior to committing
|
||||
--no-commit(-n) # Apply changes without making any commit
|
||||
--signoff(-s) # Add Signed-off-by line to the commit message
|
||||
--ff # Fast-forward if possible
|
||||
--continue # Continue the operation in progress
|
||||
--abort # Cancel the operation
|
||||
--skip # Skip the current commit and continue with the rest of the sequence
|
||||
]
|
||||
|
||||
# Rebase the current branch
|
||||
export extern "git rebase" [
|
||||
branch?: string@"nu-complete git rebase" # name of the branch to rebase onto
|
||||
upstream?: string@"nu-complete git rebase" # upstream branch to compare against
|
||||
--continue # restart rebasing process after editing/resolving a conflict
|
||||
--abort # abort rebase and reset HEAD to original branch
|
||||
--quit # abort rebase but do not reset HEAD
|
||||
--interactive(-i) # rebase interactively with list of commits in editor
|
||||
--onto?: string@"nu-complete git rebase" # starting point at which to create the new commits
|
||||
--root # start rebase from root commit
|
||||
]
|
||||
|
||||
# Merge from a branch
|
||||
export extern "git merge" [
|
||||
# For now, to make it simple, we only complete branches (not commits) and support single-parent case.
|
||||
branch?: string@"nu-complete git mergable sources" # The source branch
|
||||
--edit(-e) # Edit the commit message prior to committing
|
||||
--no-edit # Do not edit commit message
|
||||
--no-commit(-n) # Apply changes without making any commit
|
||||
--signoff # Add Signed-off-by line to the commit message
|
||||
--ff # Fast-forward if possible
|
||||
--continue # Continue after resolving a conflict
|
||||
--abort # Abort resolving conflict and go back to original state
|
||||
--quit # Forget about the current merge in progress
|
||||
--strategy(-s): string@"nu-complete git merge strategies" # Merge strategy
|
||||
-X: string@"nu-complete git merge strategy options" # Option for merge strategy
|
||||
--verbose(-v)
|
||||
--help
|
||||
]
|
||||
|
||||
# List or change branches
|
||||
export extern "git branch" [
|
||||
branch?: string@"nu-complete git local branches" # name of branch to operate on
|
||||
--abbrev # use short commit hash prefixes
|
||||
--edit-description # open editor to edit branch description
|
||||
--merged # list reachable branches
|
||||
--no-merged # list unreachable branches
|
||||
--set-upstream-to: string@"nu-complete git available upstream" # set upstream for branch
|
||||
--unset-upstream # remote upstream for branch
|
||||
--all # list both remote and local branches
|
||||
--copy # copy branch together with config and reflog
|
||||
--format # specify format for listing branches
|
||||
--move # rename branch
|
||||
--points-at # list branches that point at an object
|
||||
--show-current # print the name of the current branch
|
||||
--verbose # show commit and upstream for each branch
|
||||
--color # use color in output
|
||||
--quiet # suppress messages except errors
|
||||
--delete(-d) # delete branch
|
||||
--list # list branches
|
||||
--contains: string@"nu-complete git commits all" # show only branches that contain the specified commit
|
||||
--no-contains # show only branches that don't contain specified commit
|
||||
--track(-t) # when creating a branch, set upstream
|
||||
]
|
||||
|
||||
# List all variables set in config file, along with their values.
|
||||
export extern "git config list" [
|
||||
]
|
||||
|
||||
# Emits the value of the specified key.
|
||||
export extern "git config get" [
|
||||
]
|
||||
|
||||
# Set value for one or more config options.
|
||||
export extern "git config set" [
|
||||
]
|
||||
|
||||
# Unset value for one or more config options.
|
||||
export extern "git config unset" [
|
||||
]
|
||||
|
||||
# Rename the given section to a new name.
|
||||
export extern "git config rename-section" [
|
||||
]
|
||||
|
||||
# Remove the given section from the configuration file.
|
||||
export extern "git config remove-section" [
|
||||
]
|
||||
|
||||
# Opens an editor to modify the specified config file
|
||||
export extern "git config edit" [
|
||||
]
|
||||
|
||||
# List or change tracked repositories
|
||||
export extern "git remote" [
|
||||
--verbose(-v) # Show URL for remotes
|
||||
]
|
||||
|
||||
# Add a new tracked repository
|
||||
export extern "git remote add" [
|
||||
]
|
||||
|
||||
# Rename a tracked repository
|
||||
export extern "git remote rename" [
|
||||
remote: string@"nu-complete git remotes" # remote to rename
|
||||
new_name: string # new name for remote
|
||||
]
|
||||
|
||||
# Remove a tracked repository
|
||||
export extern "git remote remove" [
|
||||
remote: string@"nu-complete git remotes" # remote to remove
|
||||
]
|
||||
|
||||
# Get the URL for a tracked repository
|
||||
export extern "git remote get-url" [
|
||||
remote: string@"nu-complete git remotes" # remote to get URL for
|
||||
]
|
||||
|
||||
# Set the URL for a tracked repository
|
||||
export extern "git remote set-url" [
|
||||
remote: string@"nu-complete git remotes" # remote to set URL for
|
||||
url: string # new URL for remote
|
||||
]
|
||||
|
||||
# Show changes between commits, working tree etc
|
||||
export extern "git diff" [
|
||||
rev1_or_file?: string@"nu-complete git files-or-refs"
|
||||
rev2?: string@"nu-complete git refs"
|
||||
--cached # show staged changes
|
||||
--name-only # only show names of changed files
|
||||
--name-status # show changed files and kind of change
|
||||
--no-color # disable color output
|
||||
]
|
||||
|
||||
# Commit changes
|
||||
export extern "git commit" [
|
||||
--all(-a) # automatically stage all modified and deleted files
|
||||
--amend # amend the previous commit rather than adding a new one
|
||||
--message(-m): string # specify the commit message rather than opening an editor
|
||||
--reuse-message(-C): string # reuse the message from a previous commit
|
||||
--reedit-message(-c): string # reuse and edit message from a commit
|
||||
--fixup: string # create a fixup/amend commit
|
||||
--squash: string # squash commit for autosquash rebase
|
||||
--reset-author # reset author information
|
||||
--short # short-format output for dry-run
|
||||
--branch # show branch info in short-format
|
||||
--porcelain # porcelain-ready format for dry-run
|
||||
--long # long-format output for dry-run
|
||||
--null(-z) # use NUL instead of LF in output
|
||||
--file(-F): string # read commit message from file
|
||||
--author: string # override commit author
|
||||
--date: string # override author date
|
||||
--template(-t): string # use commit message template file
|
||||
--signoff(-s) # add Signed-off-by trailer
|
||||
--no-signoff # do not add Signed-off-by trailer
|
||||
--trailer: string # add trailer to commit message
|
||||
--no-verify(-n) # bypass pre-commit and commit-msg hooks
|
||||
--verify # do not bypass pre-commit and commit-msg hooks
|
||||
--allow-empty # allow commit with no changes
|
||||
--allow-empty-message # allow commit with empty message
|
||||
--cleanup: string # cleanup commit message
|
||||
--edit(-e) # edit commit message
|
||||
--no-edit # do not edit commit message
|
||||
--include(-i) # include given paths in commit
|
||||
--only(-o) # commit only specified paths
|
||||
--pathspec-from-file: string # read pathspec from file
|
||||
--pathspec-file-nul # use NUL character for pathspec file
|
||||
--untracked-files(-u): string # show untracked files
|
||||
--verbose(-v) # show diff in commit message template
|
||||
--quiet(-q) # suppress commit summary
|
||||
--dry-run # show paths to be committed without committing
|
||||
--status # include git-status output in commit message
|
||||
--no-status # do not include git-status output
|
||||
--gpg-sign(-S) # GPG-sign commit
|
||||
--no-gpg-sign # do not GPG-sign commit
|
||||
...pathspec: string # commit files matching pathspec
|
||||
]
|
||||
|
||||
# List commits
|
||||
export extern "git log" [
|
||||
# Ideally we'd allow completion of revisions here, but that would make completion of filenames not work.
|
||||
-U # show diffs
|
||||
--follow # show history beyond renames (single file only)
|
||||
--grep: string # show log entries matching supplied regular expression
|
||||
]
|
||||
|
||||
# Show or change the reflog
|
||||
export extern "git reflog" [
|
||||
]
|
||||
|
||||
# Stage files
|
||||
export extern "git add" [
|
||||
...file: string@"nu-complete git add" # file to add
|
||||
--all(-A) # add all files
|
||||
--dry-run(-n) # don't actually add the file(s), just show if they exist and/or will be ignored
|
||||
--edit(-e) # open the diff vs. the index in an editor and let the user edit it
|
||||
--force(-f) # allow adding otherwise ignored files
|
||||
--interactive(-i) # add modified contents in the working tree interactively to the index
|
||||
--patch(-p) # interactively choose hunks to stage
|
||||
--verbose(-v) # be verbose
|
||||
]
|
||||
|
||||
# Delete file from the working tree and the index
|
||||
export extern "git rm" [
|
||||
-r # recursive
|
||||
--force(-f) # override the up-to-date check
|
||||
--dry-run(-n) # Don't actually remove any file(s)
|
||||
--cached # unstage and remove paths only from the index
|
||||
]
|
||||
|
||||
# Show the working tree status
|
||||
export extern "git status" [
|
||||
--verbose(-v) # be verbose
|
||||
--short(-s) # show status concisely
|
||||
--branch(-b) # show branch information
|
||||
--show-stash # show stash information
|
||||
]
|
||||
|
||||
# Stash changes for later
|
||||
export extern "git stash push" [
|
||||
--patch(-p) # interactively choose hunks to stash
|
||||
]
|
||||
|
||||
# Unstash previously stashed changes
|
||||
export extern "git stash pop" [
|
||||
stash?: string@"nu-complete git stash-list" # stash to pop
|
||||
--index(-i) # try to reinstate not only the working tree's changes, but also the index's ones
|
||||
]
|
||||
|
||||
# List stashed changes
|
||||
export extern "git stash list" [
|
||||
]
|
||||
|
||||
# Show a stashed change
|
||||
export extern "git stash show" [
|
||||
stash?: string@"nu-complete git stash-list"
|
||||
-U # show diff
|
||||
]
|
||||
|
||||
# Drop a stashed change
|
||||
export extern "git stash drop" [
|
||||
stash?: string@"nu-complete git stash-list"
|
||||
]
|
||||
|
||||
# Create a new git repository
|
||||
export extern "git init" [
|
||||
--initial-branch(-b): string # initial branch name
|
||||
]
|
||||
|
||||
# List or manipulate tags
|
||||
export extern "git tag" [
|
||||
--delete(-d): string@"nu-complete git tags" # delete a tag
|
||||
]
|
||||
|
||||
# Prune all unreachable objects
|
||||
export extern "git prune" [
|
||||
--dry-run(-n) # dry run
|
||||
--expire: string # expire objects older than
|
||||
--progress # show progress
|
||||
--verbose(-v) # report all removed objects
|
||||
]
|
||||
|
||||
# Start a binary search to find the commit that introduced a bug
|
||||
export extern "git bisect start" [
|
||||
bad?: string # a commit that has the bug
|
||||
good?: string # a commit that doesn't have the bug
|
||||
]
|
||||
|
||||
# Mark the current (or specified) revision as bad
|
||||
export extern "git bisect bad" [
|
||||
]
|
||||
|
||||
# Mark the current (or specified) revision as good
|
||||
export extern "git bisect good" [
|
||||
]
|
||||
|
||||
# Skip the current (or specified) revision
|
||||
export extern "git bisect skip" [
|
||||
]
|
||||
|
||||
# End bisection
|
||||
export extern "git bisect reset" [
|
||||
]
|
||||
|
||||
# Show help for a git subcommand
|
||||
export extern "git help" [
|
||||
command?: string@"nu-complete git subcommands" # subcommand to show help for
|
||||
]
|
||||
|
||||
# git worktree
|
||||
export extern "git worktree" [
|
||||
--help(-h) # display the help message for this command
|
||||
...args
|
||||
]
|
||||
|
||||
# create a new working tree
|
||||
export extern "git worktree add" [
|
||||
path: path # directory to clone the branch
|
||||
branch: string@"nu-complete git available upstream" # Branch to clone
|
||||
--help(-h) # display the help message for this command
|
||||
--force(-f) # checkout <branch> even if already checked out in other worktree
|
||||
-b # create a new branch
|
||||
-B # create or reset a branch
|
||||
--detach(-d) # detach HEAD at named commit
|
||||
--checkout # populate the new working tree
|
||||
--lock # keep the new working tree locked
|
||||
--reason # reason for locking
|
||||
--quiet(-q) # suppress progress reporting
|
||||
--track # set up tracking mode (see git-branch(1))
|
||||
--guess-remote # try to match the new branch name with a remote-tracking branch
|
||||
...args
|
||||
]
|
||||
|
||||
# list details of each worktree
|
||||
export extern "git worktree list" [
|
||||
--help(-h) # display the help message for this command
|
||||
--porcelain # machine-readable output
|
||||
--verbose(-v) # show extended annotations and reasons, if available
|
||||
--expire # add 'prunable' annotation to worktrees older than <time>
|
||||
-z # terminate records with a NUL character
|
||||
...args
|
||||
]
|
||||
|
||||
def "nu-complete worktree list" [] {
|
||||
^git worktree list | to text | parse --regex '(?P<value>\S+)\s+(?P<commit>\w+)\s+(?P<description>\S.*)'
|
||||
}
|
||||
|
||||
# prevent a working tree from being pruned
|
||||
export extern "git worktree lock" [
|
||||
worktree: string@"nu-complete worktree list"
|
||||
--reason: string # reason because the tree is locked
|
||||
--help(-h) # display the help message for this command
|
||||
--reason # reason for locking
|
||||
...args
|
||||
]
|
||||
|
||||
# move a working tree to a new location
|
||||
export extern "git worktree move" [
|
||||
--help(-h) # display the help message for this command
|
||||
--force(-f) # force move even if worktree is dirty or locked
|
||||
...args
|
||||
]
|
||||
|
||||
# prune working tree information
|
||||
export extern "git worktree prune" [
|
||||
--help(-h) # display the help message for this command
|
||||
--dry-run(-n) # do not remove, show only
|
||||
--verbose(-v) # report pruned working trees
|
||||
--expire # expire working trees older than <time>
|
||||
...args
|
||||
]
|
||||
|
||||
# remove a working tree
|
||||
export extern "git worktree remove" [
|
||||
worktree: string@"nu-complete worktree list"
|
||||
--help(-h) # display the help message for this command
|
||||
--force(-f) # force removal even if worktree is dirty or locked
|
||||
]
|
||||
|
||||
# allow working tree to be pruned, moved or deleted
|
||||
export extern "git worktree unlock" [
|
||||
worktree: string@"nu-complete worktree list"
|
||||
...args
|
||||
]
|
||||
|
||||
# clones a repo
|
||||
export extern "git clone" [
|
||||
--help(-h) # display the help message for this command
|
||||
--local(-l) # cloning from the local machine
|
||||
--no-local # use the git transport mechanism even if cloning from a local path
|
||||
--no-hardlinks # force git to copy files when cloning from the local machine
|
||||
--shared(-s) # setup .git/objects/info/alternates to share objects with the source local repo
|
||||
--reference: string # setup .git/objects/info/alternates to share objects with the =<reference> local repo
|
||||
--reference-if-able: string # same as --reference, but skips empty folders
|
||||
--dissociate # borrow objects from the referenced repo (--reference)
|
||||
--quiet(-q) # suppress progress reporting
|
||||
--verbose(-v) # be verbose
|
||||
--progress # report progress unless --quiet
|
||||
--server-option: string # transmit the =<option> to the server
|
||||
--no-checkout(-n) # no checkout of HEAD
|
||||
--reject-shallow # reject shallow repository as source
|
||||
--no-reject-shallow # do not reject shallow repository as source
|
||||
--bare # make a bare git repo
|
||||
--sparse # initialize the sparse-checkout file
|
||||
--filter: string # partial clone using the given =<filter-spec>
|
||||
--mirror # mirror the source repo
|
||||
--origin(-o): string # use <name> as the name for the remote origin
|
||||
--branch(-b): string # point HEAD to <name> branch
|
||||
--upload-pack(-u): string # use <upload-pack> as the path in the other end when using ssh
|
||||
--template: string # use <template-dir> as the templates directory
|
||||
--config(-c): string # set a <key>=<value> config variable
|
||||
--depth: int # shallow clone <depth> commits
|
||||
--shallow-since: string # shallow clone commits newer than =<date>
|
||||
--shallow-exclude: string # do not clone commits reachable from <revision> (branch or tag)
|
||||
--single-branch # clone commit history from a single branch
|
||||
--no-single-Branch # do not clone only one branch
|
||||
--no-tags # do not clone any tags
|
||||
--recurse-submodules # clone the submodules. Also accepts paths
|
||||
--shallow-submodules # shallow clone submodules with depth 1
|
||||
--no-shallow-submodules # do not shallow clone submodules
|
||||
--remote-submodules # submodules are updating using their remote tracking branch
|
||||
--no-remote-submodules # do not track submodules remote
|
||||
--separate-git-dir: string # place the clone at =<git dir> and link it here
|
||||
--jobs(-j): int # number of simultaneous submodules fetch
|
||||
...args
|
||||
]
|
||||
|
||||
# Restores files in working tree or index to previous versions
|
||||
export extern "git restore" [
|
||||
--help(-h) # Display the help message for this command
|
||||
--source(-s) # Restore the working tree files with the content from the given tree
|
||||
--patch(-p) # Interactively choose hunks to restore
|
||||
--worktree(-W) # Restore working tree (default if neither --worktree or --staged is used)
|
||||
--staged(-S) # Restore index
|
||||
--quiet(-q) # Quiet, suppress feedback messages
|
||||
--progress # Force progress reporting
|
||||
--no-progress # Suppress progress reporting
|
||||
--ours # Restore from index using our version for unmerged files
|
||||
--theirs # Restore from index using their version for unmerged files
|
||||
--merge(-m) # Restore from index and recreate the conflicted merge in unmerged files
|
||||
--conflict: string # Like --merge but changes the conflict presentation with =<style>
|
||||
--ignore-unmerged # Restore from index and ignore unmerged entries (unmerged files are left as is)
|
||||
--ignore-skip-worktree-bits # Ignore sparse checkout patterns and unconditionally restores any files in <pathspec>
|
||||
--recurse-submodules # Restore the contents of sub-modules in working tree
|
||||
--no-recurse-submodules # Do not restore the contents of sub-modules in working tree (default)
|
||||
--overlay # Do not remove files that don't exist when restoring from tree with --source
|
||||
--no-overlay # Remove files that don't exist when restoring from tree with --source (default)
|
||||
--pathspec-from-file: string # Read pathspec from file
|
||||
--pathspec-file-nul # Separate pathspec elements with NUL character when reading from file
|
||||
...pathspecs: string@"nu-complete git files" # Target pathspecs to restore
|
||||
]
|
||||
|
||||
# Print lines matching a pattern
|
||||
export extern "git grep" [
|
||||
--help(-h) # Display the help message for this command
|
||||
--cached # Search blobs registered in the index file instead of worktree
|
||||
--untracked # Include untracked files in search
|
||||
--no-index # Similar to `grep -r`, but with additional benefits, such as using pathspec patterns to limit paths; Cannot be used together with --cached or --untracked
|
||||
--no-exclude-standard # Include ignored files in search (only useful with --untracked)
|
||||
--exclude-standard # No not include ignored files in search (only useful with --no-index)
|
||||
--recurse-submodules # Recursively search in each submodule that is active and checked out
|
||||
--text(-a) # Process binary files as if they were text
|
||||
--textconv # Honor textconv filter settings
|
||||
--no-textconv # Do not honor textconv filter settings (default)
|
||||
--ignore-case(-i) # Ignore case differences between patterns and files
|
||||
-I # Don’t match the pattern in binary files
|
||||
--max-depth: int # Max <depth> to descend down directories for each pathspec. A value of -1 means no limit.
|
||||
--recursive(-r) # Same as --max-depth=-1
|
||||
--no-recursive # Same as --max-depth=0
|
||||
--word-regexp(-w) # Match the pattern only at word boundary
|
||||
--invert-match(-v) # Select non-matching lines
|
||||
-H # Suppress filename in output of matched lines
|
||||
--full-name # Force relative path to filename from top directory
|
||||
--extended-regexp(-E) # Use POSIX extended regexp for patterns
|
||||
--basic-regexp(-G) # Use POSIX basic regexp for patterns (default)
|
||||
--perl-regexp(-P) # Use Perl-compatible regular expressions for patterns
|
||||
--line-number(-n) # Prefix the line number to matching lines
|
||||
--column # Prefix the 1-indexed byte-offset of the first match from the start of the matching line
|
||||
--files-with-matches(-l) # Print filenames of files that contains matches
|
||||
--name-only # Same as --files-with-matches
|
||||
--files-without-match(-L) # Print filenames of files that do not contain matches
|
||||
--null(-z) # Use \0 as the delimiter for pathnames in the output, and print them verbatim
|
||||
--only-matching(-o) # Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line
|
||||
--count(-c) # Instead of showing every matched line, show the number of lines that match
|
||||
--no-color # Same as --color=never
|
||||
--break # Print an empty line between matches from different files.
|
||||
--heading # Show the filename above the matches in that file instead of at the start of each shown line.
|
||||
--show-function(-p) # Show the preceding line that contains the function name of the match, unless the matching line is a function name itself.
|
||||
--context(-C): int # Show <num> leading and trailing lines, and place a line containing -- between contiguous groups of matches.
|
||||
--after-context(-A): int # Show <num> trailing lines, and place a line containing -- between contiguous groups of matches.
|
||||
--before-context(-B): int # Show <num> leading lines, and place a line containing -- between contiguous groups of matches.
|
||||
--function-context(-W) # Show the surrounding text from the previous line containing a function name up to the one before the next function name
|
||||
--max-count(-m): int # Limit the amount of matches per file. When using the -v or --invert-match option, the search stops after the specified number of non-matches.
|
||||
--threads: int # Number of grep worker threads to use. Use --help for more information on grep threads.
|
||||
-f: string # Read patterns from <file>, one per line.
|
||||
-e: string # Next parameter is the pattern. Multiple patterns are combined by --or.
|
||||
--and # Search for lines that match multiple patterns.
|
||||
--or # Search for lines that match at least one of multiple patterns. --or is implied between patterns without --and or --not.
|
||||
--not # Search for lines that does not match pattern.
|
||||
--all-match # When giving multiple pattern expressions combined with --or, this flag is specified to limit the match to files that have lines to match all of them.
|
||||
--quiet(-q) # Do not output matched lines; instead, exit with status 0 when there is a match and with non-zero status when there isn’t.
|
||||
...pathspecs: string # Target pathspecs to limit the scope of the search.
|
||||
]
|
||||
|
||||
export extern "git" [
|
||||
command?: string@"nu-complete git subcommands" # Subcommands
|
||||
--version(-v) # Prints the Git suite version that the git program came from
|
||||
--help(-h) # Prints the synopsis and a list of the most commonly used commands
|
||||
--html-path # Print the path, without trailing slash, where Git’s HTML documentation is installed and exit
|
||||
--man-path # Print the manpath (see man(1)) for the man pages for this version of Git and exit
|
||||
--info-path # Print the path where the Info files documenting this version of Git are installed and exit
|
||||
--paginate(-p) # Pipe all output into less (or if set, $env.PAGER) if standard output is a terminal
|
||||
--no-pager(-P) # Do not pipe Git output into a pager
|
||||
--no-replace-objects # Do not use replacement refs to replace Git objects
|
||||
--bare # Treat the repository as a bare repository
|
||||
]
|
||||
64
home/modules/shell/nushell/config/completions/make.nu
Normal file
64
home/modules/shell/nushell/config/completions/make.nu
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
def "nu-complete make" [] {
|
||||
ls
|
||||
| find --ignore-case makefile
|
||||
| open $in.0.name
|
||||
| lines
|
||||
| find --regex '^[\w\.-]+\s*:'
|
||||
| where ($it | str starts-with '.') == false
|
||||
| split column ':' target
|
||||
| get target
|
||||
| str trim
|
||||
}
|
||||
|
||||
def "nu-complete make jobs" [] {
|
||||
seq 1 (sys cpu | length)
|
||||
}
|
||||
|
||||
def "nu-complete make files" [] {
|
||||
ls **/* | where type == file | get name
|
||||
}
|
||||
|
||||
def "nu-complete make dirs" [] {
|
||||
ls **/* | where type == dir | get name
|
||||
}
|
||||
|
||||
export extern "make" [
|
||||
command?: string@"nu-complete make"
|
||||
--always-make(-B) # Unconditionally make all targets.
|
||||
--directory(-C): string@"nu-complete make dirs" # Change to DIRECTORY before doing anything.
|
||||
--debug(-d) # Print various types of debugging information.
|
||||
--environment-overrides(-e) # Environment variables override makefiles.
|
||||
--eval(-E): string # Evaluate STRING as a makefile statement.
|
||||
--file(-f) # Read FILE as a makefile.
|
||||
--help(-h) # Print this message and exit.
|
||||
--ignore-errors(-i) # Ignore errors from recipes.
|
||||
--include-dir(-I): string@"nu-complete make dirs" # Search DIRECTORY for included makefiles.
|
||||
--jobs(-j): int@"nu-complete make jobs" # Allow N jobs at once; infinite jobs with no arg.
|
||||
--keep-going(-k) # Keep going when some targets can't be made.
|
||||
--load-average(-l): int@"nu-complete make jobs" # Don't start multiple jobs unless load is below N.
|
||||
--check-symlink-times(-L) # Use the latest mtime between symlinks and target.
|
||||
--just-print(-n) # Don't actually run any recipe; just print them.
|
||||
--dry-run
|
||||
--recon
|
||||
--assume-old: string@"nu-complete make files" # Consider FILE to be very old and don't remake it.
|
||||
--old-file(-o): string@"nu-complete make files"
|
||||
--output-sync(-O) # Synchronize output of parallel jobs by TYPE.
|
||||
--print-data-base(-p) # Print make's internal database.
|
||||
--question(-q) # Run no recipe; exit status says if up to date.
|
||||
--no-builtin-rules(-r) # Disable the built-in implicit rules.
|
||||
--no-builtin-variables(-R) # Disable the built-in variable settings.
|
||||
--silent(-s) # Don't echo recipes.
|
||||
--quiet
|
||||
--no-silent # Echo recipes (disable --silent mode).
|
||||
--stop(-S) # Turns off -k.
|
||||
--no-keep-going
|
||||
--touch(-t) # Touch targets instead of remaking them.
|
||||
--trace # Print tracing information.
|
||||
--version(-v) # Print the version number of make and exit.
|
||||
--print-directory(-w) # Print the current directory.
|
||||
--no-print-directory # Turn off -w, even if it was turned on implicitly.
|
||||
--what-if(-W): string@"nu-complete make files" # Consider FILE to be infinitely new.
|
||||
--new-file: string@"nu-complete make files"
|
||||
--assume-new: string@"nu-complete make files"
|
||||
--warn-undefined-variables # Warn when an undefined variable is referenced.
|
||||
]
|
||||
48
home/modules/shell/nushell/config/hooks/did_you_mean.nu
Normal file
48
home/modules/shell/nushell/config/hooks/did_you_mean.nu
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# example:
|
||||
# ```nu
|
||||
# > got
|
||||
# Error: nu::shell::external_command
|
||||
#
|
||||
# × External command failed
|
||||
# ╭─[entry #1:1:1]
|
||||
# 1 │ got
|
||||
# · ─┬─
|
||||
# · ╰── did you mean 'get'?
|
||||
# ╰────
|
||||
# help: No such file or directory (os error 2)
|
||||
#
|
||||
# did you mean?
|
||||
# dot
|
||||
# git
|
||||
# go
|
||||
# ```
|
||||
{|cmd|
|
||||
let commands_in_path = (
|
||||
$env.PATH | each {|directory|
|
||||
if ($directory | path exists) {
|
||||
ls $directory | get name | path parse | update parent "" | path join
|
||||
}
|
||||
}
|
||||
| flatten
|
||||
| wrap cmd
|
||||
)
|
||||
|
||||
let closest_commands = (
|
||||
$commands_in_path
|
||||
| insert distance {|it|
|
||||
$it.cmd | str distance $cmd
|
||||
}
|
||||
| uniq
|
||||
| sort-by distance
|
||||
| get cmd
|
||||
| first 3
|
||||
)
|
||||
|
||||
let pretty_commands = (
|
||||
$closest_commands | each {|cmd|
|
||||
$" (ansi {fg: "default" attr: "di"})($cmd)(ansi reset)"
|
||||
}
|
||||
)
|
||||
|
||||
$"\ndid you mean?\n($pretty_commands | str join "\n")"
|
||||
}
|
||||
120
home/modules/shell/nushell/config/scripts/nufetch.nu
Normal file
120
home/modules/shell/nushell/config/scripts/nufetch.nu
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
let pri = ansi --escape '38;2;82;119;195m'
|
||||
let sec = ansi --escape '38;2;127;183;255m'
|
||||
let pri_bg = ansi --escape '48;2;82;119;195m'
|
||||
let sec_bg = ansi --escape '48;2;127;183;255m'
|
||||
let reset = ansi reset
|
||||
|
||||
let arts = [
|
||||
{
|
||||
name: "NixOS",
|
||||
art: $"
|
||||
██ ███ ██
|
||||
███ ██████
|
||||
███ ██████
|
||||
████████████████
|
||||
█████████████████ ██
|
||||
███ ██████
|
||||
███ █████
|
||||
█████████ ████████
|
||||
████████ █████████
|
||||
█████ ███
|
||||
██████ ███
|
||||
██ █████████████████
|
||||
████████████████
|
||||
██████ ███
|
||||
██████ ███
|
||||
██ ███ ██
|
||||
"
|
||||
}
|
||||
]
|
||||
|
||||
def get_art [--fake: string] {
|
||||
if ($fake | is-not-empty) {
|
||||
return ($arts | where name == $fake | first | get art)
|
||||
}
|
||||
|
||||
let host = sys host
|
||||
let target = $arts | where name == $host.name | first
|
||||
if ($target | is-empty) {
|
||||
return ""
|
||||
} else {
|
||||
let ar = $target | get art
|
||||
return ($ar | ansi gradient --fgstart '0x47CBFF' --fgend '0x4797FF')
|
||||
}
|
||||
}
|
||||
|
||||
def get_pc_model [] {
|
||||
if ($nu.os-info.name == "windows") {
|
||||
let info = wmic computersystem get model /format:csv | from csv | first
|
||||
return $info.Model
|
||||
} else if ($nu.os-info.name == "linux") {
|
||||
return (cat /sys/class/dmi/id/product_name)
|
||||
}
|
||||
}
|
||||
|
||||
def get_shell [] {
|
||||
$env.SHELL | path split | last
|
||||
}
|
||||
|
||||
def get_local_ip [] {
|
||||
ip -j route | from json | default gateway ""| default metric "" | first | get prefsrc
|
||||
}
|
||||
|
||||
def calculate_packages [] {
|
||||
# TODO
|
||||
let nix_packages = ls /run/current-system/sw/bin | length
|
||||
return {
|
||||
nix: $nix_packages,
|
||||
}
|
||||
}
|
||||
|
||||
def print_dots [] {
|
||||
let colors = {
|
||||
blue: "34m",
|
||||
cyan: "36m",
|
||||
green: "32m",
|
||||
yellow: "33m",
|
||||
red: "31m",
|
||||
magenta: "35m",
|
||||
}
|
||||
let dots = $colors | values | each {|k| $'(ansi --escape $k) '}
|
||||
|
||||
return $"($dots | str join ' ') (ansi --escape '0m')"
|
||||
}
|
||||
|
||||
def get_gpus [] {
|
||||
lspci | where description =~ "VGA" | each {|x| $'($x.description)'}
|
||||
}
|
||||
|
||||
def nufetch [ --fake: string -l ] {
|
||||
if ($l) {
|
||||
return $arts
|
||||
}
|
||||
|
||||
let art = get_art --fake $fake
|
||||
|
||||
let hostinfo = sys host
|
||||
let pkgs = calculate_packages | transpose name count | each {|x| $"($x.name) - ($x.count)"} | str join ", "
|
||||
let cpus = sys cpu | get brand | uniq
|
||||
let disks = sys disks | each {$"(ansi yellow)Диск \(($in.mount)\)(ansi white): ($in.total) / ($in.free) \(((((($in.total - $in.free) / $in.total) * 100) | math floor))%\)"}
|
||||
|
||||
let information = [
|
||||
$"(ansi blue)(whoami)(ansi white)@(ansi blue)($hostinfo.hostname)(ansi white)",
|
||||
"-------------------------------------",
|
||||
$"(ansi yellow)ОC(ansi white): ($hostinfo.long_os_version) ($hostinfo.kernel_version)",
|
||||
$"(ansi yellow)Модель(ansi white): (get_pc_model)",
|
||||
$"(ansi yellow)Ядро(ansi white): ($hostinfo.long_os_version)",
|
||||
$"(ansi yellow)Время(ansi white): ($hostinfo.uptime)",
|
||||
$"(ansi yellow)Oболочка(ansi white): (get_shell)",
|
||||
$"(ansi yellow)Пакеты(ansi white): ($pkgs)",
|
||||
$"(ansi yellow)Процессоры(ansi white): ($cpus | str join ', ')",
|
||||
$"(ansi yellow)Память(ansi white): ((sys mem | $'($in.total) / (ansi red)($in.used)(ansi white) / (ansi green)($in.free)(ansi white)'))",
|
||||
...$disks,
|
||||
$"(ansi yellow)Локальный IP(ansi white): (get_local_ip)",
|
||||
$"(ansi yellow)Цвета(ansi white): (print_dots)",
|
||||
]
|
||||
|
||||
|
||||
print ([[Арт, Информация]; [$art ($information | str join "\n")]] | table -i false)
|
||||
}
|
||||
|
||||
133
home/modules/shell/nushell/config/themes/tokyo-night.nu
Normal file
133
home/modules/shell/nushell/config/themes/tokyo-night.nu
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
# TokyoNight Storm for Nushell
|
||||
|
||||
# Retrieve the theme settings
|
||||
export def main [] {
|
||||
return {
|
||||
binary: '#bb9af7'
|
||||
block: '#7aa2f7'
|
||||
cell-path: '#a9b1d6'
|
||||
closure: '#7dcfff'
|
||||
custom: '#c0caf5'
|
||||
duration: '#e0af68'
|
||||
float: '#f7768e'
|
||||
glob: '#c0caf5'
|
||||
int: '#bb9af7'
|
||||
list: '#7dcfff'
|
||||
nothing: '#f7768e'
|
||||
range: '#e0af68'
|
||||
record: '#7dcfff'
|
||||
string: '#9ece6a'
|
||||
|
||||
bool: {|| if $in { '#7dcfff' } else { '#e0af68' } }
|
||||
|
||||
datetime: {|| (date now) - $in |
|
||||
if $in < 1hr {
|
||||
{ fg: '#f7768e' attr: 'b' }
|
||||
} else if $in < 6hr {
|
||||
'#f7768e'
|
||||
} else if $in < 1day {
|
||||
'#e0af68'
|
||||
} else if $in < 3day {
|
||||
'#9ece6a'
|
||||
} else if $in < 1wk {
|
||||
{ fg: '#9ece6a' attr: 'b' }
|
||||
} else if $in < 6wk {
|
||||
'#7dcfff'
|
||||
} else if $in < 52wk {
|
||||
'#7aa2f7'
|
||||
} else { 'dark_gray' }
|
||||
}
|
||||
|
||||
filesize: {|e|
|
||||
if $e == 0b {
|
||||
'#a9b1d6'
|
||||
} else if $e < 1mb {
|
||||
'#7dcfff'
|
||||
} else {{ fg: '#7aa2f7' }}
|
||||
}
|
||||
|
||||
shape_and: { fg: '#bb9af7' attr: 'b' }
|
||||
shape_binary: { fg: '#bb9af7' attr: 'b' }
|
||||
shape_block: { fg: '#7aa2f7' attr: 'b' }
|
||||
shape_bool: '#7dcfff'
|
||||
shape_closure: { fg: '#7dcfff' attr: 'b' }
|
||||
shape_custom: '#9ece6a'
|
||||
shape_datetime: { fg: '#7dcfff' attr: 'b' }
|
||||
shape_directory: '#7dcfff'
|
||||
shape_external: '#7dcfff'
|
||||
shape_external_resolved: '#7dcfff'
|
||||
shape_externalarg: { fg: '#9ece6a' attr: 'b' }
|
||||
shape_filepath: '#7dcfff'
|
||||
shape_flag: { fg: '#7aa2f7' attr: 'b' }
|
||||
shape_float: { fg: '#f7768e' attr: 'b' }
|
||||
shape_garbage: { fg: '#FFFFFF' bg: '#FF0000' attr: 'b' }
|
||||
shape_glob_interpolation: { fg: '#7dcfff' attr: 'b' }
|
||||
shape_globpattern: { fg: '#7dcfff' attr: 'b' }
|
||||
shape_int: { fg: '#bb9af7' attr: 'b' }
|
||||
shape_internalcall: { fg: '#7dcfff' attr: 'b' }
|
||||
shape_keyword: { fg: '#bb9af7' attr: 'b' }
|
||||
shape_list: { fg: '#7dcfff' attr: 'b' }
|
||||
shape_literal: '#7aa2f7'
|
||||
shape_match_pattern: '#9ece6a'
|
||||
shape_matching_brackets: { attr: 'u' }
|
||||
shape_nothing: '#f7768e'
|
||||
shape_operator: '#e0af68'
|
||||
shape_or: { fg: '#bb9af7' attr: 'b' }
|
||||
shape_pipe: { fg: '#bb9af7' attr: 'b' }
|
||||
shape_range: { fg: '#e0af68' attr: 'b' }
|
||||
shape_raw_string: { fg: '#c0caf5' attr: 'b' }
|
||||
shape_record: { fg: '#7dcfff' attr: 'b' }
|
||||
shape_redirection: { fg: '#bb9af7' attr: 'b' }
|
||||
shape_signature: { fg: '#9ece6a' attr: 'b' }
|
||||
shape_string: '#9ece6a'
|
||||
shape_string_interpolation: { fg: '#7dcfff' attr: 'b' }
|
||||
shape_table: { fg: '#7aa2f7' attr: 'b' }
|
||||
shape_vardecl: { fg: '#7aa2f7' attr: 'u' }
|
||||
shape_variable: '#bb9af7'
|
||||
|
||||
# Base foot.ini colors
|
||||
foreground: '#c0caf5'
|
||||
background: '#1a1b26'
|
||||
cursor: '#c0caf5'
|
||||
empty: '#7aa2f7'
|
||||
header: { fg: '#9ece6a' attr: 'b' }
|
||||
hints: '#414868'
|
||||
leading_trailing_space_bg: { attr: 'n' }
|
||||
row_index: { fg: '#9ece6a' attr: 'b' }
|
||||
search_result: { fg: '#f7768e' bg: '#a9b1d6' }
|
||||
separator: '#a9b1d6'
|
||||
}
|
||||
}
|
||||
|
||||
# Update the Nushell configuration
|
||||
export def --env "set color_config" [] {
|
||||
$env.config.color_config = (main)
|
||||
}
|
||||
|
||||
# Update terminal colors
|
||||
export def "update terminal" [] {
|
||||
let theme = (main)
|
||||
|
||||
# Set terminal colors
|
||||
let osc_screen_foreground_color = '10;'
|
||||
let osc_screen_background_color = '11;'
|
||||
let osc_cursor_color = '12;'
|
||||
|
||||
$"
|
||||
(ansi -o $osc_screen_foreground_color)($theme.foreground)(char bel)
|
||||
(ansi -o $osc_screen_background_color)($theme.background)(char bel)
|
||||
(ansi -o $osc_cursor_color)($theme.cursor)(char bel)
|
||||
"
|
||||
| str replace --all "\n" ''
|
||||
| print -n $"($in)\r"
|
||||
}
|
||||
|
||||
export module activate {
|
||||
export-env {
|
||||
set color_config
|
||||
update terminal
|
||||
}
|
||||
}
|
||||
|
||||
# Activate the theme when sourced
|
||||
use activate
|
||||
12
home/modules/shell/nushell/default.nix
Normal file
12
home/modules/shell/nushell/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
home.file.".config/nushell/config".source = ./config;
|
||||
programs.nushell = {
|
||||
enable = false;
|
||||
configFile.source = ./config.nu;
|
||||
shellAliases = {
|
||||
cls = "clear";
|
||||
nv = "nvim";
|
||||
ls = "lse";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,28 +1,17 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.file.".config/foot/themes".source = ./themes;
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
shell = "fish";
|
||||
pad = "4x4center";
|
||||
font = lib.mkForce "Maple Mono NF:size=12";
|
||||
pad = "0x0center";
|
||||
font = "Maple Mono NF:size=12";
|
||||
include = "${config.xdg.configHome}/foot/themes/bw.ini";
|
||||
};
|
||||
scrollback = {
|
||||
lines = 100000;
|
||||
multiplier = 3;
|
||||
indicator-position = "relative";
|
||||
indicator-format = "line";
|
||||
};
|
||||
url = {
|
||||
launch = "${pkgs.xdg-utils}/bin/xdg-open \${url}";
|
||||
};
|
||||
cursor = {
|
||||
style = "beam";
|
||||
beam-thickness = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
24
home/modules/terminal/foot/themes/bw.ini
Normal file
24
home/modules/terminal/foot/themes/bw.ini
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[colors]
|
||||
# alpha=1.0
|
||||
background=000000
|
||||
foreground=ffffff
|
||||
|
||||
## Normal/regular colors (color palette 0-7)
|
||||
regular0=000000 # black
|
||||
regular1=5a5a5a # dark gray
|
||||
regular2=6a6a6a # dark gray
|
||||
regular3=7a7a7a # gray
|
||||
regular4=8a8a8a # gray
|
||||
regular5=9a9a9a # light gray
|
||||
regular6=aaaaaa # light gray
|
||||
regular7=ffffff # white
|
||||
|
||||
## Bright colors (color palette 8-15)
|
||||
bright0=3a3a3a # bright black
|
||||
bright1=6a6a6a # bright gray
|
||||
bright2=7a7a7a
|
||||
bright3=8a8a8a
|
||||
bright4=9a9a9a
|
||||
bright5=bababa
|
||||
bright6=dadada
|
||||
bright7=ffffff # bright white
|
||||
27
home/modules/terminal/foot/themes/kanagawa.ini
Normal file
27
home/modules/terminal/foot/themes/kanagawa.ini
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
[colors]
|
||||
foreground = dcd7ba
|
||||
background = 1f1f28
|
||||
|
||||
selection-foreground = c8c093
|
||||
selection-background = 2d4f67
|
||||
|
||||
regular0 = 090618
|
||||
regular1 = c34043
|
||||
regular2 = 76946a
|
||||
regular3 = c0a36e
|
||||
regular4 = 7e9cd8
|
||||
regular5 = 957fb8
|
||||
regular6 = 6a9589
|
||||
regular7 = c8c093
|
||||
|
||||
bright0 = 727169
|
||||
bright1 = e82424
|
||||
bright2 = 98bb6c
|
||||
bright3 = e6c384
|
||||
bright4 = 7fb4ca
|
||||
bright5 = 938aa9
|
||||
bright6 = 7aa89f
|
||||
bright7 = dcd7ba
|
||||
|
||||
16 = ffa066
|
||||
17 = ff5d62
|
||||
44
home/modules/terminal/foot/themes/oxocarbon.ini
Normal file
44
home/modules/terminal/foot/themes/oxocarbon.ini
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# oxocarbon-foot
|
||||
# oxocarbon foot template by Boyd Kelly
|
||||
# include in foot.ini like so:
|
||||
# include=~/.config/foot/colours.ini
|
||||
# must be included under [main], or untitled section at beginning of file
|
||||
|
||||
#dark reference
|
||||
#base00: "#161616"
|
||||
#base01: "#262626"
|
||||
#base02: "#393939"
|
||||
#base03: "#525252"
|
||||
#base04: "#dde1e6"
|
||||
#base05: "#f2f4f8"
|
||||
#base06: "#ffffff"
|
||||
#base07: "#08bdba"
|
||||
#base08: "#3ddbd9"
|
||||
#base09: "#78a9ff"
|
||||
#base0A: "#ee5396"
|
||||
#base0B: "#33b1ff"
|
||||
#base0C: "#ff7eb6"
|
||||
#base0D: "#42be65"
|
||||
#base0E: "#be95ff"
|
||||
#base0F: "#82cfff"
|
||||
|
||||
[colors]
|
||||
foreground=ffffff #base06 white
|
||||
background=161616 #base01 black
|
||||
|
||||
regular0=262626 # black
|
||||
regular1=ff7eb6 # magenta
|
||||
regular2=42be65 # green
|
||||
regular3=ffe97b # yellow
|
||||
regular4=33b1ff # blue
|
||||
regular5=ee5396 # red
|
||||
regular6=3ddbd9 # cyan
|
||||
regular7=dde1e6 # white
|
||||
bright0=393939 # black
|
||||
bright1=ff7eb6 # magenta
|
||||
bright2=42be65 # green
|
||||
bright3=ffe97b # yellow
|
||||
bright4=33b1ff # blue
|
||||
bright5=ee5396 # red
|
||||
bright6=3ddbd9 # cyan
|
||||
bright7=ffffff # white
|
||||
30
home/modules/terminal/foot/themes/tokyonight.ini
Normal file
30
home/modules/terminal/foot/themes/tokyonight.ini
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
[colors]
|
||||
foreground=c0caf5
|
||||
background=1a1b26
|
||||
selection-foreground=c0caf5
|
||||
selection-background=283457
|
||||
urls=73daca
|
||||
cursor=c0caf5 283457
|
||||
|
||||
regular0=15161e
|
||||
regular1=f7768e
|
||||
regular2=9ece6a
|
||||
regular3=e0af68
|
||||
regular4=7aa2f7
|
||||
regular5=bb9af7
|
||||
regular6=7dcfff
|
||||
regular7=a9b1d6
|
||||
|
||||
bright0=414868
|
||||
bright1=f7768e
|
||||
bright2=9ece6a
|
||||
bright3=e0af68
|
||||
bright4=7aa2f7
|
||||
bright5=bb9af7
|
||||
bright6=7dcfff
|
||||
bright7=c0caf5
|
||||
|
||||
16=ff9e64
|
||||
17=db4b4b
|
||||
|
||||
# night variant.
|
||||
27
home/modules/terminal/st/default.nix
Normal file
27
home/modules/terminal/st/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(st.overrideAttrs (oldAttrs: {
|
||||
src = fetchFromGitHub {
|
||||
owner = "elisiei";
|
||||
repo = "st";
|
||||
rev = "dd154987103b12df593a424fd238713201fbce54";
|
||||
sha256 = "sha256-/++WajhlI6zlE18DlslOn+qtoqxROxnZb63NK4MTeX0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = oldAttrs.nativeBuildInputs or [ ] ++ [ pkg-config ];
|
||||
buildInputs = oldAttrs.buildInputs ++ [
|
||||
imlib2
|
||||
zlib
|
||||
harfbuzz
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
cp config.def.h config.h
|
||||
'';
|
||||
|
||||
makeFlags = [ "CC=${pkgs.gcc}/bin/gcc" ];
|
||||
installFlags = [ "PREFIX=$(out)" ];
|
||||
}))
|
||||
];
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{lib, ...}: {
|
||||
{
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
|
||||
|
|
@ -9,10 +9,31 @@
|
|||
transparency = 50;
|
||||
frame_width = 1;
|
||||
timeout = 3;
|
||||
font = lib.mkForce "Maple Mono NF 10";
|
||||
font = "Maple Mono NF 10";
|
||||
icon_corner_radius = 0;
|
||||
min_icon_size = 56;
|
||||
};
|
||||
|
||||
urgency_low = {
|
||||
background = "#000000";
|
||||
foreground = "#ffffff";
|
||||
frame_color = "#ffffff";
|
||||
timeout = 3;
|
||||
};
|
||||
|
||||
urgency_normal = {
|
||||
background = "#000000";
|
||||
foreground = "#ffffff";
|
||||
frame_color = "#ffffff";
|
||||
timeout = 3;
|
||||
};
|
||||
|
||||
urgency_critical = {
|
||||
background = "#000000";
|
||||
foreground = "#ffffff";
|
||||
frame_color = "#ffffff";
|
||||
timeout = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.wrapFirefox (pkgs.firefox-unwrapped.override {pipewireSupport = true;}) {};
|
||||
};
|
||||
}
|
||||
|
|
@ -21,12 +21,12 @@
|
|||
fetch.prune = true;
|
||||
|
||||
# @elisiei
|
||||
# url."git@github.com-elisiei:".insteadOf = "https://github.com/elisiei/";
|
||||
# url."git@github.com-elisiei:".pushInsteadOf = "https://github.com/elisiei/";
|
||||
url."git@github.com-elisiei:".insteadOf = "https://github.com/elisiei/";
|
||||
url."git@github.com-elisiei:".pushInsteadOf = "https://github.com/elisiei/";
|
||||
|
||||
# @yehorovye
|
||||
# url."git@github.com-yehorovye:".insteadOf = "https://github.com/yehorovye/";
|
||||
# url."git@github.com-yehorovye:".pushInsteadOf = "https://github.com/yehorovye/";
|
||||
url."git@github.com-yehorovye:".insteadOf = "https://github.com/yehorovye/";
|
||||
url."git@github.com-yehorovye:".pushInsteadOf = "https://github.com/yehorovye/";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
11
home/modules/user/obs/default.nix
Normal file
11
home/modules/user/obs/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
wlrobs
|
||||
obs-backgroundremoval
|
||||
obs-pipewire-audio-capture
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
stylix = {
|
||||
enable = true;
|
||||
autoEnable = true;
|
||||
polarity = "dark";
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/kanagawa-dragon.yaml";
|
||||
|
||||
icons = {
|
||||
enable = true;
|
||||
package = pkgs.papirus-icon-theme;
|
||||
dark = "Papirus-Dark";
|
||||
light = "Papirus-Light";
|
||||
};
|
||||
|
||||
fonts = {
|
||||
serif = {
|
||||
package = pkgs.maple-mono.NF;
|
||||
name = "Maple Mono NF";
|
||||
};
|
||||
sansSerif = {
|
||||
package = pkgs.maple-mono.NF;
|
||||
name = "Maple Mono NF";
|
||||
};
|
||||
monospace = {
|
||||
package = pkgs.maple-mono.NF;
|
||||
name = "Maple Mono NF";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
stylix.targets.sway.enable = true;
|
||||
stylix.targets.nixvim = {
|
||||
enable = true;
|
||||
colors.enable = true;
|
||||
plugin = "base16-nvim";
|
||||
};
|
||||
stylix.targets.spicetify.enable = false;
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
system: "base16"
|
||||
name: "pitch black"
|
||||
author: "elisiei"
|
||||
variant: "dark"
|
||||
palette:
|
||||
base00: "#000000"
|
||||
base01: "#121212"
|
||||
base02: "#262626"
|
||||
base03: "#3a3a3a"
|
||||
base04: "#9a9a9a"
|
||||
base05: "#cfcfcf"
|
||||
base06: "#e6e6e6"
|
||||
base07: "#ffffff"
|
||||
base08: "#7a7a7a"
|
||||
base09: "#8c8c8c"
|
||||
base0A: "#a6a6a6"
|
||||
base0B: "#949494"
|
||||
base0C: "#8a8a8a"
|
||||
base0D: "#707070"
|
||||
base0E: "#7c7c7c"
|
||||
base0F: "#5c5c5c"
|
||||
17
home/modules/user/tofi/default.nix
Normal file
17
home/modules/user/tofi/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
programs.tofi = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background-color = "#000000cc";
|
||||
border-width = 0;
|
||||
font = "monospace";
|
||||
height = "100%";
|
||||
num-results = 5;
|
||||
outline-width = 0;
|
||||
padding-left = "35%";
|
||||
padding-top = "35%";
|
||||
result-spacing = 25;
|
||||
width = "100%";
|
||||
};
|
||||
};
|
||||
}
|
||||
18
home/modules/user/wofi/default.nix
Normal file
18
home/modules/user/wofi/default.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
programs.wofi = {
|
||||
enable = true;
|
||||
style = ./style.css;
|
||||
settings = {
|
||||
show = "drun";
|
||||
width = 750;
|
||||
height = 400;
|
||||
always_parse_args = true;
|
||||
show_all = false;
|
||||
term = "foot";
|
||||
hide_scroll = true;
|
||||
print_command = true;
|
||||
insensitive = true;
|
||||
columns = 1;
|
||||
};
|
||||
};
|
||||
}
|
||||
35
home/modules/user/wofi/style.css
Normal file
35
home/modules/user/wofi/style.css
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
window {
|
||||
background-color: #1a1b26;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#input {
|
||||
padding: 0.6em 0.8em;
|
||||
background-color: #24283b;
|
||||
color: #c0caf5;
|
||||
border: none;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#entry {
|
||||
padding: 0.6em 0.8em;
|
||||
color: #c0caf5;
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
background-color: #7aa2f7;
|
||||
color: #1a1b26;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#text {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
#text:selected {
|
||||
color: #1a1b26;
|
||||
font-weight: bold;
|
||||
}
|
||||
177
home/modules/wm/hyprland/default.nix
Normal file
177
home/modules/wm/hyprland/default.nix
Normal file
|
|
@ -0,0 +1,177 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
wallpaperScript = pkgs.writeShellScriptBin "random-wallpaper" ''
|
||||
pkill swaybg 2>/dev/null || true
|
||||
WALP=$(find "$HOME/wallpapers" -type f \( -iname "*.jpg" -o -iname "*.png" \) | shuf -n 1)
|
||||
[ -n "$WALP" ] && ${pkgs.swaybg}/bin/swaybg -i "$WALP" --mode fill
|
||||
'';
|
||||
startupScript = pkgs.writeShellScriptBin "start" ''
|
||||
${wallpaperScript}/bin/random-wallpaper
|
||||
'';
|
||||
in
|
||||
{
|
||||
home.packages = [ wallpaperScript ];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
settings = {
|
||||
monitor = [
|
||||
",1920x1080,auto,1,bitdepth,8"
|
||||
",preferred,auto,1,mirror,eDP-1,bitdepth,8"
|
||||
];
|
||||
|
||||
xwayland = {
|
||||
force_zero_scaling = "true";
|
||||
};
|
||||
|
||||
exec-once = [ "${startupScript}/bin/start" ];
|
||||
|
||||
"$term" = "foot";
|
||||
"$browser" = "librewolf";
|
||||
"$menu" = "exec $(tofi-drun)";
|
||||
|
||||
env = [
|
||||
"XCURSOR_THEME,macOS"
|
||||
"XCURSOR_SIZE,24"
|
||||
];
|
||||
|
||||
general = {
|
||||
gaps_in = "0";
|
||||
gaps_out = "0";
|
||||
border_size = "0";
|
||||
"col.active_border" = "rgba(0,0,0,0)";
|
||||
"col.inactive_border" = "rgba(0,0,0,0)";
|
||||
resize_on_border = "false";
|
||||
allow_tearing = "false";
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
debug = {
|
||||
disable_logs = false;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = "0";
|
||||
active_opacity = "1";
|
||||
inactive_opacity = "0.95";
|
||||
shadow.enabled = false;
|
||||
blur = {
|
||||
enabled = false;
|
||||
xray = false;
|
||||
special = true;
|
||||
new_optimizations = true;
|
||||
size = 10;
|
||||
passes = 3;
|
||||
brightness = 0.9;
|
||||
noise = 2.0e-2;
|
||||
contrast = 1.1;
|
||||
popups = true;
|
||||
popups_ignorealpha = 0.5;
|
||||
|
||||
vibrancy = 0.2;
|
||||
vibrancy_darkness = 0.1;
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = false;
|
||||
animations = {
|
||||
bezier = [
|
||||
"easeOutQuint, 0.23, 1, 0.32, 1"
|
||||
"easeInOutCubic, 0.65, 0.05, 0.36, 1"
|
||||
"linear, 0, 0, 1, 1"
|
||||
"almostLinear, 0.5, 0.5, 0.75, 1.0"
|
||||
"quick, 0.15, 0, 0.1, 1"
|
||||
];
|
||||
animation = [
|
||||
"global, 1, 10, default"
|
||||
"border, 1, 5.39, easeOutQuint"
|
||||
"windows, 1, 4.79, easeOutQuint"
|
||||
"windowsIn, 1, 4.1, easeOutQuint, popin 87%"
|
||||
"windowsOut, 1, 1.49, linear, popin 87%"
|
||||
"fadeIn, 1, 1.73, almostLinear"
|
||||
"fadeOut, 1, 1.46, almostLinear"
|
||||
"fade, 1, 3.03, quick"
|
||||
"layers, 1, 3.81, easeOutQuint"
|
||||
"layersIn, 1, 4, easeOutQuint, fade"
|
||||
"layersOut, 1, 1.5, linear, fade"
|
||||
"fadeLayersIn, 1, 1.79, almostLinear"
|
||||
"fadeLayersOut, 1, 1.39, almostLinear"
|
||||
"workspaces, 1, 1.94, almostLinear, fade"
|
||||
"workspacesIn, 1, 1.21, almostLinear, fade"
|
||||
"workspacesOut, 1, 1.94, almostLinear, fade"
|
||||
"zoomFactor, 1, 7, quick"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = "0";
|
||||
disable_hyprland_logo = "true";
|
||||
middle_click_paste = "false";
|
||||
vfr = "true";
|
||||
};
|
||||
|
||||
gestures.workspace_swipe = "false";
|
||||
|
||||
device = {
|
||||
name = "epic-mouse-v1";
|
||||
sensitivity = "-0.5";
|
||||
};
|
||||
|
||||
"$mainMod" = "SUPER";
|
||||
|
||||
bind = [
|
||||
"$mainMod SHIFT, PRINT, exec, ~/bin/grimblast copy screen" # whole screen
|
||||
"$mainMod, PRINT, exec, ~/bin/grimblast copy area" # selection
|
||||
"$mainMod, SPACE, exec, $menu"
|
||||
"$mainMod, W, exec, random-wallpaper"
|
||||
"$mainMod, S, pin"
|
||||
"$mainMod, T, exec, $term"
|
||||
"$mainMod, Z, exec, $browser"
|
||||
# "$mainMod, K, exec, st" # CHANGE THIS SDBHFDSFSFHJ
|
||||
"$mainMod, Q, killactive"
|
||||
"$mainMod SHIFT, M, exit"
|
||||
"$mainMod, V, togglefloating"
|
||||
"$mainMod, left, movefocus, l"
|
||||
"$mainMod, right, movefocus, r"
|
||||
"$mainMod, up, movefocus, u"
|
||||
"$mainMod, down, movefocus, d"
|
||||
"$mainMod, 1, workspace, 1"
|
||||
"$mainMod, 2, workspace, 2"
|
||||
"$mainMod, 3, workspace, 3"
|
||||
"$mainMod, 4, workspace, 4"
|
||||
"$mainMod, 5, workspace, 5"
|
||||
"$mainMod, 6, workspace, 6"
|
||||
"$mainMod, 7, workspace, 7"
|
||||
"$mainMod, 8, workspace, 8"
|
||||
"$mainMod, 9, workspace, 9"
|
||||
"$mainMod, 0, workspace, 10"
|
||||
"$mainMod SHIFT, 1, movetoworkspace, 1"
|
||||
"$mainMod SHIFT, 2, movetoworkspace, 2"
|
||||
"$mainMod SHIFT, 3, movetoworkspace, 3"
|
||||
"$mainMod SHIFT, 4, movetoworkspace, 4"
|
||||
"$mainMod SHIFT, 5, movetoworkspace, 5"
|
||||
"$mainMod SHIFT, 6, movetoworkspace, 6"
|
||||
"$mainMod SHIFT, 7, movetoworkspace, 7"
|
||||
"$mainMod SHIFT, 8, movetoworkspace, 8"
|
||||
"$mainMod SHIFT, 9, movetoworkspace, 9"
|
||||
"$mainMod SHIFT, 0, movetoworkspace, 10"
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "es,ru";
|
||||
kb_options = "grp:alt_space_toggle";
|
||||
numlock_by_default = true;
|
||||
};
|
||||
|
||||
bindm = [
|
||||
"$mainMod, mouse:272, movewindow" # left click
|
||||
"$mainMod, mouse:273, resizewindow" # right click
|
||||
];
|
||||
|
||||
windowrulev2 = "suppressevent maximize, class:.*";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
{pkgs, ...}: let
|
||||
wallpaperScript = pkgs.writeShellScriptBin "random-wallpaper" ''
|
||||
pkill -f swaybg 2>/dev/null || true
|
||||
walp=$(find "$HOME/wallpapers" -type f \( -iname "*.jpg" -o -iname "*.png" \) | shuf -n 1)
|
||||
[ -n "$walp" ] && ${pkgs.swaybg}/bin/swaybg -m "fill" -i "$walp" &
|
||||
'';
|
||||
in {
|
||||
home.packages = [wallpaperScript];
|
||||
|
||||
wayland.windowManager.mango = {
|
||||
enable = true;
|
||||
|
||||
autostart_sh = ''
|
||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
systemctl --user start pipewire
|
||||
systemctl --user start xdg-desktop-portal
|
||||
systemctl --user import-environment WAYLAND_DISPLAY DISPLAY XDG_CURRENT_DESKTOP PATH
|
||||
systemctl --user start mango-session.target
|
||||
${pkgs.waybar}/bin/waybar &
|
||||
${wallpaperScript}/bin/random-wallpaper &
|
||||
'';
|
||||
|
||||
settings = builtins.readFile ./mango.conf;
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
XCURSOR_THEME = "macOS";
|
||||
XCURSOR_SIZE = "24";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,236 +0,0 @@
|
|||
# blur
|
||||
blur=0
|
||||
blur_layer=0
|
||||
blur_optimized=1
|
||||
blur_params_num_passes=2
|
||||
blur_params_radius=5
|
||||
blur_params_noise=0.02
|
||||
blur_params_brightness=0.9
|
||||
blur_params_contrast=0.9
|
||||
blur_params_saturation=1.2
|
||||
|
||||
# shadows
|
||||
shadows=0
|
||||
layer_shadows=0
|
||||
shadow_only_floating=1
|
||||
shadows_size=10
|
||||
shadows_blur=15
|
||||
shadows_position_x=0
|
||||
shadows_position_y=0
|
||||
shadowscolor=0x000000ff
|
||||
|
||||
# colors
|
||||
rootcolor=0x323232ff
|
||||
bordercolor=0x262626ff
|
||||
focuscolor=0x3a3a3aff
|
||||
urgentcolor=0xad401fff
|
||||
|
||||
# window appearance
|
||||
border_radius=0
|
||||
no_radius_when_single=0
|
||||
focused_opacity=0.98
|
||||
unfocused_opacity=0.95
|
||||
|
||||
# animations
|
||||
animations=1
|
||||
layer_animations=1
|
||||
animation_type_open=slide
|
||||
animation_type_close=slide
|
||||
animation_fade_in=1
|
||||
animation_fade_out=1
|
||||
tag_animation_direction=1
|
||||
|
||||
zoom_initial_ratio=0.92
|
||||
zoom_end_ratio=1.0
|
||||
fadein_begin_opacity=0.2
|
||||
fadeout_begin_opacity=0.9
|
||||
|
||||
# durations
|
||||
animation_duration_move=180
|
||||
animation_duration_open=220
|
||||
animation_duration_tag=220
|
||||
animation_duration_close=180
|
||||
animation_duration_focus=120
|
||||
|
||||
# curves
|
||||
animation_curve_open=0.22,1,0.36,1
|
||||
animation_curve_move=0.22,1,0.36,1
|
||||
animation_curve_tag=0.22,1,0.36,1
|
||||
animation_curve_close=0.4,0,0.2,1
|
||||
animation_curve_focus=0.22,1,0.36,1
|
||||
animation_curve_opafadeout=0.4,0,0.2,1
|
||||
animation_curve_opafadein=0.22,1,0.36,1
|
||||
|
||||
# scroller
|
||||
scroller_structs=0
|
||||
scroller_default_proportion=0.8
|
||||
scroller_focus_center=0
|
||||
scroller_prefer_center=0
|
||||
scroller_prefer_overspread=1
|
||||
edge_scroller_pointer_focus=0
|
||||
scroller_proportion_preset=0.5,0.8,1.0
|
||||
scroller_ignore_proportion_single=0
|
||||
scroller_default_proportion_single=1.0
|
||||
|
||||
# layout
|
||||
new_is_master=1
|
||||
default_mfact=0.55
|
||||
default_nmaster=1
|
||||
smartgaps=0
|
||||
|
||||
# overview
|
||||
enable_hotarea=0
|
||||
ov_tab_mode=0
|
||||
overviewgappi=5
|
||||
overviewgappo=30
|
||||
|
||||
# window behavior
|
||||
no_border_when_single=0
|
||||
axis_bind_apply_timeout=100
|
||||
focus_on_activate=1
|
||||
idleinhibit_ignore_visible=0
|
||||
sloppyfocus=1
|
||||
warpcursor=1
|
||||
focus_cross_monitor=0
|
||||
focus_cross_tag=0
|
||||
|
||||
enable_floating_snap=0
|
||||
snap_distance=30
|
||||
drag_tile_to_tile=1
|
||||
|
||||
# keyboard
|
||||
repeat_rate=25
|
||||
repeat_delay=600
|
||||
numlockon=1
|
||||
|
||||
xkb_rules_layout=es,ru
|
||||
xkb_rules_options=grp:alt_space_toggle
|
||||
|
||||
# trackpad
|
||||
disable_trackpad=0
|
||||
tap_to_click=1
|
||||
tap_and_drag=1
|
||||
drag_lock=1
|
||||
trackpad_natural_scrolling=0
|
||||
disable_while_typing=1
|
||||
left_handed=0
|
||||
middle_button_emulation=0
|
||||
swipe_min_threshold=1
|
||||
|
||||
# mouse
|
||||
mouse_natural_scrolling=0
|
||||
|
||||
# gaps and borders
|
||||
gappih=3
|
||||
gappiv=3
|
||||
gappoh=3
|
||||
gappov=3
|
||||
borderpx=1
|
||||
|
||||
# tag rules
|
||||
tagrule=id:1,layout_name:tiling
|
||||
tagrule=id:2,layout_name:scroller
|
||||
tagrule=id:3,layout_name:scroller
|
||||
tagrule=id:4,layout_name:scroller
|
||||
tagrule=id:5,layout_name:scroller
|
||||
tagrule=id:6,layout_name:scroller
|
||||
tagrule=id:7,layout_name:scroller
|
||||
tagrule=id:8,layout_name:scroller
|
||||
tagrule=id:9,layout_name:scroller
|
||||
|
||||
# application binds
|
||||
bind=SUPER,space,spawn,wmenu-run
|
||||
bind=SUPER,t,spawn,foot
|
||||
bind=SUPER,z,spawn,firefox
|
||||
|
||||
# screenshots
|
||||
bind=SUPER+SHIFT,Print,spawn,~/bin/sss screen
|
||||
bind=SUPER,Print,spawn,~/bin/sss area
|
||||
|
||||
# wallpaper
|
||||
bind=SUPER,w,spawn,random-wallpaper
|
||||
|
||||
# window control
|
||||
bind=SUPER,q,killclient,
|
||||
bind=SUPER,v,togglefloating,
|
||||
bind=SUPER,s,toggle_scratchpad
|
||||
|
||||
# focus navigation
|
||||
bind=SUPER,Tab,focusstack,next
|
||||
bind=SUPER,Left,focusdir,left
|
||||
bind=SUPER,Right,focusdir,right
|
||||
bind=SUPER,Up,focusdir,up
|
||||
bind=SUPER,Down,focusdir,down
|
||||
|
||||
# resize windows
|
||||
bind=CTRL+ALT,Left,resizewin,-50,+0
|
||||
bind=CTRL+ALT,Right,resizewin,+50,+0
|
||||
bind=CTRL+ALT,Up,resizewin,+0,-50
|
||||
bind=CTRL+ALT,Down,resizewin,+0,+50
|
||||
|
||||
# move windows
|
||||
bind=CTRL+SHIFT,Left,movewin,-50,+0
|
||||
bind=CTRL+SHIFT,Right,movewin,+50,+0
|
||||
bind=CTRL+SHIFT,Up,movewin,+0,-50
|
||||
bind=CTRL+SHIFT,Down,movewin,+0,+50
|
||||
|
||||
# view tags
|
||||
bind=SUPER,1,view,1,0
|
||||
bind=SUPER,2,view,2,0
|
||||
bind=SUPER,3,view,3,0
|
||||
bind=SUPER,4,view,4,0
|
||||
bind=SUPER,5,view,5,0
|
||||
bind=SUPER,6,view,6,0
|
||||
bind=SUPER,7,view,7,0
|
||||
bind=SUPER,8,view,8,0
|
||||
bind=SUPER,9,view,9,0
|
||||
bind=SUPER,0,view,10,0
|
||||
|
||||
# tag windows
|
||||
bind=SUPER+SHIFT,1,tag,1,0
|
||||
bind=SUPER+SHIFT,2,tag,2,0
|
||||
bind=SUPER+SHIFT,3,tag,3,0
|
||||
bind=SUPER+SHIFT,4,tag,4,0
|
||||
bind=SUPER+SHIFT,5,tag,5,0
|
||||
bind=SUPER+SHIFT,6,tag,6,0
|
||||
bind=SUPER+SHIFT,7,tag,7,0
|
||||
bind=SUPER+SHIFT,8,tag,8,0
|
||||
bind=SUPER+SHIFT,9,tag,9,0
|
||||
bind=SUPER+SHIFT,0,tag,10,0
|
||||
|
||||
# monitor control
|
||||
bind=ALT+SHIFT,Left,focusmon,left
|
||||
bind=ALT+SHIFT,Right,focusmon,right
|
||||
bind=SUPER+ALT,Left,tagmon,left
|
||||
bind=SUPER+ALT,Right,tagmon,right
|
||||
|
||||
# gaps control
|
||||
bind=ALT+SHIFT,X,incgaps,1
|
||||
bind=ALT+SHIFT,Z,incgaps,-1
|
||||
bind=ALT+SHIFT,R,togglegaps
|
||||
|
||||
# mouse bindings
|
||||
mousebind=SUPER,btn_left,moveresize,curmove
|
||||
mousebind=SUPER,btn_right,moveresize,curresize
|
||||
|
||||
# axis bindings
|
||||
axisbind=SUPER,UP,viewtoleft_have_client
|
||||
axisbind=SUPER,DOWN,viewtoright_have_client
|
||||
|
||||
# cursor
|
||||
cursor_size=24
|
||||
cursor_theme=macOS
|
||||
|
||||
# environment
|
||||
env=XDG_CURRENT_DESKTOP,wlroots
|
||||
env=XDG_SESSION_TYPE,wayland
|
||||
env=GDK_BACKEND,wayland
|
||||
env=SDL_VIDEODRIVER,wayland
|
||||
env=CLUTTER_BACKEND,wayland
|
||||
env=MOZ_ENABLE_WAYLAND,1
|
||||
env=OZONE_PLATFORM,wayland
|
||||
env=ELECTRON_OZONE_PLATFORM_HINT,auto
|
||||
env=QT_AUTO_SCREEN_SCALE_FACTOR,1
|
||||
|
||||
# autostart
|
||||
exec-once=~/.config/mango/autostart.sh
|
||||
|
|
@ -3,24 +3,27 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
|
||||
let
|
||||
wallpaperScript = pkgs.writeShellScriptBin "random-wallpaper" ''
|
||||
pkill -f swaybg 2>/dev/null || true
|
||||
pkill -x wbg 2>/dev/null || true
|
||||
|
||||
walp=$(find "$HOME/wallpapers" -type f \( -iname "*.jpg" -o -iname "*.png" \) | shuf -n 1)
|
||||
[ -n "$walp" ] && ${pkgs.swaybg}/bin/swaybg -m "fill" -i "$walp" &
|
||||
[ -n "$walp" ] && ${pkgs.wbg}/bin/wbg "$walp" &
|
||||
'';
|
||||
in {
|
||||
home.packages = [wallpaperScript];
|
||||
in
|
||||
{
|
||||
home.packages = [ wallpaperScript ];
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
xwayland = true;
|
||||
|
||||
config = rec {
|
||||
# vars
|
||||
modifier = "Mod4";
|
||||
terminal = "foot";
|
||||
menu = "exec $(tofi-run)";
|
||||
menu = "exec $(tofi-drun)";
|
||||
|
||||
# outputs
|
||||
output."*" = {
|
||||
|
|
@ -30,7 +33,7 @@ in {
|
|||
|
||||
# startup
|
||||
startup = [
|
||||
{command = "${wallpaperScript}/bin/random-wallpaper";}
|
||||
{ command = "${wallpaperScript}/bin/random-wallpaper"; }
|
||||
];
|
||||
|
||||
# input
|
||||
|
|
@ -47,8 +50,8 @@ in {
|
|||
};
|
||||
|
||||
# borders
|
||||
window.border = 0;
|
||||
floating.border = 0;
|
||||
window.border = 1;
|
||||
floating.border = 1;
|
||||
|
||||
# focus
|
||||
focus.followMouse = true;
|
||||
|
|
@ -56,15 +59,14 @@ in {
|
|||
# keybindings
|
||||
keybindings = lib.mkOptionDefault {
|
||||
# screenshots
|
||||
"${modifier}+Shift+Print" = "exec ~/bin/sss screen";
|
||||
"${modifier}+Print" = "exec ~/bin/sss area";
|
||||
"${modifier}+Shift+Print" = "exec ~/bin/grimblast copy screen";
|
||||
"${modifier}+Print" = "exec ~/bin/grimblast copy area --freeze";
|
||||
|
||||
# launchers
|
||||
"${modifier}+space" = "exec ${menu}";
|
||||
"${modifier}+w" = "exec ${wallpaperScript}/bin/random-wallpaper";
|
||||
"${modifier}+t" = "exec ${terminal}";
|
||||
"${modifier}+z" = "exec firefox";
|
||||
"${modifier}+r" = "exec st";
|
||||
|
||||
# window
|
||||
"${modifier}+q" = "kill";
|
||||
|
|
@ -112,17 +114,17 @@ in {
|
|||
Return = "mode default";
|
||||
};
|
||||
|
||||
bars = [];
|
||||
bars = [ ];
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
set $opacity 0.99
|
||||
set $opacity 0.97
|
||||
for_window [class=".*"] opacity $opacity
|
||||
for_window [app_id=".*"] opacity $opacity
|
||||
|
||||
# borders
|
||||
default_border pixel 0
|
||||
default_floating_border pixel 0
|
||||
default_border pixel 1
|
||||
default_floating_border pixel 1
|
||||
|
||||
# colors
|
||||
client.focused #3a3a3a #000000 #ffffff #3a3a3a #3a3a3a
|
||||
|
|
@ -143,6 +145,5 @@ in {
|
|||
home.sessionVariables = {
|
||||
XCURSOR_THEME = "macOS";
|
||||
XCURSOR_SIZE = "24";
|
||||
XDG_CURRENT_DESKTOP = "sway";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
ripgrep
|
||||
jq
|
||||
|
|
@ -8,6 +9,5 @@
|
|||
zig
|
||||
kdePackages.dolphin
|
||||
gnome.gvfs
|
||||
wmenu
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@
|
|||
./modules/programs.nix
|
||||
./modules/boot.nix
|
||||
./modules/fonts.nix
|
||||
./modules/spicetify.nix
|
||||
|
||||
# gaming shi
|
||||
# ./modules/gaming.nix
|
||||
./modules/gaming.nix
|
||||
];
|
||||
|
||||
services.omnisearch.enable = true;
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
|
|
|
|||
|
|
@ -4,17 +4,14 @@
|
|||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
LC_ADDRESS = "es_ES.UTF-8";
|
||||
LC_IDENTIFICATION = "es_ES.UTF-8";
|
||||
LC_MEASUREMENT = "es_ES.UTF-8";
|
||||
LC_MONETARY = "es_ES.UTF-8";
|
||||
LC_NAME = "es_ES.UTF-8";
|
||||
LC_NUMERIC = "es_ES.UTF-8";
|
||||
LC_PAPER = "es_ES.UTF-8";
|
||||
LC_TELEPHONE = "es_ES.UTF-8";
|
||||
LC_TIME = "es_ES.UTF-8";
|
||||
};
|
||||
|
||||
documentation.enable = false;
|
||||
i18n.supportedLocales = ["en_US.UTF-8/UTF-8"];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,18 +4,4 @@
|
|||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
networking.hosts = {
|
||||
"127.0.0.1" = ["ooo.ooo"];
|
||||
};
|
||||
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
|
||||
virtualHosts."http://ooo.ooo".extraConfig = ''
|
||||
reverse_proxy https://test.elisiei.xyz {
|
||||
header_up Host test.elisiei.xyz
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.sessionVariables = {
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
XDG_CURRENT_DESKTOP = "mango";
|
||||
WLR_DRM_NO_ATOMIC = "1";
|
||||
};
|
||||
|
||||
security.polkit.enable = true;
|
||||
|
||||
virtualisation.podman = {
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
|
@ -23,9 +22,6 @@
|
|||
xdg-desktop-portal
|
||||
gnumake
|
||||
git-credential-manager
|
||||
pipewire
|
||||
pulseaudio
|
||||
distrobox
|
||||
|
||||
# notifications
|
||||
libnotify
|
||||
|
|
@ -38,12 +34,15 @@
|
|||
# email client
|
||||
thunderbird
|
||||
|
||||
# browser
|
||||
firefox
|
||||
|
||||
# wayland
|
||||
wbg
|
||||
apple-cursor
|
||||
swaybg
|
||||
];
|
||||
|
||||
environment.gnome.excludePackages = [pkgs.gnome-tour];
|
||||
services.xserver.excludePackages = [pkgs.xterm];
|
||||
environment.gnome.excludePackages = [ pkgs.gnome-tour ];
|
||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
||||
services.xserver.desktopManager.xterm.enable = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
|
||||
let
|
||||
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
|
||||
in {
|
||||
in
|
||||
|
||||
{
|
||||
programs.spicetify = {
|
||||
enable = true;
|
||||
|
||||
|
|
@ -14,7 +17,7 @@ in {
|
|||
hidePodcasts
|
||||
];
|
||||
|
||||
theme = lib.mkForce spicePkgs.themes.text;
|
||||
theme = spicePkgs.themes.text;
|
||||
colorScheme = "custom";
|
||||
customColorScheme = {
|
||||
text = "FFFFFF";
|
||||
|
|
@ -34,5 +37,6 @@ in {
|
|||
notification-error = "FFFFFF";
|
||||
misc = "000000";
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
users.users.elisiei = {
|
||||
isNormalUser = true;
|
||||
description = "elisiei";
|
||||
|
|
@ -7,7 +8,6 @@
|
|||
"wheel"
|
||||
"video"
|
||||
"audio"
|
||||
"podman"
|
||||
];
|
||||
shell = pkgs.fishMinimal;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.xserver.enable = false;
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
services.xserver.enable = true;
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
|
|
@ -15,17 +13,22 @@
|
|||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
open = false; # closed-source driver
|
||||
prime = {
|
||||
sync.enable = true;
|
||||
offload.enable = true;
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
|
||||
services.xserver.xkb = {
|
||||
layout = "es,ru";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = rec {
|
||||
initial_session = {
|
||||
command = "${pkgs.mangowc}/bin/mango";
|
||||
command = "${pkgs.sway}/bin/sway --unsupported-gpu";
|
||||
user = "elisiei";
|
||||
};
|
||||
default_session = initial_session;
|
||||
|
|
@ -33,18 +36,12 @@
|
|||
};
|
||||
|
||||
console.keyMap = "es";
|
||||
programs.dconf.enable = true;
|
||||
|
||||
xdg = {
|
||||
portal = {
|
||||
config.common.default = "*";
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-wlr
|
||||
];
|
||||
};
|
||||
};
|
||||
#environment.etc."xdg/sessions/hyprland.desktop".text = ''
|
||||
# [Desktop Entry]
|
||||
# Name=Hyprland
|
||||
# Comment=Hyprland Wayland Compositor
|
||||
# Exec=Hyprland
|
||||
# Type=Application
|
||||
#'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue