376 current 2025-05-03 18:04:12 25.05.20250424.f771eb4 6.12.24 *

This commit is contained in:
2025-05-03 18:04:34 -04:00
parent a36b7fdebe
commit 6fe8901228
17 changed files with 679 additions and 16 deletions

View File

@@ -13,7 +13,7 @@ search() {
if [[ "$rcv" == "" ]]; then exit 1; fi
if [[ $(echo "$rs" | rg "$rcv") ]]; then # check if we actually have our note
alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \
-c "execute 'lua vim.g.goyo_if = 1' | Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" &!
-c "execute 'lua vim.g.goyo_if = 1' | Goyo | execute 'normal 4j' | set path+=$main_dir | set wrap | autocmd BufEnter * let b:coc_suggest_disable=1" &!
# -c "lua vim.g.goyo_if = 1"
# -c "syntax match LinkPattern /[a-zA-Z0-9\-][a-zA-Z0-9\-]*\.md/" \
# -c "highlight LinkPattern guifg=LightBlue gui=underline" \
@@ -31,7 +31,7 @@ search() {
# echo "lol"
alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \
-c "execute 'lua vim.g.goyo_if = 1' | Goyo | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \
-c "execute 'lua vim.g.goyo_if = 1' | Goyo | set path+=$main_dir | set wrap | autocmd BufEnter * let b:coc_suggest_disable=1" \
-c "call setline(1, ['---', 'title: $replaced', 'tags: ', '---', '']) | execute 'normal G'" &!
# make sure standardized frontmatter is there
fi
@@ -39,14 +39,14 @@ search() {
open_daily() {
alacritty -t "daily.md" -e nvim "$main/daily.md" \
-c "Goyo | set path+=$main_dir" \
-c "Goyo | set wrap | set path+=$main_dir" \
-c "execute 'normal G'" \
-c "lua vim.g.goyo_if = 1" &!
}
open_todo() {
alacritty -t "todo.md" -e nvim "$main/todo.md" \
-c "execute 'lua vim.g.goyo_if = 1' | Goyo | set path+=$main_dir" &!
-c "execute 'lua vim.g.goyo_if = 1' | set wrap | Goyo | set path+=$main_dir" &!
# -c "execute 'normal G'"
}
@@ -147,7 +147,7 @@ search_by_title() {
replaced="${no_md//[-_]/ }"
alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \
-c "execute 'lua vim.g.goyo_if = 1' | Goyo | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \
-c "execute 'lua vim.g.goyo_if = 1' | Goyo | set wrap | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \
-c "call setline(1, ['---', 'title: $replaced', 'tags: ', '---', '']) | execute 'normal G'" &!
fi
}

View File

@@ -32,12 +32,12 @@ fi
# Import into beets
if [ "$2" = "-na" ] || [ "$2" = "--no-auto" ]; then
if ! /usr/bin/beet import -s /home/synchronous/.music-not-tagged/tmp.mp3; then
if ! /etc/profiles/per-user/synchronous/bin/beet import -s /home/synchronous/.music-not-tagged/tmp.mp3; then
echo "Error importing into beets."
exit 1
fi
else
if ! /usr/bin/beet import -s /home/synchronous/.music-not-tagged/tmp.mp3 <<< "A"; then
if ! /etc/profiles/per-user/synchronous/bin/beet import -s /home/synchronous/.music-not-tagged/tmp.mp3 <<< "A"; then
echo "Error importing into beets."
exit 1
fi
@@ -45,7 +45,7 @@ fi
# Remove all entries from beets
if ! /usr/bin/beet ls | /usr/bin/beet remove -f; then
if ! /etc/profiles/per-user/synchronous/bin/beet ls | /etc/profiles/per-user/synchronous/bin/beet remove -f; then
echo "Error removing entries from beets."
exit 1
fi

View File

@@ -34,7 +34,9 @@ git status --porcelain
echo ""
echo "NixOS Rebuilding..."
prev=$(basename $(readlink /run/current-system) | sed 's/.*nixos-system-\(.*\)-.*$/\1/')
# brain damaged method
# prev=$(basename $(readlink /run/current-system) | sed 's/.*nixos-system-\(.*\)-.*$/\1/')
prev=$(hostname)
# Rebuild, output simplified errors, log trackebacks
sudo /run/current-system/sw/bin/nixos-rebuild switch --flake /home/synchronous/nix-cfg/flake.nix#"$prev" 2>&1 | tee /tmp/nixos-switch.log