The magic soldier chapter of the cult diary: 1

Keywords: vim git sudo github

The magic soldier chapter of the cult diary: 1

Article catalog

Part I It's said that after suffering, we finally joined the teaching. What do you do after joining the school? Of course, learning martial arts has unified the Jianghu. -

"The highest in the Wulin, the sword slays the dragon; command the world, dare not follow."

If you want to unify the Jianghu, you really need a magic weapon~

In this article, let's build a magic soldier.

ArchLinux-cn

Chinese, use our warehouse

PS: vim configuration is found in the directory

# Modify profile
vim /etc/pacman.conf
# Press the big G key to jump to the last line of the configuration file, and then press the O key to enter
[archlinuxcn]
SigLevel = Optional TrustedOnly
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch
# Save exit

# Update system
sudo pacman -Syy
# Write key
sudo pacman -S archlinuxcn-keyring
# ok

Artifact YAY

# After the above operation, you can install the artifact
sudo pacman -S yay

Desktop Environment

yay -S xorg-server xorg-xinit i3-gaps i3status i3lock-fancy polybar

##### If you are lucky, you can not find the strip binary required for object file stripping
##### So. Do it
pacman -Sy base-devel
##### That's it

xinitrc

# How to start i3
cp /etc/X11/xinit/xinitrc ~/.xinitrc
# Delete blank lines first
sed -i -e '/^\s*$/d' ~/.xinitrc

Break in a piece of news

Because command line and vim are frequently used here

So let's start with these two. Make yourself comfortable

VIM configuration

vim ~/.vimrc

:set nu
:noh
set ignorecase
set shortmess=atI
syntax on
autocmd InsertLeave * se nocul
set ruler
set showcmd
set foldenable
set foldmethod=manual
set autowrite
set cursorline
set confirm
set autoindent
set cindent
set tabstop=4
set softtabstop=4
set shiftwidth=4
set noexpandtab
set smarttab
set hlsearch
set incsearch
set enc=utf-8
set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936
set langmenu=zh_CN.UTF-8
set showmatch
set smartindent
# Save exit

perhaps

wget https://github.com/marquisXuan/configuration/blob/master/linux/.vimrc ~/.vimrc
ZSH | oh-my-zsh
# install 
yay -S zsh

# install oh-my-zsh
sh -c "$(curl -fsSL http://git.oschina.net/yangchendong/oh-my-zsh/raw/master/tools/install.sh)"

# delete~/.zshrc In the file#Comment line at the beginning
sed -i -e '/#/d' ~/.zshrc

# Delete empty lines in ~ /. zshrc file
sed -i -e '/^\s*$/d' ~/.zshrc

# download plugins
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions && git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting

# config plugins
sed -i 's/fg=8/fg=6/g' ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh

# config zshrc
vim ~/.zshrc

################# Modify the corresponding content #################
ZSH_THEME="agnoster"
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
################# Modification completed #################
source ~/.zshrc
# Look at the effect. If PowerLine is not installed, you can change agnoster to lambda first, and then I will write how to solve the problem of garbled code

Continue xinitrc

 # There are many things in xinitrc copied. We haven't installed them. We need to change the configuration file
# Like twm, xclock, xterm and so on. I don't use them all -- so they're all deleted
# There's an I3 gap on it, so let's play like this
mkdir -p ~/.config/i3/log
vim ~/.xinitrc
################# Document content #################
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi
# In black apple, this is called verbose mode ~~
exec i3 -V >> ~/.config/i3/log/i3log-$(date +'%F-%k-%M-%S') 2>&1
################# End of file content #################

After that, we reboot. After logging in, we execute startx. We can see this picture

PS: This screen is not a virtual machine, but I installed a vnc first and then used it for screenshots~

Right or wrong, it's a piece of random code with black, black, black and black. Now, let's build a nice and practical desktop step by step

i3

Random code problem one
# Install the Chinese character library
yay -S adobe-source-han-sans-cn-fonts

Well, it's much better

Random code problem two

By default, i3 binds a key to Alt. however, it can't be used until something is configured. Because we haven't installed the default terminal, we have installed an alacrity terminal. In simple configuration

vim ~/.config/i3/config

# 1. Find set $mod mod 1 
# Mod1 is the bound Alt key
# Mod4 is the Win key. Change it according to personal habits~

# 2. Find the start a terminal comment bindsym $mod + return exec I3 sensitive terminal 
# And add
bindsym $mod+Return exec alacritty
# Save exit
# After pressing alt + shift + r, press win + enter

Generally speaking, this is the case. The reason is that theme in ~ /. zshrc uses agnoters, which is not the case if it is a lambda

Solution
# Installing powerline fonts
cd /srv && sudo git clone https://github.com/powerline/fonts.git --depth=1
# then 
cd font && ./install

Well, let's see how it works, isn't it very nice?

picom
# A transparent software
yay -S picom
ROFI
# A software similar to listray in Windows and spotlight in MAC
yay -S rofi

# Configure it
mkdir -p ~/.config/rofi
rofi -dump-config > ~/.config/rofi/config.rasi

# Synchronization enables i3 to call with shortcut key 
vim ~/.config/i3/config
# Search start dmenu again, comment, add a new line where adapta nokto is the subject
bindsym $mod+d exec --no-startup-id rofi -show drun -theme Adapta-Nokto
# Choose your own theme
rofi-theme-selector
# rofi's profile is attached

It looks like this

Clean and tidy. The theme is changed by yourself. There are many configurations

Command line Explorer
yay -S ranger

It's like this. It can preview the picture

i3Status

Status bar at the bottom of the screen

yay -S i3status
# And a better poly
yay -S polybar
# Are highly customizable status bars
# Configuration file attached
wallpaper
yay -S variety

Well, that's about it

Of course, we can't start it like this. It's also added to the configuration file of i3~

Emmmm, I have to go out to check for baby. I'll have one first~

Posted by arisjb on Sat, 20 Jun 2020 00:28:24 -0700