1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-22 15:01:59 +01:00

changed kubernetes context and namespace integration

This commit is contained in:
eoli3n 2020-12-19 13:32:04 +01:00
parent 083c2438c7
commit 38f9641e4f
4 changed files with 19 additions and 7 deletions

@ -21,7 +21,3 @@ behind = "⇣${count} "
[gcloud]
disabled = true
[kubernetes]
format = 'on [⛵ $context \($namespace\)](dimmed green) '
disabled = false

@ -72,7 +72,7 @@
"layer": "bottom",
"position": "bottom",
"modules-left": ["tray", "custom/spotify"],
"modules-left": ["tray", "custom/spotify", "custom/kubernetes"],
"modules-center": ["network#speed"],
"modules-right": ["custom/systemd", "custom/backup", "custom/zfs-trim", "custom/zfs-scrub", "temperature", "custom/storage", "cpu", "memory" ],
"custom/spotify": {
@ -108,7 +108,13 @@
"format": "<span foreground='#ff5c57'> {}</span>",
"interval": 5,
"exec": "~/.config/waybar/modules/systemd.sh",
"exec-if": "~/.config/waybar/modules/systemd.sh"
"exec-if": "which systemctl"
},
"custom/kubernetes": {
"format": " {}",
"interval": 5,
"exec": "~/.config/waybar/modules/kubernetes.sh",
"exec-if": "which kubectx kubens"
},
"cpu": {
"interval": 3,

@ -0,0 +1,10 @@
#!/bin/bash
context=$(kubectx -c)
namespace=$(kubens -c)
if [[ $namespace == "default" ]]
then
echo "$context"
else
echo "$context - $namespace"
fi

@ -58,7 +58,7 @@ window {
margin: 0px 16px 0px 0px;
}
#tray, #custom-spotify {
#tray, #custom-spotify, #custom-kubernetes {
margin: 0px 0px 0px 16px;
}