From 58f342e86a6c0dd1341c96e5bc588e113cc5ecfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Wed, 16 Sep 2020 23:18:00 +0200 Subject: [PATCH] Added MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcin Woźniak --- .emacs.d/emacs-custom.el | 3 +- .emacs.d/init.el | 4 ++ .gitignore | 1 + .local/bin/checking-repo | 98 ++++++++++++++++++++++++++++++++++++++++ .local/bin/euscan | 4 ++ .local/bin/update-kernel | 2 +- .vimrc | 3 +- .zshrc | 1 - 8 files changed, 110 insertions(+), 6 deletions(-) create mode 100755 .local/bin/checking-repo create mode 100755 .local/bin/euscan diff --git a/.emacs.d/emacs-custom.el b/.emacs.d/emacs-custom.el index 272f5f3..0230f4b 100644 --- a/.emacs.d/emacs-custom.el +++ b/.emacs.d/emacs-custom.el @@ -8,8 +8,7 @@ '(livedown-open t) '(livedown-port 1337) '(package-selected-packages - (quote - (auto-complete use-package switch-window ox-reveal ox-jira org-jira markdown-mode magit htmlize dracula-theme dired-sidebar confluence)))) + '(markdown-mode magit dired-sidebar dracula-theme auto-complete ox-reveal htmlize switch-window use-package))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 7945a88..b84f7e8 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -65,6 +65,10 @@ ([remap other-window] . switch-window) ) +;; Enable japanese +(require 'mozc) +(setq default-input-method "japanese-mozc") + ;; reveal dependency (use-package htmlize :ensure t diff --git a/.gitignore b/.gitignore index f5a1520..0717806 100644 --- a/.gitignore +++ b/.gitignore @@ -61,6 +61,7 @@ go/ Documents Downloads Linux +mega MEGA Muzyka Screenshots diff --git a/.local/bin/checking-repo b/.local/bin/checking-repo new file mode 100755 index 0000000..a49a109 --- /dev/null +++ b/.local/bin/checking-repo @@ -0,0 +1,98 @@ +#!/usr/bin/env bash + +#################################################### +# +# SRC_PREPARE +# +# Marcin Woźniak +# y0rune@aol.com +# +# Last edit: 16-09-2020 +# +################################################### + +function scanning(){ + EUSCAN=$(euscan --nocolor --quiet "$1") + if [ -n "$EUSCAN" ]; then + echo "=============== NOW: $(find ./* -mindepth 2 -maxdepth 2 -name ''"$1"'*.ebuild' | tail -1) ================= + $(echo -e "$EUSCAN" | tail -1)" + fi +} + +function folder(){ + cd "$1" || exit + + PACKAGES=() + + for FILE in */* + do + PACKAGE=$(echo "$FILE" | grep -Eo '[A-z0-9_-]+$') + PACKAGES+=("$PACKAGE") + done + + for i in "${PACKAGES[@]}" + do + scanning "$i" & + done + + for j in $(jobs -p) + do + wait "$j" + done + + echo -n ">>> Done scanning $1" +} + +function nofolder(){ + if [ -z "${1}" ]; then + echo "No overlay names given" + echo "Please give at least one overlay name as a commandline argument" + echo "Exiting" + exit 1 + fi + +for overlay in "${@}" +do + for ebuild in $(EIX_LIMIT=0 eix --only-names --in-overlay "${overlay}") + do + euscan --nocolor --quiet "${ebuild}" & + done + + for j in $(jobs -p) + do + wait "$j" + done + + echo -n ">>> Done scanning ${overlay}" +done +} + +function help(){ + echo "You can use:" + echo "* -r or --repo " + echo "* -f or --folder " + echo + echo "Example of usage" + echo "./logeuscan -r src_prepare-overlay" + echo "./logeuscan -f ~/git/src_prepare-overlay" +} + +function main(){ + [ "$(whereis eix | wc -w)" -le "1" ] && { echo "The eix is NOT installed"; exit; } + [ "$(whereis euscan | wc -w)" -le "1" ] && { echo "The euscan is NOT installed"; exit; } + case $1 in + -h|--help) + help + ;; + -r|--repo) + nofolder "$2" | tee -a "euscan-$(date -I).log" + ;; + -f|--folder) + folder "$2" | tee -a "euscan-$(date -I).log" + ;; + *) + echo "No found variable"; echo; help + esac +} + +main "$@" diff --git a/.local/bin/euscan b/.local/bin/euscan new file mode 100755 index 0000000..ed2c3c4 --- /dev/null +++ b/.local/bin/euscan @@ -0,0 +1,4 @@ +#!/usr/lib/python-exec/python3.7/python +# EASY-INSTALL-SCRIPT: 'euscan==9999','euscan' +__requires__ = 'euscan==9999' +__import__('pkg_resources').run_script('euscan==9999', 'euscan') diff --git a/.local/bin/update-kernel b/.local/bin/update-kernel index 4a9d951..58995a8 100755 --- a/.local/bin/update-kernel +++ b/.local/bin/update-kernel @@ -37,7 +37,7 @@ if [ "$agreed" == "y" ] || [ "$agreed" == "Y" ] NEW_KERNEL="/tmp/new-kernel-config" sudo cp -r $TMP_KERNEL $DEFAULT_KERNEL cd /usr/src/linux; sudo make menuconfig; sleep 2; sudo cp -r $DEFAULT_KERNEL $NEW_KERNEL - sudo genkernel all --makeopts=-j$(nproc --all) --kernel-config=$NEW_KERNEL --callback="emerge nvidia-drivers::gentoo" + sudo genkernel all --makeopts=-j$(nproc --all) --kernel-config=$NEW_KERNEL --callback="emerge nvidia-drivers::gentoo" --lvm --btrfs --luks elif [ "$agreed" == "N" ] || [ "$agreed" == "n" ] then exit diff --git a/.vimrc b/.vimrc index c31d71e..bf57a97 100644 --- a/.vimrc +++ b/.vimrc @@ -46,7 +46,6 @@ set nocompatible set hlsearch set incsearch set noshowmode -set cursorline set cmdheight=1 syntax on filetype plugin indent on @@ -118,7 +117,7 @@ autocmd BufWritePost *.tex silent! execute "!sudo pkill -HUP mupdf > /dev/null" " mutt autocmd BufRead,BufNewFile /tmp/neomutt* let g:goyo_width=80 -autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo | set bg=light +autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x! autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q! diff --git a/.zshrc b/.zshrc index 6c7b72f..e38b8a7 100644 --- a/.zshrc +++ b/.zshrc @@ -16,7 +16,6 @@ plugins=(rake ruby vagrant knife knife_ssh kitchen ) ZSH_DISABLE_COMPFIX=true source $ZSH/oh-my-zsh.sh -source $HOME/.sshservers source $HOME/Linux/configs/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh &>> /dev/null source $HOME/Linux/configs/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh &>> /dev/null [ ! -d $HOME/.config/fzf ] && git clone https://github.com/junegunn/fzf.git $HOME/.config/fzf