Add alacritty, bettrscreenlock config & update qtile, nvim

This commit is contained in:
Smirnov Olexandr 2020-12-19 14:42:34 +02:00
parent 88cbabb443
commit f407ac09bc
13 changed files with 304 additions and 36 deletions

View file

@ -1,14 +1,18 @@
<h1 align="center">dotfiles</h1>
[install arch linux](install_arch.md)
-------------------------------------
![](./config/qtile/screen.png)
------------------------------
#### System configuration
- `OS` Arch
- `WM` Qtile
- `Terminal` Kitty
- `Terminal` Alacritty
- `Shell` zsh
- `Editor` nvim
- `File manager` ranger, mc
- `Browser` firefox
- `Font` Jatbrains Mono
- `Icon font` FontAwesome5

View file

@ -1,16 +1,12 @@
#!/bin/sh
add() {
local file="$1"
echo $file >> .gitignore
echo $1 >> .gitignore
}
del() {
local file="$1"
sed -i "/$file/d" .gitignore
sed -i "/$1/d" .gitignore
}
edit() {
local oldname="$1"
local newanme="$2"
sed -in "s|$oldname|$newanme|g" .gitignore
sed -in "s|$1|$2|g" .gitignore
}
show() {
if [ -f '/usr/bin/bat' ]
@ -22,8 +18,8 @@ show() {
}
case "$1" in
add|a) shift; add "$@" ;;
del|d) shift; del "$@" ;;
add|a) shift; add "$@" ;;
del|d) shift; del "$@" ;;
mv) shift; edit "$@" ;;
show|s) shift; show ;;
help) echo "add/a - filename add to ignore"

View file

@ -1,6 +1,6 @@
#!/bin/sh
case "$1" in
"on"|"-on"|"--on"|1) xset led on ;;
"on"|"-on"|"--on"|1) xset led on ;;
"of"|"off"|"-off"|"--off"|0) xset led off ;;
esac

78
config/alacritty.yml Normal file
View file

@ -0,0 +1,78 @@
env:
TERM: xterm-256color
window:
title: Alacritty
class:
instance: Alacritty
general: Alacritty
padding:
x: 0
y: 0
scrolling:
history: 1000
font:
antialias: lcd
hinting: true
size: 12.0
normal:
family: Hack
style: Regular
bold:
family: Hack
style: Bold
italic:
family: Hack
style: Italic
bold_italic:
family: Hack
style: Bold Italic
offset:
x: 1
y: 0
debug.render_timer: false
draw_bold_text_with_bright_colors: false
background_opacity: 0.85
#dynamic_title: true
colors:
primary:
background: '0x262A2D'
foreground: '0xDFDFDF'
cursor:
text: '0x7D7D7D'
cursor: '0xDFDFDF'
selection:
text: '0xEDEBD7'
background: '0x262A3B'
normal:
black: '0x1c1f24'
red: '0xff6c6b'
green: '0x98be65'
yellow: '0xda8548'
blue: '0x51afef'
magenta: '0xc678dd'
cyan: '0x5699af'
white: '0x202328'
bright:
black: '0x5b6268'
red: '0xda8548'
green: '0x4db5bd'
yellow: '0xecbe7b'
blue: '0x3071db'
magenta: '0xa9a1e1'
cyan: '0x46d9ff'
white: '0xdfdfdf'
cursor:
style: Block
key_bindings:
- { key: V, mods: Control|Shift, action: Paste }
- { key: C, mods: Control|Shift, action: Copy }
- { key: Key0, mods: Control, action: ResetFontSize }
- { key: Equals, mods: Alt, action: IncreaseFontSize }
- { key: Minus, mods: Alt, action: DecreaseFontSize }

13
config/betterlockscreenrc Normal file
View file

@ -0,0 +1,13 @@
insidecolor=#00000000
ringcolor=#ffffff
keyhlcolor=#51AFEF
bshlcolor=#51AFEF
separatorcolor=#00000000
insidevercolor=#ff6c6b
insidewrongcolor=#51AFEF
ringvercolor=#ffffff
ringwrongcolor=#ffffff
verifcolor=#ffffff
timecolor=#ffffff
datecolor=#ced4da
loginbox=#000066

View file

@ -86,8 +86,8 @@ map alt+ctrl+backspace change_font_size all 0
# Theming
foreground #dfdfdf
#background_opacity 0.85
background_opacity 1
background_opacity 0.85
#background_opacity 1
background_image none
background_image_layout tiled
background_image_linear no
@ -96,7 +96,8 @@ background_tint 0.0
dim_opacity 0.75
selection_foreground #edebd7
selection_background #073642
background #262a2b
background #262a3b
#background #262a2b
foreground #ffffff
cursorColor #d2dae2
selection_background #262a3b

