diff --git a/README.md b/README.md index 08fae4e..f7880ee 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ #### System configuration - `OS` Arch -- `WM` bspwm, openbox +- `WM` bspwm - `Terminal` kitty - `Shell` zsh - `Editor` nvim, vscode @@ -23,12 +23,12 @@ yay -S rcm Install dependency: ```bash -sudo pacman -S neovim tmux git openbox tint2 bspwm sxhkd kitty picom dunst zsh rofi ranger firefox ttf-font-awesome ttf-jetbrains +sudo pacman -S neovim tmux git dunst picom bspwm sxhkd kitty rofi zsh ranger ttf-jetbrains-mono ttf-font-awesome yay -S polybar ``` -And install config: +And install configs: ```bash -git clone https://github.com/Smirnov-O/dotfiles .dotfiles +git clone --recursive https://github.com/Smirnov-O/dotfiles .dotfiles rcup ``` diff --git a/bin/extract b/bin/extract index fe46b67..b7c3663 100755 --- a/bin/extract +++ b/bin/extract @@ -1,18 +1,18 @@ #!/bin/sh case "$1" in - *.tar.bz2) tar xjf $1 ;; - *.tar.gz) tar xzf $1 ;; - *.bz2) bunzip2 $1 ;; - *.rar) unrar x $1 ;; - *.gz) gunzip $1 ;; - *.tar) tar xf $1 ;; - *.tbz2) tar xjf $1 ;; - *.tgz) tar xzf $1 ;; - *.zip) unzip $1 ;; - *.Z) uncompress $1 ;; - *.7z) 7z x $1 ;; - *.deb) ar x $1 ;; - *.tar.xz) tar xf $1 ;; - *.tar.zst) unzstd $1 ;; - *) echo "'$1' is not a valid file" ;; + *.tar.bz2) tar xjf $1 ;; + *.tar.gz) tar xzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar x $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xf $1 ;; + *.tbz2) tar xjf $1 ;; + *.tgz) tar xzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1 ;; + *.7z) 7z x $1 ;; + *.deb) ar x $1 ;; + *.tar.xz) tar xf $1 ;; + *.tar.zst) unzstd $1 ;; + *) echo "'$1' is not a valid file" ;; esac diff --git a/bin/giti b/bin/giti index c8a3d69..1a9b2ee 100755 --- a/bin/giti +++ b/bin/giti @@ -3,6 +3,7 @@ function add() { echo $1 >> .gitignore echo "[.gitignore] Successful add '$1'." } + function del() { if [ -f '.gitignore' ]; then if [ "$(cat .gitignore|wc -l)" = "1" ] @@ -13,9 +14,11 @@ function del() { fi echo "[.gitignore] Successful del '$1'." } + function edit() { sed -in "s|$1|$2|g" .gitignore } + function show() { if [ -f '.gitignore' ]; then if [ -f '/usr/bin/bat' ] @@ -27,14 +30,13 @@ function show() { } case "$1" in - add|a) shift; add "$@" ;; - del|d) shift; del "$@" ;; - mv) shift; edit "$@" ;; - show) shift; show ;; - help) echo "add|a - [file name] add to ignore." - echo "del|d - [file name] delete from ignore." - echo "mv - [old] [new] file name for rename." - echo "show - show ignore file." - ;; - *) echo "Command is not valid. Type 'giti help' for help." ;; + add|a) shift; add "$@" ;; + del|d) shift; del "$@" ;; + mv) shift; edit "$@" ;; + show) shift; show ;; + help) echo "add|a - [file name] add to ignore." + echo "del|d - [file name] delete from ignore." + echo "mv - [old] [new] file name for rename." + echo "show - show ignore file." ;; + *) echo "Command is not valid. Type 'giti help' for help." ;; esac diff --git a/config/bspwm/bspwmrc b/config/bspwm/bspwmrc index 4a6ff2c..25fb3bf 100755 --- a/config/bspwm/bspwmrc +++ b/config/bspwm/bspwmrc @@ -1,15 +1,20 @@ #!/bin/sh -###== Function -R() { +###== Functions +A() { if ! pgrep $1 then $@& fi } +C() { + bspc config $@ +} +R() { + bspc rule -a $@ +} ###== Autostart -R feh --randomize --bg-scale ~/Pictures/wallp & -R sxhkd -c ~/.config/bspwm/sxhkd & -R lxsession & -R picom -b & +A feh --randomize --bg-scale ~/Pictures/wallp & +A sxhkd -c ~/.config/bspwm/sxhkd & +A picom -b & ~/.config/bspwm/polybar/bar.sh & ###== BSPWM @@ -18,31 +23,32 @@ R picom -b & bspc monitor -d 1 2 3 4 5 6 7 8 9 # General -bspc config border_width 2 -bspc config window_gap 4 -bspc config split_ratio 0.50 -bspc config borderless_monocle true -bspc config gapless_monocle true -bspc config single_monocle true -bspc config focus_follows_pointer true +C border_width 2 +C window_gap 4 +C split_ratio 0.50 +C borderless_monocle true +C gapless_monocle true +C single_monocle true +C focus_follows_pointer true # Colors -bspc config normal_border_color "#262A2B" -bspc config active_border_color "#1F2324" -bspc config focused_border_color "#008DCD" -bspc config presel_feedback_color "#51AFEF" -bspc config urgent_border_color "#FF6C6B" +C normal_border_color "#262A2B" +C active_border_color "#1F2324" +C focused_border_color "#008DCD" +C presel_feedback_color "#51AFEF" +C urgent_border_color "#FF6C6B" ###== BSPWM Rules -bspc rule -a kitty desktop='^1' focus=on follow=on -bspc rule -a Google-chrome desktop='^2' focus=on follow=on -bspc rule -a LibreWolf desktop='^2' focus=on follow=on -bspc rule -a Code desktop='^3' focus=on follow=on -bspc rule -a '*:nvim' desktop='^3' focus=on follow=off -bspc rule -a Todoist desktop='^4' focus=on follow=off -bspc rule -a Joplin desktop='^4' focus=on follow=on -bspc rule -a Simplenote desktop='^4' focus=on follow=on -bspc rule -a '*:ranger' desktop='^5' focus=on follow=off -bspc rule -a discord desktop='^6' focus=off follow=off -bspc rule -a telegram-desktop desktop='^6' focus=off follow=on -bspc rule -a KeePassXC desktop='^7' focus=on follow=off +R kitty desktop='^1' focus=on follow=on +R Google-chrome desktop='^2' focus=on follow=on +R LibreWolf desktop='^2' focus=on follow=on +R Code desktop='^3' focus=on follow=on +R '*:nvim' desktop='^3' focus=on follow=off +R Todoist desktop='^4' focus=on follow=off +R Joplin desktop='^4' focus=on follow=on +R Simplenote desktop='^4' focus=on follow=on +R '*:ranger' desktop='^5' focus=on follow=off +R discord desktop='^6' focus=off follow=off +R TelegramDesktop desktop='^6' focus=off follow=on +R KeePassXC desktop='^7' focus=on follow=off +R Zathura desktop='^9' focus=on follow=on state=tiled diff --git a/config/bspwm/polybar/polybar b/config/bspwm/polybar/polybar index eca9930..cac1a36 100644 --- a/config/bspwm/polybar/polybar +++ b/config/bspwm/polybar/polybar @@ -3,8 +3,8 @@ [settings] enable-ipc = true format-padding = 1 -screenchange-reload = true -pseudo-transparency = true +#screenchange-reload = true +#pseudo-transparency = true [colors] background = #262A2B @@ -34,7 +34,6 @@ fixed-center = true background = ${colors.background} foreground = ${colors.foreground} wm-restack = bspwm -override-redirect = true font-0 = Iosevka Nerd Font:style=Medium:size=8;3 font-1 = FontAwesome5Free:style=Solid:size=7.5;2.5 modules-left = bspwm diff --git a/config/bspwm/sxhkd b/config/bspwm/sxhkd index 1d27fb0..8c93e29 100644 --- a/config/bspwm/sxhkd +++ b/config/bspwm/sxhkd @@ -28,7 +28,7 @@ super + q bspc node -c super + control + r - bspc wm -r; sxhkd -c ~/.config/bspwm/sxhkd + bspc wm -r && pkill sxhkd && sxhkd -c ~/.config/bspwm/sxhkd ### == BSPWM windows ## Resize window diff --git a/config/nvim/init.vim b/config/nvim/init.vim index 958c24b..f470f02 100644 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -66,8 +66,10 @@ set list listchars=tab:\|·,trail:~,extends:>,precedes:<,space:· set visualbell t_vb= "== Settings for specific files -autocmd FileType python,go,json setlocal et sw=4 ts=4 -autocmd FileType css,javascript,javascriptreact,yaml setlocal noet sw=2 ts=2 +autocmd FileType python,json setlocal ex sw=4 ts=4 +autocmd FileType go setlocal noex sw=4 ts=4 +autocmd FileType javascript,javascriptreact setlocal noet sw=2 ts=2 +autocmd FileType css,yaml setlocal ex sw=4 ts=4 "== Aliases command! WQ :wq @@ -109,7 +111,6 @@ nnoremap spk :wincmd L " Tab nnoremap tn :tabnew -nnoremap tc :tabclose noremap :tabn 1 noremap :tabn 2 noremap :tabn 3 diff --git a/config/ranger/rc.conf b/config/ranger/rc.conf index 63d4242..111f13f 100644 --- a/config/ranger/rc.conf +++ b/config/ranger/rc.conf @@ -1,6 +1,6 @@ #== Appearance set colorscheme solarized -set confirm_on_delete always +set confirm_on_delete multiple set automatically_count_files false #== General @@ -31,3 +31,7 @@ map dD delete map dT trash map tab_shift 1 map tab_shift -1 +map sa shell zip -r archive.zip %s +map ss shell tar -czvf archive.tar.gz %s +map sd shell 7z a archive.7z %s +map se shell extract %s diff --git a/config/zathura/zathurarc b/config/zathura/zathurarc new file mode 100644 index 0000000..8c6ebe9 --- /dev/null +++ b/config/zathura/zathurarc @@ -0,0 +1,18 @@ +set font "JetBrains Mono 10" +set default-fg "#DFDFDF" +set default-bg "#262A2B" + +set statusbar-fg "#CED4DA" +set statusbar-bg "#1F2324" +set statusbar-h-padding 10 +set statusbar-v-padding 10 + +set inputbar-fg "#FFFFFF" +set inputbar-bg "#1F2324" + +set completion-bg "#262A2B" +set completion-fg "#FFFFFF" +set completion-highlight-bg "#262A2B" +set completion-highlight-fg "#51AFEF" +set completion-group-bg "#262A2B" +set completion-group-fg "#51AFEF" diff --git a/zshrc b/zshrc index c8e4951..a28b54d 100644 --- a/zshrc +++ b/zshrc @@ -1,4 +1,4 @@ -export PATH="$HOME/.yarn/bin:$HOME/bin:$HOME/.local/bin:$PATH" +export PATH="$HOME/.yarn/bin:$HOME/bin:$HOME/go/bin:$HOME/.local/bin:$PATH" export EDITOR="nvim" ### Oh my zsh