Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
fe050f9
fix: implement autostart functionality and remove redundant Save button
spenceriam Nov 16, 2025
9667460
chore: update version references to 1.0.2
spenceriam Nov 16, 2025
d835386
docs: update AGENTS.md with comprehensive versioning process
spenceriam Nov 16, 2025
9a7d481
chore: organize installer files and update .gitignore
spenceriam Nov 16, 2025
84a89df
feat: add build-installer.sh script and update build process
spenceriam Nov 16, 2025
1e2def0
feat: improve installer naming and build process
spenceriam Nov 16, 2025
e1a8775
fix: ensure config file creation and settings persistence work correctly
spenceriam Nov 16, 2025
3f10f49
fix: final cleanup of start minimized functionality
spenceriam Nov 16, 2025
b46e4af
fix: add missing autostart switch connection to on_setting_changed
spenceriam Nov 17, 2025
349aadf
feat: add build date and time to About section
spenceriam Nov 17, 2025
e95a1d3
feat: add configuration cleanup during uninstall
spenceriam Nov 17, 2025
13788a8
fix: add error handling and debugging to prevent autostart freezing
spenceriam Nov 17, 2025
886a47b
fix: move autostart operations to background thread to prevent UI fre…
spenceriam Nov 17, 2025
d3e5f94
fix: ensure prerm cleanup script is properly included in package
spenceriam Nov 17, 2025
8845ebf
fix: add comprehensive debugging and error handling for autostart toggle
spenceriam Nov 17, 2025
92ab081
fix: resolve autostart cleanup issues during package removal
spenceriam Nov 17, 2025
96e74cd
docs: update AGENTS.md with current critical issues status
spenceriam Nov 17, 2025
cd0be5c
fix: resolve settings persistence and autostart creation issues
spenceriam Nov 17, 2025
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,15 @@ debian/debhelper-build-stamp
debian/files
debian/coremon/

# Release/installer directory (for manual release uploads)
installer/

# Python build artifacts
.pybuild/

# Factory build artifacts
.factory/

# Release notes (internal)
RELEASE_NOTES_*.md

Expand Down
52 changes: 50 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ CoreMon is a system monitoring tool for Zorin OS and Ubuntu-based distributions.
### Building Debian Package
- Install build dependencies: `sudo apt install build-essential devscripts debhelper dh-python python3-all python3-setuptools`
- Update changelog: `export DEBEMAIL="your-email@example.com" && dch --distribution unstable --increment "Description of changes"`
- Build package: `dpkg-buildpackage -us -uc`
- Copy .deb to project: `cp ../coremon_*.deb .`
- Build package: `./build-installer.sh` (builds and places packages in installer/ directory)
- Alternative manual build: `dpkg-buildpackage -us -uc` (outputs to parent directory)

### Testing
- Run the application: `python3 coremon/main.py`
Expand Down Expand Up @@ -51,6 +51,54 @@ CoreMon is a system monitoring tool for Zorin OS and Ubuntu-based distributions.
- System tray requires appropriate indicator support
- Build artifacts appear in parent directory by default

## Current Issues (November 2025)

### Issue: Settings Persistence and Autostart Creation
**Status: RESOLVED - FIXED** ✅
- **Fixed**: Settings now properly persist to config file when changed in UI
- **Fixed**: Autostart desktop file is created when "Start on login" is enabled
- **Root Causes Identified and Fixed**:
1. **Missing Signal Connection**: `start_minimized_switch` was created but never connected to `on_setting_changed`
2. **Logic Error**: `_previous_autostart_state` was set AFTER updating settings, making comparison always false
3. **File Write Buffering**: Added `flush()` and `fsync()` to ensure immediate disk writes
- **Files Modified**:
- `coremon/main.py` - Added signal connection and fixed state tracking logic
- `coremon/main.py` - Enhanced `save_settings()` with immediate disk sync
- **Verified**: Settings persist across application restarts and autostart file is created/removed correctly

