From dbb91fba34f70577c5f93290e4178d5d19f2f90b Mon Sep 17 00:00:00 2001 From: Antonio Molina Date: Fri, 28 Nov 2025 20:00:18 +0100 Subject: [PATCH 1/6] =?UTF-8?q?=E2=9C=A8=20feat:=20Added=20tmux=20and=20vs?= =?UTF-8?q?code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- install.sh | 37 ++++++++++--- tmux/tmux.conf | 55 ++++++++++++++++++++ vscode/settings.json | 112 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 197 insertions(+), 9 deletions(-) create mode 100644 tmux/tmux.conf create mode 100644 vscode/settings.json diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 171a83c..dd414f0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,4 +3,4 @@ repos: rev: v8.18.2 # usa una versiรณn fija hooks: - id: gitleaks - args: ["detect", "--redact"] + args: ["detect", "--redact"] \ No newline at end of file diff --git a/install.sh b/install.sh index fa73fa6..eac3e54 100755 --- a/install.sh +++ b/install.sh @@ -5,7 +5,7 @@ set -euo pipefail # Always work from the directory where this script lives REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -link_optional_config() { +link_config() { local source_path="$1" local target_path="$2" local label="$3" @@ -19,20 +19,41 @@ link_optional_config() { fi } +install_vscode_config() { + local source="$REPO_DIR/vscode/settings.json" + local target="$HOME/.config/Code/User/settings.json" + + if [ ! -f "$source" ]; then + echo "โšช๏ธ Skipping VS Code settings (source file missing)." + return + fi + + mkdir -p "$(dirname "$target")" + + if [ -e "$target" ] && [ ! -L "$target" ]; then + local backup="${target}.bak.$(date +%Y%m%d-%H%M%S)" + mv "$target" "$backup" + echo "๐Ÿ’พ Existing VS Code settings moved to $backup" + fi + + ln -sf "$source" "$target" + echo "๐Ÿ”— VS Code settings linked to $target" +} + if ! command -v fzf >/dev/null 2>&1; then echo "โš ๏ธ Missing dependency: fzf" echo " Please install fzf (e.g., 'sudo pacman -S fzf') and re-run this script." exit 1 fi -echo "๐Ÿ”— Linking zsh configโ€ฆ" -ln -sf "$REPO_DIR/zsh/zshrc" "$HOME/.zshrc" +link_config "$REPO_DIR/zsh/zshrc" "$HOME/.zshrc" "zsh config" +link_config "$REPO_DIR/git/gitconfig" "$HOME/.gitconfig" "main git config" +link_config "$REPO_DIR/tmux/tmux.conf" "$HOME/.tmux.conf" "tmux config" -echo "๐Ÿ”— Linking main git configโ€ฆ" -ln -sf "$REPO_DIR/git/gitconfig" "$HOME/.gitconfig" +link_config "$REPO_DIR/git/gitconfig_qustodio" "$HOME/.gitconfig_qustodio" "Qustodio git config" +link_config "$REPO_DIR/git/gitconfig_local" "$HOME/.gitconfig_local" "local git config" +link_config "$REPO_DIR/git/gitignore_global" "$HOME/.gitignore_global" "global gitignore" -link_optional_config "$REPO_DIR/git/gitconfig_qustodio" "$HOME/.gitconfig_qustodio" "Qustodio git config" -link_optional_config "$REPO_DIR/git/gitconfig_local" "$HOME/.gitconfig_local" "local git config" -link_optional_config "$REPO_DIR/git/gitignore_global" "$HOME/.gitignore_global" "global gitignore" +install_vscode_config echo "โœจ Done! Reload your shell or start a new terminal." diff --git a/tmux/tmux.conf b/tmux/tmux.conf new file mode 100644 index 0000000..873efc3 --- /dev/null +++ b/tmux/tmux.conf @@ -0,0 +1,55 @@ +set -g @byobu-enable "off" + +# Use Ctrl+A instead of Ctrl+B +set -g prefix C-a +unbind C-b +bind C-a send-prefix + +# Mouse support +set -g mouse on + +# Reload config +bind r source-file ~/.tmux.conf \; display-message "Config reloaded!" + +# Plugin manager setup + +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @plugin 'tmux-plugins/tmux-prefix-highlight' +set -g @plugin 'tmux-plugins/tmux-yank' + +run '~/.tmux/plugins/tpm/tpm' + +# Status bar customization +set -g status on +set -g status-interval 5 + +set -g status-bg colour235 +set -g status-fg colour250 + +set-option -g status-left-length 40 +set-option -g status-right-length 120 +set -g status-left ' #[fg=colour250]#S #[fg=colour241]' +set-option -g status-right "#[fg=colour208]๐Ÿ–ฅ๏ธ #(top -bn1 | grep 'Cpu(s)' | awk '{print $2}' | cut -d'%' -f1)% #[fg=colour241]| #[fg=colour33]๐Ÿง  #(free | grep '^Mem' | awk '{printf \"%.1f%%\", $3/$2 * 100.0}') #[fg=colour241]| #[fg=colour244]%Y-%m-%d %H:%M #[fg=colour241]| #[fg=green]#H" + +# Dim, simple style for inactive windows +set -g window-status-format " #[fg=colour244]#I:#W " + +# Strong highlight for current window +set -g window-status-current-format " #[bg=colour34,fg=colour0,bold]#I:#W #[default]" + +# Start counting at 1 (nicer UX) +set -g base-index 1 +setw -g pane-base-index 1 +set -g renumber-windows on + +# Bigger scrollback +set -g history-limit 50000 + +# tmux-continuum: auto-save + auto-restore +set -g @continuum-restore 'on' +set -g @continuum-save-interval '15' # minutes + + diff --git a/vscode/settings.json b/vscode/settings.json new file mode 100644 index 0000000..0879c06 --- /dev/null +++ b/vscode/settings.json @@ -0,0 +1,112 @@ +{ + // ============================ + // ==== FILES & AUTO-SAVE ===== + // ============================ + + // Automatically save files after a short delay + "files.autoSave": "afterDelay", + // Delay before auto-saving (in milliseconds) + "files.autoSaveDelay": 1000, + // Remove trailing spaces on save + "files.trimTrailingWhitespace": true, + // Ensure files always end with a newline + "files.insertFinalNewline": true, + + + // ============================ + // ======== APPEARANCE ======== + // ============================ + + // Default dark theme (lightweight and clean) + "workbench.colorTheme": "Default Dark Modern", + // File icons (requires "Material Icon Theme" extension) + "workbench.iconTheme": "material-icon-theme", + // No zoom applied to UI/layout + "window.zoomLevel": 0, + + + // ============================ + // ========= EDITOR =========== + // ============================ + + // Use modern, thin and readable fonts for code + "editor.fontFamily": "JetBrains Mono, Fira Code, Menlo, Monaco, 'Courier New', monospace", + // Enable font ligatures (optional but nice) + "editor.fontLigatures": true, + // Comfortable size for a 3440x1440 monitor + "editor.fontSize": 14, + "editor.lineHeight": 22, + + // Python: always use 4 spaces, never tabs + "editor.tabSize": 4, + "editor.insertSpaces": true, + "editor.detectIndentation": false, + + // Avoid extremely long lines on ultrawide screens + "editor.wordWrap": "bounded", + // Maximum width before wrapping + "editor.wordWrapColumn": 120, + // Visual rulers for Python formatting (PEP8 & Ruff) + "editor.rulers": [88, 120], + + // Clean editor view + "editor.minimap.enabled": false, + "editor.renderWhitespace": "boundary", + "editor.cursorBlinking": "smooth", + "editor.smoothScrolling": true, + "editor.inlineSuggest.enabled": true, + + + // ============================ + // ========= PYTHON =========== + // ============================ + + // Lightweight type checking (not too strict) + "python.analysis.typeCheckingMode": "basic", + // Auto-complete imports + "python.analysis.autoImportCompletions": true, + + // Prefer pytest over unittest + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true, + "python.testing.pytestArgs": ["tests"], + + // Auto-activate virtual environments in integrated terminal + "python.terminal.activateEnvironment": true, + + + // ============================ + // ========= DOCKER =========== + // ============================ + + // Enable Docker explorer sidebar (if extension installed) + "docker.showExplorer": true, + + + // ============================ + // ========= TERMINAL ========= + // ============================ + + // Default shell for Linux + "terminal.integrated.defaultProfile.linux": "bash", + // Slightly smaller terminal font size + "terminal.integrated.fontSize": 14, + + + // ============================ + // ============ GIT =========== + // ============================ + + // Auto-fetch remote changes + "git.autofetch": true, + // Do not ask for confirmation when syncing + "git.confirmSync": false, + + + // ============================ + // ========= COPILOT ========== + // ============================ + + // Keep your Copilot setting + "github.copilot.nextEditSuggestions.enabled": true +} From 26e76c1d69f494b41c4b3e81a449fa0d80bdfcdd Mon Sep 17 00:00:00 2001 From: Antonio Molina Date: Fri, 28 Nov 2025 20:07:56 +0100 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=93=9D=20docs:=20Updated=20README=20a?= =?UTF-8?q?dding=20tmux=20and=20vscode=20update=20+=20little=20improvement?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index b974c6f..a4b7260 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ ===================================== ``` -My personal Linux/macOS configuration: **Zsh**, **Ohโ€‘Myโ€‘Zsh**, terminal tweaks, git config, aliasesโ€ฆ +My personal Linux/macOS configuration: **Zsh**, **Ohโ€‘Myโ€‘Zsh**, terminal tweaks, git config, aliasesโ€ฆ Everything clean, modular, and easy to install. ![Status](https://img.shields.io/badge/Status-Active-brightgreen) @@ -27,20 +27,26 @@ Everything clean, modular, and easy to install. ### ๐Ÿš Zsh Setup - **Theme:** `agnoster` with custom rightโ€‘prompt -- Right prompt shows: - - โšก *root indicator* - - ๐Ÿ’ฅ *exit code on failures* - - ๐Ÿ *active Python virtualenv* -- Autosuggestions (`zsh-autosuggestions`) -- Syntax highlighting (`zsh-syntax-highlighting`) -- Command execution timer (โฑ) -- Clean history settings +- Right prompt shows โšก (root), ๐Ÿ’ฅ (exit status), and ๐Ÿ (virtualenv) +- Autosuggestions (`zsh-autosuggestions`) & syntax highlighting (`zsh-syntax-highlighting`) +- Command execution timer (โฑ) and tidy history defaults + +### โŒจ๏ธ Tmux Profile +- Prefix remapped to `Ctrl+A`, mouse mode, 50k scrollback +- Status bar with CPU/memory, host, date, and session/window info +- TPM + plugins: `sensible`, `resurrect`, `continuum`, `prefix-highlight`, `yank` +- Continuum auto-save/restore enabled out of the box + +### ๐Ÿ’ป VS Code Settings +- Workspace settings synced via symlink (`vscode/settings.json`) +- Auto-save, trimming, JetBrains Mono with ligatures, rulers at 88/120 +- Python defaults (pytest, basic type checking) and terminal profile tweaks ### ๐ŸŽฎ Extras - `proton-run` function for launching Windows games with persistent Proton prefixes ### ๐Ÿงฐ Git Configuration -Your repository includes an opinionated `.gitconfig` with: +This repo ships an opinionated `.gitconfig` with: - **diff-so-fancy** integration - Rich color configuration @@ -66,7 +72,7 @@ cd dotfiles ./install.sh ``` -The install script symlinks everything safely into `$HOME`. +The installer checks for `fzf`, symlinks all configs (Zsh, Git, tmux, etc.), and links VSย Code settings after backing up any local copy. --- @@ -74,23 +80,20 @@ The install script symlinks everything safely into `$HOME`. ``` dotfiles/ -โ”œโ”€โ”€ zsh/ -โ”‚ โ”œโ”€โ”€ .zshrc -โ”‚ โ””โ”€โ”€ custom/ โ”œโ”€โ”€ git/ -โ”‚ โ”œโ”€โ”€ .gitconfig -โ”‚ โ””โ”€โ”€ .gitignore_global +โ”‚ โ””โ”€โ”€ gitconfig +โ”œโ”€โ”€ tmux/ +โ”‚ โ””โ”€โ”€ tmux.conf +โ”œโ”€โ”€ vscode/ +โ”‚ โ””โ”€โ”€ settings.json +โ”œโ”€โ”€ zsh/ +โ”‚ โ””โ”€โ”€ zshrc โ”œโ”€โ”€ install.sh โ””โ”€โ”€ README.md ``` --- -## ๐Ÿ› ๏ธ TODO / Future Ideas -- Add tmux config - ---- - ## ๐Ÿค Contributions While this is a personal setup, PRs with improvements are welcome. From 4745a20b7a2df2a103c4f243c3fdfcb67dfe62a5 Mon Sep 17 00:00:00 2001 From: Antonio Molina <1543676+aydevosotros@users.noreply.github.com> Date: Fri, 28 Nov 2025 20:23:04 +0100 Subject: [PATCH 3/6] Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a4b7260..bcf2f66 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Everything clean, modular, and easy to install. - Continuum auto-save/restore enabled out of the box ### ๐Ÿ’ป VS Code Settings -- Workspace settings synced via symlink (`vscode/settings.json`) +- User settings synced via symlink (`vscode/settings.json`) - Auto-save, trimming, JetBrains Mono with ligatures, rulers at 88/120 - Python defaults (pytest, basic type checking) and terminal profile tweaks From abb12b4adbc1ea76fc6b4449e3ad7e0cf5b2bdaf Mon Sep 17 00:00:00 2001 From: Antonio Molina Date: Fri, 28 Nov 2025 20:12:53 +0100 Subject: [PATCH 4/6] =?UTF-8?q?=E2=9C=A8=20feat:=20Added=20bumpversion=20f?= =?UTF-8?q?or=20automatic=20versioning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 8 ++++++++ README.md | 25 ++++++++++++++++++++++++- VERSION | 1 + 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .bumpversion.cfg create mode 100644 VERSION diff --git a/.bumpversion.cfg b/.bumpversion.cfg new file mode 100644 index 0000000..b34b790 --- /dev/null +++ b/.bumpversion.cfg @@ -0,0 +1,8 @@ +[bumpversion] +current_version = 0.1.1 +commit = True +tag = True +tag_name = v{new_version} +message = chore: bump version to {new_version} + +[bumpversion:file:VERSION] diff --git a/README.md b/README.md index bcf2f66..5306e2d 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,28 @@ The installer checks for `fzf`, symlinks all configs (Zsh, Git, tmux, etc.), and --- +## ๐Ÿ”– Versioning & Releases + +- Version number lives in the `VERSION` file and is managed by [bumpversion](https://github.com/c4urself/bump2version). +- Install the tool once (e.g. `pip install --user bump2version`). +- To cut a new release: + 1. Decide the part to bump (`patch`, `minor`, or `major`). + 2. Run `bumpversion ` which updates `VERSION`, commits, and tags using `.bumpversion.cfg`. + 3. Push everything: `git push && git push --tags`. + +--- + +## ๐Ÿ”– Versioning & Releases + +- Version number lives in the `VERSION` file and is managed by [bumpversion](https://github.com/c4urself/bump2version). +- Install the tool once (e.g. `pip install --user bump2version`). +- To cut a new release: + 1. Decide the part to bump (`patch`, `minor`, or `major`). + 2. Run `bumpversion ` which updates `VERSION`, commits, and tags using `.bumpversion.cfg`. + 3. Push everything: `git push && git push --tags`. + +--- + ## ๐Ÿ“ Structure ``` @@ -89,7 +111,8 @@ dotfiles/ โ”œโ”€โ”€ zsh/ โ”‚ โ””โ”€โ”€ zshrc โ”œโ”€โ”€ install.sh -โ””โ”€โ”€ README.md +โ””โ”€โ”€ zsh/ + โ””โ”€โ”€ zshrc ``` --- diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..6e8bf73 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.1.0 From a40bb322957ac66a36ad5e426034e65af518db5c Mon Sep 17 00:00:00 2001 From: Antonio Molina Date: Fri, 28 Nov 2025 20:30:32 +0100 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Fixed=20wrong=20versi?= =?UTF-8?q?on=20in=20VERSION?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 6e8bf73..17e51c3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.0 +0.1.1 From 575e9cb56a177b8c7629ebe20bd6f2f2889982c5 Mon Sep 17 00:00:00 2001 From: Antonio Molina Date: Fri, 28 Nov 2025 20:55:42 +0100 Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=93=9D=20docs:=20Improved=20documenta?= =?UTF-8?q?tion=20with=20the=20co-pilot=20feedback?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 5306e2d..75a4f11 100644 --- a/README.md +++ b/README.md @@ -36,11 +36,14 @@ Everything clean, modular, and easy to install. - Status bar with CPU/memory, host, date, and session/window info - TPM + plugins: `sensible`, `resurrect`, `continuum`, `prefix-highlight`, `yank` - Continuum auto-save/restore enabled out of the box +- **Install plugins:** clone [TPM](https://github.com/tmux-plugins/tpm) once via `git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm`, then inside tmux press `prefix` + `I` to fetch the declared plugins. ### ๐Ÿ’ป VS Code Settings - User settings synced via symlink (`vscode/settings.json`) - Auto-save, trimming, JetBrains Mono with ligatures, rulers at 88/120 - Python defaults (pytest, basic type checking) and terminal profile tweaks +- **Fonts:** best experience with [JetBrains Mono](https://www.jetbrains.com/lp/mono/) or [Fira Code](https://github.com/tonsky/FiraCode); install one of them locally or VSย Code will fall back to system defaults. +- **Extensions:** set icon theme assumes the [Material Icon Theme](https://marketplace.visualstudio.com/items?itemName=PKief.material-icon-theme) extension is installed; install it (or change the setting) to avoid fallback warnings. ### ๐ŸŽฎ Extras - `proton-run` function for launching Windows games with persistent Proton prefixes