Commit Graph

226 Commits

Author SHA1 Message Date
194ead0148 Use gentler SIGTERM instead of SIGKILL for music apps 2025-12-07 14:36:11 +01:00
e29f2ec04b Reduce music parallelism check interval from 10s to 3s 2025-12-07 14:35:04 +01:00
a116a551d5 Fix music parallelism log to use user directory instead of /var/log 2025-12-07 14:34:23 +01:00
3e1b8e7d8a Fix music parallelism: add youtube-music Electron app detection and use SIGKILL
- Added 'youtube-music' and 'YouTube Music' patterns to detect Electron app
- Added explicit killing of youtube-music process
- Use SIGKILL (-9) to ensure apps are actually terminated
- Fixed log function to not fail on permission errors
2025-12-07 14:31:36 +01:00
addfa1a9ae Add music parallelism prevention script
Prevents multitasking between focus work and music streaming.
When focus apps (VS Code, Steam, Godot, etc.) are detected running
alongside music services (YouTube Music, Spotify, etc.), the music
is automatically stopped.

Features:
- Monitors for focus applications (IDEs, games, creative software)
- Detects music streaming via browser tabs and native apps
- Closes music windows/processes when conflict detected
- Desktop notifications when music is stopped
- Status command to check current state
- Systemd service for background monitoring
2025-12-07 14:27:19 +01:00
1635469320 Add multi-layer protection to shutdown timer monitor
- Add RefuseManualStop=true to prevent systemctl stop
- Add RestartForceExitStatus to restart even on SIGTERM/SIGKILL
- Add watchdog timer that checks monitor every 60 seconds
- Watchdog also restarts the main timer if stopped
- Tested: manual stop refused, pkill auto-restarts, timer tampering detected
2025-12-07 14:20:05 +01:00
a1b9200d19 Add shutdown timer monitor service to prevent disabling
- Remove 'disable' option from setup_midnight_shutdown.sh
- Add shutdown-timer-monitor.sh that watches the timer every 30s
- Re-enables timer automatically if someone tries to disable it
- Monitor service installed alongside the timer
- Makes it significantly harder to bypass the shutdown schedule
- Similar pattern to hosts-file-monitor.service
2025-12-07 14:08:13 +01:00
4cb3a62491 Add custom entries protection to hosts install.sh
- Track custom blocked entries in /etc/hosts.custom-entries.state
- Block installation if any previously blocked entries are removed
- No bypass option - manual chattr removal required for changes
- Protects against impulsive unblocking of sites
- State file is also protected with chattr +i
2025-12-07 14:01:41 +01:00
b33385671f Add original monolithic Nextcloud setup script
This is the original all-in-one script that was later split into:
- raspberry_pi_flash_sd.sh (SD card flashing)
- raspberry_pi_nextcloud.sh (Nextcloud installation)

Kept for reference and as an alternative single-script deployment option.
2025-12-05 20:01:53 +01:00
b8de5968db Add Raspberry Pi 5 Nextcloud deployment scripts
- raspberry_pi_flash_sd.sh: Flash RPi OS to SD card (local/remote)
  - Auto-discovers SD cards on local or remote systems
  - Configures headless SSH access with auto-generated passwords
  - Supports flashing via remote laptop with SD card reader

- raspberry_pi_nextcloud.sh: Install and configure Nextcloud
  - Automated installation of Nextcloud with Apache, MariaDB, Redis
  - DuckDNS + Let's Encrypt for publicly trusted HTTPS
  - Security hardening: HSTS, cron jobs, default phone region
  - Auto-generated admin credentials stored in config file
  - fix command for security warnings
  - setup-ssl-remote for Let's Encrypt via DuckDNS

Includes shellcheck compliance with appropriate directives.
2025-12-05 20:00:30 +01:00
02e799453e Add gitignore for Raspberry Pi config files with passwords 2025-12-05 19:57:57 +01:00
95da70203b Add greylist support for challenge-required packages
- Create pacman_greylist.txt with virtualbox as initial entry
- Add is_greylisted_package_name() for substring matching
- Add remove_installed_greylisted_packages() to auto-uninstall
- Replace hardcoded VirtualBox check with generic greylist check
- Update installer to copy greylist file
2025-12-04 21:33:29 +01:00
c95462c5db fix: repair media-organizer.service and prevent future issues
- Add fix_systemctl.sh to repair corrupted media-organizer.service
- Fix setup_media_organizer.sh to use SUDO_USER instead of whoami
  when running with sudo (prevents User/Group being set to root)

