minor fixes
authorIan Kelling <ian@iankelling.org>
Thu, 18 Apr 2024 01:57:52 +0000 (21:57 -0400)
committerIan Kelling <ian@iankelling.org>
Thu, 18 Apr 2024 01:57:52 +0000 (21:57 -0400)
brc
obs-clip
prof-tail

diff --git a/brc b/brc
index ad99e0ff360f5a7db129e0941a548c6ddcb54c75..2ffd91cc86fca751dc1ef157c63d36f0f95af6fd 100644 (file)
--- a/brc
+++ b/brc
@@ -315,6 +315,7 @@ export PROFILE_TASKS_TASK_OUTPUT_LIMIT=100
 export LESS=RXij12
 export SYSTEMD_LESS=$LESS
 
+
 export NNN_COLORS=2136
 
 export SL_FILES_DIR=/b/ds/sl/.iank
@@ -3181,9 +3182,13 @@ if $use_color && type -p tput &>/dev/null; then
   # https://github.com/trapd00r/LS_COLORS
   # I would like if there was something similar for light.
 
+  # https://www.bigsoft.co.uk/blog/2008/04/11/configuring-ls_colors
+  # change the hard to read turqouise.
+  # defaults dircolors --print-database.
+
   # the default bold green is too light.
   # this explains the codes: https://gist.github.com/thomd/7667642
-  export LS_COLORS=ex=1
+  export LS_COLORS="ex=1:ln=00;31"
 
   term_bold="$(tput bold)"
   term_red="$(tput setaf 1)"
index 7d075a07530e7a9ec1094397d4035726ae5eb0e9..60bafda5b9e3fbf75de7918716db86b228e8507a 100755 (executable)
--- a/obs-clip
+++ b/obs-clip
@@ -52,10 +52,20 @@ case $type in
     ;;
 esac
 
+found=false
+
 p=$(cat /p/obs-ws-pass)
 # note, if the desktop audio is already on, this will do the wrong thing.
 # obs-cmd needs more commands. But, I don't use desktop audio for anything
 # else atm.
-obs-cmd -w obsws://localhost:4455/$p toggle-mute 'Desktop Audio'
+if pgrep '^obs$' &>/dev/null; then
+  # this is so the script keeps working when obs is not running, but
+  # also doesn't ignore errors.
+  found=true
+  obs-cmd -w obsws://localhost:4455/$p toggle-mute 'Desktop Audio'
+fi
 mpv --profile=a $clip ||:
-obs-cmd -w obsws://localhost:4455/$p toggle-mute 'Desktop Audio'
+
+if $found; then
+  obs-cmd -w obsws://localhost:4455/$p toggle-mute 'Desktop Audio'
+fi
index 638e57600dfa61ea5c1d2aa00608e02cb9ec0169..aa022bc60617f39b2fdbc64173a1a5e2b8560f5a 100644 (file)
--- a/prof-tail
+++ b/prof-tail
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# hacky way to kill off old leftover processes
+pkill -O 1 -x 'prof-tail'
+
 set -e; . /usr/local/lib/bash-bear; set +e
 
 # kill 0 doesn't seem to be documented in man bash, but it kills the
 # background processes.
 # https://unix.stackexchange.com/questions/67532/what-does-kill-0-do-actually/67552
-trap "kill 0" EXIT
+# commented out because the way I exit prof-tail is from an ssh disconnect from
+# the connection dying or killing konsole, and this has no effect on either.
+#trap "kill 0" EXIT
+
 
 xmpp_users=(
   anoukr