This repository contains a collection of scripts I built to make my daily workflow on Linux Mint Cinnamon (Ubuntu-based) a bit smoother. They might not change the world, but they certainly save me some keystrokes. Feel free to use them as-is or tweak them to fit your own needs.
Note: Since these were made for my personal setup, I haven't written exhaustive documentation—just a quick "how-to" for each tool.
The "Lazy Git" Tool
I made this to simplify the process of publishing changes to a repository without typing the same three commands every time.
- Copy the file into your repository and make it executable.
- Standard usage: Run the script, and it will execute
git add . && git commit && git pushautomatically. - Commit Messages:
- It uses a default message (set to "Update" by default).
- You can change the default by editing this line in the script:
commit_msg="Update". - Or, provide a custom message on the fly:
./push "YourCommitMessageHere".
The Morning Ritual Automator
I have a specific routine when I open my laptop: mounting disks, applying keyboard layouts, and starting services like MySQL and Apache. Doing this manually every day was annoying, so I automated it.
- Move the file to
/usr/local/binto use it as a standard command and make it executable. - Configuration: You must edit the following variables inside the script to match your system:
| Variable | Description |
|---|---|
XMOD_FILE |
Path to your custom .Xmodmap layout file |
MOUNT_DEV |
The device identifier (e.g., /dev/sda4) |
MOUNT_POINT |
Where you want the drive mounted (e.g., /media/mahdi/D-drive) |
LOG_FILE |
Where to save logs (default is ~/startup.log) |
START_SERVICES_CMD |
The command to start your services |
- Logs: You can check your logs using
nano ~/startup.logor your favorite GUI text editor.
The Instant Scaffolder
I built this one day when I was bored and wanted a way to instantly generate essential website files so I wouldn't have to create them manually every time.
- Move the file to
/usr/local/binand make it executable. - You can run it in your current directory or provide a path (relative or absolute).
- The script will even create the directory for you if it doesn't exist.
| Command | Files Created |
|---|---|
webuild static |
index.html, style.css, script.js |
webuild dynamic |
index.html, style.css, script.js, server.php |
webuild platform |
index.html, style.css, script.js, server.php, data.json |
Example Usage:
webuild static ./new-pagewebuild dynamic /var/www/html
The Nemo Context Menu Mapper
I made this great Nemo action to instantly map my local development directories to their respective network URLs. It adds a handy right-click option in the Nemo file manager to open a local path directly in the browser with the correct IP and port routing.
You can find the necessary files for this tool in the Open-In-Browser folder in this repository.
Installation:
- The Script: Copy
open-in-browser.shto your local bin and make it executable:cp Open-In-Browser/open-in-browser.sh ~/.local/bin/chmod +x ~/.local/bin/open-in-browser.sh - The Action: Copy the Nemo action file (e.g.,
open-in-browser.nemo_action) to your Nemo actions directory:cp Open-In-Browser/*.nemo_action ~/.local/share/nemo/actions/ - Restart Nemo: Apply the changes by running
nemo -qin your terminal.
Configuration: This action is hardcoded to specific network IPs and drive paths. You will need to edit both files to match your environment:
- open-in-browser.sh: Change the
/media/mahdi/D-drive/paths to your actual working directories. Update the IPs (192.168.1.32) and ports (6060,6061,60) to match your local server setups. - .nemo_action file: Update the
Exec=line to point to your correct home folder path. You should also update theConditions=path:line to match the drive you want this right-click option to appear in.
The Multi-Repo Manager
When you have a lot of repositories and switch between devices, it's easy to forget to pull before you push. GitMan solves that by giving you a clean interactive menu to manage all your repos at once from a single directory.
You can find the script in the GitMan folder in this repository.
- Copy
gitman.shinto the directory that contains your repos (not inside one of them) and make it executable:cp GitMan/gitman.sh ~/your-repos-dir/chmod +x ~/your-repos-dir/gitman.sh - Run it from that directory:
./gitman.sh
It will automatically detect every subdirectory with a .git folder and include it.
| Option | Description |
|---|---|
1 Pull All |
Pull every detected repo at once |
2 Push All |
Push every detected repo at once |
3 Check Pull |
See which repos are behind the remote |
4 Check Push |
See which repos are ahead of the remote |
5 Pull Specific |
Pick one or more repos to pull |
6 Push Specific |
Pick one or more repos to push |
7 Help |
Show usage info inside the script |
- Multi-select: When picking specific repos, type the numbers separated by
_— for example1_3_5. Typeallto select everything in the list. - Logs: Every action is logged to
git.login the same directory, with a timestamp and per-repo result for each run.
The Instant Dev Server
A Nemo right-click action that sets any directory (or file) as an Apache DocumentRoot on the fly and opens it in the browser — full Apache, full .htaccess, full PHP. No spinning up vhosts manually, no typing paths, just right-click and go.
You need these installed before running the setup:
| Dependency | Install command |
|---|---|
apache2 |
sudo apt install apache2 |
libapache2-mod-php |
sudo apt install libapache2-mod-php |
python3 |
Pre-installed on Linux Mint |
notify-send |
Pre-installed on Linux Mint (via libnotify-bin) |
You can find all three necessary files in the Server-With-Apache folder in this repository.
Installation (one-time):
cdinto theServer-With-Apachefolder.- Make the setup script executable and run it:
chmod +x setup.sh ./setup.sh - Done. The setup script handles everything automatically — no further steps needed.
What the setup script does:
- Copies
nemo-serve.pyto/usr/local/bin/(the main engine) - Installs
serve_here.nemo_actioninto~/.local/share/nemo/actions/ - Adds a scoped sudoers rule to
/etc/sudoers.d/nemo-serveso Apache can be reloaded without a password prompt - Enables Apache modules:
mod_rewrite,mod_headers, and your PHP module - Adds
Listen 6161to/etc/apache2/ports.conf - Restarts Nemo to pick up the new action
Usage:
- Right-click any folder → "Serve with Apache (port 6161)" → opens
http://localhost:6161 - Right-click any file → serves its parent folder as root, opens
http://localhost:6161/yourfile.ext
What you get:
- Real Apache —
.htaccessworks,mod_rewriteworks, PHP works AllowOverride Allbaked in so nothing is blocked- Desktop notification with the URL when the server is ready
- Error and access logs at
/tmp/nemo-apache-error.logand/tmp/nemo-apache-access.log - One persistent vhost on port
6161— switching directories just swaps theDocumentRoot, no vhost accumulation
Note: Only one directory can be served at a time. Right-clicking a new folder replaces the previous one.