View file

@ -20,6 +20,7 @@ call plug#begin('~/.vim/plugged')
Plug 'pangloss/vim-javascript', { 'for': 'javascript' }
Plug 'PotatoesMaster/i3-vim-syntax', { 'for': 'i3' }
Plug 'kovetskiy/sxhkd-vim', { 'for': 'sxhkd' }
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries', 'for': 'go' }
Plug 'mattn/emmet-vim', { 'on': 'Emmet' }
Plug 'Olical/vim-scheme', { 'for': 'scheme' }
Plug 'cakebaker/scss-syntax.vim', { 'for': 'scss' }
@ -117,8 +118,7 @@ nmap <C-p> :CtrlP<CR>
let g:indent_guides_enable_on_vim_startup = 1
" Floaterm
nmap <A-t> :FloatermNew --name=vimterminal --position=top --autoclose=2<CR>
imap <A-t> :FloatermNew --name=vimterminal --position=top --autoclose=2<CR>
nmap <A-t> :FloatermNew --title=vimterminal --position=top --autoclose=2<CR>
" == Maping
"imap fd <Esc>
@ -142,14 +142,14 @@ noremap <C-S-Tab> :tabprev<CR>
noremap <C-n> :tabnew<CR>
noremap <C-t> :tabnew<CR>
noremap <C-S-w> :tabclose<CR>
noremap <leader>1 :tabn 1<CR>
noremap <leader>2 :tabn 2<CR>
noremap <leader>3 :tabn 3<CR>
noremap <leader>4 :tabn 4<CR>
noremap <leader>5 :tabn 5<CR>
noremap <leader>6 :tabn 6<CR>
noremap <leader>7 :tabn 7<CR>
noremap <leader>8 :tabn 8<CR>
noremap <leader>9 :tabn 9<CR>
noremap <A-1> :tabn 1<CR>
noremap <A-2> :tabn 2<CR>
noremap <A-3> :tabn 3<CR>
noremap <A-4> :tabn 4<CR>
noremap <A-5> :tabn 5<CR>
noremap <A-6> :tabn 6<CR>
noremap <A-7> :tabn 7<CR>
noremap <A-8> :tabn 8<CR>
noremap <A-9> :tabn 9<CR>
noremap <leader>n :bnext<CR>
noremap <leader>p :bprev<CR>

View file

