Skip to content

feat: Integrate 5 features from dotfiles repository - #11

Merged
therealtinhtute merged 1 commit into
mainfrom
claude/review-ubuntu-port-files-01RTbeZNrbum4yKMj42mNCWA
Nov 20, 2025
Merged

therealtinhtute merged 1 commit into
mainfrom
claude/review-ubuntu-port-files-01RTbeZNrbum4yKMj42mNCWA

Conversation

@therealtinhtute

Copy link
Copy Markdown
Contributor

No description provided.

Integrate key features from comchienlab/dotfiles to enhance fub's Ubuntu
system maintenance capabilities with improved cleanup, swap management,
font installation, and performance tuning.

## 1. Enhanced Debloat Features (bin/clean.sh)

**Orphaned Packages Cleanup:**
- Auto-remove orphaned packages via apt autoremove
- Detect and count orphaned packages in dry-run mode
- Clean up unused dependencies automatically

**Deborphan Integration:**
- Use deborphan tool (if installed) to find truly orphaned packages
- Purge deborphan packages automatically
- Show count in dry-run mode

**Optional Bloatware Removal:**
- Remove gnome-games, gnome-software, gnome-mahjongg, gnome-mines, etc.
- Only activates with FUB_REMOVE_BLOAT=true environment variable
- Shows count of bloatware packages in dry-run mode
- Protects user choice with explicit opt-in

## 2. Swap File Manager (bin/swap.sh + fub)

**New Command: fub swap**
- Interactive swap file creation and management
- Uses fzf for size selection (2GB/4GB/8GB/16GB/32GB/Custom)
- Shows current memory and swap status
- Auto-persists in /etc/fstab
- Supports removal of existing swap files
- Environment variable support: FUB_SWAP_SIZE=8 fub swap

**Integration:**
- Added to main fub menu as option 5
- Added to help text
- Added keyboard shortcut '5' in interactive menu
- Standalone command: fub swap

## 3. Nerd Fonts Installer (bin/optimize.sh)

**Optional Installation:**
- Activates with FUB_INSTALL_NERDFONTS=true
- Downloads popular Nerd Fonts: JetBrainsMono, FiraCode, Hack, Meslo
- Installs to ~/.local/share/fonts
- Updates font cache automatically
- Skips already installed fonts
- Shows progress for each font download

**Benefits:**
- Enhanced terminal appearance
- Better icon support in CLI tools
- Professional development font options

## 4. Performance Tuning (bin/optimize.sh)

**GNOME Tracker Disable:**
- Masks and stops tracker services (file indexing)
- Reduces background CPU/disk usage
- Improves overall system responsiveness
- Only runs if tracker is active

**Hibernation Disable:**
- Configures logind to use suspend instead
- Faster boot times
- Creates /etc/systemd/logind.conf.d/fub-performance.conf
- Only runs if not already configured

**Swappiness Optimization:**
- Reduces vm.swappiness from default (60) to 10
- Better performance with adequate RAM
- Persists via /etc/sysctl.d/99-fub-swappiness.conf
- Only runs if current swappiness > 10

## 5. UI/UX Improvements

**Main Menu:**
- Now shows 5 options (added Swap Manager)
- Updated navigation to support 5 options (DOWN limit changed)
- Added keyboard shortcut '5' for swap command

**Help Text:**
- Updated fub --help to include swap command
- Clear description: "Manage swap file (create/remove)"

## Environment Variables

New environment variables for feature control:
- `FUB_REMOVE_BLOAT=true` - Enable bloatware removal in clean
- `FUB_INSTALL_NERDFONTS=true` - Install Nerd Fonts in optimize
- `FUB_SWAP_SIZE=N` - Auto-create N GB swap file

## Usage Examples

```bash
# Create 8GB swap file interactively
fub swap

# Create 4GB swap file automatically
FUB_SWAP_SIZE=4 fub swap

# Clean system with bloatware removal
FUB_REMOVE_BLOAT=true fub clean

# Optimize with Nerd Fonts installation
FUB_INSTALL_NERDFONTS=true fub optimize

# Preview all new cleanup features
fub clean --dry-run
```

## Files Changed

- bin/clean.sh (+61 lines) - Enhanced debloat features
- bin/swap.sh (NEW, +302 lines) - Swap file manager
- bin/optimize.sh (+69 lines) - Performance tuning + Nerd Fonts
- fub (+7 lines) - Integrated swap command into menu

## Inspired By

Features adapted from: https://github.com/comchienlab/dotfiles
- debloat.sh → Enhanced cleanup in fub clean
- create_swap.sh → New fub swap command
- fsetup.sh performance tuning → fub optimize additions
- nerdfont-installer.sh → fub optimize optional feature

All features maintain fub's philosophy of safety-first with dry-run
support, explicit confirmations, and opt-in for aggressive operations.
@therealtinhtute
therealtinhtute merged commit ffb8d6e into main Nov 20, 2025
1 check failed
@therealtinhtute
therealtinhtute deleted the claude/review-ubuntu-port-files-01RTbeZNrbum4yKMj42mNCWA branch November 20, 2025 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants