diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 56126bb..a7d59d9 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -134,7 +134,8 @@ cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' edit! " latex let g:tex_flavor = "latex" -autocmd BufWritePost *.tex silent! execute "!pdflatex --shell-escape -synctex=1 -interaction=nonstopmode % > /dev/null " | redraw! +" autocmd BufWritePost *.tex silent! execute "!pdflatex --shell-escape -synctex=1 -interaction=nonstopmode % > /dev/null " | redraw! +autocmd BufWritePost *.tex silent! execute "!pdflatex --shell-escape -interaction=nonstopmode % > /dev/null " | redraw! autocmd BufWritePost *.tex silent! execute "!latexmk -pdf -silent % > /dev/null" | redraw! autocmd BufWritePost *.tex silent! execute "!sudo rm -rf *.fls *.ilg *.nav *.snm *.toc *.idx *.lof *.lot *.synctex.gz *.aux *.fdb_latexmk *.fls *.log *.out > /dev/null" | redraw! autocmd BufWritePost *.tex silent! execute "!sudo pkill -HUP mupdf > /dev/null" | redraw! diff --git a/.local/bin/Checking-repo b/.local/bin/Checking-repo index 658384b..6d6c5af 100755 --- a/.local/bin/Checking-repo +++ b/.local/bin/Checking-repo @@ -11,9 +11,12 @@ # ################################################### +mainteiner="Marcin Woźniak" + function scanning(){ EUSCAN=$(euscan --nocolor --quiet "$1") if [ -n "$EUSCAN" ]; then + echo $1 echo "=============== NOW: $(find ./* -mindepth 2 -maxdepth 2 -name ''"$1"'*.ebuild' | sort | tail -1) ================= $(echo -e "$EUSCAN" | tail -1)" fi @@ -89,6 +92,7 @@ function main(){ ;; -f|--folder) folder "$2" | tee -a "euscan-$(date -I).log" + ;; *) echo "No found variable"; echo; help diff --git a/.local/bin/ext b/.local/bin/ext new file mode 100755 index 0000000..806ce5e --- /dev/null +++ b/.local/bin/ext @@ -0,0 +1,44 @@ +#!/bin/sh + +# A general, all-purpose extraction script. Not all extraction programs here +# are installed by LARBS automatically. +# +# Default behavior: Extract archive into new directory +# Behavior with `-c` option: Extract contents into current directory + +while getopts "hc" o; do case "${o}" in + c) extracthere="True" ;; + *) printf "Options:\\n -c: Extract archive into current directory rather than a new one.\\n" && exit 1 ;; +esac done + +if [ -z "$extracthere" ]; then + archive="$(readlink -f "$*")" && + directory="$(echo "$archive" | sed 's/\.[^\/.]*$//')" && + mkdir -p "$directory" && + cd "$directory" || exit 1 +else + archive="$(readlink -f "$(echo "$*" | cut -d' ' -f2)" 2>/dev/null)" +fi + +[ -z "$archive" ] && printf "Give archive to extract as argument.\\n" && exit 1 + +if [ -f "$archive" ] ; then + case "$archive" in + *.tar.bz2|*.tbz2) tar xvjf "$archive" ;; + *.tar.xz) tar -xf "$archive" ;; + *.tar.gz|*.tgz) tar xvzf "$archive" ;; + *.lzma) unlzma "$archive" ;; + *.bz2) bunzip2 "$archive" ;; + *.rar) unrar x -ad "$archive" ;; + *.gz) gunzip "$archive" ;; + *.tar) tar xvf "$archive" ;; + *.zip) unzip "$archive" ;; + *.Z) uncompress "$archive" ;; + *.7z) 7z x "$archive" ;; + *.xz) unxz "$archive" ;; + *.exe) cabextract "$archive" ;; + *) printf "extract: '%s' - unknown archive method\\n" "$archive" ;; + esac +else + printf "File \"%s\" not found.\\n" "$archive" +fi diff --git a/.local/bin/gfetch b/.local/bin/gfetch new file mode 100755 index 0000000..ed7039c --- /dev/null +++ b/.local/bin/gfetch @@ -0,0 +1,133 @@ +#!/bin/sh + + +# Copyright (c) 2020, XGQT +# Licensed under the ISC License + +# .vir. +# ,d$$$$$$b. +# &&&&( )&&&b +# Q$$$$$$$$$$B +# "$$$$$$$P +# ,d$$$$$$P" +# $$$$$$P +# `Q$$P" + +# gfetch - tiny system info for gentoo + +# based on: +# https://github.com/jschx/ufetch/ + + +# INFO + +host="$(hostname 2>/dev/null)" +cpu="$(uname -p 2>/dev/null)" +kernel="$(uname -sr 2>/dev/null)" +uptime="$(uptime -p 2>/dev/null | sed 's/up //')" +shell="$(basename "${SHELL}" 2>/dev/null)" + +if [ -f /etc/lsb-release ] +then + os="$(cut -d \" -f 2 < /etc/lsb-release) $(uname -m)" +elif [ -f /etc/os-release ] +then + os="$(cut -d = -f 2 < /etc/os-release | sed 1q) $(uname -m)" +else + os="Gentoo $(uname -m)" +fi + +if [ -d "${EPREFIX}"/var/db/pkg ] +then + packages="All: $(find "${EPREFIX}"/var/db/pkg/*/* -type d | wc -l)" + real="Real: $(find "${EPREFIX}"/var/db/pkg/*/* -type d | grep -c -v -E 'acct-group|acct-user|app-eselect|java-virtuals|media-fonts|virtual')" +else + packages="n/a" + real="" +fi + +if [ -f "${EPREFIX}"/var/lib/portage/world ] +then + world="World: $(wc -l < "${EPREFIX}"/var/lib/portage/world)" +else + world="" +fi + +if [ -n "${DE}" ] +then + ui="${DE}" + uitype='DE' +elif [ -n "${WM}" ] +then + ui="${WM}" + uitype='WM' +elif [ -n "${XDG_CURRENT_DESKTOP}" ] +then + ui="${XDG_CURRENT_DESKTOP}" + uitype='DE' +elif [ -n "${DESKTOP_SESSION}" ] +then + ui="${DESKTOP_SESSION}" + uitype='DE' +elif [ -f "${HOME}/.xinitrc" ] +then + ui="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)" + uitype='WM' +elif [ -f "${HOME}/.xsession" ] +then + ui="$(tail -n 1 "${HOME}/.xsession" | cut -d ' ' -f 2)" + uitype='WM' +else + ui='unknown' + uitype='UI' +fi + + +# Color Definitions + +if [ -x "$(command -v tput)" ]; then + bold="$(tput bold)" + # black="$(tput setaf 0)" + # red="$(tput setaf 1)" + # green="$(tput setaf 2)" + # yellow="$(tput setaf 3)" + # blue="$(tput setaf 4)" + magenta="$(tput setaf 5)" + # cyan="$(tput setaf 6)" + white="$(tput setaf 7)" + reset="$(tput sgr0)" +fi + + +# Output color + +# labels +lc="${reset}${bold}${magenta}" + +# user and hostname +nc="${reset}${bold}${magenta}" + +# info +ic="${reset}${bold}${white}" + +# first color +c0="${reset}${bold}${magenta}" + +# second color +c1="${reset}${magenta}" + + +# OUTPUT + +cat < /var/log/megacmd/megacmd.log& -mega-cmd-server > /var/log/megacmd/megacmd.log& setxkbmap pl& dwmstatusbar& diff --git a/.zshrc b/.zshrc index 30580f1..8ae3d56 100644 --- a/.zshrc +++ b/.zshrc @@ -1,5 +1,6 @@ parse_git_branch() { - git symbolic-ref --short HEAD 2> /dev/null + command=$(git symbolic-ref --short HEAD 2> /dev/null) + [ -z $command ] && echo -e "$ " || echo -e "$(git symbolic-ref --short HEAD 2> /dev/null) $ " } gbranch() { @@ -15,7 +16,8 @@ HISTSIZE=10000 SAVEHIST=10000000 autoload -U colors && colors setopt PROMPT_SUBST -PS1='%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%m %{$fg[magenta]%}%~%{$fg[red]%} $(parse_git_branch)]%{$reset_color%}$%b ' +PS1='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(parse_git_branch)%{$reset_color%}' +#PS1='%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%m %{$fg[magenta]%}%~%{$fg[red]%} $(parse_git_branch)]%{$reset_color%}$%b ' plugins=(rake ruby vagrant knife knife_ssh kitchen ) ZSH_DISABLE_COMPFIX=true @@ -27,9 +29,9 @@ source $HOME/Linux/configs/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh & [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh FPATH=/usr/local/share/zsh/site-functions:$FPATH -xset b off &>> /dev/null -set bell-style none &>> /dev/null -setxkbmap pl &>> /dev/null +#xset b off &>> /dev/null +#set bell-style none &>> /dev/null +#setxkbmap pl &>> /dev/null export GPG_TTY=$(tty) export TERM=xterm-256color