Skip to content

lth-go/myconfig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyConfig

Init

# sudo 免密
sudo vim /etc/sudoers
# lth     ALL=(ALL)       NOPASSWD: ALL

# disable selinux
sudo vim /etc/selinux/config

# disable firewalld
sudo systemctl disable firewalld

# 修正目录名
export LANG=en_US
xdg-user-dirs-gtk-update

# Make Dir
mkdir ~/.ssh/
mkdir ~/work/
mkdir ~/data/
mkdir ~/.pip/

# Set ssh key

# dnf
sudo dnf install -y git
sudo dnf install -y zsh neovim python3-neovim htop jq
sudo dnf install -y docker docker-compose
sudo dnf install -y golang nodejs
sudo dnf install -y ripgrep fd-find bat
sudo dnf install -y clash flameshot
sudo dnf install -y gcc-c++ libstdc++-devel
sudo pip install -U thefuck

sudo dnf copr enable agriffis/neovim-nightly
sudo dnf update -y neovim

# config
cd ~ && git clone --depth 1 https://email:[email protected]/lth-go/myconfig.git

# zsh
cd ~/myconfig/zsh/ && sh ./install.sh

cd ~/.oh-my-zsh/custom/themes/ && ln -sf ~/myconfig/zsh/my.zsh-theme my.zsh-theme

cd ~/.oh-my-zsh/custom/plugins
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions.git
git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting.git

# soft link
cd ~
ln -sf ~/myconfig/zsh/zshrc .zshrc
cd ~/.config && ln -sf ~/myconfig/nvim nvim
cd ~
ln -sf ~/myconfig/git/.gitconfig .gitconfig
ln -sf ~/myconfig/git/.gitignore_global .gitignore_global
ln -sf ~/myconfig/ripgrep/.rgrc .rgrc
cd ~/.pip && ln -sf ~/myconfig/python/pip.conf pip.conf

cd /
sudo ln -sf ~/work/ work
sudo ln -sf ~/data/ data

# fzf
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install

# Nodejs
npm config set registry https://registry.npmmirror.com

# vim
cd ~/myconfig
# $ vim :PackerSync

# Python
pip install --user virtualenv
mkdir ~/work/python_venv/
cd /work/python_venv/
~/.local/bin/virtualenv --python=python3 py3_venv

source /work/python_venv/py3_venv/bin/activate
pip install jedi autopep8 flake8

deactivate
pip install --user ipython
pip install --user requests
pip install --user jedi autopep8 flake8

# Golang
go get golang.org/x/tools/gopls@latest

sudo npm install -g diff-so-fancy tldr

# Docker
sudo systemctl enable docker
sudo usermod -aG docker $USER
# 重启
# cgroups: cgroup mountpoint does not exist: unknown
sudo mkdir /sys/fs/cgroup/systemd
sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd

# sudo dnf install -y grubby
# sudo grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0"

# clash
sudo mkdir /etc/clash/
sudo wget -O /etc/clash/config.yaml {xxx}
sudo vim /usr/lib/systemd/system/clash.service
# [Unit]
# Description=Clash Daemon
#
# [Service]
# ExecStart=/usr/bin/clash -d /etc/clash/
# Restart=on-failure
# 
# [Install]
# WantedBy=multi-user.target

sudo systemctl enable clash.service
sudo systemctl start clash.service

# https://clash.razord.top/#/proxies

Update

cd ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions && git pull
cd ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting && git pull

字体

mkdir -p ~/.local/share/fonts
rm -rf ~/.local/share/fonts/DejaVu\ Sans\ Mono\ Nerd\ Font\ Complete\ Mono.ttf
cd ~/myconfig
cp ./fonts/DejaVu\ Sans\ Mono\ Nerd\ Font\ Complete\ Mono.ttf ~/.local/share/fonts

fc-cache -vf ~/.local/share/fonts

Other

# 禁用CapsLock
# ~/.Xmodmap
# clear lock
# clear control
# keycode 66 = Control_L
# add control = Control_L Control_R

# git拉取失败问题
vim ~/.ssh/config
# Host xxx
#     PubkeyAcceptedKeyTypes=+ssh-rsa

# ssh nvim共享剪切板
https://github.com/hanxi/lemonade
https://github.com/hanxi/blog/issues/26

# vbox
sudo usermod -G vboxsf -a $USER

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published