Compare commits

...

12 Commits

Author SHA1 Message Date
github-actions[bot]
179938132c chore: update pre-commit hooks (#120) 2025-06-09 08:06:27 +03:00
renovate[bot]
bae84c176c fix(container): update image python (3.13.3 → 3.13.4) (#119)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-05 07:45:53 +03:00
be8a6761af test: expand version comparison tests (#118) 2025-06-04 12:12:55 +03:00
c348f3625f chore(lint): fix replacable helper typo (#116)
* Fix typo in replaceable helper

* chore(docs): add docstrings to `codex/rename-replacable-to-replaceable-and-update-references` (#117)

Docstrings generation was requested by @ivuorinen.

* https://github.com/ivuorinen/dotfiles/pull/116#issuecomment-2938946257

The following files were modified:

* `scripts/install-cheat-purebashbible.sh`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-06-04 11:00:42 +03:00
094f19c99c chore(config): tweak yabai config
Signed-off-by: Ismo Vuorinen <ismo@ivuorinen.net>
2025-06-03 13:58:04 +03:00
5a23ae8f01 chore(config): nvim tweaks
Signed-off-by: Ismo Vuorinen <ismo@ivuorinen.net>
2025-06-03 13:57:01 +03:00
github-actions[bot]
ee47821089 chore: update pre-commit hooks (#115) 2025-06-02 08:16:06 +03:00
github-actions[bot]
b834ce04f7 chore: update pre-commit hooks (#114) 2025-05-29 14:54:33 +03:00
github-actions[bot]
6a62d73d7f chore: update pre-commit hooks (#113) 2025-05-26 13:15:01 +03:00
github-actions[bot]
440842ed34 chore: update pre-commit hooks (#112) 2025-05-22 08:29:51 +03:00
renovate[bot]
d0563e4a29 chore(deps): update node.js to v22.16.0 (#111) 2025-05-22 01:11:53 +03:00
github-actions[bot]
bc404bfbea chore: update pre-commit hooks (#110) 2025-05-19 08:27:54 +03:00
9 changed files with 51 additions and 16 deletions

2
.nvmrc
View File

@@ -1 +1 @@
22.15.1
22.16.0

View File

@@ -23,7 +23,7 @@ repos:
args: [--autofix, --no-sort-keys]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.44.0
rev: v0.45.0
hooks:
- id: markdownlint
args: [-c, .markdownlint.json, --fix]
@@ -49,7 +49,7 @@ repos:
- id: actionlint
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 40.10.4
rev: 40.48.4
hooks:
- id: renovate-config-validator

View File

@@ -1 +1 @@
3.13.3
3.13.4

View File

@@ -213,7 +213,7 @@ get_sha256sum()
# $2 - filename (string)
#
# Returns 1 when replaceable, 0 when not replaceable.
replacable()
replaceable()
{
FILE1="$1"
FILE2="$2"

View File

@@ -5,7 +5,7 @@
-- ── Install lazylazy ────────────────────────────────────────────────
-- https://github.com/folke/lazy.nvim
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not vim.uv.fs_stat(lazypath) then
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
local out = vim.fn.system {
'git',

View File

@@ -13,7 +13,7 @@ local a = vim.api -- A table to store API functions
g.mapleader = ' ' -- Space as the leader key
g.maplocalleader = ' ' -- Space as the local leader key
g.colors_theme = 'pencil' -- Set the colorscheme
g.colors_theme = 'onedark' -- Set the colorscheme
-- g.colors_variant_light = 'tokyonight-day' -- Set the light variant
-- g.colors_variant_dark = 'tokyonight-storm' -- Set the dark variant

View File

@@ -22,16 +22,19 @@ yabai -m config \
# apps to not manage (ignore)
# TODO: add apps from aerospace config to here
# list active apps:
# > yabai -m query --windows | jq .[].app
# > yabai -m query --windows | jq .[].app | sort | uniq
yabai -m rule --add app="1Password" manage=off
yabai -m rule --add app="Fork" manage=off
yabai -m rule --add app="JetBrains Rider" manage=off
yabai -m rule --add app="Logi Options" manage=off
yabai -m rule --add app="MSTeams" manage=off
yabai -m rule --add app="Microsoft Teams" manage=off
yabai -m rule --add app="PhpStorm" manage=off
yabai -m rule --add app="Slack" manage=off
yabai -m rule --add app="System Settings" manage=off
yabai -m rule --add app="^Logi Options$" manage=off
yabai -m rule --add app="^Microsoft Teams$" manage=off
yabai -m rule --add app="^PhpStorm$" manage=off
yabai -m rule --add app="^Slack$" manage=off
yabai -m rule --add app="^TIDAL$" manage=off
yabai -m rule --add app="^Windows App$" manage=off
yabai -m rule --add app="TIDAL" manage=off
yabai -m rule --add app="Windows App" manage=off
yabai -m rule --add app="Zoom" manage=off
# apply rules
yabai -m rule --apply

View File

@@ -46,9 +46,25 @@ def test():
assert vercmp("2.4 >= 2.4")
assert vercmp("2.5 >= 2.4")
assert vercmp("3 >= 2.999")
assert vercmp("2.9 < 2.9a")
assert vercmp("2.9a < 2.9")
assert vercmp("2.9a >= 2.8")
# multiple comparisons in a single expression
assert vercmp("1.0 < 2.0 <= 2.0")
assert not vercmp("1.0 > 2.0 < 3.0")
# mixed major/minor version comparisons
assert vercmp("2 >= 1.5")
assert not vercmp("1 < 1.0")
# invalid operator should raise an error
try:
vercmp("1.0 <> 2.0")
except KeyError:
pass
else:
assert False, "invalid operator did not raise"
if __name__ == "__main__":
if len(sys.argv) == 2 and sys.argv[1] == "test":

18
scripts/install-cheat-purebashbible.sh Executable file → Normal file
View File

@@ -47,6 +47,22 @@ prepare_cheat_dest()
echo "$cheat_dest"
}
# Processes chapter files from the pure-bash-bible repository and generates or updates corresponding cheat sheets.
#
# For each chapter file, creates or updates a cheat sheet in the appropriate destination directory, removes chapter end markers, and ensures required metadata is present.
#
# Globals:
# * PBB_TEMP_DIR: Directory containing the cloned pure-bash-bible repository.
# * PBB_SYNTAX, PBB_TAGS, PBB_SOURCE: Metadata strings for cheat sheets.
#
# Outputs:
# * Writes or updates cheat sheet files in the determined cheat sheet directory.
#
# Example:
#
# ```bash
# process_chapters
# ```
process_chapters()
{
local cheat_dest
@@ -59,7 +75,7 @@ process_chapters()
header=$(grep -e '^[#] ' "$f" | head -1 | awk '{print tolower($2)}')
cheat_file="$cheat_dest/$header"
if ! replacable "$f" "$cheat_file"; then
if ! replaceable "$f" "$cheat_file"; then
cp "$f" "$cheat_file" && msg_run "Updated: $cheat_file"
fi