From 76ed9417f95a7782e873887e77b20d409fe486ff Mon Sep 17 00:00:00 2001 From: Dilan Gilluly Date: Thu, 12 Mar 2026 22:26:26 -0400 Subject: [PATCH] opencode and mpd enhancements --- .bashrc | 7 +++++++ .config/scripts/mpd-song.sh | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index ee63ffd..da9afd5 100644 --- a/.bashrc +++ b/.bashrc @@ -16,6 +16,10 @@ if [ -x "$(command -v go)" ]; then fi fi +if [ -x "$(command -v ollama)" ]; then + export OLLAMA_KEEP_ALIVE=10m +fi + if [ -x "$(command -v fastfetch)" ]; then if [ -f ~/.config/fastfetch/minimal.jsonc ]; then fastfetch -c ~/.config/fastfetch/minimal.jsonc @@ -25,3 +29,6 @@ if [ -x "$(command -v fastfetch)" ]; then fi echo -e "\nShall we play a game?" + +# opencode +export PATH=/home/dilan/.opencode/bin:$PATH diff --git a/.config/scripts/mpd-song.sh b/.config/scripts/mpd-song.sh index 05afc77..cdb53a5 100755 --- a/.config/scripts/mpd-song.sh +++ b/.config/scripts/mpd-song.sh @@ -1,7 +1,10 @@ #!/bin/bash -if mpc status | grep -q "\[playing\]"; then - mpc status | head -1 +c_song=$(mpc current) + +if [ -n "${c_song}" ]; then + p_status=$(mpc status "%state%") + echo -e "[${p_status}] ${c_song}" else echo -n "mpd" fi