Compare commits

7 Commits
Author SHA1 Message Date
romanzy313 4f051082a3 easier python env 2026-11-30 21:48:11 +01:00
romanzy313 c2bd4d9468 stricter python lsp 2026-11-30 21:41:28 +01:00
romanzy313 467450029d optimize concurrent changes 2026-11-30 17:39:10 +01:00
romanzy313 64888f9b6a clear screen 2026-11-30 17:18:04 +01:00
romanzy313 5e6a665265 simplify 2026-11-30 17:16:37 +01:00
romanzy313 a430080725 exec-watch 2026-11-30 17:12:57 +01:00
romanzy313 0f52c02146 scripts 2026-11-30 17:02:05 +01:00
8 changed files with 69 additions and 13 deletions
+3 -2
View File
@@ -6,14 +6,15 @@ stow:
unstow: unstow:
stow -D nvim ghostty emacs stow -D nvim ghostty emacs
# if stow is not available, symlink configs instead
# TODO: this is currently outdated
LN := ln -svf LN := ln -svf
LNDIR := ln -sv LNDIR := ln -sv
DOTFILES_DIR := $(shell pwd) DOTFILES_DIR := $(shell pwd)
TARGET_DIR := $(HOME) TARGET_DIR := $(HOME)
# if stow is not available, symlink configs instead
# this is currently outdated
.PHONY: link unlink .PHONY: link unlink
link: nvim link: nvim
+7 -1
View File
@@ -4,4 +4,10 @@
# Usage # Usage
Run `make stow` Run `make stow`.
Add the `./scripts` contents to the path for ez codin
```sh
export PATH="$PATH:$HOME/dotfiles/scripts"
```
-10
View File
@@ -1,10 +0,0 @@
# https://pypi.org/project/c-formatter-42/
# install via
# pip3 install --user c-formatter-42
normify(){
c_formatter_42 *.c *.h
}
pycheck(){
flake8 --color=never . && echo "Success: flake8" && mypy --strict .
}
@@ -110,6 +110,7 @@ local servers = {
settings = { settings = {
basedpyright = { basedpyright = {
analysis = { analysis = {
typeCheckingMode = "strict",
diagnosticSeverityOverrides = { diagnosticSeverityOverrides = {
reportUnannotatedClassAttribute = "none", reportUnannotatedClassAttribute = "none",
reportAny = "none", reportAny = "none",
@@ -126,6 +127,9 @@ local servers = {
init_options = { init_options = {
settings = { settings = {
lineLength = 79, lineLength = 79,
lint = {
extendSelect = { "ANN2" }, -- Missing return annotations.
},
}, },
}, },
}, },
+25
View File
@@ -0,0 +1,25 @@
#!/bin/sh
set -euo pipefail
script_name=$(basename "$0")
if [ "$#" -eq 0 ]; then
echo "Usage: $script_name command [args ...]" >&2
exit 2
fi
if ! command -v inotifywait >/dev/null; then
echo "$script_name: inotifywait was not found. Install inotify-tools." >&2
exit 127
fi
while true; do
if [ -t 1 ]; then
clear 2>/dev/null || true
fi
( "$@" ) || echo "$script_name: command exited with status $?" >&2
inotifywait --quiet --recursive --event close_write,move,create,delete . >/dev/null
sleep 0.2
done
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
set -euo pipefail
# https://pypi.org/project/c-formatter-42/
# install via
# pip3 install --user c-formatter-42
c_formatter_42 *.c *.h
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
set -euo pipefail
flake8 --color=never . && echo "Success: flake8"
mypy --strict .
Executable
+14
View File
@@ -0,0 +1,14 @@
# Run with `source pyvenv`
if [ -n "${VIRTUAL_ENV:-}" ]; then
return 0
fi
if [ ! -f .venv/bin/activate ]; then
python3 -m venv .venv || return $?
if [ -f requirements.txt ]; then
.venv/bin/python -m pip install -r requirements.txt || return $?
fi
fi
. .venv/bin/activate