mirror of
https://github.com/eoli3n/dotfiles
synced 2024-11-26 06:08:35 +01:00
changed kubernetes context and namespace integration
This commit is contained in:
parent
083c2438c7
commit
38f9641e4f
@ -21,7 +21,3 @@ behind = "⇣${count} "
|
|||||||
|
|
||||||
[gcloud]
|
[gcloud]
|
||||||
disabled = true
|
disabled = true
|
||||||
|
|
||||||
[kubernetes]
|
|
||||||
format = 'on [⛵ $context \($namespace\)](dimmed green) '
|
|
||||||
disabled = false
|
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
"layer": "bottom",
|
"layer": "bottom",
|
||||||
"position": "bottom",
|
"position": "bottom",
|
||||||
|
|
||||||
"modules-left": ["tray", "custom/spotify"],
|
"modules-left": ["tray", "custom/spotify", "custom/kubernetes"],
|
||||||
"modules-center": ["network#speed"],
|
"modules-center": ["network#speed"],
|
||||||
"modules-right": ["custom/systemd", "custom/backup", "custom/zfs-trim", "custom/zfs-scrub", "temperature", "custom/storage", "cpu", "memory" ],
|
"modules-right": ["custom/systemd", "custom/backup", "custom/zfs-trim", "custom/zfs-scrub", "temperature", "custom/storage", "cpu", "memory" ],
|
||||||
"custom/spotify": {
|
"custom/spotify": {
|
||||||
@ -108,7 +108,13 @@
|
|||||||
"format": "<span foreground='#ff5c57'> {}</span>",
|
"format": "<span foreground='#ff5c57'> {}</span>",
|
||||||
"interval": 5,
|
"interval": 5,
|
||||||
"exec": "~/.config/waybar/modules/systemd.sh",
|
"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": {
|
"cpu": {
|
||||||
"interval": 3,
|
"interval": 3,
|
||||||
|
10
roles/waybar/files/waybar/modules/kubernetes.sh
Executable file
10
roles/waybar/files/waybar/modules/kubernetes.sh
Executable file
@ -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;
|
margin: 0px 16px 0px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tray, #custom-spotify {
|
#tray, #custom-spotify, #custom-kubernetes {
|
||||||
margin: 0px 0px 0px 16px;
|
margin: 0px 0px 0px 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user