From: Ian Kelling Date: Fri, 14 Jun 2024 01:56:16 +0000 (-0400) Subject: fixes X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=eef2ed83fa84b3ac19533dfe0239cef4c2223143;p=distro-setup fixes --- diff --git a/filesystem/usr/local/bin/abrowser b/filesystem/usr/local/bin/abrowser index b67ec81..96c969a 100755 --- a/filesystem/usr/local/bin/abrowser +++ b/filesystem/usr/local/bin/abrowser @@ -20,6 +20,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# note this is duplicated in i3-abrowser if ! test "$BASH_VERSION"; then echo "error: shell is not bash" >&2; exit 1; fi shopt -s inherit_errexit 2>/dev/null ||: # ignore fail in bash < 4.4 @@ -27,13 +28,6 @@ set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" exit status: $?, PIPESTATUS: ${PIPESTATUS[*]}" >&2' ERR -# https://stackoverflow.com/a/2108540 -tmp=:$PATH: -del=/usr/local/bin -tmp=${tmp//:$del:/:} -tmp=${tmp%:} -tmp=${tmp#:} -PATH=$tmp # -allow-downgrade good enough? #rm -f {/p/c/firefox-main-profile,/p/c/firefox-main-profile,/p/c/firefox-vpn2-profile,/mnt/z/firefox-vpn-profile}/compatibility.ini @@ -45,6 +39,14 @@ PATH=$tmp +# remove local/bin from path +# https://stackoverflow.com/a/2108540 +tmp=:$PATH: +del=/usr/local/bin +tmp=${tmp//:$del:/:} +tmp=${tmp%:} +tmp=${tmp#:} +PATH=$tmp # prefer abrowser if type -P abrowser &>/dev/null; then b=abrowser diff --git a/i3-abrowser b/i3-abrowser index 55246ee..83c216a 100755 --- a/i3-abrowser +++ b/i3-abrowser @@ -26,6 +26,14 @@ set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" exit status: $?, PIPESTATUS: ${PIPESTATUS[*]}" >&2' ERR +# remove local/bin from path +# https://stackoverflow.com/a/2108540 +tmp=:$PATH: +del=/usr/local/bin +tmp=${tmp//:$del:/:} +tmp=${tmp%:} +tmp=${tmp#:} +PATH=$tmp # prefer abrowser if type -P abrowser &>/dev/null; then b=abrowser @@ -47,7 +55,7 @@ if i3-msg -t get_tree | jq --stream -r 'select(.[1]|scalars!=null) | "\(.[0]|joi else i3-split-maybe - abrowser & + $b "$@" & # on a fast computer, .5 is too fast, 1 is ok. on x200, 1 is too fast, 2 is ok. sleep 2 i3-msg "[workspace=__focused__ class=\"$b\" instance=\"Navigator\" window_role=\"browser\"] mark abrowser" diff --git a/laptop-xrandr b/laptop-xrandr index bed869d..d57b43f 100755 --- a/laptop-xrandr +++ b/laptop-xrandr @@ -32,13 +32,13 @@ output=$(grep -E "^(HDMI|DP)[^ ]* connected [0-9]" $xf| awk '{print $1}' ||:) edid() { card=$1 sha256sum /dev/null; then + xrandr --delmonitor BIG-$x + fi + done xrandr --setmonitor BIG-LEFT $half_x/298x$y/336+0+$x_offset $output xrandr --setmonitor BIG-RIGHT $half_x/298x$y/336+$(( x_offset + half_x ))+0 none