diff --git a/k9s/.config/k9s/aliases.yaml b/k9s/.config/k9s/aliases.yaml new file mode 100644 index 0000000..ee4d9ec --- /dev/null +++ b/k9s/.config/k9s/aliases.yaml @@ -0,0 +1,9 @@ +aliases: + dp: deployments + sec: v1/secrets + jo: jobs + cr: clusterroles + crb: clusterrolebindings + ro: roles + rb: rolebindings + np: networkpolicies diff --git a/k9s/.config/k9s/clusters/arn-aws-eks-eu-west-1-996819778728-cluster-eu-01/arn-aws-eks-eu-west-1-996819778728-cluster-eu-01/benchmarks.yaml b/k9s/.config/k9s/clusters/arn-aws-eks-eu-west-1-996819778728-cluster-eu-01/arn-aws-eks-eu-west-1-996819778728-cluster-eu-01/benchmarks.yaml new file mode 100644 index 0000000..9efba4c --- /dev/null +++ b/k9s/.config/k9s/clusters/arn-aws-eks-eu-west-1-996819778728-cluster-eu-01/arn-aws-eks-eu-west-1-996819778728-cluster-eu-01/benchmarks.yaml @@ -0,0 +1,4 @@ +benchmarks: + defaults: + concurrency: 2 + requests: 200 \ No newline at end of file diff --git a/k9s/.config/k9s/clusters/arn-aws-eks-eu-west-1-996819778728-cluster-eu-01/arn-aws-eks-eu-west-1-996819778728-cluster-eu-01/config.yaml b/k9s/.config/k9s/clusters/arn-aws-eks-eu-west-1-996819778728-cluster-eu-01/arn-aws-eks-eu-west-1-996819778728-cluster-eu-01/config.yaml new file mode 100644 index 0000000..63c8343 --- /dev/null +++ b/k9s/.config/k9s/clusters/arn-aws-eks-eu-west-1-996819778728-cluster-eu-01/arn-aws-eks-eu-west-1-996819778728-cluster-eu-01/config.yaml @@ -0,0 +1,16 @@ +k9s: + cluster: arn:aws:eks:eu-west-1:996819778728:cluster/eu-01 + namespace: + active: all + lockFavorites: false + favorites: + - all + - dt-account-monitoring-stag + - core-infra-system + - digitaltrust-stag + - default + view: + active: IngressRoute + featureGates: + nodeShell: false + proxy: null diff --git a/k9s/.config/k9s/config.yaml b/k9s/.config/k9s/config.yaml new file mode 100644 index 0000000..7b0b044 --- /dev/null +++ b/k9s/.config/k9s/config.yaml @@ -0,0 +1,42 @@ +k9s: + liveViewAutoRefresh: false + screenDumpDir: ~/.config/k9s/screen-dumps + refreshRate: 2 + maxConnRetry: 5 + readOnly: false + noExitOnCtrlC: false + ui: + enableMouse: false + headless: false + logoless: false + crumbsless: false + reactive: false + noIcons: false + defaultsToFullScreen: false + skin: rose-pine # => All clusters will use this skin unless otherwise specified in the context configuration file + skipLatestRevCheck: false + disablePodCounting: false + shellPod: + image: busybox:1.35.0 + namespace: default + limits: + cpu: 100m + memory: 100Mi + imageScans: + enable: false + exclusions: + namespaces: [] + labels: {} + logger: + tail: 100 + buffer: 5000 + sinceSeconds: -1 + textWrap: false + showTime: false + thresholds: + cpu: + critical: 90 + warn: 70 + memory: + critical: 90 + warn: 70 diff --git a/k9s/.config/k9s/skins/dracula.yaml b/k9s/.config/k9s/skins/dracula.yaml new file mode 100644 index 0000000..7d39f49 --- /dev/null +++ b/k9s/.config/k9s/skins/dracula.yaml @@ -0,0 +1,115 @@ +# ----------------------------------------------------------------------------- +# Dracula skin +# ----------------------------------------------------------------------------- + +# Styles... +foreground: &foreground "#f8f8f2" +background: &background "#282a36" +current_line: ¤t_line "#44475a" +selection: &selection "#44475a" +comment: &comment "#6272a4" +cyan: &cyan "#8be9fd" +green: &green "#50fa7b" +orange: &orange "#ffb86c" +pink: &pink "#ff79c6" +purple: &purple "#bd93f9" +red: &red "#ff5555" +yellow: &yellow "#f1fa8c" + +# Skin... +k9s: + # General K9s styles + body: + fgColor: *foreground + bgColor: *background + logoColor: *purple + # Command prompt styles + prompt: + fgColor: *foreground + bgColor: *background + suggestColor: *purple + # ClusterInfoView styles. + info: + fgColor: *pink + sectionColor: *foreground + # Dialog styles. + dialog: + fgColor: *foreground + bgColor: *background + buttonFgColor: *foreground + buttonBgColor: *purple + buttonFocusFgColor: *yellow + buttonFocusBgColor: *pink + labelFgColor: *orange + fieldFgColor: *foreground + frame: + # Borders styles. + border: + fgColor: *selection + focusColor: *current_line + menu: + fgColor: *foreground + keyColor: *pink + # Used for favorite namespaces + numKeyColor: *pink + # CrumbView attributes for history navigation. + crumbs: + fgColor: *foreground + bgColor: *current_line + activeColor: *current_line + # Resource status and update styles + status: + newColor: *cyan + modifyColor: *purple + addColor: *green + errorColor: *red + highlightColor: *orange + killColor: *comment + completedColor: *comment + # Border title styles. + title: + fgColor: *foreground + bgColor: *current_line + highlightColor: *orange + counterColor: *purple + filterColor: *pink + views: + # Charts skins... + charts: + bgColor: default + defaultDialColors: + - *purple + - *red + defaultChartColors: + - *purple + - *red + # TableView attributes. + table: + fgColor: *foreground + bgColor: *background + # Header row styles. + header: + fgColor: *foreground + bgColor: *background + sorterColor: *cyan + # Xray view attributes. + xray: + fgColor: *foreground + bgColor: *background + cursorColor: *current_line + graphicColor: *purple + showIcons: false + # YAML info styles. + yaml: + keyColor: *pink + colonColor: *purple + valueColor: *foreground + # Logs styles. + logs: + fgColor: *foreground + bgColor: *background + indicator: + fgColor: *foreground + bgColor: *purple + toggleOnColor: *green + toggleOffColor: *cyan diff --git a/k9s/.config/k9s/skins/rose-pine-dawn.yaml b/k9s/.config/k9s/skins/rose-pine-dawn.yaml new file mode 100644 index 0000000..b18d648 --- /dev/null +++ b/k9s/.config/k9s/skins/rose-pine-dawn.yaml @@ -0,0 +1,100 @@ +k9s: + body: + fgColor: "#575279" + bgColor: "#faf4ed" + logoColor: "#907aa9" + prompt: + fgColor: "#575279" + bgColor: "#fffaf3" + suggestColor: "#56949f" + help: + fgColor: "#575279" + bgColor: "#faf4ed" + sectionColor: "#286983" + keyColor: "#56949f" + numKeyColor: "#d7827e" + frame: + title: + fgColor: "#286983" + bgColor: "#faf4ed" + highlightColor: "#907aa9" + counterColor: "#ea9d34" + filterColor: "#286983" + border: + fgColor: "#907aa9" + focusColor: "#56949f" + menu: + fgColor: "#575279" + keyColor: "#56949f" + numKeyColor: "#d7827e" + crumbs: + fgColor: "#faf4ed" + bgColor: "#907aa9" + activeColor: "#d7827e" + status: + newColor: "#56949f" + modifyColor: "#56949f" + addColor: "#286983" + pendingColor: "#b4637a" + errorColor: "#b4637a" + highlightColor: "#d7827e" + killColor: "#907aa9" + completedColor: "#797593" + info: + fgColor: "#b4637a" + sectionColor: "#575279" + views: + table: + fgColor: "#575279" + bgColor: "#faf4ed" + cursorFgColor: "#fffaf3" + cursorBgColor: "#faf4ed" + markColor: "#907aa9" + header: + fgColor: "#ea9d34" + bgColor: "#faf4ed" + sorterColor: "#d7827e" + xray: + fgColor: "#575279" + bgColor: "#faf4ed" + cursorColor: "#cecacd" + cursorTextColor: "#faf4ed" + graphicColor: "#907aa9" + charts: + bgColor: "#faf4ed" + chartBgColor: "#faf4ed" + dialBgColor: "#faf4ed" + defaultDialColors: + - "#286983" + - "#b4637a" + defaultChartColors: + - "#286983" + - "#b4637a" + resourceColors: + cpu: + - "#907aa9" + - "#56949f" + mem: + - "#ea9d34" + - "#b4637a" + yaml: + keyColor: "#56949f" + valueColor: "#575279" + colonColor: "#797593" + logs: + fgColor: "#575279" + bgColor: "#faf4ed" + indicator: + fgColor: "#56949f" + bgColor: "#faf4ed" + toggleOnColor: "#286983" + toggleOffColor: "#797593" + dialog: + fgColor: "#ea9d34" + bgColor: "#9893a5" + buttonFgColor: "#faf4ed" + buttonBgColor: "#575279" + buttonFocusFgColor: "#faf4ed" + buttonFocusBgColor: "#907aa9" + labelFgColor: "#d7827e" + fieldFgColor: "#575279" diff --git a/k9s/.config/k9s/skins/rose-pine.yaml b/k9s/.config/k9s/skins/rose-pine.yaml new file mode 100644 index 0000000..2645d54 --- /dev/null +++ b/k9s/.config/k9s/skins/rose-pine.yaml @@ -0,0 +1,100 @@ +k9s: + body: + fgColor: "#e0def4" + bgColor: "#191724" + logoColor: "#c4a7e7" + prompt: + fgColor: "#e0def4" + bgColor: "#1f1d2e" + suggestColor: "#9ccfd8" + help: + fgColor: "#e0def4" + bgColor: "#191724" + sectionColor: "#31748f" + keyColor: "#9ccfd8" + numKeyColor: "#ebbcba" + frame: + title: + fgColor: "#31748f" + bgColor: "#191724" + highlightColor: "#c4a7e7" + counterColor: "#f6c177" + filterColor: "#31748f" + border: + fgColor: "#c4a7e7" + focusColor: "#9ccfd8" + menu: + fgColor: "#e0def4" + keyColor: "#9ccfd8" + numKeyColor: "#ebbcba" + crumbs: + fgColor: "#191724" + bgColor: "#c4a7e7" + activeColor: "#ebbcba" + status: + newColor: "#9ccfd8" + modifyColor: "#9ccfd8" + addColor: "#31748f" + pendingColor: "#eb6f92" + errorColor: "#eb6f92" + highlightColor: "#ebbcba" + killColor: "#c4a7e7" + completedColor: "#908caa" + info: + fgColor: "#eb6f92" + sectionColor: "#e0def4" + views: + table: + fgColor: "#e0def4" + bgColor: "#191724" + cursorFgColor: "#1f1d2e" + cursorBgColor: "#191724" + markColor: "#c4a7e7" + header: + fgColor: "#f6c177" + bgColor: "#191724" + sorterColor: "#ebbcba" + xray: + fgColor: "#e0def4" + bgColor: "#191724" + cursorColor: "#524f67" + cursorTextColor: "#191724" + graphicColor: "#c4a7e7" + charts: + bgColor: "#191724" + chartBgColor: "#191724" + dialBgColor: "#191724" + defaultDialColors: + - "#31748f" + - "#eb6f92" + defaultChartColors: + - "#31748f" + - "#eb6f92" + resourceColors: + cpu: + - "#c4a7e7" + - "#9ccfd8" + mem: + - "#f6c177" + - "#eb6f92" + yaml: + keyColor: "#9ccfd8" + valueColor: "#e0def4" + colonColor: "#908caa" + logs: + fgColor: "#e0def4" + bgColor: "#191724" + indicator: + fgColor: "#9ccfd8" + bgColor: "#191724" + toggleOnColor: "#31748f" + toggleOffColor: "#908caa" + dialog: + fgColor: "#f6c177" + bgColor: "#6e6a86" + buttonFgColor: "#191724" + buttonBgColor: "#e0def4" + buttonFocusFgColor: "#191724" + buttonFocusBgColor: "#c4a7e7" + labelFgColor: "#ebbcba" + fieldFgColor: "#e0def4" diff --git a/nvim/.config/nvim/lua/plugins/ui.lua b/nvim/.config/nvim/lua/plugins/ui.lua index 9820d64..00fafe9 100644 --- a/nvim/.config/nvim/lua/plugins/ui.lua +++ b/nvim/.config/nvim/lua/plugins/ui.lua @@ -68,6 +68,29 @@ return { }, }, }, + { + "f-person/git-blame.nvim", + -- load the plugin at startup + event = "VeryLazy", + keys = { + { "gk", "GitBlameToggle", desc = "Toggle git-blame" }, + }, + config = function() + vim.g.gitblame_display_virtual_text = false + -- schedule_event = "CursorHold" + -- clear_event = "CursorHoldI" + vim.g.gitblame_delay = 50 -- miliseconds + local git_blame = require("gitblame") + require("lualine").setup({ + sections = { + lualine_c = { + { "filename" }, + { git_blame.get_current_blame_text, cond = git_blame.is_blame_text_available }, + }, + }, + }) + end, + }, { -- cosmetic indent lines "lukas-reineke/indent-blankline.nvim", main = "ibl", diff --git a/scripts/hcf/rose_pine_switch b/scripts/hcf/rose_pine_switch index e083836..a054dfa 100755 --- a/scripts/hcf/rose_pine_switch +++ b/scripts/hcf/rose_pine_switch @@ -49,11 +49,26 @@ function switch_tmux_colors() { fi } +function switch_k9s_colors() { + local config_file + config_file="$DOTFILES/k9s/.config/k9s/config.yaml" + if ! grep -q 'rose-pine' "$config_file"; then + echo "Error, could not find rose pine settings in config file" + return 1 + fi + if grep -q 'rose-pine-dawn' "$config_file"; then + sed_i 's/rose-pine-dawn/rose-pine/g' "$config_file" + else + sed_i 's/rose-pine/rose-pine-dawn/g' "$config_file" + fi +} + function switch_colors() { # Only work if the DOTFILES variable is set if [ -n "$DOTFILES" ]; then switch_alacritty_colors switch_tmux_colors + switch_k9s_colors fi } diff --git a/zsh/.zsh_aliases b/zsh/.zsh_aliases index 691a24b..0255978 100644 --- a/zsh/.zsh_aliases +++ b/zsh/.zsh_aliases @@ -148,3 +148,14 @@ git_push() { } alias gpush="git_push" + +passgen() { + length=${1:-"12"} + if [[ "$length" == <-> ]]; then + echo $(cat /dev/urandom| base64 | head -c "$length") + else + echo "passgen() takes a positive integer as first argument" + echo "got $length" + return 1 + fi +} diff --git a/zsh/.zshenv b/zsh/.zshenv index 46f5b78..0c0c613 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -8,6 +8,7 @@ export SAVEHIST=$HISTSIZE export CLICOLOR=1 export DOTFILES="$HOME/dotfiles" +export K9S_CONFIG_DIR="$HOME/.config/k9s" # colored GCC warnings and errors export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'