mostlyfix some long annoying things
authorIan Kelling <ian@iankelling.org>
Fri, 1 May 2026 04:42:05 +0000 (00:42 -0400)
committerIan Kelling <ian@iankelling.org>
Fri, 1 May 2026 04:42:05 +0000 (00:42 -0400)
.psqlrc
beet [new file with mode: 0755]
brc2
distro-end
pqrc [new file with mode: 0644]
pqrc-v [new file with mode: 0644]
sqfmt [new file with mode: 0755]
sqlfluff [new file with mode: 0755]
subdir_files/.config/konsolerc
subdir_files/.config/sqlfluff/.sqlfluff

diff --git a/.psqlrc b/.psqlrc
index be763a5b6b5b10b0e9d9e56bbd17b98a29212d3d..89ed6ef0d44d4ba5708fd8ee5fced75c7930fd56 100644 (file)
--- a/.psqlrc
+++ b/.psqlrc
@@ -9,9 +9,13 @@
 \set HISTSIZE 500000
 \set HISTCONTROL ignoredups
 \set ON_ERROR_STOP on
--- auto switch to \x when results are too wide to fix
+\set ECHO errors
+-- Use \x output when results are too wide.
 \x auto
 -- alternative to x auto, this wraps long columns.
 --\pset format wrapped
 
+-- ditch ugly footer,eg "(30 rows)"
+\pset footer off
+
 \unset QUIET
diff --git a/beet b/beet
new file mode 100755 (executable)
index 0000000..88ef765
--- /dev/null
+++ b/beet
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+~/.local/bin/uvx --exclude-newer='31 days' --from 'beets[lyrics,discogs]' beet "$@"
diff --git a/brc2 b/brc2
index f6f38beb953a50bb93086bb4f50f68b84ddfda22..69af5890431733d10a144aba09aef4e2ec80743d 100644 (file)
--- a/brc2
+++ b/brc2
@@ -65,6 +65,7 @@ path_add --end ~/.local/bin
 #path_add --ifexists --end /a/opt/scancode-toolkit-3.10.
 path_add --ifexists --end /p/bin
 
+export UV_EXCLUDE_NEWER='31 days'
 
 ### Commented because I tried a cpan module, but didn't want to keep it, so I removed cpan too,
 ### then I found that this was causing problems with my perl.
index 1725cbaa29403cd753785aa60328635d95ca3838..2ba01e76e8ee9b3d332284744dd71639b73f1405 100755 (executable)
@@ -1715,58 +1715,12 @@ esac
 
 #### note: the central place for my beets docs is in t.org
 
-## note: begin u24 message upon pip install
-# If you wish to install a non-Debian-packaged Python package,
-# create a virtual environment using python3 -m venv path/to/venv.
-# Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
-# sure you have python3-full installed.
-
-# If you wish to install a non-Debian packaged Python application,
-# it may be easiest to use pipx install xyz, which will manage a
-# virtual environment for you. Make sure you have pipx installed.
-
-# See /usr/share/doc/python3.12/README.venv for more information.
-## end
-## in ubuntu, you can install python3-venv
-
-#   ### begin msg from below without
-#   #   error: externally-managed-environment
-
-#   # × This environment is externally managed
-#   # ╰─> To install Python packages system-wide, try apt install
-#   #     python3-xyz, where xyz is the package you are trying to
-#   #     install.
-
-#   #     If you wish to install a non-Debian-packaged Python package,
-#   #     create a virtual environment using python3 -m venv path/to/venv.
-#   #     Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
-#   #     sure you have python3-full installed.
-
-#   #     If you wish to install a non-Debian packaged Python application,
-#   #     it may be easiest to use pipx install xyz, which will manage a
-#   #     virtual environment for you. Make sure you have pipx installed.
-
-#   #     See /usr/share/doc/python3.12/README.venv for more information.
-
-#   # note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
-#   # hint: See PEP 668 for the detailed specification.
-#   ### end msg
-#   #
-#   # The instructions from the message of course dont work in trisquel. I
-#   # tried using --break-system-packages, but then trying to use pipx
-#   # failed with something like: no module ensurepath, and again
-#   # complained that I should install system packages, but this time
-#   # there was no alternative. bleh
-# if [[ ! -e ~/.local/bin/pip ]]; then
-#   tmp=$(mktemp)
-#   wget -O$tmp https://bootstrap.pypa.io/get-pip.py
-
-#   python3 $tmp --user
-#   hash -r
-#   python3 -m pip install --user pipx --break-system-packages
-#   # todo: periodically run this:
-#   # Upgrade pipx with python3 -m pip install --user --upgrade pipx
-# fi
+# I got rather frustrated with pip and pipx on trisquel giving a bunch
+# of confusing errors, so, trying out uv.
+
+if ! type -p uv &>/dev/null; then
+  curl -LsSf https://astral.sh/uv/install.sh | sh
+fi
 
 
 
