From e30ca4eb165eb61fad3d1efd0a703c56e266e9d7 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Wed, 4 Mar 2026 18:03:19 -0500 Subject: [PATCH] misc cleanups --- config/nvim/lua/plugins/dev.lua | 19 +++++++++++++++++-- scripts/ctl | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/config/nvim/lua/plugins/dev.lua b/config/nvim/lua/plugins/dev.lua index 89ace4e..a535dde 100644 --- a/config/nvim/lua/plugins/dev.lua +++ b/config/nvim/lua/plugins/dev.lua @@ -147,7 +147,7 @@ return { { 'barrettruth/pending.nvim', before = function() - vim.g.pending = { debug = true } + vim.g.pending = { debug = false } end, keys = { { 'P', 'Pending' } }, }, @@ -297,7 +297,22 @@ return { require('preview').setup({ github = true, typst = { open = { 'sioyek', '--new-instance' } }, - latex = { open = { 'sioyek', '--new-instance' } }, + latex = { + open = { 'sioyek', '--new-instance' }, + output = function(ctx) + return 'build/' .. vim.fn.fnamemodify(ctx.file, ':t:r') .. '.pdf' + end, + args = function(ctx) + return { + '-pdf', + '-interaction=nonstopmode', + '-synctex=1', + '-outdir=build', + '-pdflatex=pdflatex -file-line-error -interaction=nonstopmode %O %S', + ctx.file, + } + end, + }, }) end, keys = { { 'p', 'Preview watch' } }, diff --git a/scripts/ctl b/scripts/ctl index 1a8d302..8f79813 100755 --- a/scripts/ctl +++ b/scripts/ctl @@ -96,7 +96,7 @@ audio) '.[] | select(.info.props."media.class" == $class) | "\(.id)\t\(.info.props."node.description" // .info.props."node.name" // "unknown")\t\(.info.props."node.name" // "")"') [ -z "$devices" ] && exit 0 default_name=$(printf '%s' "$dump" | jq -r --arg key "$default_meta" \ - '.[] | select(.type == "PipeWire:Interface:Metadata" and .info.props."metadata.name" == "default") | .info.metadata[] | select(.key == $key) | .value | fromjson | .name') + '.[] | select(.type == "PipeWire:Interface:Metadata" and .props."metadata.name" == "default") | .metadata[] | select(.key == $key) | .value.name') rows=$(printf '%s\n' "$devices" | while IFS="$(printf '\t')" read -r id name node_name; do active=$([ "$node_name" = "$default_name" ] && echo ">" || echo "") vol=$(wpctl get-volume "$id" 2>/dev/null | awk '{printf "%d", $2 * 100}')