### Recently Fixed: Autostart Cleanup During Uninstall
**Status: WORKING** ✅
- **Fixed**: prerm script now properly detects user and cleans up configuration files during uninstall
- **Files Modified**:
- `debian/coremon.prerm` - Added proper user detection logic
- `prerm` - Fixed file paths to use actual user directory instead of $HOME
- **Verified**: Autostart desktop file and config directory are properly removed during package uninstall

### Testing Status
- Installation: ✅ Working
- Application Launch: ✅ Working
- Default Config Creation: ✅ Working
- Settings Persistence: ✅ WORKING
- Autostart Creation: ✅ WORKING
- Autostart Cleanup: ✅ Working

## Versioning Process
When making a new release:

1. **Update version in setup.py**: Change the version string
2. **Update application version**:
- Update `__version__` variable in `coremon/main.py`
- Update About screen version display in `coremon/main.py` (search for "CoreMon vX.X.X")
3. **Update Debian changelog**: Use `dch --distribution unstable --increment "Description"`
4. **Build packages**: Run `./build-installer.sh` (creates universal installer in installer/ directory)
5. **Test installation**: Verify universal installer works and version displays correctly in About screen

**Important**: Always keep version numbers synchronized across:
- `setup.py` (Python package version)
- `coremon/main.py` `__version__` variable
- `coremon/main.py` About screen display
- `debian/changelog` (Debian package version)

## Git Workflow
- Main branch: `main`
- Commit format: Conventional commits preferred
Expand Down
48 changes: 48 additions & 0 deletions build-installer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash

# CoreMon Installer Build Script
# This script builds universal Debian packages and places them in the installer directory

set -e

# Get version from setup.py
VERSION=$(grep "version=" setup.py | sed "s/.*version=['\"]\([^'\"]*\)['\"].*/\1/")

echo "Building CoreMon universal Debian package (version $VERSION)..."

# Create installer directory if it doesn't exist
mkdir -p installer

# Clean up any existing build artifacts in parent directory
echo "Cleaning up existing build artifacts..."
rm -f ../coremon_*.deb ../coremon_*.changes ../coremon_*.buildinfo ../coremon_*.dsc ../coremon_*.tar.gz

# Temporarily modify debian/control to force universal architecture
echo "Configuring for universal architecture..."
cp debian/control debian/control.backup
sed -i 's/Architecture: any/Architecture: all/' debian/control

# Build the Debian package
echo "Building universal Debian package..."
dpkg-buildpackage -us -uc

# Restore original debian/control
mv -f debian/control.backup debian/control

# Move and rename the universal package
echo "Moving and renaming universal package..."
if ls ../coremon_*_all.deb 1> /dev/null 2>&1; then
mv -f ../coremon_*_all.deb "installer/coremon_1.0.2-1_x64_arm64.deb"
fi

# Move other artifacts with original names
mv -f ../coremon_*.changes installer/ 2>/dev/null || true
mv -f ../coremon_*.buildinfo installer/ 2>/dev/null || true
mv -f ../coremon_*.dsc installer/ 2>/dev/null || true
mv -f ../coremon_*.tar.gz installer/ 2>/dev/null || true

echo "Build complete! Universal installer file is in the installer/ directory:"
ls -la installer/

echo ""
echo "To install locally, run: sudo apt install ./installer/coremon_1.0.2-1_x64_arm64.deb"
13 changes: 13 additions & 0 deletions control
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Package: coremon
Version: 1.0.2-1
Architecture: all
Maintainer: CoreMon Team <support@example.com>
Installed-Size: 103
Depends: python3-gi, python3-matplotlib, python3-numpy, python3-psutil, python3:any, gir1.2-gtk-3.0, gir1.2-appindicator3-0.1, libappindicator3-1, neofetch
Section: utils
Priority: optional
Homepage: https://github.com/yourusername/coremon
Description: system monitoring tool for Ubuntu/Zorin OS
CoreMon displays real-time CPU temperature and load with graphs,
system tray integration, and configurable thresholds. Designed for
Ubuntu-based distributions.
Loading