misc cleanups

This commit is contained in:
Barrett Ruth 2026-03-04 18:03:19 -05:00
parent 902f0f3ad6
commit e30ca4eb16
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
2 changed files with 18 additions and 3 deletions

View file

@ -147,7 +147,7 @@ return {
{ {
'barrettruth/pending.nvim', 'barrettruth/pending.nvim',
before = function() before = function()
vim.g.pending = { debug = true } vim.g.pending = { debug = false }
end, end,
keys = { { '<leader>P', '<cmd>Pending<cr>' } }, keys = { { '<leader>P', '<cmd>Pending<cr>' } },
}, },
@ -297,7 +297,22 @@ return {
require('preview').setup({ require('preview').setup({
github = true, github = true,
typst = { open = { 'sioyek', '--new-instance' } }, 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, end,
keys = { { '<leader>p', '<cmd>Preview watch<cr>' } }, keys = { { '<leader>p', '<cmd>Preview watch<cr>' } },

View file

@ -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" // "")"') '.[] | 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 [ -z "$devices" ] && exit 0
default_name=$(printf '%s' "$dump" | jq -r --arg key "$default_meta" \ 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 rows=$(printf '%s\n' "$devices" | while IFS="$(printf '\t')" read -r id name node_name; do
active=$([ "$node_name" = "$default_name" ] && echo ">" || echo "") active=$([ "$node_name" = "$default_name" ] && echo ">" || echo "")
vol=$(wpctl get-volume "$id" 2>/dev/null | awk '{printf "%d", $2 * 100}') vol=$(wpctl get-volume "$id" 2>/dev/null | awk '{printf "%d", $2 * 100}')