Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/niksingh710/cdots

Cli Configuration to be worked on terminal and compatible with TTy based for Arch Linux
https://github.com/niksingh710/cdots

bash cdots cli command-line commandline configuration dotfiles dots shell starship transient zsh

Last synced: 10 days ago
JSON representation

Cli Configuration to be worked on terminal and compatible with TTy based for Arch Linux

Awesome Lists containing this project

README

        

![image](https://github.com/niksingh710/cdots/assets/60490474/17f50b3e-2fdf-4914-b396-475574afeb68)


These are my dot files for Commandline Instance on my system.

I use **[Arch Linux](https://archlinux.org)** as My main OS and **[Zsh](https://www.zsh.org/)** as my Shell and **[Tmux](https://github.com/tmux/tmux)** as my Multiplexer.

The configuration highly uses **[Fzf](https://github.com/junegunn/fzf)** and **[Vim](https://github.com/vim/vim)** style key binding and **[Starship](https://github.com/starship/starship)** for Shell Prompt.

![GitHub repo size](https://img.shields.io/github/repo-size/niksingh710/cdots)
![GitHub Org's stars](https://img.shields.io/github/stars/niksingh710%2Fcdots)
![GitHub forks](https://img.shields.io/github/forks/niksingh710/cdots)
![GitHub last commit](https://img.shields.io/github/last-commit/niksingh710/cdots)

### Prerequisites

```bash
yay -S fd ripgrep shellcheck-bin shfmt advcpmv bat lsd git glow urlview git-secret \
starship tmux fzf zoxide ssh zsh zsh-completions-git \
trash-cli xstow ttf-jetbrains-mono-nerd
```

### Setup

Setup is done by using `stow` command. I use xstow a fork of stow command.

This command will place the files in the correct location.

```bash
mkdir -p ~/.local/bin/
xstow home -t ~
xstow bin -t ~/.local/bin
xstow .config -t ~/.config
````

### Structure
`.zshrc` is in home Dir that contains all `zsh` related config.

`~/.shell` dir contains:

- `path` file that adds all path's from the array to `$PATH` variable without cluttering it.
- `aliases` file that contains all the aliases with utility fns.
`~/.local/bin` contains all the binaries required by the configuration.

# Preview

#### Starship prompt
> [!Note]
> I have a custom function in my zshrc to make my starship prompt Transient.

(Transient) prompt is when the prompt is visible for only the current input and previous input just contains a symbol.

![image](https://github.com/niksingh710/cdots/assets/60490474/1c1bff31-eb4f-43e7-8dd4-e55892622977)

#### Fzf
I have my fzf setted up via `~/.shell/fzf.zsh` where i perform mapping for fzf and setup `preview` script.

**preview** script can preview text files, list dir's and also show images in fzf preview pane.

| Mapping | Action |
| - | - |
| `Ctrl-j` | Move down |
| `Ctrl-k` | Move Up |
| `Ctrl-t` | List files in current dir |
| `Alt-c` | List dir in current location |
| `Ctrl-r` | Search throught Hitory |
| `Ctrl-/` | Search for aur package with info to install|
| `Ctrl-Alt-/` | Search for aur package with info to remove |
| `Ctrl-space` (fzf list) | Select in multiple Selection |
| `Ctrl-/` (fzf list) | DeSelect in multiple Selection |

| ![image](https://github.com/niksingh710/cdots/assets/60490474/6a96631d-02c0-4c5a-a777-1edaff594081) | ![image](https://github.com/niksingh710/cdots/assets/60490474/3a761775-695a-4160-a835-6077fd1cc90a) |
| - | - |

| ![image](https://github.com/niksingh710/cdots/assets/60490474/6ab40586-9978-4b8c-b944-f0343e180b6a) | ![image](https://github.com/niksingh710/cdots/assets/60490474/bf5cf7cf-b5bc-4d59-92ed-d73c71f15df8) |
| - | - |

### Zsh

I have setted up my zsh using **[znap](https://github.com/marlonrichert/zsh-snap)** plugin manager.

It makes plugin installation and completions management a breeze.

- I use Vim mode for navigation in zsh. `jk` can be pressed in quick succession to switch in vim Mode.

- `Ctrl-Space` is to complete throught the ghost text shown on the terminal.

- In Completion option `j,k,l,h` vim navigations can be used.

>[!Note]
> Nothing extra is required to be done zsh will automatically install everything.

#### Yay

I use `yay` as my aur helper.
Below is the commnad to be setup yay to ignore annoying questions regarding installs.

This will also force yay to check for git packages if they need rebuilding.

```
yay --save --answerclean "None" --answerdiff "None" --removemake --cleanafter --devel
```
#### Vim

Quick vim setup for TTY. if don't want to setup whole shell

```

curl https://raw.githubusercontent.com/niksingh710/cdots/master/home/.vimrc > ~/.vimrc

```


Tools

- **Node**
- For Node js i recommend using [fnm](https://github.com/Schniz/fnm). My `~/.shell/path` already includes it as in path i only need to install it.
- Rust
- Rustup for rust