The service was failing due to:
1. Corrupted ExecStart path (line break in the middle)
2. Wrong script path (missing 'utils/' directory)
3. User/Group set to root instead of actual user
2025-12-04 20:31:44 +01:00
c2972c4c33 Fix check_and_enable_services.sh and hosts guard
- Fix startup_monitor check to verify timer instead of service
- Fix pacman hooks filename check (10-unlock-etc-hosts.hook, 90-relock-etc-hosts.hook)
- Add re-verification after fixes to update status correctly
- Set immutable attribute before bind mount in pacman-post-relock-hosts.sh
- Add new check_and_enable_services.sh script for verifying all digital wellbeing services
2025-12-04 15:14:50 +01:00
242cf9eeec feat: script for install unreal mcp kvick 2025-11-28 20:39:02 +01:00
bd0d87b276 chore: rooting bl9000 with etc hosts 2025-11-17 11:14:38 +01:00
dfe079c219 fix: improve pre-commit hook to avoid formatting loop
- Auto-fix with shfmt on staged files
- Run shellcheck validation directly instead of full shell_check.sh
- Avoids shfmt -d validation after auto-formatting (prevents .orig file loop)
- Ensures consistent formatting without blocking commits
2025-11-16 21:20:23 +01:00
03bd36e41d fix: resolve all shellcheck errors
- Replace 'A && B || C' patterns with proper if-then-else statements (SC2015)
- Add check_for_virtualbox function to invoke prompt_for_virtualbox_challenge (SC2317)
- Fix install_launcher function to escape variable in heredoc (SC2119/SC2120)
- Apply shfmt formatting to ensure consistent style

Fixes 7 SC2015 violations, 1 SC2317 violation, and 1 SC2119/SC2120 pair.
All 79 shell files now pass shellcheck without errors.
2025-11-16 21:17:08 +01:00
8e0a720499 test: verify pre-commit hook with all checks enabled 2025-11-16 21:01:17 +01:00
e7dd2e4c6d style: convert tabs to spaces in shell_check.sh 2025-11-16 21:00:22 +01:00
4256df1d15 style: convert remaining tabs to spaces in root_bl9000.sh 2025-11-16 20:59:56 +01:00
53bd0fd60a refactor: remove all skip-fmt flags and enforce all checks always 2025-11-16 20:55:39 +01:00
f9884270e4 fix: format pre-commit hook and root_bl9000.sh with shfmt 2025-11-16 20:48:41 +01:00
26c57518a7 fix: format shell_check.sh with correct indentation (spaces not tabs) 2025-11-16 20:48:19 +01:00
d86f775d66 ci: add GitHub Actions workflow for shell script linting 2025-11-16 20:42:11 +01:00
46fb79b262 feat: add auto-fix to pre-commit hook with --skip-fmt option 2025-11-16 20:40:34 +01:00
0fa3a9dcd5 feat: root bl9000 script with backup functionality 2025-11-16 20:37:48 +01:00
57779a3e20 feat: add 4 utils 2025-11-14 15:44:34 +01:00
d32d305d3b feat: script for formatting sd card 2025-11-14 14:49:51 +01:00
aa462adc4f fix: installing mcp plugin in speicifc unreal project 2025-11-06 21:05:15 +01:00
bfe064f3b9 feat: add install unreal mcp script 2025-11-06 20:33:03 +01:00
dc353d3575 feat: add install unreal mcp script 2025-11-06 20:24:19 +01:00
6d78878b99 chore: fix shell check issues 2025-11-06 19:39:04 +01:00
f11ce4002f feat: added script for fixing xbox controller 2025-11-06 17:31:02 +01:00
1650c31b1a Import testsAndMisc/Bash as subtree (preserve history)
git-subtree-dir: scripts/misc/testsAndMisc-bash
git-subtree-mainline: 38b4214cfb
git-subtree-split: d2e750a20b
2025-11-01 16:27:05 +01:00
38b4214cfb chore: enforce shell_check via tracked pre-commit hook 2025-11-01 16:02:58 +01:00
8c1fe9e7a1 Add test script 2025-11-01 15:45:00 +01:00
795f56023e fix: shellcheck issues 2025-11-01 15:36:22 +01:00
2c46984c61 feat: shell check script 2025-11-01 13:50:07 +01:00
2806b969ca chore; added copilot instructions 2025-11-01 13:47:38 +01:00
06d327ebd9 feat: removed yt from pacman blocked list 2025-10-31 18:00:30 +01:00
12cc8a2ae3 Revert "feat: removed pre unlock hosts script"
This reverts commit 0b9503695a.
2025-10-31 17:50:11 +01:00
249f29f11a feat: add 3 python packages to whitelist 2025-10-31 17:37:26 +01:00
2b62e60ee1 chore: organize scripts folder 2025-10-31 17:31:16 +01:00
0b9503695a feat: removed pre unlock hosts script 2025-10-31 17:16:48 +01:00
d2e750a20b feat: add fix unity script and transwcibe 2025-10-26 14:46:18 +01:00
8d5e0ce1ba expand pacman whitelist and fix locked db 2025-10-24 23:30:01 +02:00
60b7ccbf0f feat: more robust toggle wheel script 2025-10-24 23:20:12 +02:00
0d5ea0a9d4 added yt and youtube to blocked keywords 2025-10-19 22:14:09 +02:00
3dd6a06e3a feat: blocked and allowed list for pacman wrapper 2025-10-16 19:48:12 +02:00