@@ -2094,7 +2048,7 @@ if [[ ! -e /etc/apt/sources.list.d/pgdg.sources ]]; then
     :
     # if we get oomed, try enabling this in sysctl to disable overcommit.
     # vm.overcommit_memory = 2
-    fi
+  fi
 fi
 
 #####
diff --git a/pqrc b/pqrc
new file mode 100644 (file)
index 0000000..6d074c7
--- /dev/null
+++ b/pqrc
@@ -0,0 +1,13 @@
+-- General purpose psqlrc for scripts.
+
+-- aka -q
+\set QUIET on
+\set ON_ERROR_STOP on
+
+--  print queries that fail.
+\set ECHO errors
+\pset format unaligned
+-- print tuples only.
+\t
+-- space field separator.
+\f ' '
diff --git a/pqrc-v b/pqrc-v
new file mode 100644 (file)
index 0000000..a92b37a
--- /dev/null
+++ b/pqrc-v
@@ -0,0 +1,13 @@
+-- pqrc-v = pqrc + verbose
+
+\set QUIET on
+\set ON_ERROR_STOP on
+
+-- print time of each query.
+\timing on
+-- print queries as they are sent to the server.
+\set ECHO queries
+-- auto switch to \x when results are too wide to fix
+\x auto
+
+\unset QUIET
diff --git a/sqfmt b/sqfmt
new file mode 100755 (executable)
index 0000000..6f07e8d
--- /dev/null
+++ b/sqfmt
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# alternate command which is ok too:
+# sqlformat -k lower -r --wrap_after=80
+
+~/.local/bin/uvx --exclude-newer='31 days' sqlfluff format --disable-progress-bar "$@"
+
+
+# other tools which I haven't tried or saved notes on:
+# pgformatter, sqlfmt sql-formatter, sqlformat-rs
diff --git a/sqlfluff b/sqlfluff
new file mode 100755 (executable)
index 0000000..d15191b
--- /dev/null
+++ b/sqlfluff
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+~/.local/bin/uvx --exclude-newer='31 days' sqlfluff "$@"
index 310d7bf3f17eaaa5b3dd121c8bca7217adb1b70f..ec251f8773ac0724b1d6dc8618a2e3079a11873f 100644 (file)
@@ -24,9 +24,9 @@ ShowMenuBarByDefault=false
 2 screens: XPosition=2
 2 screens: YPosition=2
 3840x2160 screen: Height=2156
-3840x2160 screen: Width=3836
-3840x2160 screen: XPosition=2
-3840x2160 screen: YPosition=2
+3840x2160 screen: Width=1916
+3840x2160 screen: XPosition=1282
+3840x2160 screen: YPosition=1082
 DP-0=DP-0
 DP-1 eDP-1=DP-1
 DP-1-1 eDP-1=DP-1-1
index a3c29ef144881ceb709d205b9a68f7ef378b643f..405271bde8524832494d5faf0bce14415254b111 100644 (file)
@@ -6,9 +6,26 @@ dialect = postgres
 # exclude_rules = LT02
 #ignore = lexing,linting,parsing,templating
 
+# default 80.
+max_line_length = 120
+
+
+# light up the cores.
+processes = -1
+
+# by default it skips over big files.
+large_file_skip_byte_limit = 0
 
 [sqlfluff:indentation]
 tab_space_size = 2
 
 [sqlfluff:rules:capitalisation.keywords]
 capitalisation_policy = lower
+[sqlfluff:rules:capitalisation.identifiers]
+extended_capitalisation_policy = lower
+[sqlfluff:rules:capitalisation.functions]
+extended_capitalisation_policy = lower
+[sqlfluff:rules:capitalisation.literals]
+capitalisation_policy = lower
+[sqlfluff:rules:capitalisation.types]
+extended_capitalisation_policy = lower