# nhkduy201/dotfiles architecture

> Architecture diagram of the GitHub repository nhkduy201/dotfiles, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nhkduy201/dotfiles
- Repository: https://github.com/nhkduy201/dotfiles

## Overview

This project is a configuration repository—a collection of dotfiles and scripts intended to set up and customize an Arch Linux (and possibly cross-platform) environment. The goal is to manage everything from personal shell configurations (bash, vim, tmux, xinit), system installation scripts (arch-install.sh, kvm-arch-install.sh), window manager configurations (dwm-config.h, st-config.h, slstatus-git-config.h), and even miscellaneous utilities (JavaScript, PowerShell scripts) for various tasks. The README (“# config”) confirms that the repository is focused on system configuration.

##### Main Components
- Dotfiles & Personal Configurations: Files like .bashrc, .tmux.conf, .vimrc, .xinitrc, and configuration files for input devices (01-libinput.conf, 01-touchpad.rules). These represent customized personal environment settings.
- Window Manager & Status Bar Configurations: Files such as dwm-config.h, st-config.h, and slstatus-git-config.h, which detail custom setups for the tiling window manager (dwm) and its associated status bar.
- System Installation Scripts: Scripts like arch-install.sh, kvm-arch-install.sh, min-arch-install.sh, and others that automate system installation and setup for Arch Linux. These may also deal with different virtualization environments.
- Post-Installation & Saved Data: The "post_install" folder and "save" subdirectory (which contains various text notes and backups) highlight processes for post-install configuration and documentation of installed packages or other notes.
- Cross-Platform & Utility Scripts: Various scripts in different languages (Python, Bash, PowerShell, JavaScript) that support tasks such as transcription (get_transcript.*), clipboard manipulation, or even managing services (ibus-daemon.service).

##### Relationships and Interactions
- Dotfiles are applied at system/user startup and are independent but work in tandem to provide a custom user interface and environment.
- Installation Scripts integrate with these configuration files by automating their deployment during a fresh Arch Linux setup or in virtualized environments.
- The post-installation components ensure that any additional configurations or package installations are completed following the base setup.
- Utility scripts might be invoked manually or as part of automation flows, bridging interactions between system customizations and external utilities.

##### Architectural Patterns & Design Principles
- Separation of Concerns: Each type of configuration or script is organized by purpose (shell, window manager, installation, backup) so that modifications to one area (e.g. updating .vimrc) do not impact others.
- Modularity: Installation scripts and configuration files are designed to be recombined or deployed separately. For example, separate installation scripts for different environments (KVM, minimal install, etc.) allow modularity in deployment.
- Cross-Platform Consideration: The presence of PowerShell scripts (.ps1) and Windows batch files (.bat) among predominantly Bash and Linux configuration files suggests an effort to integrate or troubleshoot across operating systems.

## Diagram (Mermaid)

```mermaid
flowchart TD
    Repo["Repository (# config)"]:::environment

    subgraph "Dotfiles & Personal Configurations"
        B1[".bashrc"]:::config
        B2[".tmux.conf"]:::config
        B3[".vimrc"]:::config
        B4[".xinitrc"]:::config
        I1["01-libinput.conf"]:::config
        I2["01-touchpad.rules"]:::config
    end

    subgraph "Window Manager Configs"
        W1["dwm-config.h"]:::config
        W2["st-config.h"]:::config
        W3["slstatus-git-config.h"]:::config
        W4["picom.conf"]:::config
    end

    subgraph "Installation Scripts"
        S1["arch-install.sh"]:::script
        S2["kvm-arch-install.sh"]:::script
        S3["min-arch-install.sh"]:::script
        S4["arch_pkg_src_xplr.sh"]:::script
        S5["download_arch_iso.sh"]:::script
        S6["download_arch_iso.ps1"]:::script
    end

    subgraph "Post-Installation & Saved Data"
        P1["post_install"]:::directory
        P2["save"]:::directory
    end

    subgraph "Utility Scripts"
        U1["changefont.tampermonkey"]:::script
        U2["copy_innerText_to_clipboard.js"]:::script
        U3["get_transcript.sh"]:::script
        U4["get_transcript.py"]:::script
        U5["get_transcript.ps1"]:::script
        U6["windows_google_dns.ps1"]:::script
        U7["virtualbox-mobaxterm.bat"]:::script
        U8["w32tm-resync.vbs"]:::script
        U9["ibus-daemon.service"]:::script
    end

    UserEnv["User Environment"]:::environment

    %% Repository links to major components
    Repo --> B1
    Repo --> W1
    Repo --> S1
    Repo --> P1
    Repo --> U1

    %% Dotfiles internal connection (grouping display)
    B1 --> B2
    B2 --> B3
    B3 --> B4
    B4 --> I1
    I1 --> I2

    %% Window Manager group internal flow
    W1 --> W2
    W2 --> W3
    W3 --> W4

    %% Installation Scripts internal connection
    S1 --> S2
    S2 --> S3
    S3 --> S4
    S4 --> S5
    S5 --> S6

    %% Post-Installation group connection
    P1 --> P2

    %% Utility Scripts internal connection
    U1 --> U2
    U2 --> U3
    U3 --> U4
    U4 --> U5
    U5 --> U6
    U6 --> U7
    U7 --> U8
    U8 --> U9

    %% Cross-component interactions
    S1 -->|"deploy"| B1
    B1 -->|"apply"| UserEnv
    W1 -->|"apply"| UserEnv
    P1 -->|"post-install"| UserEnv
    U1 -->|"support"| UserEnv

    %% Click Events for Dotfiles & Personal Configurations
    click B1 "https://github.com/nhkduy201/dotfiles/blob/main/.bashrc"
    click B2 "https://github.com/nhkduy201/dotfiles/blob/main/.tmux.conf"
    click B3 "https://github.com/nhkduy201/dotfiles/blob/main/.vimrc"
    click B4 "https://github.com/nhkduy201/dotfiles/blob/main/.xinitrc"
    click I1 "https://github.com/nhkduy201/dotfiles/blob/main/01-libinput.conf"
    click I2 "https://github.com/nhkduy201/dotfiles/blob/main/01-touchpad.rules"

    %% Click Events for Window Manager Configs
    click W1 "https://github.com/nhkduy201/dotfiles/blob/main/dwm-config.h"
    click W2 "https://github.com/nhkduy201/dotfiles/blob/main/st-config.h"
    click W3 "https://github.com/nhkduy201/dotfiles/blob/main/slstatus-git-config.h"
    click W4 "https://github.com/nhkduy201/dotfiles/blob/main/picom.conf"

    %% Click Events for Installation Scripts
    click S1 "https://github.com/nhkduy201/dotfiles/blob/main/arch-install.sh"
    click S2 "https://github.com/nhkduy201/dotfiles/blob/main/kvm-arch-install.sh"
    click S3 "https://github.com/nhkduy201/dotfiles/blob/main/min-arch-install.sh"
    click S4 "https://github.com/nhkduy201/dotfiles/blob/main/arch_pkg_src_xplr.sh"
    click S5 "https://github.com/nhkduy201/dotfiles/blob/main/download_arch_iso.sh"
    click S6 "https://github.com/nhkduy201/dotfiles/blob/main/download_arch_iso.ps1"

    %% Click Events for Post-Installation & Saved Data
    click P1 "https://github.com/nhkduy201/dotfiles/tree/main/post_install"
    click P2 "https://github.com/nhkduy201/dotfiles/tree/main/save"

    %% Click Events for Utility Scripts
    click U1 "https://github.com/nhkduy201/dotfiles/blob/main/changefont.tampermonkey"
    click U2 "https://github.com/nhkduy201/dotfiles/blob/main/copy_innerText_to_clipboard.js"
    click U3 "https://github.com/nhkduy201/dotfiles/blob/main/get_transcript.sh"
    click U4 "https://github.com/nhkduy201/dotfiles/blob/main/get_transcript.py"
    click U5 "https://github.com/nhkduy201/dotfiles/blob/main/get_transcript.ps1"
    click U6 "https://github.com/nhkduy201/dotfiles/blob/main/windows_google_dns.ps1"
    click U7 "https://github.com/nhkduy201/dotfiles/blob/main/virtualbox-mobaxterm.bat"
    click U8 "https://github.com/nhkduy201/dotfiles/blob/main/w32tm-resync.vbs"
    click U9 "https://github.com/nhkduy201/dotfiles/blob/main/ibus-daemon.service"

    %% Class Definitions
    classDef config fill:#b3e6ff,stroke:#333,stroke-width:1px;
    classDef script fill:#c6f7d0,stroke:#333,stroke-width:1px;
    classDef directory fill:#ffe4c4,stroke:#333,stroke-width:1px;
    classDef environment fill:#f1c0e8,stroke:#333,stroke-width:1px;
```
