An open API service indexing awesome lists of open source software.

https://github.com/irichu/dotfiles

Simple but powerful dotfiles for Linux and Android. Easily setup the intuitive development environment: Zsh, tmux, Neovim support on Ubuntu, Fedora, Arch Linux with Docker trial.
https://github.com/irichu/dotfiles

android brew docker dotfiles homebrew japanese lazyvim neovim shortcuts starship termux termux-configuration tmux ubuntu zsh

Last synced: 6 months ago
JSON representation

Simple but powerful dotfiles for Linux and Android. Easily setup the intuitive development environment: Zsh, tmux, Neovim support on Ubuntu, Fedora, Arch Linux with Docker trial.

Awesome Lists containing this project

README

          


Dotfiles




GitHub code size in bytes

GitHub repo size


Tokei total line


GitHub Created At

GitHub last commit

GitHub commit activity

GitHub License

GitHub Release

GitHub Repo stars



[English] [Japanese(æ—ĨæœŽčŠž)]

# Dotfiles for Linux and Termux

## 🎉 Welcome

Welcome to my dotfiles. This repository helps easily set up a fast and intuitive terminal environment. This setup installs Zsh with starship prompt, tmux, Neovim, and Golang and Rust-based command-line tools that starts and operates quickly. I would be delighted if even a single element leads to a new discovery for you. Grateful that you found this project and took a look!

### Linux

### Android Termux

### WSL2

wsl_zsh_nvim_startuptime

## 🚀 Installation

**1. Download and Install dotfiles**

Use the following `curl`, `wget`, or `git` command:

- curl

```bash
curl -sL https://raw.githubusercontent.com/irichu/dotfiles/main/install.sh | bash
```

- wget

```bash
wget -qO- https://raw.githubusercontent.com/irichu/dotfiles/main/install.sh | bash
```

- git (>=2.35.0 recommended)

```bash
git clone --depth=1 https://github.com/irichu/dotfiles.git && cd dotfiles && ./install.sh
```

**2. Bulk installation**

> [!IMPORTANT]
> On Linux (Ubuntu/Fedora/Arch Linux), automatic setup is available using `--brew`.

> On Ubuntu, fast installation is possible with `--apt` or `--snap`.

> On Termux, setup can be done using `--pkg`.
>

> [!NOTE]
> On Linux, `sudo` access is required for installation.

> This is needed to install Homebrew itself with `--brew` and to install packages using `--apt`, `--snap`.

>

Install all components using your preferred package manager:
`dots install [--apt|--brew|--snap|--pkg]`
Replace `[--apt|--brew|--snap|--pkg]` with your package manager of choice.

**Examples:**

- To use brew on Linux:

```bash
dots install --brew
```

- To use pkg on Termux:

```bash
dots install --pkg
```

> [!NOTE]
> If `dots` command not found,

> please run the following command to add the path to ~/.local/bin

> or use `~/.local/bin/dots` command directly during the installation process
>

```bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
```

**3. Start**

Relogin or execute the following command:

```bash
exec -l $(which zsh)
```

> [!NOTE]
> In a login shell, such as an SSH session, Tmux will start automatically.

> If a Tmux server is already running, you can select a session to connect to.
>

## ✅ Supported OS

- Linux 🐧
- Ubuntu 22.04 and newer (recommended)
- Arch Linux
- Fedora
- Android ðŸ“ą
- The latest version of Termux

> [!WARNING]
> The Google Play Store version of Termux may not work properly with some commands.

> It is recommended to install it from [F-Droid].
>

## âœĻ Features

- **Shell**: Zsh with the [starship] prompt
- **Editor**: [Neovim] configured via [LazyVim]
- **Terminal Multiplexers**: [tmux] for session management, [zellij] for workspace management
- **TUI File Managers**: [broot] for efficient navigation, [yazi] for rapid file access
- **Terminal Emulator**: [Alacritty] for performance, [Termux] for Android environments

## 📗 Basic commands

Show help and available commands:

```bash
dots --help
```

Get the current color theme:

```bash
dots theme
```

Set the color theme:

```bash
dots set-theme

# Example
dots set-theme 4 # Set by number
dots set-theme "developer-mono" # Set by name
```

