Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .claude/worktrees/graceful-crafting-hanrahan
Submodule graceful-crafting-hanrahan deleted from a51460
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Tests

on:
push:
branches:
- dev
- rc
- master
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
test:
name: Configuration and script checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Comment thread
coderabbitai[bot] marked this conversation as resolved.
with:
persist-credentials: false

- name: Install test dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends lua5.4 shellcheck
sudo ln -sf /usr/bin/lua5.4 /usr/local/bin/lua
sudo ln -sf /usr/bin/luac5.4 /usr/local/bin/luac

- name: Report tool versions
run: |
lua -v
shellcheck --version
python3 --version

- name: Run the test suite
run: sh tests/run.sh
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ Scripts/pkg_user.lst
Configs/.config/uwsm/*
./.*
build

# Local agent worktrees, never part of the tree
.claude/
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
Group navigation stays on `Super + Alt + arrows`
- Hyprland: the right Control key no longer hides Waybar on its own. Hiding moved to `Super + Ctrl + B`
- Hyprland: workspaces 11-20 on the numpad respond again
- OCR: the language list in the result notification is no longer split across arguments
- Wallpaper: the duplicate check in the kon backend compares against the whole hash list again
- Repo: dropped two stray gitlinks that made `git submodule` fail on a fresh clone

## v26.7.4 | 4th Week of July 2026 Release

Expand Down
2 changes: 2 additions & 0 deletions Configs/.config/uwsm/env.d/01-gpu.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env sh

# 00-gpu.sh - GPU detection
# This env script will detect the presence of various GPUs on the system
# and set environment variables accordingly.
Expand Down
1 change: 0 additions & 1 deletion Configs/.config/zsh/ohmyzsh
Submodule ohmyzsh deleted from 9e2392
2 changes: 1 addition & 1 deletion Configs/.local/lib/hyde/shutils/ocr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ ocr_extract() {
)

printf "%s" "$tesseract_output" | wl-copy
notify-send -a "HyDE Alert" "$(echo -e "OCR: ${#tesseract_output} symbols recognized\n\nLanguages used ${tesseract_languages[@]/#/'\n '}")" -i "$image_path" -e -r 9
notify-send -a "HyDE Alert" "$(echo -e "OCR: ${#tesseract_output} symbols recognized\n\nLanguages used ${tesseract_languages[*]/#/'\n '}")" -i "$image_path" -e -r 9

}
2 changes: 1 addition & 1 deletion Configs/.local/lib/hyde/wallpaper.kon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ done
if [ ! -z "$setTheme" ] && [ ! -z "$setWall" ]; then
inwallHash="$(set_hash "$setWall")"
get_hashmap "$tgtPath/$setTheme"
if [[ ${wallHash[@]} == *"$inwallHash"* ]]; then
if [[ ${wallHash[*]} == *"$inwallHash"* ]]; then
notify-send -a "HyDE Notify" -i "$thmbDir/$inwallHash.sqre" "Error" "Hash matched in $setTheme"
exit 0
fi
Expand Down
38 changes: 38 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Tests

Structural checks over the shipped configuration and scripts. They read the
tree, never the machine: no Hyprland session, no installed HyDE, nothing
outside the repository is touched.

## Running

```sh
sh tests/run.sh # every case
sh tests/run.sh binds # only cases whose name contains "binds"
```

Each case is an executable `tests/test_*.sh` that prints its own diagnostics
and exits non-zero on failure. `tests/run.sh` discovers them, so adding a case
is adding a file.

## Cases

| Case | Checks |
| --- | --- |
| `test_binds.sh` | Loads the Lua keybinds against a stubbed Hyprland API: no two binds share a combination once modifiers are folded to what Hyprland matches on, no keysym sits in a modifier position, no bind uses the `code:NN` form the Lua parser rejects, every bind has a description, every `hyde-shell` command it runs exists. Touchpad gestures are checked in the same pass: a valid finger count, a direction and action Hyprland accepts, and no two gestures on the same finger count and direction |
| `test_git.sh` | The tree holds no gitlink without a matching `.gitmodules` entry, which would break `git submodule` and anything walking submodules |
| `test_dots.sh` | Every installer metafile under `Scripts/dots` parses, declares the keys the installer needs, uses a known action, and points at a source directory that exists |
| `test_lua_syntax.sh` | Every shipped Lua file parses |
| `test_shell.sh` | Every shipped shell script parses, and shellcheck finds no error-severity problem |

## Dependencies

| Tool | Used by | Missing |
| --- | --- | --- |
| `lua`, `luac` | bind and Lua syntax checks | case is skipped |
| `python3` 3.11+ | metafile check | case is skipped |
| `shellcheck` | shell check | only the parse half runs |

A skipped case is reported as such and does not fail the run, so the suite
stays usable on a machine without the full toolchain. CI installs everything,
so nothing is skipped there.
29 changes: 29 additions & 0 deletions tests/lib/common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env sh
# Shared helpers for the test cases.

TESTS_DIR=${TESTS_DIR:-$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)}
export TESTS_DIR

# The tree under test. Defaults to the checkout the suite lives in, and can
# be pointed at another one to check it with this suite.
REPO_ROOT=${REPO_ROOT:-$(CDPATH='' cd -- "$TESTS_DIR/.." && pwd)}
export REPO_ROOT

_failures=0

fail() {
_failures=$((_failures + 1))
printf ' fail: %s\n' "$1"
}

skip() {
printf ' skip: %s\n' "$1"
}

finish() {
if [ "$_failures" -ne 0 ]; then
printf ' %d failure(s)\n' "$_failures"
exit 1
fi
exit 0
}
Loading
Loading