dots/README.md

130 lines
3.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# В репозитории собраны некоторые конфигурационные файлы для комфортной работы в консоли GNU Linux
Для упрощения процесса настройки можно воспользоваться [установочным скриптом](install.sh)
```shell
wget https://git.da2001.ru/da2001/dots/raw/branch/main/install.sh
```
Скрипт необходимо запукать от имени текущего пользователя с повышенными привилегиями - sudo
## Tmux
### Установка tmux
```shell
sudo apt-get update && sudo apt-get install -y curl git tmux
```
### Скачивание конфига и запуск
Плагины установятся автоматически
```shell
curl --create-dirs -fLo \
~/.config/tmux/tmux.conf \
https://git.da2001.ru/da2001/dots/raw/branch/main/.config/tmux/tmux.conf
```
После скачивания конфига можно запускать tmux, первый запуск будет долгим, т.к. потребуется скачать плагины
```shell
tmux
```
## Оболочка zsh
```shell
sudo apt-get update && sudo apt-get install -y zsh zsh-syntax-highlighting
```
### ## [Oh-My-Zsh](https://ohmyz.sh/) — популярный и активно развивающийся фреймворк Zsh, который позволяет гибко настроить оболочку терминала
Установка - [тыц](https://ohmyz.sh/#install)
```sh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
```
### Подсветка синтаксиса в консоли при вводе - `zsh-syntax-highlighting`
<https://github.com/zsh-users/zsh-syntax-highlighting>
```shell
sudo apt-get update && sudo apt-get install -y zsh-syntax-highlighting
```
Для активации подсветки синтаксиса необходимо добавить пусть к скрипту в настройки `.zshrc`
```shell
echo "source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
```
### Автодополнение команд из истории
<https://github.com/zsh-users/zsh-autosuggestions>
Установка в Oh My Zsh
```shell
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
```
Добавить плагин к списку плагинов Oh My Zsh `~/.zshrc`:
```shell
plugins=(
# other plugins...
zsh-autosuggestions
)
```
Для дефолтного zsh
```sh
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
```
Перезагрузить оболочку
```sh
source ~/.zshrc
```
### Внешний вид
Тема [PowerLevel10K](https://github.com/romkatv/powerlevel10k)
#### Установить шрифт с поддержкой иконок
```shell
https://github.com/ryanoasis/nerd-fonts?tab=readme-ov-file#font-installation
```
если кратко:
```shell
apt-get install -y fontconfig
mkdir -p ~/.local/share/fonts
curl -OL https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz
tar -xvf JetBrainsMono.tar.xz -C ~/.local/share/fonts
rm JetBrainsMono.tar.xz
fc-cache
```
#### Установить непосредственно плагин PowerLevel10K для Oh My Zsh
```shell
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
```
В настройках `~/.zshrc` заменить значение темы на
```shell
ZSH_THEME="powerlevel10k/powerlevel10k"
```
#### Настройка
После первого запуска консоли будет запущен мастер настройки внешнего вида PowerLevel10K