Available themes:

**1. developer**

![Image](https://github.com/user-attachments/assets/b11d0239-654c-4bb8-8b00-053052bf6551)

**2. developer-textcolored**

![Image](https://github.com/user-attachments/assets/eb263ac8-43a4-40b6-9416-d062500ce4db)

**3. developer-colorful**

![Image](https://github.com/user-attachments/assets/bdf15c2c-fa79-482e-acc4-d5cff417ea26)

**4. developer-mono**

![Image](https://github.com/user-attachments/assets/ff462435-3c49-4671-9ae7-dd5b58e8ddb6)

**5. dark-turquoise**

![Image](https://github.com/user-attachments/assets/04e742ca-9ce8-433b-9b07-19618274d36c)

**6. dark-turquoise-textcolored**

![Image](https://github.com/user-attachments/assets/56cccb66-fb8f-4ca3-872b-16ec20abc619)

**7. dark-turquoise-colorful**

![Image](https://github.com/user-attachments/assets/bb5f85de-c149-4ad1-a912-ce62c1b62580)

**8. dark-turquoise-mono**

![Image](https://github.com/user-attachments/assets/66e21e1b-f1f5-487e-87b0-ad1655e5fd28)

**9. dark-orange**

![Image](https://github.com/user-attachments/assets/e7a84520-94e6-44c9-ab0e-8c1358123e58)

**10. dark-orange-textcolored**

![Image](https://github.com/user-attachments/assets/f9d520d0-8740-4538-ae4e-7e88d77aa10d)

**11. dark-orange-colorful**

![Image](https://github.com/user-attachments/assets/5aebc5e0-bef7-451b-9cd0-0f22be945a76)

**12. dark-orange-mono**

![Image](https://github.com/user-attachments/assets/4bb9b5b7-e5e1-4865-9a5e-f4e2e4fc2da1)

**13. dark-skyblue**

![Image](https://github.com/user-attachments/assets/2b97e6ef-9510-40b0-85e0-dd9629db7eac)

**14. dark-skyblue-textcolored**

![Image](https://github.com/user-attachments/assets/406430fe-ba61-4790-9b8a-0ea752d0fe4b)

**15. dark-skyblue-colorful**

![Image](https://github.com/user-attachments/assets/5a3dfb75-9f9d-4324-ac70-fcb988e7c313)

**16. dark-skyblue-mono**

![Image](https://github.com/user-attachments/assets/02e7bf8a-9269-4bfa-bdab-212bea7c9c4a)

Copy $XDG_CONFIG_HOME to $XDG_DATA_HOME/dotfiles-main/backup dir:

```bash
dots backup
```

Clean up directories:

```bash
# remove dotfiles cache
dots clean

# remove cache + dotfiles backup directories
dots clean backup

# remove cache + config directories
dots clean config

# remove cache + backup + config
dots clean all
```

Show install target package list:

```bash
dots list [--apt|--brew|--snap|--pkg]
```

Install individual package:

```bash
dots install
```

| Help image |
| :----------------------------------------------------------------------------------------------------------------: |
| help |

### ðŸ–Ĩïļ Install individual package

The following apps can be installed individually from the `dots install ` command

#### >_ CLI/TUI Apps

| Package Name | Description |
| ------------ | ------------------------------------------ |
| `docker` | docker-ce (additional repository) |
| `fnm` | latest FNM (Fast Node Manager) and Node.js |
| `fzf` | fzf (fuzzy finder) from github |
| `lazydocker` | LazyDocker |
| `lazygit` | LazyGit |
| `lazyvim` | LazyVim |
| `neovim` | Neovim and LazyVim |
| `starship` | starship.rs |

#### ðŸ–Ĩïļ GUI Apps

| Package Name | Description |
| ------------ | --------------------------- |
| `rustdesk` | RustDesk on Ubuntu Desktop |
| `zed` | Zed editor on Linux Desktop |

#### ðŸŠī Others

| Package Name | Description |
| ------------ | ------------------------ |
| `hackgen` | HackGen font (Nerd Font) |

### 🍚 Brew Apps

The `dots install --brew` command mainly installs the following apps

| Package Name | Description |
| ------------------------- | --------------------------------------------------------- |
| `bat` | cat replacement |
| `bottom` | TUI system resource monitor |
| `broot` | Interactive directory navigation tool |
| `cloc` | Count lines of code in a project |
| `duf` | df replacement with better visualization |
| `dust` | du replacement with intuitive output |
| `eza` | ls replacement with modern features |
| `fastfetch` | Fast system information fetcher |
| `fd` | find replacement with simpler syntax |
| `fnm` | Fast Node Manager for managing Node.js versions |
| `fzf` | Fuzzy finder for the command line |
| `gh` | GitHub CLI tool for interacting with GitHub |
| `git-delta` | Syntax-highlighting pager for git and diff output |
| `gping` | Graphical ping tool with live visualization |
| `gum` | A tool for enhancing shell scripts with interactive UI |
| `jq` | Command-line JSON processor |
| `just` | Handy command runner similar to Make |
| `lazygit` | Simple TUI for Git repositories |
| `ripgrep` | grep replacement with blazing fast search |
| `ruff` | Fast Python linter and formatter |
| `sd` | Simplified and faster replacement for sed |
| `starship` | Minimal and customizable shell prompt |
| `tmux` | Terminal multiplexer for managing multiple panes |
| `tokei` | Code statistics tool for counting lines and files |
| `typst` | Modern markup-based typesetting system |
| `uv` | Python version manager with seamless virtual environments |
| `yazi` | TUI file manager inspired by ranger |
| `zellij` | Rust-based terminal multiplexer with workspace support |
| `zoxide` | cd replacement with smart directory jumping |
| `zsh` | Powerful and customizable shell |
| `zsh-autosuggestions` | Fish-like command suggestions for zsh |
| `zsh-completions` | Additional completions for zsh commands |
| `zsh-syntax-highlighting` | Syntax highlighting for zsh command line |

### 📓 Target apps

If you want to check all applications per package manager, please refer:

- [apt packages]
- [brew packages]
- [snap packages]
- [pkg packages]

## ðŸģ Docker

You can build and enter a container with the following commands.

```bash
cd ~/.local/share/dotfiles-main

docker build -t dotfiles-img .
docker run -it -d --name dotfiles-con dotfiles-img
docker exec -it dotfiles-con /bin/zsh
```

In container, install apt packages

```bash
dots install --apt
```

or install Homebrew with following command.

```bash
dots install --brew
```

## 🖞ïļ Gallery

### Neovim

| LazyVim tokyonight.nvim style=night |
| :-------------------------------------------------------------------------------------------------------------------: |
| LazyVim |

### Tmux

| Tmux split window |
| :-----------------------------------------------------------------------------------------------------------------------------: |
| Tmux split window |

| Tmux synchronize-panes mode |
| :---------------------------------------------------------------------------------------------------------------------------------------: |
| Tmux synchronize-panes mode |

### eza, lazygit, yazi

| eza tree (eza -l -T) |
| :--------------------------------------------------------------------------------------------------------------------: |
| eza tree |

| lazygit |
| :-------------------------------------------------------------------------------------------------------------------: |
| lazygit |

| yazi |
| :----------------------------------------------------------------------------------------------------------------: |
| yazi |

## ⚡ Aliases for quick start

### Tmux

#### Create a session

Quickly start a new tmux session.

```bash
t # tmux new
```

#### Attach the last session

Reconnect to the most recent tmux session.

```bash
ta # tmux attach
```

#### Show all sessions

List all tmux sessions that are currently running.

```bash
tls # tmux ls
```

#### Terminate tmux server

Kill the entire tmux server and all running sessions.

```bash
tks # tmux kill-server
```

#### Show tmux pane id

Show tmux pane id

```bash
tid # tmux display -pt "${TMUX_PANE:?}" "#{pane_index}"
```

#### Reload tmux config

Reload .tmux.conf

```bash
.t # source ~/.config/tmux/.tmux.conf
```

### Neovim

#### Search and Open

Search and open files by fd and fzf.

```bash
v # fd --type f --hidden --exclude .git | fzf-tmux -p | xargs -o nvim
```

## âŒĻïļ Keymaps

### Zsh

Based on Emacs mode with `bindkey -e`, with some additional key bindings added.

| Key | Action |
| ------------------------------------------- | ---------------------------- |
| Ctrl+(↑/↓) | Undo / Redo |
| Ctrl+(←/→) | Backward-word / Forward-word |

### Tmux

#### prefix key

> [!NOTE]
> The tmux prefix key is configured to `Ctrl + \` for easier access.
>

| Key | Description |
| ---------------------------- | ----------------------------- |
| I | Install tmux plugins with tpm |
| U | Update tmux plugins with tpm |
| Ctrl+s | Save tmux env |
| Ctrl+r | Restore tmux env |
| d | Detach the tmux session |
| e | Switch pane-synchronize mode |

> [!TIP]
> In nested Tmux sessions, pressing the prefix key (`Ctrl-\`) multiple times
> will send it to the innermost session.
> The number of times you need to press it equals the depth of nesting.
>
> For example, if you are running Tmux inside another Tmux session (nested once),
> pressing `Ctrl-\` twice will send the prefix key to the inner session.
> If you are three levels deep, you need to press `Ctrl-\` three times.
> Additionally, pressing `Ctrl-\` sends the key input to the shell within the session.
>

##### tmux plugins

The tmux plugins installed by default are as follows:

- [tpm]
- [tmux-continuum]
- [tmux-logging]
- [tmux-resurrect]
- [tmux-fingers]

#### alt key shortcut

| Key | Description | Prefix key + |
| ------------------------------------------ | ------------------------------------- | --------------------------------------------------- |
| Alt+(↑/↓) | Create/delete the window | c/& |
| Alt+(←/→) | Switch to the previous/next window | p/n |
| Alt+[1-9] | Switch to the 1-9 window | [1-9] |
| Alt+- | Split the window horizontally | - |
| Alt+\\ | Split the window vertically | \\ |
| Alt+[hjkl] | Switch to the left/down/up/right pane | ←/↓/↑/→ |

#### alt+shift key shortcut

| Key | Description | Prefix key + |
| ----------------------------------------------------------- | ----------------------------------- | ------------------------- |
| Alt+Shift+(↑/↓) | Create/delete a session | |
| Alt+Shift+(←/→) | Switch to the previous/next session | (/) |

### Neovim

Based on [LazyVim keymaps], with some additional key bindings added.

| Mode | Key | Description |
| :---: | ------------------------------------------- | ----------------------------------------------------------------------- |
| n,v | Ctrl+(↑/↓) | Move to (the end of the previous / the beginning of the next) paragraph |
| n,v,i | Ctrl+(←/→) | Backward word / Forward word |
| i | Ctrl+/ | Undo |
| i | Ctrl+r | Redo |

[Emacs-like shortcuts] are configured in insert mode.

- Ctrl+[abdefnpuwy]
- Alt+[bdf]

## 📜 License

This project is licensed under the [MIT License].

[æ—ĨæœŽčŠž]: docs/README-ja.md
[F-Droid]: https://f-droid.org/
[starship]: https://starship.rs/
[Neovim]: https://github.com/neovim/neovim
[LazyVim]: https://www.lazyvim.org/
[tmux]: https://github.com/tmux/tmux
[zellij]: https://github.com/zellij-org/zellij
[broot]: https://github.com/Canop/broot
[yazi]: https://github.com/sxyazi/yazi
[Alacritty]: https://github.com/alacritty/alacritty
[Termux]: https://github.com/termux/termux-app
[apt packages]: assets/txt/apt-packages.txt
[brew packages]: Brewfile
[snap packages]: assets/txt/snap-packages.txt
[pkg packages]: assets/txt/pkg-packages.txt
[tpm]: https://github.com/tmux-plugins/tpm
[tmux-continuum]: https://github.com/tmux-plugins/tmux-continuum
[tmux-logging]: https://github.com/tmux-plugins/tmux-logging
[tmux-resurrect]: https://github.com/tmux-plugins/tmux-resurrect
[tmux-fingers]: https://github.com/Morantron/tmux-fingers
[LazyVim keymaps]: https://www.lazyvim.org/keymaps
[Emacs-like shortcuts]: docs/neovim.md#emacs-like
[MIT License]: LICENSE.md