all repos

dotfiles @ 71ddd0a

i use rach linux btw
7 files changed, 61 insertions(+), 14 deletions(-)
Add gpe(gpg wrapper) for ranger
Author: Smirnov Alexandr ss2316544@gmail.com
Committed at: 2021-03-22 19:13:32 +0200
Parent: 633e8ad
M bin/catfetch
···
        1
        1
         #!/bin/sh

      
        2
        
        -kernel=$(cat /proc/sys/kernel/osrelease|cut -d '-' -f1)

      
        
        2
        +

      
        
        3
        +# Kernel version

      
        
        4
        +kernel=$(cat /proc/sys/kernel/osrelease | cut -d '-' -f1)

      
        
        5
        +

      
        
        6
        +# Window manager

      
        3
        7
         [ ! "$wm" ] && [ "$DISPLAY" ] && command -v xprop >/dev/null && {

      
        4
        8
             wmname="$(xprop -id $(xprop -root -notype\

      
        5
        9
             | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}') -notype -f _NET_WM_NAME 8t\

      
        6
        10
             | grep "WM_NAME"\

      
        7
        11
             | cut -f2 -d \")"

      
        8
        12
         }

      
        
        13
        +

      
        
        14
        +# Shell

      
        9
        15
         shell=$(basename $SHELL)

      
        
        16
        +

      
        
        17
        +# Installed packages

      
        10
        18
         manager=$(which apt pacman yay 2>/dev/null)

      
        11
        19
         manager=${manager##*/}

      
        12
        20
         case "$manager" in

      
        13
        
        -    apt) packages="$(dpkg-query -f '${binary:Package}\n' -W | wc -l)";;

      
        14
        
        -    yay) packages="$(yay -Q | wc -l)";;

      
        15
        
        -    pacman) packages="$(pacman -Q | wc -l)";;

      
        
        21
        +    apt) packages="$(dpkg-query -f '${binary:Package}\n' -W | wc -l)" ;;

      
        
        22
        +    yay) packages="$(yay -Q | wc -l)" ;;

      
        
        23
        +    pacman) packages="$(pacman -Q | wc -l)" ;;

      
        16
        24
         esac

      
        
        25
        +

      
        
        26
        +# Text decorations

      
        17
        27
         bold=$(tput bold)

      
        18
        28
         reset="\e[0m"

      
        19
        29
         blue="\e[36m"

      
A bin/gpe
···
        
        1
        +#!/usr/bin/env bash

      
        
        2
        +# For working this script set in $GPG_KEY you gpg key

      
        
        3
        +## Functions

      
        
        4
        +function encrypt() {

      
        
        5
        +    gpg -ea -r $GPG_KEY $@

      
        
        6
        +}

      
        
        7
        +function decrypt() {

      
        
        8
        +    local fn="$1"

      
        
        9
        +

      
        
        10
        +    if [ ${fn: -4} == ".asc" ]

      
        
        11
        +    then

      
        
        12
        +        gpg -d -o ${fn%%.asc} $@

      
        
        13
        +    elif [ ${fn: -4} == ".gpg" ]

      
        
        14
        +    then

      
        
        15
        +        gpg -d -o ${fn%%.gpg} $@

      
        
        16
        +    fi

      
        
        17
        +}

      
        
        18
        +

      
        
        19
        +## Logic

      
        
        20
        +case "$1" in

      
        
        21
        +    enc|e) shift; encrypt $@ ;;

      
        
        22
        +    dec|d) shift; decrypt $@ ;;

      
        
        23
        +    *) echo "Error."         ;;

      
        
        24
        +esac

      
M config/bspwm/sxhkd
···
        28
        28
             bspc node -c

      
        29
        29
         

      
        30
        30
         super + control + r

      
        31
        
        -    bspc wm -r && pkill sxhkd && sxhkd -c ~/.config/bspwm/sxhkd

      
        
        31
        +    bspc wm -r \

      
        
        32
        +    && pkill sxhkd \

      
        
        33
        +    && sxhkd -c ~/.config/bspwm/sxhkd

      
        32
        34
         

      
        33
        35
         ### == BSPWM windows

      
        34
        
        -## Resize window

      
        35
        
        -super + ctrl + {h,j,k,l}

      
        36
        
        -    bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}

      
        37
        
        -

      
        38
        
        -# Change focus & move focus window

      
        39
        36
         super + {_,shift + } {h,j,k,l}

      
        40
        37
             bspc node -{f,s} {west,south,north,east}

      
        41
        38
         

      
        42
        
        -# Preselect the direction

      
        
        39
        +super + ctrl + {h,j,k,l}

      
        
        40
        +    bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}

      
        
        41
        +

      
        
        42
        +### === BSPWM window preselect

      
        43
        43
         super + alt + {h,j,k,l}

      
        44
        44
             bspc node -p {west,south,north,east}

      
        45
        45
         

      
M config/nvim/init.vim
···
        85
        85
         "== NERDTree

      
        86
        86
         let g:NERDTreeWinPos = "right"

      
        87
        87
         let g:NERDTreeMinimalUI = 1

      
        
        88
        +let g:NERDTreeWinSize = 24

      
        88
        89
         

      
        89
        90
         "== Mapping

      
        90
        91
         let mapleader=";"

      
M config/ranger/rc.conf
···
        22
        22
         set scroll_offset 4

      
        23
        23
         

      
        24
        24
         #== Mappings

      
        
        25
        +

      
        
        26
        +# go to

      
        25
        27
         map gc    cd ~/code

      
        26
        28
         map gd    cd ~/Documents

      
        27
        29
         map gw    cd ~/Downloads

      
        28
        30
         map g.    cd ~/.dotfiles

      
        29
        31
         map @     shell $SHELL

      
        
        32
        +

      
        
        33
        +# delete

      
        30
        34
         map dD    delete

      
        31
        35
         map dT    trash

      
        
        36
        +

      
        
        37
        +# tab

      
        32
        38
         map <c-k> tab_shift 1

      
        33
        39
         map <c-j> tab_shift -1

      
        
        40
        +

      
        
        41
        +# archive

      
        34
        42
         map sa shell zip -r archive.zip %s

      
        35
        43
         map ss shell tar -czvf archive.tar.gz %s

      
        36
        44
         map sd shell 7z a archive.7z %s

      
        37
        45
         map se shell extract %s

      
        
        46
        +

      
        
        47
        +# gpg

      
        
        48
        +map ee shell gpe enc %s

      
        
        49
        +map ed shell gpe dec %s

      
M config/zathura/zathurarc
···
        4
        4
         

      
        5
        5
         set statusbar-fg             "#CED4DA"

      
        6
        6
         set statusbar-bg             "#1F2324"

      
        7
        
        -set statusbar-h-padding      10

      
        8
        
        -set statusbar-v-padding      10

      
        
        7
        +set statusbar-h-padding      7

      
        
        8
        +set statusbar-v-padding      7

      
        9
        9
         

      
        10
        10
         set inputbar-fg              "#FFFFFF"

      
        11
        11
         set inputbar-bg              "#1F2324"

      
M zshrc
···
        1
        
        -export PATH="$HOME/.yarn/bin:$HOME/bin:$HOME/go/bin:$HOME/.local/bin:$PATH"

      
        
        1
        +export PATH="$HOME/.yarn/bin:$HOME/bin:$HOME/.local/bin:$PATH"

      
        2
        2
         export EDITOR="nvim"

      
        3
        3
         

      
        4
        4
         ### Oh my zsh