Update kitty bg color, nvim config. Add bgcolor function in zshrc for set specific bg color, hot keys for archiving in vifm

This commit is contained in:
Smirnov Olexandr 2020-12-13 20:52:29 +02:00
parent f5a07cf3b0
commit 4f7f44d7f4
10 changed files with 91 additions and 42 deletions

4
bin/arch_upd Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
sudo pacman -Syyuu --noconfirm
yay -Sua --noconfirm
sudo pacman -Rs $(pacman -Qdtq) --noconfirm

18
bin/extract Executable file
View file

@ -0,0 +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" ;;
esac

35
bin/giti Executable file
View file

@ -0,0 +1,35 @@
#!/bin/sh
add() {
local file="$1"
echo $file >> .gitignore
}
del() {
local file="$1"
sed -i "/$file/d" .gitignore
}
edit() {
local oldname="$1"
local newanme="$2"
sed -in "s|$oldname|$newanme|g" .gitignore
}
show() {
if [ -f '/usr/bin/bat' ]
then
bat .gitignore
else
cat .gitignore
fi
}
case "$1" in
add|a) shift; add "$@" ;;
del|d) shift; del "$@" ;;
mv) shift; edit "$@" ;;
show|s) shift; show ;;
help) echo "add/a - filename add to ignore"
echo "del/d - filename del from ignore"
echo "mv - oldname newname chage file name"
echo "show - show ignore file"
;;
*) echo "Command is not valid"
esac

6
bin/kbhl Executable file
View file

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

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,7 @@ background_tint 0.0
dim_opacity 0.75
selection_foreground #edebd7
selection_background #073642
background #262a3b
background #262a2b
foreground #ffffff
cursorColor #d2dae2
selection_background #262a3b

View file

@ -28,6 +28,10 @@ call plug#begin('~/.vim/plugged')
Plug 'ap/vim-css-color'
call plug#end()
set termguicolors
set background=dark
colorscheme nten16
set number
set relativenumber
@ -69,11 +73,6 @@ set smartindent
set visualbell t_vb=
set termguicolors
set background=dark
colorscheme nten16
" == Plugins configure
" Lightline
set noshowmode

View file

@ -237,10 +237,9 @@ screens = [Screen(top=bar.Bar([
highlight_method="block",
this_current_screen_border=color[2],
this_screen_border=color[3],
foreground=color[0],
),
widget.Prompt(foreground=color[0]),
widget.WindowName(foreground=color[0]),
widget.Prompt(),
widget.WindowName(),
kblayout.KBLayout(
foreground=color[5],
update_interval=0,
@ -300,6 +299,6 @@ floating_layout = layout.Floating(
{"wname": "pinentry"},
{"wmclass": "ssh-askpass"},
])
auto_fullscreen = True
auto_fullscreen = False
focus_on_window_activation = "smart"
wmname = "LG3D"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Before After
Before After

View file

@ -20,14 +20,21 @@ set trashdir=$HOME/.local/share/Trash/files
set vifminfo=dhistory,chistory,state,shistory,phistory,fhistory,dirstack,registers,bookmarks,bmarks
" === commands
command! zip zip -r %f.zip %f
command! targz tar -czvf %f.tar.gz %f
command! vgrep nvim "+grep %a"
set rulerformat=
" === files
" === Key maps
nmap q ZQ
nnoremap gg ggj
nnoremap ! :shell<cr>
nnoremap w :view<cr>
nnoremap S :sort<cr>
nnoremap se :!$HOME/bin/extract %f &<cr>
nnoremap sa :!zip -r %f.zip %f
nnoremap ss :!tar -czvf %f.tar.gz @f
" === files
filetype *.csv,*.xlsx libreoffice %c %i
fileviewer *.csv sed "s/,,,,/,,-,,/g;s/,,/ /g" %c | column -t | sed "s/ - / /g" | cut -c -%pw
@ -38,22 +45,8 @@ filetype <text/*> nvim
fileviewer <text/*> env -uCOLORTERM bat --color always --wrap never --pager never %c -p
filextype *.pdf zathura %c %i &
fileviewer *.pdf
\ vifmimg pdf %px %py %pw %ph %c
\ %pc
\ vifmimg clear
filetype <audio/*> mocp %c %i &
fileviewer <audio/*>
\ vifmimg audio %px %py %pw %ph %c
\ %pc
\ vifmimg clear
filetype <video/*> mpv %c %i &
fileviewer <video/*>
\ vifmimg video %px %py %pw %ph %c
\ %pc
\ vifmimg clear
filextype <image/*> sxiv %c %i &
fileviewer <image/*>
@ -75,14 +68,6 @@ fileviewer .*/ ls --color --group-directories-first
filetype * xdg-open %c
fileviewer * file -b %c
" === Key maps
nmap q ZQ
nnoremap gg ggj
nnoremap ! :shell<cr>
nnoremap w :view<cr>
nnoremap S :sort<cr>
nnoremap a cw
" go keys
nnoremap gh :cd ~<cr>
nnoremap gc :cd ~/Code<cr>
@ -92,9 +77,6 @@ nnoremap gm :cd ~/.dotfiles<cr>
nnoremap gn :cd ~/bin<cr>
nnoremap gz :cd ~/.script<cr>
" extract
nnoremap se :!$HOME/bin/extract %f &<cr>
" === file icons
set classify=' :dir:/, :exe:, :reg:, :link:'
set classify+=' ::../::, ::*.sh::, ::*.[hc]pp::, ::*.[hc]::, ::/^copying|license$/::, ::.git/,,*.git/::, ::*.epub,,*.fb2,,*.djvu::, ::*.pdf::, ::*.htm,,*.html,,**.[sx]html,,*.xml::'

10
zshrc
View file

@ -1,7 +1,7 @@
export ZSH="$HOME/.oh-my-zsh"
export PATH="$HOME/bin:$PATH"
source ~/.env
source ~/.profile
#source ~/.env
#source ~/.profile
### Oh my zsh ###
@ -26,6 +26,12 @@ source $ZSH/oh-my-zsh.sh
export EDITOR="nvim"
export VISUAL="nvim"
### Function ###
function bgcolor {
convert -size 1x1 xc:$1 /tmp/bgc.png
feh --bg-tile /tmp/bgc.png
}
### Aliases ###
alias cls="clear"
alias :q="exit"