Skip to content

Commit

Permalink
asdfa
Browse files Browse the repository at this point in the history
  • Loading branch information
ediw8311xht committed May 31, 2023
1 parent 86e1166 commit af301d1
Show file tree
Hide file tree
Showing 8 changed files with 127 additions and 101 deletions.
67 changes: 43 additions & 24 deletions bash/bashrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

#
#- ~/.bashrc
# shellcheck disable=SC1000-SC9999
## shellcheck disable=SC1000-SC9999
#-
#
#-If not running interactively, don't do anything
Expand All @@ -10,8 +10,8 @@ alias ls='ls --color=auto'
alias grep='grep --colour=auto'
#PS0='$(pwd)\n'
#PS0+='\e[0 q'
INSERT='$(echo "${PWD/~/\~}" | perl -pe '\''s/^(\/[^\/]*|~)[\/]\K.*(?=\/[^\/]*$)/../g'\'')'
INSERT2='$(echo "${PWD/~/\~}" | perl -pe '\''s/^(\/[^\/]*|~)[\/]\K.*(?=\/[^\/]*$)/../g; s/[^ ]/ /g'\'')'
#INSERT='$(echo "${PWD/~/\~}" | perl -pe '\''s/^(\/[^\/]*|~)[\/]\K.*(?=\/[^\/]*$)/../g'\'')'
#INSERT2='$(echo "${PWD/~/\~}" | perl -pe '\''s/^(\/[^\/]*|~)[\/]\K.*(?=\/[^\/]*$)/../g; s/[^ ]/ /g'\'')'
PS0='\e[0 q\[\e[0m\]'
PS1='>'
PS2='\e[0 q\[\e[0m\]'
Expand Down Expand Up @@ -50,9 +50,10 @@ kup() {
kiwix-serve *.zim --verbose --daemon --nodatealiases --address="127.0.0.1" --port="${KIWIX_PORT}"
}
run_flask() {
cd "$MYWEB"
flask run --cert "${CERT_LOCALHOST}" --key "${KEY_LOCALHOST}"
cd -
if cd "$MYWEB" ; then
#flask run --cert "${CERT_LOCALHOST}" --key "${KEY_LOCALHOST}"
cd - || echo "issue returning back to original dir" && return 1
fi
}
cd_from_lf() {
lf
Expand All @@ -65,11 +66,6 @@ cd_from_lf() {
trash-put "${a}"
fi
}
kn() {
local IFS=$'\n'
local ns=($(echo "$(grep -Pi '^ [0-9]+\K.*'"${1}"'.*$' <<< $(ps ax))"))
echo "MATCHES GOT: ${#ns[@]}"; echo "${ns[*]}"
}
cg() {
if [[ -z "$*" ]] ; then
compgen -A -abck | sort | uniq -c | grep -Pio '.+[0-9]+ \K.*'
Expand All @@ -87,7 +83,7 @@ my_cd() {

cd "${@:-"$(find . -type d | fzf --preview="ls -1 {}" )"}"
}
vid() {
open_mpv() {
if [[ "${1}" =~ ^-mono ]] ; then local AUD="mono"; shift 1; fi

mpv --audio-channels="${AUD:-"auto"}" "${@:-.}" & disown
Expand Down Expand Up @@ -175,6 +171,10 @@ killall_loaded() {
#---------------------------------------------------------------------- #
#-ALIASES #
#---------------------------------------------------------------------- #
alias listaudio=" find . -type f -iregex '.*[.]\(mp3\|flac\)'"
alias listpics=" find . -type f -iregex '.*[.]\(jp[e]?g\|png\|tiff\|webp\|bmp\|avif\)'"
alias listvids=" find . -type f -iregex '.*[.]\(mov\|m4v\|mkv\|mp[e]?[4vg]\|gif[v]?\|webm\|avi\|amv\)'"
alias listmedia=" listaudio; listpics; listvids"
alias sudo=' sudo -v; sudo '
alias rml=' rmlint --no-followlinks --keep-all-tagged --no-crossdev --paranoid --progress --types="duplicates"'
alias r=' run_flask'
Expand All @@ -186,6 +186,7 @@ alias b=' cd "$HOME/bin/"'
alias c=' printf "\n%.0s_______________________________" {1..400} ; printf "%.0s\n" {1..500} ; clear '
alias f=' find / -mount'
alias h=' cd "$HOME"'
alias bhis=' cd "$HOME/Documents/BASH_HISTORY"'
alias i=' iex'
alias j=' flask run --cert="$HOME/ADD_TO_TRUSTED/mykey.crt" --key="$HOME/.cretse_ridi/mykey.pem"'
alias t=' trash-put'
Expand Down Expand Up @@ -214,7 +215,7 @@ alias nvo=' nvim -O'
alias snv=' sudoedit'
alias sf=' clear; screenfetch 2>/dev/null'
alias ac=' acheck'
alias gital=' (read _z; git log -S "${_z}" --source --all ) <<<'
alias gital=' git log --source --all -S'
alias alas_np=' alias -p | grep -Pio "^[ \t]*alias[ \t]*\K[^=]*" | column'
alias acc=' alias_conflict'
alias acf=' alias_conflict --full'
Expand All @@ -233,14 +234,14 @@ alias lookpdf=' cd $HOME/Notebooks/REFERENCE_SHEETS/PDF/; lf ; cd -'
alias lookmd=' cd $HOME/Notebooks/REFERENCE_SHEETS/MARKDOWN/; lf ; cd -'
alias stack=' cd $HOME/Notebooks/REFERENCE_SHEETS/MARKDOWN/; lf ; cd -'
# Rename
alias tyren=' perl-rename -v -n'
alias testren=' perl-rename -v -n'
alias doren=' perl-rename -v'
alias quickren=" perl-rename -v 's/[^0-9a-zA-Z\-.]/_/g' *"
# Kill
alias kctpv=' kill "$(pidof "ctpv")"'
alias kill_at_spi2=' killall at-spi2-registryd; killall at-spi2-bus-launcher'
alias ka=' killall_loaded'
alias xprdet=' pkill -f "^[/]+usr[/]+bin[/]+xpra attach :${XPRA_DISPLAY_NUMBER}[ \$]"'
alias kctpv=' kill "$(pidof "ctpv")"'
alias k_at_spi2=' killall at-spi2-registryd; killall at-spi2-bus-launcher'
alias ka=' killall_loaded'
alias xprdet=' pkill -f "^[/]+usr[/]+bin[/]+xpra attach :${XPRA_DISPLAY_NUMBER}[ \$]"'
alias tracenet=' strace'
alias g=' grep --perl-regexp --ignore-case'
alias xg=' grep -r -i --exclude=\*.{dll,gpg,iso,au,elc,xpm,xcf}\
Expand All @@ -249,15 +250,20 @@ alias xg=' grep -r -i --exclude=\*.{dll,gpg,iso,au,elc,xpm,xcf}\
--exclude=\*.{aac,webm,alac,ape,ogg,mp4,mkv,m4a,mp4a,avi,mp3,wav,flac}'
alias yg=' xg --exclude=\*.{rar,tar,gz,tgz,zip,bz2,tbz2}'
alias zg=' yg --exclude=\*.{pdf,mobi,epub,azw,azw2,djvu,lit,azw3}'
alias tarlist=' tar -tf'
alias tl=' tar -tf'
alias bt=' bsdtar'
alias btc=' bsdtar -cf'
#-------------------------------------GREP---------------#
alias gport=' gport_function'
alias isport=' (read _z; ss -lp "sport = :${_z}") <<< '
alias xprattach=" nohup /usr/bin/xpra attach :${XPRA_DISPLAY_NUMBER} &"
alias xprattach=' nohup /usr/bin/xpra attach :${XPRA_DISPLAY_NUMBER} &'
alias img=' nsxiv -0'
alias nimg=' nsxiv -0 .'
alias ldi=' fdisk -l -o +uuid'
alias pcal=' calcurse'
alias ll=" lsd --icon='never' -rt --permission='octal' --date=+'[%_H:%M:%S|%a|%D]' --blocks='permission,user,date,name'"
alias n=" lsd --icon='never' -rt --permission='octal' --date=+'[%_H:%M:%S|%a|%D]' --blocks='permission,user,date,name'"
alias lst=" lsd --icon='never' -ltrh"
alias lsz=" lsd --icon='never' -lSrh"
alias psg=' ps ax | grep -Pi'
Expand All @@ -275,12 +281,16 @@ alias sman=' man -K --regex'
alias down=' cd "$HOME/Downloads/"'
alias pics=' cd "$HOME/Pictures/"'
alias aud=' cd "$HOME/Audio/"'
alias rec=' cd "$HOME/Audio/Recordings"'
alias docs=' cd "$HOME/Documents/"'
alias spreds=' cd "$HOME/Documents/SPREADSHEETS/"'
alias desk=' cd "$HOME/Desktop/"'
alias wallz=' cd "$HOME/Pictures/Wallpapers"'
alias nswp=' cd "$HOME/.mynvim/swapfiles/"'
alias p=' pwd'
alias grab_dir=' xcmenu --input --clipboard "$(pwd)"'
alias gd=' xcmenu --input --clipboard "$(pwd)"'
alias pd=' cd "$(xcmenu --clipboard)"'
alias git_mt=' git log --pretty=format:"%h %s" --graph'
alias mansec=' man -f'
alias sap=' apropos'
Expand All @@ -305,14 +315,12 @@ alias fm=' worker'
#---------------------------------------------------------------------- #
#-EXPORT #
#---------------------------------------------------------------------- #
export MYKIWIX="$HOME/.local/share/kiwix"

export PYTHONPATH="${PYTHONPATH}:$HOME/.local/python3.10/site-packages"
export DOCS="$HOME/Documents/"
export DESK="$HOME/Desktop/"
export DOWN="$HOME/Downloads/"
export PYTHONPATH="${PYTHONPATH}:$HOME/.local/python3.10/site-packages"

export PAGER='most'

export TERM='st-256color'
export EDITOR="nvim"
export HISTSIZE=10000
Expand All @@ -325,7 +333,6 @@ export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export NO_AT_BRIDGE=1
export QT_QPA_PLATFORMTHEME="qt5ct"

#---------------------------------------------------------------------- #
#-`PATH` #
#---------------------------------------------------------------------- #
Expand Down Expand Up @@ -356,4 +363,16 @@ alias pacdneed='pacman -Qet'

alias reqs=' (read _a ; yay -Qi "${_a}" | grep -Pi "^(Required by:|Optional For:)" | grep -Pi "(Required by|Optional For|[^ \t]+)") <<<'
alias pg=' $PAGER'
alias vid=' open_mpv'

alias pyac=' source *env*/bin/activate'
alias pyde=' deactivate'









6 changes: 3 additions & 3 deletions i3wm/config
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@
workspace 13 output $MON_3
workspace 14 output $MON_3
#-------------------------------------------------------SETTINGS----------#
smart_gaps on
floating_modifier $mod
smart_gaps off
floating_modifier $mod+Ctrl
focus_follows_mouse yes
floating_maximum_size 1800 x 1080
floating_maximum_size 1920 x 1080
font pango:Hack 8
default_border $BORDER_PIXEL
#---GAPS------------------------------------------#
Expand Down
3 changes: 3 additions & 0 deletions i3wm/modes_i3wm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ mode "freekey" {
bindsym $mod+y $mode_be "default"
bindsym --release $mod+h exec xdotool key 'alt+Left'
bindsym --release $mod+l exec xdotool key 'alt+Right'

bindsym $mod+Shift+0 exec cp $HOME/.config/blugon/NOBLUE__-_GAMMA $HOME/.config/blugon/gamma; exec blugon
bindsym $mod+Shift+1 exec cp $HOME/.config/blugon/NOTHING__-_GAMMA $HOME/.config/blugon/gamma; exec blugon
}

#---------------------------------------------------RESIZE---------------------------------------------------------#
Expand Down
3 changes: 2 additions & 1 deletion i3wm/shift_bindings_i3wm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
#SF c
$SF d $_ exec dmenu_run -b -nb "#000000" -l 10 -fn "Office Code Pro:pixelsize=20:antialias=true:autohint=true"
$SF e $_ exec "i3-nagbar -t warning -m 'Exit i3?' -b 'Yes, exit i3' '. $HOME/bin/i3wm_exit_script.sh'"
$SF i $_ exec $HOME/bin/mdmenu.sh
$SF f $_ exec $HOME/bin/toggle_key_layout.sh
$SF h $B1 move left 20px
$SF i $_ exec $HOME/bin/mdmenu.sh
$SF j $B1 move down 20px
$SF k $B1 move up 20px
$SF l $B1 move right 20px
Expand Down
3 changes: 1 addition & 2 deletions lf/lfrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


set shell sh
set shellopts '-eu'
##USE DOUBLE QUOTES FOR 'set ifs "something"'
Expand Down Expand Up @@ -65,7 +64,7 @@ cmd autocd ${{


map e np
map <lt>p set nopreview
map <lt>p set preview!
map <lt>0 set ratios 1:2:3
map <lt>1 set ratios 1:2:1
map <lt>2 set ratios 1:2
Expand Down
127 changes: 66 additions & 61 deletions nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ set splitright
set t_Co=256
set nocompatible
set modelines=0
set signcolumn=no
"set signcolumn=no
set nu
set rnu
set ruler
Expand Down Expand Up @@ -223,9 +223,11 @@ let g:closetag_regions = {
let g:closetag_shortcut = '>'
" Add > at current position without closing the current tag, default is ''
let g:closetag_close_shortcut = '<leader>>'
"<hi> >

"<--------- COLOR SCHEME STUFF --------------------------------------------->
colorscheme pop-punk
"colorscheme cyberpunk-neon
:call CorrectColors()

hi Normal ctermbg=black guibg=Transparent
Expand All @@ -241,67 +243,69 @@ set nocuc
"list keybindings with :help index
"list user keybindings with :map
"nn <leader>. :NERDTreeToggle<esc>
cal L( 'a' , ':cal Tog(g:coc_enabled, 0, ":CocEnable", ":CocDisable")<esc>')
cal L( 'b' , ':ls<CR>:b<Space>' )
cal L( 'c' , ':set nocursorline!<esc>' )
cal L( 'd' , '<C-d>' )
cal L( 'e' , ':set cursorcolumn!<esc>' )
cal L( 'f' , ':set wrap!<esc>' )
cal L( 'g' , ':enew<esc>' )
cal L( 'h' , ':cal Tog(&ls, 0, "set ru \| set ls=2", "set noru \| set ls=0")<esc><C-L>')
cal L( 'j' , ':cal CyCol(+1)<CR>' )
cal L( 'l' , ':cal CyBac(+1)<CR>' )
cal L( 'n' , ':next<esc>' )
cal L( 'oc' , 'q:iput=execute("")<esc>A<C-c>' )
cal L( 'op' , 'q:<C-p><esc>Iput =execute("<esc>A")<esc>A<C-c>')
cal L( 'ox' , ':put =execute("<C-r>0")<esc>' )
cal L( 'out' , 'q:iput =execute("<C-r>0")<esc>A<C-c>' )
cal L( 'p' , ':previous<esc>' )
"cal L( 'q' , '' )
cal L( 'r' , '<C-w>' )
cal L( 's' , ':%so "${HOME}/.config/nvim/init.vim"<esc>' )
cal L( 'tcc' , ':tabclose<esc>' )
cal L( 'tt' , ':tabnew<esc>' )
cal L( 'tn' , ':tabmove +1<esc>' )
cal L( 'tp' , ':tabmove -1<esc>' )
cal L( 'tb' , ':tabmove -1<esc>' )
cal L( 'tm' , ':tabmove' )
cal L( 'tf' , ':tabfirst<esvsplitc>' )
cal L( 'tl' , ':tablast<esc>' )
cal L( 'tB' , ':tabmove -1<esc>' )
cal L( 'tN' , ':tabmove +1<esc>' )
cal L( 'u' , '<C-u>' )
cal L( 'var' , ':let maxvar ="<C-r>1<C-r>0"' )
cal L( 'vf' , '?<C-r>"<enter>' )
cal L( 'vm' , ':put =eval("<C-r>0")' )
cal L( 'vq' , ':put =eval("<C-r>0")<esc>' )
cal L( 'vv' , ':cal Cy(["none", "all", "block"], &ve, ["set ve=all \| echo &ve", "set ve=block \| echo &ve", "set ve=none \| echo &ve"], 0)<esc>')
cal L( 'vz' , 'i<C-r>"' )
cal L( 'w' , ':w<esc>' )
cal L( 'x' , ':w<esc>:!%:p<esc>' )
cal L( 'y' , ':hi Normal guibg=Transparent<esc>' )
cal L( 'z' , 'z' )
cal L( 'B' , ':Buffers<esc>' )
cal L( 'D' , ':bdelete<esc><enter>' )
cal L( 'G' , ':buff term://<esc>iohttp://localhost:4842' )
cal L( 'H' , ':vert helpgrep ' )
cal L( 'J' , ':cal CyCol(-1)<CR>' )
cal L( 'L' , ':cal CyBac(-1)<CR>' )
cal L( 'M' , ':messages<esc>' )
cal L( 'N' , ':cnext<esc>' )
cal L( 'P' , ':cprevious<esc>' )
"cal L( 'S' , ':BraceyStop<esc>' )
cal L( 'T' , ':buff term://<esc>i' )
cal L( 'W' , ':call Web("f")<esc>i' )
cal L( '<leader>' , ' <C-^>' )
cal L( '<enter>' , ':set paste!<esc>' )
cal L( ';' , ':ls<CR>:b<Space>' )
"cal L( '.' , ':bnext<esc>' )-----------------------
cal L( '/' , ':Explore<CR>' )
cal L( '[' , ':bprevious<CR>' )
cal L( ']' , ':bnext<CR>' )
call L( 'a' , ':call Tog(g:coc_enabled, 0, ":CocEnable", ":CocDisable")<esc>')
call L( 'b' , ':ls<CR>:b<Space>')
call L( 'c' , ':set nocursorline!<esc>')
call L( 'd' , '<C-d>')
call L( 'e' , ':set cursorcolumn!<esc>')
call L( 'f' , ':set wrap!<esc>')
call L( 'g' , ':enew<esc>')
call L( 'h' , ':call Tog(&ls, 0, "set ru \| set ls=2", "set noru \| set ls=0")<esc><C-L>')
call L( 'j' , ':call CyCol(+1)<CR>')
call L( 'k' , ':call CorrectColors()<CR>')
call L( 'l' , ':call CyBac(+1)<CR>')
call L( 'n' , ':next<esc>')
call L( 'oc' , 'q:iput=execute("")<esc>A<C-c>')
call L( 'op' , 'q:<C-p><esc>Iput =execute("<esc>A")<esc>A<C-c>')
call L( 'ox' , ':put =execute("<C-r>0")<esc>')
call L( 'out' , 'q:iput =execute("<C-r>0")<esc>A<C-c>')
call L( 'p' , ':previous<esc>')
"call L( 'q' , '')
call L( 'r' , '<C-w>')
call L( 's' , ':%so "${HOME}/.config/nvim/init.vim"<esc>')
call L( 'tcc' , ':tabclose<esc>')
call L( 'tt' , ':tabnew<esc>')
call L( 'tn' , ':tabmove +1<esc>')
call L( 'tp' , ':tabmove -1<esc>')
call L( 'tb' , ':tabmove -1<esc>')
call L( 'tm' , ':tabmove')
call L( 'tf' , ':tabfirst<esvsplitc>')
call L( 'tl' , ':tablast<esc>')
call L( 'tB' , ':tabmove -1<esc>')
call L( 'tN' , ':tabmove +1<esc>')
call L( 'u' , '<C-u>')
call L( 'var' , ':let maxvar ="<C-r>1<C-r>0"')
call L( 'vf' , '?<C-r>"<enter>')
call L( 'vm' , ':put =eval("<C-r>0")')
call L( 'vq' , ':put =eval("<C-r>0")<esc>')
call L( 'vv' , ':call Cy(["none", "all", "block"], &ve, ["set ve=all \| echo &ve", "set ve=block \| echo &ve", "set ve=none \| echo &ve"], 0)<esc>')
call L( 'vz' , 'i<C-r>"')
call L( 'w' , ':w<esc>')
call L( 'x' , ':w<esc>:!%:p<esc>')
call L( 'y' , ':hi Normal guibg=Transparent<esc>')
call L( 'z' , 'z')
call L( 'B' , ':Buffers<esc>')
call L( 'D' , ':bdelete<esc><enter>')
call L( 'G' , ':buff term://<esc>iohttp://localhost:4842')
call L( 'H' , ':vert helpgrep ')
call L( 'J' , ':call CyCol(-1)<CR>')
call L( 'L' , ':call CyBac(-1)<CR>')
call L( 'M' , ':messages<esc>')
call L( 'N' , ':cnext<esc>')
call L( 'P' , ':cprevious<esc>')
"call L( 'S' , ':BraceyStop<esc>')
call L( 'T' , ':buff term://<esc>i')
call L( 'W' , ':call Web("f")<esc>i')
call L( '<leader>' , ' <C-^>')
call L( '<enter>' , ':set paste!<esc>')
call L( ';' , ':ls<CR>:b<Space>')
"call L( '.' , ':bnext<esc>')-----------------------
call L( '/' , ':Explore<CR>')
call L( '[' , ':bprevious<CR>')
call L( ']' , ':bnext<CR>')

call L( '<C-w>line', ':call Tog(&cc, 0, "set cc=80", "set cc=0")<esc>')

cal L( '<C-w>line', ':cal Tog(&cc, 0, "set cc=80", "set cc=0")<esc>')

map <Space> <leader>
map , <leader>
Expand Down Expand Up @@ -365,6 +369,7 @@ autocmd BufNewFile,BufRead *.css setlocal tabstop=2 shift

vn <leader>M :!dc<esc>
vn <leader>m :!bc<esc>
"map <c-b> nn <leader>bb :buffers<cr>:b<space>
"nn <leader><leader> :<backspace>
"nn <leader>ap :let @+="<c-r>1<c-r>0"
Expand Down
Loading

0 comments on commit af301d1

Please sign in to comment.