From 3f1a63e2a3a7ae66dd560f2a615c751b300c4951 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Tue, 16 Jun 2026 22:43:52 -0400 Subject: [PATCH] minor improvements --- brc | 8 ++++++-- brc2 | 4 ++++ g5 | 32 ++++++++++++++++++++++++++++++++ g6 | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 2 deletions(-) create mode 100755 g5 create mode 100755 g6 diff --git a/brc b/brc index e33ac4b..042bdb6 100644 --- a/brc +++ b/brc @@ -2295,7 +2295,9 @@ pst() { # journalctl with times in the format the --since= and --until= options accept jrt() { journalctl -e -n100000 -o short-full "$@"; } jr() { journalctl -e -n100000 "$@" ; } -jrf() { SYSTEMD_COLORS=true bn journalctl -n1000 -f "$@" ; } +jrf() { journalctl -n1000 -f "$@" ; } +bjrf() { SYSTEMD_COLORS=true bn journalctl -n1000 -f "$@" ; } + jrfg() { _jrfg() { SYSTEMD_COLORS=true journalctl -n1000 -f | grp "$@"; } bn _jrfg "$@" @@ -3166,10 +3168,12 @@ shk-p() { } # todo: update bash style guide with new exceptions. # note: I wouldn't recommend 2012 to others. +# +# 1090 = source that can't be followed. This is basically never something i want to remedy. shellcheck-except() { local quotes others quotes=2048,2064,2068,2086,2119,2206,2254,2231,2223 - others=2024,2029,2032,2033,2054,2164,2185,2190,2317,2012,2103 + others=2024,2029,2032,2033,2054,2164,2185,2190,2317,2012,2103,1090 shellcheck -e $quotes,$others "$@" || return $? } # wrapper for shellcheck with better defaults. diff --git a/brc2 b/brc2 index a5daa4b..c0cac14 100644 --- a/brc2 +++ b/brc2 @@ -2845,6 +2845,10 @@ mpvk() { mpvl() { mpv --profile=l "$@"; } +# just shuffle +mpvs() { + mpv --profile=s "$@"; +} # mpv for testing video quality, dont scale. mpvt() { mpv --video-unscaled "$@"; diff --git a/g5 b/g5 new file mode 100755 index 0000000..c82be49 --- /dev/null +++ b/g5 @@ -0,0 +1,32 @@ +#!/bin/bash +# I, Ian Kelling, follow the GNU license recommendations at +# https://www.gnu.org/licenses/license-recommendations.en.html. They +# recommend that small programs, < 300 lines, be licensed under the +# Apache License 2.0. This file contains or is part of one or more small +# programs. If a small program grows beyond 300 lines, I plan to switch +# its license to GPL. + +# Copyright 2024 Ian Kelling + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +glib=${BASH_SOURCE[0]%/*}/g-lib.sh + +if [[ ! -s $glib ]]; then + echo "$0: error, can't find g-lib.sh" >&2; exit 1 +fi + +source $glib + +echo "$*" >>/tmp/g2.log +g g5 "$@" diff --git a/g6 b/g6 new file mode 100755 index 0000000..2cc3de0 --- /dev/null +++ b/g6 @@ -0,0 +1,32 @@ +#!/bin/bash +# I, Ian Kelling, follow the GNU license recommendations at +# https://www.gnu.org/licenses/license-recommendations.en.html. They +# recommend that small programs, < 300 lines, be licensed under the +# Apache License 2.0. This file contains or is part of one or more small +# programs. If a small program grows beyond 300 lines, I plan to switch +# its license to GPL. + +# Copyright 2024 Ian Kelling + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +glib=${BASH_SOURCE[0]%/*}/g-lib.sh + +if [[ ! -s $glib ]]; then + echo "$0: error, can't find g-lib.sh" >&2; exit 1 +fi + +source $glib + +echo "$*" >>/tmp/g2.log +g g6 "$@" -- 2.30.2