Wednesday, September 3, 2025

Dotfiles manager Project

Check out my current project! 

Dotfiles all in one manager



Dotfiles Manager All-in-One (Version 1.0)

Overview

Dotfiles Manager All-in-One is a Bash script to manage, backup, and restore your dotfiles. It includes optional Thunderbird backup, GPG encryption, SSH management, logging, and notifications.

Features

  • Backup & Restore dotfiles using a bare Git repository
  • SSH key management for GitHub or GitLab
  • Optional Thunderbird backup (emails, settings, extensions)
  • Optional GPG encryption for sensitive files
  • Interactive menu to toggle settings, change email, or trigger backups
  • Automatic logging: backup log and error log
  • Email notifications after backups
  • Cross-platform Git support (GitHub and GitLab)
  • Safe initial checkout: backups conflicting dotfiles to `.dotfiles-backup`
  • Selective backup: excludes large/unnecessary folders like `.cache`, `Downloads`, `Music`, `Videos`, etc.
  • Manual and scheduled backups (cron compatible)
  • Version history tracked via Git commits

Prerequisites

Ensure the following are installed:

  • Git: Install Git
  • GPG (optional for encryption): Install GPG
  • msmtp (optional for email notifications): Install msmtp
  • Zenity / notify-send (optional for GUI notifications)
  • SSH client (for SSH key management)

Step-by-Step Setup

1. Prepare a Git Repository

You can use either GitHub or GitLab.

GitHub

GitLab

2. Clone or Copy Script

Download `dotfiles_manager_allinone.sh` and make it executable:

chmod +x dotfiles_manager_allinone.sh

3. First Run

Run the script:

./dotfiles_manager_allinone.sh

During the first-run setup, you will:

  1. Enter your Git repository URL
  2. Paste personal access token if using HTTPS
  3. Enter your email for notifications
  4. Generate an SSH key if none exists
  5. Backup conflicting dotfiles to `.dotfiles-backup`
  6. Checkout repository into a bare Git setup

4. Interactive Menu

  • Toggle Thunderbird backup
  • Toggle GPG encryption
  • Change notification email
  • Update repository URL
  • Generate/View SSH key
  • Trigger manual backup
  • Exit menu

5. Automatic & Manual Backup

  • Manual: select “Trigger manual backup” from the menu
  • Automatic: schedule weekly via cron:
0 2 * * 0 /bin/bash $HOME/backup_dotfiles.sh >> $HOME/dotfiles_backup.log 2>&1

6. Thunderbird Backup (Optional)

If enabled, the script backs up your Thunderbird profile.

7. GPG Encryption (Optional)

  • Toggle encryption from interactive menu
  • Sensitive dotfiles will be encrypted/decrypted during backup/restore

8. Logs and Notifications

  • Logs: `$HOME/dotfiles_backup.log`
  • Errors: `$HOME/dotfiles_backup_error.log`
  • Email notifications sent to your configured address

9. Restoring Dotfiles

Run the script on a new system to restore your dotfiles safely.

10. Version History

  • v1.0 - Initial release of the all-in-one dotfiles manager

Links & Resources

License

This project is licensed under the GNU General Public License v3. GPL v3

Sunday, August 31, 2025

Learning Doom Emacs

 I have been trying to learn to use Emacs. 

Its a light weight, yet robust, minimalist software suite, that is modular and configurable. Here is I am listing out notes in a sort of tutorial for reference purposes.


   ■ Doom Emacs Comprehensive Tutorial

1. What is Doom Emacs?
Doom Emacs is a configuration framework for GNU Emacs that prioritizes speed, modular
configuration, and Vim-like editing.
It combines Emacs' extensibility with modern defaults, making it a powerful IDE and productivity
system.

2. Installation
Requirements: GNU Emacs 27.1+, Git, and build tools.
Installation:
git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.emacs.d
~/.emacs.d/bin/doom install
Configuration files:
~/.doom.d/init.el → Enable/disable modules
~/.doom.d/config.el → Personal settings
~/.doom.d/packages.el→ Extra packages
Apply changes: doom sync

3. Configuration
init.el: enable/disable modules
config.el: user settings (fonts, keybinds, org dir, etc.)
packages.el: declare extra packages
Example (init.el):
(doom! :completion company vertico
:ui doom modeline vc-gutter
:editor (evil +everywhere) format
:tools magit lsp docker
:lang python javascript org markdown)

4. Available Modules
:completion → company, vertico, ivy, helm
:ui → doom, modeline, treemacs
:editor → evil, multiple-cursors, parinfer
:tools → magit, lsp, docker, debugger
:lang → python, go, rust, javascript, org, latex
:app → rss, calendar, emms

5. Beginner Workflow
1. Open a project → SPC p p
2. Edit code → gd (go to def), K (docs), SPC c l (comment)
3. Search → SPC / (project), SPC s s (buffer)
4. Git → SPC g g (Magit), s (stage), c c (commit), P p (push)
5. Org mode → SPC m t (TODO), SPC m s (schedule), SPC o A (agenda)

6. Cheat Sheet (Quick)
Leader = SPC
Files & Projects: SPC f f (find), SPC p p (project)
Buffers & Windows: SPC b b (switch), SPC w / (split)
Editing: dd (delete), yy (yank), gd (def), SPC c l (comment)
Search: SPC / (project), SPC s s (buffer)
Git: SPC g g (status), c c (commit), P p (push)
Org: SPC m t (TODO), SPC m s (schedule), SPC o A (agenda)



Dotfiles manager Project

Check out my current project!  Dotfiles all in one manager Dotfiles Manager All-in-One (Version 1.0) Overview Dotfiles Manager All-in-One ...