Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .aliases
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,19 @@ if command -v kubectl &>/dev/null; then
alias netshoot='kubectl run netshoot-$(date +%s) --rm -i --tty --image nicolaka/netshoot -- /bin/bash'
fi

# k9s - apply danger skin when current context contains "prd"
if command -v k9s &>/dev/null; then
function k9s() {
local context
context="$(kubectl config current-context 2>/dev/null || true)"
if [[ -n "$context" && "${context,,}" == *prd* ]]; then
K9S_SKIN="${K9S_SKIN:-prd}" command k9s "$@"
else
command k9s "$@"
fi
}
fi

# akamai
alias akamai='docker run -it -v ${HOME}/.config/akamai/.edgerc:/root/.edgerc:ro akamai/shell:latest akamai'

Expand Down
107 changes: 107 additions & 0 deletions .config/k9s/skins/prd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Production cluster skin - danger/red theme to visually warn when
# operating on a production cluster (context name contains "prd").
# Based on the Dracula skin with red-tinted backgrounds and accents.
foreground: &foreground "#f8f8f2"
background: &background "#1c0000"
current_line: &current_line "#3d0000"
comment: &comment "#6272a4"
bright_red: &bright_red "#ff8888"
orange: &orange "#ffb86c"
red: &red "#ff5555"
yellow: &yellow "#f1fa8c"

# Skin...
k9s:
# General K9s styles
body:
fgColor: *foreground
bgColor: *background
logoColor: *red
# Command prompt styles
prompt:
fgColor: *foreground
bgColor: *background
suggestColor: *red
# ClusterInfoView styles.
info:
fgColor: *red
sectionColor: *foreground
# Dialog styles.
dialog:
fgColor: *foreground
bgColor: *background
buttonFgColor: *foreground
buttonBgColor: *red
buttonFocusFgColor: *background
buttonFocusBgColor: *bright_red
labelFgColor: *orange
fieldFgColor: *foreground
frame:
# Borders styles.
border:
fgColor: *red
focusColor: *current_line
menu:
fgColor: *foreground
keyColor: *red
# Used for favorite namespaces
numKeyColor: *red
# CrumbView attributes for history navigation.
crumbs:
fgColor: *foreground
bgColor: *current_line
activeColor: *current_line
# Resource status and update styles
status:
newColor: *bright_red
modifyColor: *red
addColor: *orange
errorColor: *red
highlightColor: *orange
killColor: *comment
completedColor: *comment
# Border title styles.
title:
fgColor: *foreground
bgColor: *current_line
highlightColor: *orange
counterColor: *red
filterColor: *red
views:
# Charts skins...
charts:
bgColor: default
defaultDialColors:
- *red
- *bright_red
defaultChartColors:
- *red
- *bright_red
# TableView attributes.
table:
fgColor: *foreground
bgColor: *background
# Header row styles.
header:
fgColor: *foreground
bgColor: *background
sorterColor: *orange
# Xray view attributes.
xray:
fgColor: *foreground
bgColor: *background
cursorColor: *current_line
graphicColor: *red
showIcons: false
# YAML info styles.
yaml:
keyColor: *red
colonColor: *bright_red
valueColor: *foreground
# Logs styles.
logs:
fgColor: *foreground
bgColor: *background
indicator:
fgColor: *foreground
bgColor: *red
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
!.config/k9s/skin.yml
!.config/k9s/skins/
!.config/starship.toml
!.config/zellij/config.yaml
!.config/nvim/
Expand Down