Commit Graph

351 Commits

Author SHA1 Message Date
base47
fdced04a67 Address the second set of comments from Copilot 2026-02-25 02:00:33 +01:00
base47
80d00f6826 setup.sh: start with an empty binfolder and ensure there is no symlink or file at the path 2026-02-22 20:40:59 +01:00
base47
18f75882a4 Relocate battery background executables to /usr/local/co.palokaj.battery 2026-02-22 16:30:18 +01:00
base47
15fb455206 Address most of the PR comments from Copilot 2026-02-22 16:30:18 +01:00
base47
acb0eac349 Address the PR comments from base47 2026-02-15 20:48:59 +01:00
base47
2e17e17971 Consistent behavior for charge/discharge actions. Fix calibrate action (#301) 2026-02-14 09:16:51 +01:00
base47
ba94751a92 battery.sh: Check network reachability before version check 2026-02-14 09:16:51 +01:00
base47
6fb7abb11c Add PID to battery.sh log messages 2026-02-14 09:16:51 +01:00
base47
88f501a3b5 Fix confusing on/off meaning in 'adapter on/off' action 2026-02-14 09:16:50 +01:00
base47
30a30da9b7 Add --help and --version actions (#433) 2026-02-14 09:15:53 +01:00
base47
8fb2e4d18d battery.js: Fix online connectivity check 2026-02-14 09:15:53 +01:00
base47
aef458db8f Fix never-ending 'battery charge' action (#439) 2026-02-14 09:14:24 +01:00
base47
502d957949 gui.log: preserve rich object output 2026-02-14 09:14:24 +01:00
base47
65a07fcbb1 battery.js shell-execution helpers: unified output contract, explicit timeouts only, tolerate stderr warnings 2026-02-14 09:14:24 +01:00
base47
33fb672ae1 Make all background battery executables root-owned + cleanup (#443) 2026-02-14 09:13:39 +01:00
base47
b9f5a66194 Add missing visudo.tmp file removal 2026-02-09 20:29:37 +01:00
base47
2bdc8ae953 Remove visudo related checks from change_magsafe_led_color() 2026-02-09 20:29:37 +01:00
base47
39d78e0134 Do not use sudo to read SMC keys 2026-02-09 20:29:37 +01:00
Mentor
6721c2b703 🔼 increment gui version after pull request v1.3.2 2025-11-20 16:40:27 +01:00
Mentor
a3a3a2c8bf 🔼 increment cli version after pull request 2025-11-20 16:29:22 +01:00
Mentor Palokaj
4861a09e04 Merge pull request #413 from base47/fix-issues-377and410
Fix battery update on UI app startup (#377) and disabled charging (410)
2025-11-20 16:28:30 +01:00
base47
232559e06c Do not invoke battery visudo from update.sh, because it may crash the UI (issue #377) 2025-11-20 01:15:25 +01:00
base47
8f63a7b9be Fix the visudo_complete check and avoid writing the SMC key CH0J, which is supposedly never written by battery.sh 2025-11-19 23:24:43 +01:00
base47
8761f97a0e Fix force discharge option for users using a shell other than zsh. 2025-11-19 22:00:39 +01:00
Mentor
3ec12357d9 🔼 bump gui version v1.3.1 2025-11-19 17:19:04 +01:00
Mentor
eb08fefaa3 🐛 Misc bugfixes and add AGENTS.me 2025-11-19 17:13:24 +01:00
Mentor
863b3dbd98 add visudo checks for sanoma (fixes old installations that update) 2025-11-19 16:52:34 +01:00
Mentor
4dc1aceb54 🐛 fix annpying includes bug 2025-11-19 16:42:37 +01:00
Mentor
5366f40b41 📚 Little more contribution info 2025-10-21 19:27:32 +02:00
Mentor
d066750978 📚 be very annoying about telling people to check if their issue was already reported 2025-10-21 19:23:48 +02:00
Mentor
bf721d19ad 🐛 Do not call visudo with sudo in update script 2025-10-21 19:09:32 +02:00
Mentor
e9993d4777 🔼 Bmp cli version to trigger updates 2025-10-21 19:03:08 +02:00
Mentor Palokaj
f8cd2cefb0 Merge pull request #398 from seefood/feature/maintain-range
Add percentage range support to maintain command
2025-10-21 19:01:48 +02:00
Mentor Palokaj
81b96f488f Merge pull request #388 from duetocode/main
Support Tahoe SMC keys with existing smc binary
2025-10-21 18:37:33 +02:00
Ira Abramov
f42628e609 feat: add percentage range support to maintain command
- Add valid_percentage_range() validation function
  - Validates NUMBER-NUMBER format
  - Ensures lower < upper
  - Enforces lower >= 10 and upper <= 100
  - No maximum range spread limit

- Update maintain_synchronous to handle ranges
  - Parse range into lower_bound and upper_bound
  - Enable charging when battery < lower_bound
  - Disable charging when battery >= upper_bound
  - Fully backward compatible with single values

- Update help message and README
  - Add examples: 'battery maintain 70-80'
  - Document range syntax alongside single values

- Maintain daemon persists ranges across reboots
  - Stores range format (e.g., '70-80') in maintain.percentage
  - Recovery logic auto-detects and restores ranges

Tested:
- Single value (80) works as before
- Valid ranges (70-80) work correctly
- Invalid ranges rejected (80-70, 5-15, 95-105, 70-70)
- Status display shows ranges properly (70% - 80%)

CLI-only feature. GUI support deferred to future work.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 13:10:08 +03:00
Ira Abramov
08031fb677 chore: explicitly ignore CLAUDE.md in gitignore
The .* pattern already covers .claude/ directory, but explicitly adding
CLAUDE.md to ensure Claude Code configuration files are not committed.
Also re-allowing .github and .vscode directories that should be tracked.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 11:25:34 +03:00
Bowie
362a2dd47f Merge pull request #1 from base47/main
Minor fixes to Tahoe SMC keys support
2025-10-05 14:47:54 +08:00
Bowie
1e60c8b20d Remove the '.sh' extension from the visudo call. 2025-10-05 14:45:50 +08:00
Bowie
faa27adc48 Use sudo for smc commands when reading values 2025-10-05 14:44:56 +08:00
user
30768087bc Move smc capability logging out of global scope so it does not interfere with status_csv command 2025-10-04 02:57:53 +02:00
user
556565c145 Use js4jiang5's approach to detect supported smc keys instead of detect_smc_capabilities() func 2025-10-04 02:01:44 +02:00
user
d3e9ea7678 Update visudo declarations along with the battery script 2025-10-04 01:11:01 +02:00
user
dbfc1bf095 Suppress the output of detect_smc_capabilities() in functions which return status string 2025-10-04 01:08:07 +02:00
user
49f5daaa45 Use js4jiang5's implementation of smc_read_hex() to fix smc output parsing error 2025-10-04 01:05:47 +02:00
user
0e5b7b04d7 Enable passwordless 'sudo smc ...' execution for new Tahoe SMC keys 2025-10-03 16:33:15 +02:00
Leon
20258a1690 Support Tahoe SMC keys with existing smc binary 2025-10-01 12:40:41 +08:00
Mentor
9db24e4dad Explicitly ignore dotfiles in root as well 2025-06-30 14:19:21 +02:00
Mentor
4e48feaa8f deploy version that fixes bug for many users v1.2.3 2025-06-26 11:24:02 +02:00
Mentor Palokaj
d30344f5b5 Merge pull request #346 from andostronaut/docs/add-calibrate-to-readme
docs: add calibrate command to readme doc
2025-06-26 11:14:12 +02:00
Ando
8eed78a8ca docs: add calibrate command to readme doc 2025-05-18 10:06:26 +03:00