@ -9,7 +9,7 @@ import os
mod = "mod4"
alt = "mod1"
terminal = "kitty"
terminal = "alacritty"
browser = "firefox"
filemanager="pcmanfm"
user = "sasha"
@ -45,7 +45,7 @@ keys = [
desc="Launch filemanager"
),
Key([mod, alt], "t",
lazy.spawn(f"{terminal} -e \"nvim /home/{user}/.todo\""),
lazy.spawn(f"{terminal} -e nvim /home/{user}/.todo"),
desc="Open ~/.todo file in nvim"
),
@ -200,8 +200,8 @@ for i, (name, kwargs) in enumerate(group_names, 1):
# Window layout(s)
layout_theme = {
"border_width": 2,
"margin": 3,
"border_width": 1,
"margin": 2,
"border_focus": color[2],
"border_normal": color[1],
"font": "Jatbrains Mono"

View file

@ -24,8 +24,8 @@ set vcs_msg_length 30
### Preview
set preview_images true
set preview_images_method kitty
#set preview_images_method ueberzug
#set preview_images_method kitty
set preview_images_method ueberzug
set unicode_ellipsis false
set bidi_support false

175
install_arch.md Normal file
View file

@ -0,0 +1,175 @@
### Connect to WiFi
~~~bash
$ iwctl
> device list # Show all network deivce
> station `wlan` scan # Scan networks from `wlan` device
> station `wlan` get-networks # Show all wifi networks
> station `wlan` connect SSID # Get passphrase for connect
$ iwctl --passphrase `pass` station `wlan` connect `SSID`
~~~
### Clock
~~~bash
$ timedatectl set-ntp true
~~~
### Disk
~~~bash
$ cfdisk /dev/sdX
~~~
**Create:**
- swap: size(RAM); type(Linux SWAP)
- root: size(15-30Gb); type(ext4)'
- home(optional): size(all size); type(ext4)
**Format:**
~~~bash
$ mkswap /dev/(swap)
$ mkfs.ext4 /dev/(root)
$ mkfs.ext4 /dev/(home)
~~~
**Mount:**
~~~bash
swapon /dev/(swap)
mount /dev/(root) / mnt
mkdit mnt/home && mount /dev/(home) /mnt/home
~~~
### Base system
~~~bash
$ pacstrarp /mnt base base-devel linux linux-dirmware wpa_supplicant dhcpcd networkmanager
~~~
### FStab
~~~bash
$ genfstab -U /mnt >> /mnt/etc/fstab
~~~
### Chroot
~~~bash
$ arch-chroot /mnt
~~~
## Configure base system
### Time
~~~bash
$ ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
$ hwclock --systohc
~~~
### Localization
Uncomment your locale in `/etc/locale.gen`
~~~bash
$ locale-gen
~~~
### Hostname
~~~bash
$ hostnamectl set-hostname arch
$ vim /etc/hosts
> 127.0.0.1 arch
> ::1 arch
> 127.0.1.1 arch.localdomain arch
~~~
### Root password
~~~bash
$ passwd root
~~~
### User & sudo
Uncomment `%wheel` line in `/etc/sudoers`
~~~bash
$ useradd -m user
$ usermod -aG wheel,audio,video,optical,strage user
$ passwd user
~~~
### Install grub
~~~bash
$ pacman -S grub
$ grub-install --recheck /dev/sdX
$ grub-mkconfig -o /boot/grub/grub.cfg
~~~
### Reboot in base system
~~~bash
$ exit
$ umount /mnt
$ reboot
~~~
### Network manager
~~~bash
$ sudo systemctl enable NetworkManager
$ sudo systemctl start NetworkManager
$ nmtui-connect
~~~
### User dirs
~~~bash
$ sudo pacman -S xdg-userr-dirs
$ xdg-user-dirs-update
~~~
### Xorg, login manager, video drivers
~~~bash
$ sudo pacman -S xorg-server xorg-xrand xorg-xsetroot xorg-drivers lightdm lightdm-gtk-greeter
$ sudo pacman -S xf86-video-intel lib32-intel-dri # Intel
$ sudo pacman -S nvidia nvidia-utils lib32-nvidia-utils # Nvidia
$ sudo pacman -S xf86-video-ati lib-ati-dri # AMD
$ sudo systemctl enable lightdm
~~~
### Install yay
~~~bash
$ git clone https://aur.archlinux.org/yay-bin
$ cd yay-bin
$ makepkg -si
~~~
### Install alsa, pulseaudio
~~~bash
$ sudo pacman -S alsa-firmware alsa-utils pulseaudio-alsa pulseaudio
~~~
### Install WM: Qtile
~~~bash
$ sudo pacman -S qtile alacritty nitrogen
$ sudo systemctl start lightdm
~~~
### Install packages from pacman & aur
~~~bash
$ sudo pacman -S --noconfirm --needed firefox redshift mc vifm ranger neovim htop pass passmenu discord zathura papirus-icon-theme arc-gtk-theme lxappearance
$ sudo pacman -S --noconfirm --needed ttf-font-awesome ttf-jatbrains-mono ttf-joypixels
$ yay -S --noconfirm --needed rcm xkblayout bibata-cursor-theme-bin spotify
~~~
### Install betterlockscreen
~~~bash
yay -S i3lock-color imagemagick feh xorg-xrandr xorg-xdpyinfo
wget -O betterlockscreen https://git.io/fASUJ
chmod u+x betterlockscreen
cp betterlockscreen ~/.local/bin
~~~
### Set qt appearance
~~~bash
$ sudo pacman -S kvantum-qt5 qt5ct
$ sudo echo "QT_QPA_PLATFORMTHEME="qt5ct" >> /etc/enviroment
~~~
### Install Oh My ZSH
~~~bash
$ sudo pacman -S zsh curl
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
~~~

View file

@ -19,7 +19,7 @@ choice=$(echo -e "${options[@]}" | dmenu -p 'Edit config file' $@)
case "$choice" in
i3) choice="$HOME/.config/i3/config" ;;
qtile)
opt=$(echo -e "config.py\nautostart"|dmenu -p 'Qtile' $@)
opt=$(echo -e "config.py\nautostart.sh"|dmenu -p 'Qtile' $@)
case "$opt" in
"config.py") choice="$HOME/.config/qtile/config.py" ;;
"autostart.sh") choice="$HOME/.config/qtile/autostart.sh" ;;

5
zshrc
View file

@ -1,5 +1,5 @@
export ZSH="$HOME/.oh-my-zsh"
export PATH="$HOME/bin:$PATH"
export PATH="$HOME/bin:$HOME/.local/bin:$PATH"
#source ~/.env
#source ~/.profile
@ -36,6 +36,7 @@ function bgcolor {
alias cls="clear"
alias :q="exit"
alias tmux="tmux -2"
alias vim="nvim"
alias icat="kitty +kitten icat"
alias ..="cd .."
@ -50,4 +51,4 @@ alias tofish="chsh -s /bin/fish && echo 'Now log out.'"
alias tobash="chsh -s /bin/bash && echo 'Now log out.'"
### NeoFetch ###
neofetch
#neofetch