polybar: add new module ollama and its script

This commit is contained in:
inkch 2025-01-14 14:13:57 +09:00
parent 5299fa8d48
commit 0b5d7dd6b6
2 changed files with 15 additions and 2 deletions

View File

@ -61,7 +61,7 @@ font-5 = "Symbols Nerd Font:pixelsize=12;2"
{{- if eq .chezmoi.hostname "arch" }}
modules-left = i3 clicker xwindow
modules-center = date
modules-right = pueue filesystem temp cpu memory eth-down eth-up ipv6 caffeine cam tray
modules-right = pueue filesystem temp cpu memory eth-down eth-up ipv6 ollama caffeine cam tray
{{- else if eq .chezmoi.hostname "buzz" }}
modules-left = i3 xwindow
modules-center = date
@ -141,7 +141,14 @@ format-background = ${colors.alert}
label-padding-left = 2
label-padding-right = 2
exec = /home/inkch/.config/polybar/scripts/clicker-stat.sh
{{ end }}
[module/ollama]
type = custom/script
format = <label>
label = %output%
interval = 3
exec = /home/inkch/.config/polybar/scripts/ollama.sh
{{- end }}
[module/caffeine]
type = custom/script

View File

@ -0,0 +1,6 @@
#!/usr/bin/dash
if systemctl is-active ollama >/dev/null; then
echo 'ol'
else
echo ''
fi