From: Ian Kelling Date: Fri, 1 May 2026 04:42:05 +0000 (-0400) Subject: mostlyfix some long annoying things X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=bdbb78a72930ba80960f18c0cc8249ed0a481586;p=distro-setup mostlyfix some long annoying things --- diff --git a/.psqlrc b/.psqlrc index be763a5..89ed6ef 100644 --- 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 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 f6f38be..69af589 100644 --- 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. diff --git a/distro-end b/distro-end index 1725cba..2ba01e7 100755 --- a/distro-end +++ b/distro-end @@ -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 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 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 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 index 0000000..d15191b --- /dev/null +++ b/sqlfluff @@ -0,0 +1,3 @@ +#!/bin/bash + +~/.local/bin/uvx --exclude-newer='31 days' sqlfluff "$@" diff --git a/subdir_files/.config/konsolerc b/subdir_files/.config/konsolerc index 310d7bf..ec251f8 100644 --- a/subdir_files/.config/konsolerc +++ b/subdir_files/.config/konsolerc @@ -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 diff --git a/subdir_files/.config/sqlfluff/.sqlfluff b/subdir_files/.config/sqlfluff/.sqlfluff index a3c29ef..405271b 100644 --- a/subdir_files/.config/sqlfluff/.sqlfluff +++ b/subdir_files/.config/sqlfluff/.sqlfluff @@ -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