13 files changed,
304 insertions(+),
36 deletions(-)
Author:
Smirnov Olexandr
ss2316544@gmail.com
Committed at:
2020-12-19 14:42:34 +0200
Parent:
88cbabb
M
README.md
··· 1 1 <h1 align="center">dotfiles</h1> 2 2 3 +[install arch linux](install_arch.md) 4 +------------------------------------- 5 + 3 6  4 7 ------------------------------ 5 8 6 9 #### System configuration 7 10 - `OS` Arch 8 11 - `WM` Qtile 9 -- `Terminal` Kitty 12 +- `Terminal` Alacritty 10 13 - `Shell` zsh 11 14 - `Editor` nvim 15 +- `File manager` ranger, mc 12 16 - `Browser` firefox 13 17 - `Font` Jatbrains Mono 14 18 - `Icon font` FontAwesome5
M
bin/giti
··· 1 1 #!/bin/sh 2 2 add() { 3 - local file="$1" 4 - echo $file >> .gitignore 3 + echo $1 >> .gitignore 5 4 } 6 5 del() { 7 - local file="$1" 8 - sed -i "/$file/d" .gitignore 6 + sed -i "/$1/d" .gitignore 9 7 } 10 8 edit() { 11 - local oldname="$1" 12 - local newanme="$2" 13 - sed -in "s|$oldname|$newanme|g" .gitignore 9 + sed -in "s|$1|$2|g" .gitignore 14 10 } 15 11 show() { 16 12 if [ -f '/usr/bin/bat' ] ··· 22 18 } 23 19 24 20 case "$1" in 25 - add|a) shift; add "$@" ;; 26 - del|d) shift; del "$@" ;; 21 + add|a) shift; add "$@" ;; 22 + del|d) shift; del "$@" ;; 27 23 mv) shift; edit "$@" ;; 28 24 show|s) shift; show ;; 29 25 help) echo "add/a - filename add to ignore" ··· 32 28 echo "show - show ignore file" 33 29 ;; 34 30 *) echo "Command is not valid" 35 -esac 31 +esac
A
config/alacritty.yml
··· 1 +env: 2 + TERM: xterm-256color 3 + 4 +window: 5 + title: Alacritty 6 + class: 7 + instance: Alacritty 8 + general: Alacritty 9 + padding: 10 + x: 0 11 + y: 0 12 + 13 +scrolling: 14 + history: 1000 15 + 16 +font: 17 + antialias: lcd 18 + hinting: true 19 + size: 12.0 20 + normal: 21 + family: Hack 22 + style: Regular 23 + bold: 24 + family: Hack 25 + style: Bold 26 + italic: 27 + family: Hack 28 + style: Italic 29 + bold_italic: 30 + family: Hack 31 + style: Bold Italic 32 + offset: 33 + x: 1 34 + y: 0 35 + 36 +debug.render_timer: false 37 +draw_bold_text_with_bright_colors: false 38 +background_opacity: 0.85 39 +#dynamic_title: true 40 + 41 +colors: 42 + primary: 43 + background: '0x262A2D' 44 + foreground: '0xDFDFDF' 45 + cursor: 46 + text: '0x7D7D7D' 47 + cursor: '0xDFDFDF' 48 + selection: 49 + text: '0xEDEBD7' 50 + background: '0x262A3B' 51 + normal: 52 + black: '0x1c1f24' 53 + red: '0xff6c6b' 54 + green: '0x98be65' 55 + yellow: '0xda8548' 56 + blue: '0x51afef' 57 + magenta: '0xc678dd' 58 + cyan: '0x5699af' 59 + white: '0x202328' 60 + bright: 61 + black: '0x5b6268' 62 + red: '0xda8548' 63 + green: '0x4db5bd' 64 + yellow: '0xecbe7b' 65 + blue: '0x3071db' 66 + magenta: '0xa9a1e1' 67 + cyan: '0x46d9ff' 68 + white: '0xdfdfdf' 69 + 70 +cursor: 71 + style: Block 72 + 73 +key_bindings: 74 + - { key: V, mods: Control|Shift, action: Paste } 75 + - { key: C, mods: Control|Shift, action: Copy } 76 + - { key: Key0, mods: Control, action: ResetFontSize } 77 + - { key: Equals, mods: Alt, action: IncreaseFontSize } 78 + - { key: Minus, mods: Alt, action: DecreaseFontSize }
A
config/betterlockscreenrc
··· 1 +insidecolor=#00000000 2 +ringcolor=#ffffff 3 +keyhlcolor=#51AFEF 4 +bshlcolor=#51AFEF 5 +separatorcolor=#00000000 6 +insidevercolor=#ff6c6b 7 +insidewrongcolor=#51AFEF 8 +ringvercolor=#ffffff 9 +ringwrongcolor=#ffffff 10 +verifcolor=#ffffff 11 +timecolor=#ffffff 12 +datecolor=#ced4da 13 +loginbox=#000066
M
config/kitty/kitty.conf
··· 86 86 87 87 # Theming 88 88 foreground #dfdfdf 89 -#background_opacity 0.85 90 -background_opacity 1 89 +background_opacity 0.85 90 +#background_opacity 1 91 91 background_image none 92 92 background_image_layout tiled 93 93 background_image_linear no ··· 96 96 dim_opacity 0.75 97 97 selection_foreground #edebd7 98 98 selection_background #073642 99 -background #262a2b 99 +background #262a3b 100 +#background #262a2b 100 101 foreground #ffffff 101 102 cursorColor #d2dae2 102 103 selection_background #262a3b
M
config/nvim/init.vim
··· 20 20 Plug 'pangloss/vim-javascript', { 'for': 'javascript' } 21 21 Plug 'PotatoesMaster/i3-vim-syntax', { 'for': 'i3' } 22 22 Plug 'kovetskiy/sxhkd-vim', { 'for': 'sxhkd' } 23 + Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries', 'for': 'go' } 23 24 Plug 'mattn/emmet-vim', { 'on': 'Emmet' } 24 25 Plug 'Olical/vim-scheme', { 'for': 'scheme' } 25 26 Plug 'cakebaker/scss-syntax.vim', { 'for': 'scss' } ··· 117 118 let g:indent_guides_enable_on_vim_startup = 1 118 119 119 120 " Floaterm 120 -nmap <A-t> :FloatermNew --name=vimterminal --position=top --autoclose=2<CR> 121 -imap <A-t> :FloatermNew --name=vimterminal --position=top --autoclose=2<CR> 121 +nmap <A-t> :FloatermNew --title=vimterminal --position=top --autoclose=2<CR> 122 122 123 123 " == Maping 124 124 "imap fd <Esc> ··· 142 142 noremap <C-n> :tabnew<CR> 143 143 noremap <C-t> :tabnew<CR> 144 144 noremap <C-S-w> :tabclose<CR> 145 -noremap <leader>1 :tabn 1<CR> 146 -noremap <leader>2 :tabn 2<CR> 147 -noremap <leader>3 :tabn 3<CR> 148 -noremap <leader>4 :tabn 4<CR> 149 -noremap <leader>5 :tabn 5<CR> 150 -noremap <leader>6 :tabn 6<CR> 151 -noremap <leader>7 :tabn 7<CR> 152 -noremap <leader>8 :tabn 8<CR> 153 -noremap <leader>9 :tabn 9<CR> 145 +noremap <A-1> :tabn 1<CR> 146 +noremap <A-2> :tabn 2<CR> 147 +noremap <A-3> :tabn 3<CR> 148 +noremap <A-4> :tabn 4<CR> 149 +noremap <A-5> :tabn 5<CR> 150 +noremap <A-6> :tabn 6<CR> 151 +noremap <A-7> :tabn 7<CR> 152 +noremap <A-8> :tabn 8<CR> 153 +noremap <A-9> :tabn 9<CR> 154 154 noremap <leader>n :bnext<CR> 155 155 noremap <leader>p :bprev<CR>
M
config/qtile/config.py
··· 9 9 mod = "mod4" 10 10 alt = "mod1" 11 11 12 -terminal = "kitty" 12 +terminal = "alacritty" 13 13 browser = "firefox" 14 14 filemanager="pcmanfm" 15 15 user = "sasha" ··· 45 45 desc="Launch filemanager" 46 46 ), 47 47 Key([mod, alt], "t", 48 - lazy.spawn(f"{terminal} -e \"nvim /home/{user}/.todo\""), 48 + lazy.spawn(f"{terminal} -e nvim /home/{user}/.todo"), 49 49 desc="Open ~/.todo file in nvim" 50 50 ), 51 51 ··· 200 200 201 201 # Window layout(s) 202 202 layout_theme = { 203 - "border_width": 2, 204 - "margin": 3, 203 + "border_width": 1, 204 + "margin": 2, 205 205 "border_focus": color[2], 206 206 "border_normal": color[1], 207 207 "font": "Jatbrains Mono"
M
config/ranger/rc.conf
··· 24 24 25 25 ### Preview 26 26 set preview_images true 27 -set preview_images_method kitty 28 -#set preview_images_method ueberzug 27 +#set preview_images_method kitty 28 +set preview_images_method ueberzug 29 29 30 30 set unicode_ellipsis false 31 31 set bidi_support false
A
install_arch.md
··· 1 +### Connect to WiFi 2 +~~~bash 3 +$ iwctl 4 + > device list # Show all network deivce 5 + > station `wlan` scan # Scan networks from `wlan` device 6 + > station `wlan` get-networks # Show all wifi networks 7 + > station `wlan` connect SSID # Get passphrase for connect 8 +$ iwctl --passphrase `pass` station `wlan` connect `SSID` 9 +~~~ 10 + 11 +### Clock 12 +~~~bash 13 +$ timedatectl set-ntp true 14 +~~~ 15 + 16 +### Disk 17 +~~~bash 18 +$ cfdisk /dev/sdX 19 +~~~ 20 + 21 +**Create:** 22 +- swap: size(RAM); type(Linux SWAP) 23 +- root: size(15-30Gb); type(ext4)' 24 +- home(optional): size(all size); type(ext4) 25 + 26 +**Format:** 27 +~~~bash 28 +$ mkswap /dev/(swap) 29 +$ mkfs.ext4 /dev/(root) 30 +$ mkfs.ext4 /dev/(home) 31 +~~~ 32 + 33 +**Mount:** 34 +~~~bash 35 +swapon /dev/(swap) 36 +mount /dev/(root) / mnt 37 +mkdit mnt/home && mount /dev/(home) /mnt/home 38 +~~~ 39 + 40 +### Base system 41 +~~~bash 42 +$ pacstrarp /mnt base base-devel linux linux-dirmware wpa_supplicant dhcpcd networkmanager 43 +~~~ 44 + 45 +### FStab 46 +~~~bash 47 +$ genfstab -U /mnt >> /mnt/etc/fstab 48 +~~~ 49 + 50 +### Chroot 51 +~~~bash 52 +$ arch-chroot /mnt 53 +~~~ 54 + 55 +## Configure base system 56 +### Time 57 +~~~bash 58 +$ ln -sf /usr/share/zoneinfo/Region/City /etc/localtime 59 +$ hwclock --systohc 60 +~~~ 61 + 62 +### Localization 63 +Uncomment your locale in `/etc/locale.gen` 64 +~~~bash 65 +$ locale-gen 66 +~~~ 67 + 68 +### Hostname 69 +~~~bash 70 +$ hostnamectl set-hostname arch 71 +$ vim /etc/hosts 72 + > 127.0.0.1 arch 73 + > ::1 arch 74 + > 127.0.1.1 arch.localdomain arch 75 +~~~ 76 + 77 +### Root password 78 +~~~bash 79 +$ passwd root 80 +~~~ 81 + 82 +### User & sudo 83 +Uncomment `%wheel` line in `/etc/sudoers` 84 +~~~bash 85 +$ useradd -m user 86 +$ usermod -aG wheel,audio,video,optical,strage user 87 +$ passwd user 88 +~~~ 89 + 90 +### Install grub 91 +~~~bash 92 +$ pacman -S grub 93 +$ grub-install --recheck /dev/sdX 94 +$ grub-mkconfig -o /boot/grub/grub.cfg 95 +~~~ 96 + 97 +### Reboot in base system 98 +~~~bash 99 +$ exit 100 +$ umount /mnt 101 +$ reboot 102 +~~~ 103 + 104 +### Network manager 105 +~~~bash 106 +$ sudo systemctl enable NetworkManager 107 +$ sudo systemctl start NetworkManager 108 +$ nmtui-connect 109 +~~~ 110 + 111 +### User dirs 112 +~~~bash 113 +$ sudo pacman -S xdg-userr-dirs 114 +$ xdg-user-dirs-update 115 +~~~ 116 + 117 +### Xorg, login manager, video drivers 118 +~~~bash 119 +$ sudo pacman -S xorg-server xorg-xrand xorg-xsetroot xorg-drivers lightdm lightdm-gtk-greeter 120 +$ sudo pacman -S xf86-video-intel lib32-intel-dri # Intel 121 +$ sudo pacman -S nvidia nvidia-utils lib32-nvidia-utils # Nvidia 122 +$ sudo pacman -S xf86-video-ati lib-ati-dri # AMD 123 +$ sudo systemctl enable lightdm 124 +~~~ 125 + 126 + 127 +### Install yay 128 +~~~bash 129 +$ git clone https://aur.archlinux.org/yay-bin 130 +$ cd yay-bin 131 +$ makepkg -si 132 +~~~ 133 + 134 + 135 +### Install alsa, pulseaudio 136 +~~~bash 137 +$ sudo pacman -S alsa-firmware alsa-utils pulseaudio-alsa pulseaudio 138 +~~~ 139 + 140 + 141 +### Install WM: Qtile 142 +~~~bash 143 +$ sudo pacman -S qtile alacritty nitrogen 144 +$ sudo systemctl start lightdm 145 +~~~ 146 + 147 + 148 +### Install packages from pacman & aur 149 +~~~bash 150 +$ sudo pacman -S --noconfirm --needed firefox redshift mc vifm ranger neovim htop pass passmenu discord zathura papirus-icon-theme arc-gtk-theme lxappearance 151 +$ sudo pacman -S --noconfirm --needed ttf-font-awesome ttf-jatbrains-mono ttf-joypixels 152 +$ yay -S --noconfirm --needed rcm xkblayout bibata-cursor-theme-bin spotify 153 +~~~ 154 + 155 + 156 +### Install betterlockscreen 157 +~~~bash 158 +yay -S i3lock-color imagemagick feh xorg-xrandr xorg-xdpyinfo 159 +wget -O betterlockscreen https://git.io/fASUJ 160 +chmod u+x betterlockscreen 161 +cp betterlockscreen ~/.local/bin 162 +~~~ 163 + 164 + 165 +### Set qt appearance 166 +~~~bash 167 +$ sudo pacman -S kvantum-qt5 qt5ct 168 +$ sudo echo "QT_QPA_PLATFORMTHEME="qt5ct" >> /etc/enviroment 169 +~~~ 170 + 171 +### Install Oh My ZSH 172 +~~~bash 173 +$ sudo pacman -S zsh curl 174 +$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" 175 +~~~
M
zshrc
··· 1 1 export ZSH="$HOME/.oh-my-zsh" 2 -export PATH="$HOME/bin:$PATH" 2 +export PATH="$HOME/bin:$HOME/.local/bin:$PATH" 3 3 #source ~/.env 4 4 #source ~/.profile 5 5 ··· 36 36 alias cls="clear" 37 37 alias :q="exit" 38 38 alias tmux="tmux -2" 39 +alias vim="nvim" 39 40 alias icat="kitty +kitten icat" 40 41 41 42 alias ..="cd .." ··· 50 51 alias tobash="chsh -s /bin/bash && echo 'Now log out.'" 51 52 52 53 ### NeoFetch ### 53 -neofetch 54 +#neofetch