Compare commits

..
5 Commits
12 changed files with 120 additions and 18 deletions
+5
View File
@@ -45,6 +45,11 @@
"key": "Docker",
"text": "docker --version 2>/dev/null | cut -d' ' -f3 | tr -d ','"
},
{
"type": "command",
"key": "Kubectl",
"text": "kubectl version --client --output=yaml 2>/dev/null | grep gitVersion | cut -d' ' -f4"
},
{
"type": "command",
"key": "Go",
+1
View File
@@ -0,0 +1 @@
/Applications/OrbStack.app/Contents/MacOS/../Resources/completions/fish/kubectl.fish
+14 -1
View File
@@ -3,10 +3,11 @@ alias ld="ls -lisaGh"
alias g="goto"
alias vim="nvim"
alias code="open -a 'Visual Studio Code'"
alias kubi="open -a 'Lens'"
alias do-st="docker compose"
alias do-re="docker compose down && docker compose up -d"
alias qaserv="TERM=xterm-256color ssh root@195.201.17.47"
alias kc1="set -gx KUBECONFIG ~/.kube/config"
alias ram="vm_stat"
# DevOps Core Tools
@@ -18,6 +19,18 @@ alias dcl="docker compose logs -f"
alias dce="docker compose exec"
alias dps="docker ps --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}'"
# Kubernetes power aliases
alias k="kubectl"
alias kx="kubectx" # Context switching
alias kn="kubens" # Namespace switching
alias kgp="kubectl get pods -o wide"
alias kgs="kubectl get svc -o wide"
alias kgd="kubectl get deploy -o wide"
alias kl="kubectl logs -f"
alias ke="kubectl exec -it"
alias kdesc="kubectl describe"
alias kpf="kubectl port-forward"
# Testing
alias pw="pnpm exec playwright"
alias pwt="pnpm exec playwright test"
+7
View File
@@ -13,6 +13,13 @@ function docker-cleanup
docker volume prune -f
end
# Kubernetes context info
function kinfo
echo "Context: "(kubectl config current-context)
echo "Namespace: "(kubectl config view --minify -o jsonpath='{..namespace}')
kubectl get nodes --no-headers | wc -l | xargs echo "Nodes:"
end
# Quick YAML validation
function yaml-check
python3 -c "import yaml; yaml.safe_load(open('$argv[1]'))"
+42
View File
@@ -0,0 +1,42 @@
# Kubernetes setup
set -gx KUBECONFIG ~/.kube/config
# Kubernetes aliases
alias k="kubectl"
alias kgp="kubectl get pods"
alias kgn="kubectl get nodes"
alias kgs="kubectl get services"
alias kgc="kubectl config get-contexts"
alias kuc="kubectl config use-context"
alias kns="kubectl config set-context --current --namespace"
# Kubernetes context function
function update_kubernetes_context
if command -q kubectl
set -l kube_ctx (kubectl config current-context 2>/dev/null)
if test $status -eq 0
set -l kube_ns (kubectl config view --minify --output 'jsonpath={..namespace}' 2>/dev/null)
set -gx STARSHIP_KUBERNETES_CONTEXT $kube_ctx
if test -n "$kube_ns"
set -gx STARSHIP_KUBERNETES_NAMESPACE $kube_ns
end
else
set -e STARSHIP_KUBERNETES_CONTEXT
set -e STARSHIP_KUBERNETES_NAMESPACE
end
end
end
# Wrapper for kubectl
function kubectl
command kubectl $argv
set -l exit_code $status
if test $exit_code -eq 0; and test "$argv[1]" = "config"; and contains "$argv[2]" "use-context" "set-context"
update_kubernetes_context
end
return $exit_code
end
# Update context on startup
update_kubernetes_context
+5
View File
@@ -27,3 +27,8 @@ function vdocker
echo "No Docker files found"
end
end
# Edit kubernetes manifests
function vk8s
find . -name "*.yaml" -o -name "*.yml" | grep -E "(k8s|kubernetes|deploy)" | head -5 | xargs nvim
end
+27 -6
View File
@@ -31,21 +31,42 @@ function update-system --description "Update system packages depending on OS"
npm update -g
end
else if test -f /etc/arch-release
echo (set_color blue)"[Update-System] Arch Linux erkannt. Starte System-Update..."(set_color normal)
echo (set_color blue)"[Update-System] Arch Linux erkannt. Starte vollständiges System-Update..."(set_color normal)
if type -q yay
# yay handles password prompts and elevation internally, so we run it directly
yay -Syu
set -l orphans (pacman -Qtdq 2>/dev/null)
if test -n "$orphans"
echo (set_color blue)"[Update-System] Entferne ungenutzte Abhängigkeiten (autoremove)..."(set_color normal)
yay -Rns --noconfirm $orphans
end
else
run_with_sudo pacman -Syu
set -l orphans (pacman -Qtdq 2>/dev/null)
if test -n "$orphans"
echo (set_color blue)"[Update-System] Entferne ungenutzte Abhängigkeiten (autoremove)..."(set_color normal)
run_with_sudo pacman -Rns --noconfirm $orphans
end
end
else if test -f /etc/debian_version
echo (set_color blue)"[Update-System] Debian/Ubuntu-basiertes System erkannt. Starte System-Update..."(set_color normal)
run_with_sudo apt update; and run_with_sudo apt upgrade -y
echo (set_color blue)"[Update-System] Debian/Ubuntu-basiertes System erkannt. Starte vollständiges System-Update..."(set_color normal)
run_with_sudo apt update
and run_with_sudo apt upgrade -y
and run_with_sudo apt dist-upgrade -y
and run_with_sudo apt autoremove -y
and run_with_sudo apt autoclean
else if test -f /etc/fedora-release
echo (set_color blue)"[Update-System] Fedora erkannt. Starte System-Update..."(set_color normal)
run_with_sudo dnf upgrade -y
echo (set_color blue)"[Update-System] Fedora erkannt. Starte vollständiges System-Update..."(set_color normal)
run_with_sudo dnf upgrade --refresh -y
and run_with_sudo dnf autoremove -y
else
echo (set_color red)"[Update-System] Unbekanntes Betriebssystem. Keine automatische Aktualisierung möglich."(set_color normal)
return 1
end
# Optional: Flatpak-Pakete aktualisieren und ungenutzte Runtimes entfernen
if test "$os" != "Darwin"; and type -q flatpak
echo (set_color blue)"[Update-System] Aktualisiere Flatpaks..."(set_color normal)
flatpak update -y
flatpak uninstall --unused -y
end
end
+1 -1
View File
@@ -30,7 +30,7 @@ local menu = "rofi -show drun"
-- See https://wiki.hypr.land/Configuring/Basics/Autostart/
hl.on("hyprland.start", function ()
hl.exec_cmd("hyprpaper")
hl.exec_cmd("waybar")
hl.exec_cmd("systemctl --user start waybar.service")
hl.exec_cmd("wl-paste --type text --watch cliphist store")
hl.exec_cmd("wl-paste --type image --watch cliphist store")
hl.exec_cmd("uwsm app -- steam -silent")
+2 -2
View File
@@ -3,6 +3,6 @@ ipc = on
wallpaper {
monitor = DP-1
path = ~/Bilder/wallpaper/zen.jpg
fit_mode = covor
path = /home/baerspektivo/Bilder/wallpaper_5120x1440/00000_cyberpunk_5120x1440.jpg
fit_mode = cover
}
+7 -7
View File
@@ -7,28 +7,28 @@
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"conform.nvim": { "branch": "master", "commit": "016802de402556da54c36bd7359b441266b01cdd" },
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
"fidget.nvim": { "branch": "main", "commit": "6f793b2bcd2d35e201c09520f698bb763220908a" },
"fidget.nvim": { "branch": "main", "commit": "9e0201673e08e997e7cf52afca5565c70bd117f3" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"gitsigns.nvim": { "branch": "main", "commit": "5be654f2232c10ddcad19c1607a67b6b4b78fc29" },
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
"indent-blankline.nvim": { "branch": "master", "commit": "f1e186e44d3b7f9ae918008e2c28ce37c6023d2d" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "40276c4df7e6bdce6801d6c035c6227f9115a855" },
"mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" },
"neo-tree.nvim": { "branch": "main", "commit": "83e7a2982fd12b9c3d35bc39dd5877cd91a02a61" },
"neo-tree.nvim": { "branch": "main", "commit": "f3f3bf73414e400cf9fc13fda50f00404a8f8ab1" },
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
"nui.nvim": { "branch": "main", "commit": "10fc361835c856ba4233ef5ea135b919bf3dce97" },
"nvim-autopairs": { "branch": "master", "commit": "430522f95fe4fb7c511ec64f8c1a90cc6a66c05c" },
"nvim-cmp": { "branch": "main", "commit": "2ffe79f1f021def8dd1fcd81deb16f1bb0d989f3" },
"nvim-lspconfig": { "branch": "master", "commit": "16286347bdba1333c7d124d9de9fe6630731b2b2" },
"nvim-lspconfig": { "branch": "master", "commit": "84252f9832fb5b9024fe9f7258e7c2aff915e6fb" },
"nvim-surround": { "branch": "main", "commit": "2e93e154de9ff326def6480a4358bfc149d5da2c" },
"nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" },
"nvim-treesitter": { "branch": "main", "commit": "41416e81a6c7f4af4984395bfe0cd8d174e70976" },
"nvim-treesitter-textobjects": { "branch": "main", "commit": "5c7b0263797dfd1bd6202f2b219f3b53a80b2187" },
"nvim-web-devicons": { "branch": "master", "commit": "5f032a85be210cd1c6ac98861eb3b187ff3bd5eb" },
"oil.nvim": { "branch": "master", "commit": "b73018b75affd13fa38e2fc94ef753b465f770d7" },
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
"schemastore.nvim": { "branch": "main", "commit": "2940d5e12f8797620cd47dca984d46119e1fa4b8" },
"schemastore.nvim": { "branch": "main", "commit": "4a0e1b74096937d366031bc1e2b244546af39f8e" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
+7
View File
@@ -4,6 +4,7 @@ $time\
$directory\
$git_branch\
$git_status\
$kubernetes\
$docker_context\
$python\
$golang\
@@ -50,6 +51,12 @@ staged = "+"
renamed = "»"
deleted = "✘"
[kubernetes]
format = '[$symbol$context( \($namespace\))]($style) '
symbol = "☸ "
style = "bold cyan"
disabled = false
[docker_context]
symbol = " "
format = "[$symbol$context]($style) "
+1
View File
@@ -264,6 +264,7 @@ Das Installationsskript kann optional verschiedene KI-Kommandozeilentools für S
- **Mise Integration** - Modernes Tool- & Node-Version-Management
- **FZF Integration** - Fuzzy finding everywhere
- **Git Shortcuts** - Aliases für häufige Commands
- **Kubernetes** - kubectl completion
- **Auto-completion** - Für Docker, Git, etc.
---