Skip to content

Commit

Permalink
AUTO_SAVE_Tue Jan 10 06:11:24 AM EST 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
ediw8311xht committed Jan 10, 2023
1 parent 3950d5d commit 97e4975
Show file tree
Hide file tree
Showing 8 changed files with 142 additions and 533 deletions.
72 changes: 47 additions & 25 deletions bash/bashrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#-
#
#- ~/.bashrc
# \\shellcheck disable=SC1000-SC9999
#-
Expand All @@ -24,12 +24,12 @@ PS2+=' '"${INSERT2}"
# --------------------------------------------------------------------- #
# FUNCTIONS #
# --------------------------------------------------------------------- #
kn() {
(IFS=$'\n'
ns=($(echo "$(grep -Pi '^ [0-9]+\K.*'"${1}"'.*$' <<< $(ps ax))"))
function kn() {
local IFS=$'\n'
local ns=($(echo "$(grep -Pi '^ [0-9]+\K.*'"${1}"'.*$' <<< $(ps ax))"))
echo "MATCHES GOT: ${#ns[@]}"; echo "${ns[*]}"
)}
cg() {
}
function cg() {
if [[ -z "$*" ]] ; then
compgen -A function -abck | sort | uniq -c | grep -Pio '.+[0-9]+ \K.*'
else
Expand All @@ -47,20 +47,20 @@ my_cd() {
cd "${@:-"$(find . -type d | fzf --preview="ls -1 {}" )"}"
}
vid() {
(if [[ "${1}" =~ ^-mono ]] ; then AUD="mono"; shift 1; fi
if [[ "${1}" =~ ^-mono ]] ; then local AUD="mono"; shift 1; fi

mpv --audio-channels="${AUD:-"auto"}" "${@:-.}" & disown
)}
}
upd_pip_z() {
(IFS=$'\n'
zname="$(date +'%Y%m%d')_pipoutdated.txt"
local IFS=$'\n'
local zname="$(date +'%Y%m%d')_pipoutdated.txt"
pip list --outdated > "${zname}"
A="$(cat "${zname}" | sed '1,2d' | sed -e 's/[ ][ ]*/ /g' | cut -d' ' -f1)"
local A="$(cat "${zname}" | sed '1,2d' | sed -e 's/[ ][ ]*/ /g' | cut -d' ' -f1)"
for i in $A ; do pip install --upgrade "${i}"; done
return "$?"
)}
}
fpend() {
(if [[ "$1" =~ ^-[dD](ate)? ]] ; then shift 1; MDATE="#$(date)"; fi
if [[ "$1" =~ ^-[dD](ate)? ]] ; then shift 1; local MDATE="#$(date)"; fi
if [[ -f "${1}" ]] ; then
for i in "${@:2}" "${MDATE:-"_"}"; do
echo "${i}" ' |---| ' "${1}"
Expand All @@ -69,19 +69,37 @@ fpend() {
return "$?"
fi
echo "INCORRECT ARGUMENTS"; return 1
)}
}
addally() {
printf 'alias %s='\''cd "%s"'\'' %s' "${1}" "${PWD/$HOME/\$HOME}" "${IGNORE_TEXT}" >> "$HOME/.bashrc"
)}
printf 'alias %s='\''cd "%s"'\'' %s' \
"${1}" "${PWD/$HOME/\$HOME}" "${IGNORE_TEXT}" >> "$HOME/.bashrc"
}
rep_char() {
(z="${1}"; while ((z--)) ; do echo -n "${2}"; done
)}
local z="${1}"; while ((z--)) ; do echo -n "${2}"; done
}
nifs() { IFS=$'\n' ; printf 'IFS=%q\n' "${IFS}" ; }
rifs() { IFS=$' \t\n'; printf 'IFS=%q\n' "${IFS}" ; }
ppifs() { printf "IFS=%q" "${IFS}"; echo "" ; }
pifs() { printf "%q" "${IFS}"; echo "" ; }
acheck() { compgen -c | grep -x "${@}" ; }

