Skip to content

Commit f628617

Browse files
authored
Merge pull request #12 from Firstp1ck/check-aurhelper
Check aurhelper
2 parents c5ddcd8 + 2af41a1 commit f628617

File tree

8 files changed

+452
-92
lines changed

8 files changed

+452
-92
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ A clear and concise description of what you expected to happen.
2424
If applicable, add screenshots to help explain your problem.
2525

2626
**Desktop (please complete the following information):**
27-
- OS: [e.g. iOS]
28-
- Browser [e.g. chrome, safari]
29-
- Version [e.g. 22]
27+
- OS: [e.g. EndeavourOS]
28+
- Package Version [e.g. v0.5.0 git]
3029

3130
**Additional context**
3231
Add any other context about the problem here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<!-- Thank you for contributing to Hyprland-Simple-Setup! Please read CONTRIBUTING.md before submitting. -->
2+
3+
## Summary
4+
Briefly describe the problem and how your change solves it.
5+
6+
## Type of change
7+
- [ ] feat (new feature)
8+
- [ ] fix (bug fix)
9+
- [ ] docs (documentation only)
10+
- [ ] refactor (no functional change)
11+
- [ ] perf (performance)
12+
- [ ] test (add/update tests)
13+
- [ ] chore (build/infra/CI)
14+
- [ ] ui (visual/interaction changes)
15+
- [ ] breaking change (incompatible behavior)
16+
17+
## Related issues
18+
Closes #
19+
20+
## How to test
21+
List exact steps and commands to verify the change. Include flags like `--dry-run` when appropriate.
22+
23+
```bash
24+
# examples
25+
cargo fmt --all
26+
cargo clippy --all-targets --all-features -- -D warnings
27+
cargo test -- --test-threads=1
28+
RUST_LOG=hyprland_setup_tui=debug cargo run -- --dry-run
29+
```
30+
31+
## Screenshots / recordings (if UI changes)
32+
Include before/after images or a short GIF. Update files in `Images/` if relevant.
33+
34+
## Checklist
35+
- [ ] Code compiles locally
36+
- [ ] `cargo fmt --all` ran without changes
37+
- [ ] `cargo clippy --all-targets --all-features -- -D warnings` is clean
38+
- [ ] `cargo test -- --test-threads=1` passes
39+
- [ ] Added or updated tests where it makes sense
40+
- [ ] Updated docs if behavior, options, or keybinds changed (README, config examples)
41+
- [ ] For UI changes: included screenshots and updated `Images/` if applicable
42+
- [ ] Changes respect `--dry-run` and degrade gracefully if `pacman`/`paru`/`yay` are unavailable
43+
- [ ] Not a packaging change for AUR (otherwise propose in `hyprland-simple-setup-git` repos)
44+
45+
## Notes for reviewers
46+
Call out tricky areas, assumptions, edge cases, or follow-ups.
47+
48+
## Breaking changes
49+
Describe any breaking changes and migration steps (e.g., config key renames).
50+
51+
## Additional context
52+
Logs, links to discussions, design notes, or prior art.
53+
54+

.github/workflows/rust.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Rust
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
permissions:
8+
contents: read
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Build
20+
run: cargo build --verbose
21+
- name: Run tests
22+
run: cargo test --verbose -- --test-threads=1

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ RELEASE.md
1616

1717
# Added by cargo
1818
/target
19+
20+
Documents/*
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env bash
2+
3+
LOG_FILE="${HOME}/Linux-Setup.log"
4+
5+
# Give notification daemon a moment to start
6+
sleep 3
7+
8+
# If notify-send is unavailable, exit quietly
9+
if ! command -v notify-send >/dev/null 2>&1; then
10+
exit 0
11+
fi
12+
13+
# If log doesn't exist, nothing to check
14+
[ -f "$LOG_FILE" ] || exit 0
15+
16+
# Limit to warnings from the most recent run (after the last "Starting Hyprland Setup..." debug entry)
17+
start_line=$(grep -n '\[DEBUG\] Starting Hyprland Setup\.\.\.' "$LOG_FILE" | tail -n1 | cut -d: -f1)
18+
if [[ -n "$start_line" ]]; then
19+
log_slice=$(tail -n +"$start_line" "$LOG_FILE")
20+
else
21+
log_slice=$(cat "$LOG_FILE")
22+
fi
23+
24+
# Extract all WARNING messages from the selected slice and notify once per unique message.
25+
# Log format: [YYYY-MM-DD HH:MM:SS] [WARNING] message...
26+
mapfile -t warnings < <(awk '/\[WARNING\]/ { sub(/^.*\[WARNING\] /,""); msg=$0; if (!seen[msg]++) print msg }' <<< "$log_slice")
27+
28+
for w in "${warnings[@]}"; do
29+
[ -n "$w" ] || continue
30+
notify-send -u critical -t 0 "Hyprland Setup - Warning" "$w"
31+
done
32+
33+

dotfiles/.config/hypr/sources_example/autostart.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,5 @@ exec-once = blueman-applet &
5151
# Start Waybar
5252
exec-once = sleep 1; waybar -c "$HOME/.config/waybar/config.jsonc" &
5353

54-
exec-once = $hyprscripts/Startup_check.sh &
54+
exec-once = $hyprscripts/Startup_check.sh &
55+
exec-once = sleep 5; $hyprscripts/check_setup_warnings.sh &

0 commit comments

Comments
 (0)