alias_conflict() {
local beg=' '
echo "------------------------------"
local cvm="$(compgen -c)"
for i in $(alias -p | grep -Pio '^[ \t]*alias[ \t]*\K[^=]*') ; do
local wcl="$(grep -x "${i}" <<< "${cvm}" | wc -l)"
if [[ "${wcl}" -gt 1 ]] ; then
echo "${wcl} - ${i}"
if [[ "${1,,}" =~ ^[-][-]?f(ull)?$ ]] ; then
type -a "${i}" |
sed 's/^/'"${beg}"'/' |
sed 's/.*is aliased to [`][ \t]*/\n'"${beg}""${beg}"'/'
fi
echo "------------------------------"
fi
done
}
gport_function() { netstat -lntu | grep -Pi "${@:-""}" ; }

bash_history_grab() {
Expand All @@ -106,10 +124,9 @@ alias t=' trash-put'
alias x=' $HOME/bin/FOR_BASHRC/stars_c.sh'
alias bgr=' bash_history_grab'
alias hb=' nvim $HOME/.bash_history2'
alias ac=' acheck'
alias cl=' clear'
alias cp=' cp -i'
alias df=' df -h'
alias cp_=' cp -i'
alias df_=' df -h'
alias fz=' my_cd'
alias fo=' xdg-open "$(fzf)"'
alias fn=' nvim "$(fzf --preview="nvim {}")"'
Expand All @@ -119,20 +136,25 @@ alias mf=' find . -iname'
alias ic=' clear; imgcat'
alias nv=' nvim'
alias snv=' sudoedit'
alias sf=' clear; screenfetch'
alias ac=' acheck'
alias alas_np=' alias -p | grep -Pio "^[ \t]*alias[ \t]*\K[^=]*" | column'
alias acc=' alias_conflict'
alias acf=' alias_conflict --full'
alias pc=' clear; neofetch'
alias pe=' ps -eo comm=,'
alias po=' ps -eo cmd=,'
alias conf=' cd "$XDG_CONFIG_HOME"'
alias qread=' zathura "$(fzf)"'
alias free=' free -m'
alias free_=' free -m'
alias rmi=' rm -i'
alias pdf=' zathura'
alias i3c=' i3 -C "$HOME/.config/i3/config"'
#--rename--
#---rename-#
alias tyren=' perl-rename -v -n'
alias doren=' perl-rename -v'
alias quickren=" perl-rename -v 's/[^0-9a-zA-Z\-.]/_/g' *"
#--kill--
#---kill---#
alias kctpv='kill "$(pidof "ctpv")"'
alias kill_at_spi2='killall at-spi2-registryd; killall at-spi2-bus-launcher'
alias ka='killall'
Expand Down Expand Up @@ -227,7 +249,7 @@ alias pso=' ps -eo cmd=, | grep --ignore-case'
alias tre=' ps -ejH'
alias trev=' ps axjf'
alias tres=' ps -eHo euser,ruser,suser,fuser,f,comm,label'
alias scim=' sc-im'
alias vcs=' sc-im'
alias phone=' aft-mtp-cli'
alias decl=' declare -f'
alias ht=' htop'
Expand Down
18 changes: 9 additions & 9 deletions i3wm/config
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
set_from_resource $BOT_GAPS i3wm.TOP_GAPS 0
set_from_resource $R_GAPS i3wm.IN_GAPS 0
set_from_resource $L_GAPS i3wm.L_GAPS 0
set $WSW 1200
set $WSH 900
set $WSW 1400
set $WSH 950
set $mod Mod1
set $Br bindsym Mod1+
set $SF bindsym Mod1+Shift+
Expand Down Expand Up @@ -60,12 +60,12 @@
font pango:Hack 7
default_border $BORDER_PIXEL
#---GAPS------------------------------------------#
gaps inner $IN_GAPS
gaps outer $OUT_GAPS
gaps top $TOP_GAPS
gaps bottom $BOT_GAPS
gaps right $R_GAPS
gaps left $L_GAPS
gaps inner 0
gaps outer 0
gaps top 0
gaps bottom 0
gaps right 0
gaps left 0
#---Class-----------------------Border----------Background------Text------------Indicator-------ChildBorder----#
client.focused $focuse_TBAR $focuse_TBAR $focuse_TEXT $focuse_TBAR $focuse_BORD
client.focused_inactive $inacti_TBAR $inacti_TBAR $inacti_TEXT $inacti_TBAR $inacti_BORD
Expand All @@ -85,7 +85,7 @@
for_window [all] title_format "<big><big><big><span background='#000000' rise='3pt'> <small>%title</small> </span></big></big></big>"
for_window [instance="i3s_note"] floating enable, resize set $WSW $WSH, move position center, move scratchpad, scratchpad show
for_window [instance="i3s_st"] floating enable, resize set $WSW $WSH, move position center, move scratchpad, scratchpad show
for_window [class=".*elementary\.term.*"] floating enable, resize set $WSW $WSH, move position center, move scratchpad, scratchpad show
for_window [class=".*Thunar*"] floating enable, resize set $WSW $WSH, move position center, move scratchpad, scratchpad show
for_window [class="Tor Browser"] floating enable, resize set $WSW $WSH, move position center, move scratchpad, scratchpad show
for_window [class="Emacs"] floating enable, resize set $WSW $WSH, move position center, move scratchpad, scratchpad show
for_window [class=".*icecat.*"] floating enable, resize set $WSW $WSH, move position center, move scratchpad, scratchpad show
Expand Down
8 changes: 3 additions & 5 deletions i3wm/regular_bindings_i3wm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# i3 config file (v4)
#---------------------------------------------------[a-z]-BINDS----------------------------------------------------#
$Br a $B1 focus parent
$Br b $B1 floating toggle
$Br b $B1 floating toggle ; resize set $WSW $WSH, move position center
$Br c $B1 [class="Emacs"] scratchpad show
$Br d $_ exec dmenu_run -b -i -nf '#00FF00' -nb '#000000' -l 10 -fn "Office Code Pro:pixelsize=25:antialias=true:autohint=true"
$Br e $_ layout toggle split
Expand All @@ -26,7 +26,7 @@
$Br u $B1 [instance="i3s_st"] scratchpad show
$Br v $_ split v
$Br w $_ layout tabbed
$Br x $_ exec dmenu_run -b -nb "#000000" -l 10 -fn "Office Code Pro:pixelsize=20:antialias=true:autohint=true"
#$Br x $_ exec resize
$Br y $_ $xm_hd "Freekey"; mode freekey
$Br z $_ exec /usr/local/bin/st -c 'special_float' -n 'i3s_note' nvim -p "$HOME/.config/BraveSoftware/new_tab_page/new_tab_page.html" "$HOME/.config/BraveSoftware/new_tab_page/new_tab_page.css"
#--------------------------------------------------[^a-z]-BINDS----------------------------------------------------#
Expand All @@ -42,10 +42,8 @@
$Br 0 $B1 workspace 10
$Br bracketleft $B1 workspace 11
$Br bracketright $B1 workspace 12
#SE braceleft
#SE braceright
$Br semicolon $B1 [class=".*qutebrowser.*"] scratchpad show
$Br equal $B1 resize set 900 900
$Br equal $B1 [class=".*Thunar.*"] scratchpad show
$Br KP_Home $_ exec $HOME/bin/polybar_select_dmenu.sh
$Br KP_Begin $_ exec $HOME/bin/polybar_manipulate.sh "TOGGLE"
$Br KP_Up $_ exec $HOME/bin/polybar_manipulate.sh "UP"
Expand Down
4 changes: 2 additions & 2 deletions i3wm/shift_bindings_i3wm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
$SF j $B1 move down 30px
$SF k $B1 move up 30px
$SF l $B1 move right 40px
$SF m $_ floating enable, resize set $WSW $WSH, move scratchpad
$SF m $_ floating enable, resize set $WSW $WSH, move scratchpad
$SF n $_ exec /usr/local/bin/st -c 'special_float' -n 'i3s_note' nvim "$HOME/Documents/Notepad/note.txt"
$SF o $_ exec i3lock -f -e -c 333333
$SF p $_ exec /usr/bin/brave --incognito
Expand All @@ -33,7 +33,7 @@
$SF Left $_ exec $HOME/bin/xwallpaperauto.sh "LEFT"
$SF Right $_ exec $HOME/bin/xwallpaperauto.sh "RIGHT"
$SF minus $B1 move position mouse
$SF equal $B1 resize set $WSW $WSH
$SF equal $B1 exec /usr/bin/Thunar
$SF Return $_ exec /usr/bin/brave
$SF semicolon $B1 exec /usr/bin/qutebrowser
#BSF Delete $_ exec $HOME/bin/xwallpaperauto.sh --pargs --auto
Expand Down
78 changes: 47 additions & 31 deletions lf/lfrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
set shell sh
set shellopts '-eu'
##USE DOUBLE QUOTES FOR 'set ifs "something"'
set ifs "\n"
set ratios 1:2:3
set info size:time
set scrolloff 10
set autoquit
#set drawbox
set dircounts
set preview
set number
set ignorecase
#set icons
set relativenumber
set ifs "\n"
set ratios 1:2:3
set info size:time
set scrolloff 10
set autoquit
set drawbox
set dircounts
set preview
set number
set ignorecase
set noicons
set relativenumber
set sortby ctime

set previewer ctpv
set cleaner ctpvclear
Expand All @@ -37,10 +38,14 @@ cmd rep &{{
cmd trash ${{
set -f
if [ -z "$fs" ]; then
trash-put "${f}" && lf -remote "send $id reload && redraw" &
trash-put "${f}"
lf -remote "send $id reload && redraw"
&
else
for f in ${fs} ; do
trash-put "${f}" && lf -remote "send $id reload && redraw" &
trash-put "${f}"
sleep 0.1
lf -remote "send $id reload && redraw" &
done
fi
sleep 0.5 && lf -remote "send $id reload && redraw" &
Expand All @@ -57,23 +62,34 @@ cmd open &{{
&xdg-open "${f}"
}}

cmd oneforone &{{
lf -remote "send $id set nopreview"
lf -remote "send $id set ratios 1"
}}


map e np
map <lt>p set nopreview
map <lt>0 set ratios 1:2:3
map <lt>1 set ratios 1:2:1
map <lt>2 set ratios 1:1
map <lt>3 set ratios 2:1
map <lt>4 :oneforone
map <esc> clear
map <enter> shell
map H set hidden!
map d set dironly!
map r set reverse!

map TR :trash
map RR :reload
map RN rename
map P push :!echo<space>""<left>
map ; push ''
map K :rep "3" "up"
map J :rep "3" "down"
map Q &lf -remote 'send quit'; lf -remote 'quit'
map o &xdg-open "${f}"
map O $xdg-open --ask "${f}"

map e np
map H set hidden!
map TR :trash
map d set dironly!
map r set reverse!
map RR :reload
map RN rename
map P push :!echo<space>""<left>
map ; push ''
map K :rep "3" "up"
map J :rep "3" "down"
map Q &lf -remote 'send quit'; lf -remote 'quit'
map <esc> clear
map <enter> shell
map o &xdg-open "${f}"
map O $xdg-open --ask "${f}"
set sortby name

4 changes: 3 additions & 1 deletion nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ Plug 'wakatime/vim-wakatime'
" fzf finder
Plug 'junegunn/fzf.vim'

Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' }

call plug#end()
"<--------_G-VAR_<leader>f_from-:-lf
lua require('base')
Expand Down Expand Up @@ -255,7 +257,7 @@ function! CycleColorscheme(nextprevious)
for _ in g:myScheme
if current_scheme ==? _
let j = (i + (a:nextprevious)) % lenny
echo j . ' / ' . lenny
echo j . ' / ' . lenny . ' - ' . _
execute "colorscheme " g:myScheme[j]
execute g:mySpec[j]
syntax on
Expand Down
Loading

0 comments on commit 97e4975

Please sign in to comment.