147 lines
		
	
	
		
			4.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
			
		
		
	
	
			147 lines
		
	
	
		
			4.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| ### Custom Alias File 
 | |
| ##  sourced by .zshrc
 | |
| 
 | |
| # Aliases
 | |
| alias grep='grep --color=auto'
 | |
| alias ec="$EDITOR $HOME/.zshrc" # edit .zshrc
 | |
| alias sc="source $HOME/.zshrc"  # reload zsh configuration
 | |
| #alias cp="cp -i"                                                # Confirm before overwriting something
 | |
| alias df='df -h'                                                # Human-readable sizes
 | |
| alias free='free -m'                                            # Show sizes in MB
 | |
| 
 | |
| 
 | |
| ### Check on free space and overgrowing files
 | |
| alias freespace="sudo du -h /* --exclude={'proc','run'}| sort -hr | less"
 | |
| 
 | |
| 
 | |
| ### Get system info via inxi [use -z for private filters]
 | |
| alias sysinfo="sudo inxi -FdfiJlmopru -W 75013 -xxx -t && echo -e ' \n' && systemd-analyze"
 | |
| 
 | |
| 
 | |
| ### EXA
 | |
| export EXA_COLORS="uu=38;5;42:di=38;5;33:fi=38;5;183:ex=38;5;125:sn=38;5;13:sb=38;5;13:uw=38;5;91:gw=38;5;91:tw=38;5;91:ur=38;5;11:gr=38;5;11:tr=38;5;11:ux=38;5;42:gx=38;5;42:tx=38;5;42:ue=38;5;42"
 | |
| export EXA_ICON_SPACING=1
 | |
| alias ls='exa --icons --color always'                                             # ls
 | |
| alias ll='exa -lbGFa --git --icons --color always'                              # long list
 | |
| alias llm='exa -lbGF --git --sort=modified'                                     # long list, modified date sort
 | |
| alias la='exa -bGFa --git --color always --icons'                               # shorter all list
 | |
| alias lla='exa -lbhHigUmuSa --time-style=long-iso --git --color-scale --icons'  # longer all list
 | |
| alias lx='exa -lbhHigUmuSa@ --time-style=long-iso --git --color-scale'          # all
 | |
| 
 | |
| 
 | |
| ### BAT
 | |
| export BAT_THEME="Dracula"
 | |
| export BAT_STYLE="full"
 | |
| alias cat='bat'
 | |
| 
 | |
| 
 | |
| ### COPYFILE
 | |
| # cpy() {
 | |
| #     xclip -sel c "$@" && echo -e "\n\"$@\" was copied to the clipboard\n"
 | |
| # }
 | |
| 
 | |
| ### COPYFILE WAYLAND
 | |
| cpy(){
 | |
| 	cat "$@" | wl-copy && echo -e "\n\"$@\" was copied to the clipboard\n"
 | |
| }
 | |
| 
 | |
| 
 | |
| ### Fuzzy History Finder utility
 | |
| fhf() {
 | |
| 	cat $HOME/.histfile |
 | |
| 	fzf --scheme=history \
 | |
| 	--cycle \
 | |
| 	--border=double \
 | |
| 	--border-label="| Command History |" \
 | |
| 	--margin=2,20,2,20 \
 | |
| 	--padding=0,10,0,22 \
 | |
| 	--height=60% \
 | |
|   	--color='fg+:15,fg:42,hl+:134,hl:123,query:134,gutter:0,label:134,border:134,prompt:15,pointer:15,marker:15,header:123' \
 | |
| 	--prompt=' ' \
 | |
|   	--pointer=' ' \
 | |
| 	--header="Select command to copy" \
 | |
| 	--info=hidden \
 | |
| 	--no-scrollbar \
 | |
| 	--reverse \
 | |
| 	--tac |
 | |
| 	tr -d '\n' |
 | |
| 	#xclip -sel c
 | |
| 	wl-copy 
 | |
| }
 | |
| 
 | |
| 
 | |
| ###	Fuzzy Man Finder utility
 | |
| fmf() {
 | |
| 	man -k . | 
 | |
| 	sort - |
 | |
| 	fzf -q "$1" +m \
 | |
| 	--cycle \
 | |
| 	--reverse \
 | |
|   	--color='fg+:15,fg:42,hl+:134,hl:123,query:134,gutter:0,label:134,border:134,prompt:15,pointer:15,marker:15,header:123' \
 | |
| 	--prompt=' ' \
 | |
|   	--pointer=' ' \
 | |
|   	--tiebreak=begin,chunk,length \
 | |
| 	--preview="echo -e '\n\t\t\t\t   \033[4mCHEAT SHEET:\033[0m\n'; cheat {1}; echo -e '\n\t\t\t\t      \033[4mTLDR:\033[0m\n'; tldr {1}; echo -e '\n\t\t\t\t  \033[4mMANUAL PAGE:\033[0m\n'; man -Hw3m {1} 2> /dev/null" \
 | |
| 	--preview-window=62%:wrap:border-rounded \
 | |
| 	--preview-label="| Manual Entry |"
 | |
| }
 | |
| 
 | |
| ### Fuzzy Cheatsheat utility (WIP may replace fmf)
 | |
| \?() {
 | |
| 	curl -s cheat.sh/:list > /tmp/cheatlist
 | |
| 	fzf --preview='curl -s cheat.sh/{}; echo; man -Hw3m {} 2> /dev/null' \
 | |
| 		--bind=ctrl-h:preview:'curl -s cheat.sh/:help' \
 | |
| 		--preview-window=62%:wrap:border-rounded \
 | |
| 		--color='fg+:15,fg:42,hl+:134,hl:123,query:134,gutter:0,label:134,border:134,prompt:15,pointer:15,marker:15,header:123' \
 | |
| 		--tiebreak=begin,chunk,length \
 | |
| 		--reverse \
 | |
| 		--cycle \
 | |
| 		--prompt=' ' \
 | |
| 	  	--pointer=' ' \
 | |
| 		< /tmp/cheatlist
 | |
| }
 | |
| 
 | |
| 
 | |
| ### Emoji selector
 | |
| emojis() {
 | |
| 	emojis=$(curl -sSL 'https://git.io/JXXO7')
 | |
| 	echo $emojis |
 | |
| 	# fzf --cycle \
 | |
| 	# --border=double \
 | |
| 	# --border-label="| Emoji Selector |" \
 | |
| 	# --margin=2,20,2,20 \
 | |
| 	# --padding=0,10,0,22 \
 | |
| 	# --height=60% \
 | |
|   	# --color='fg+:15,fg:42,hl+:134,hl:123,query:134,gutter:0,label:134,border:134,prompt:15,pointer:15,marker:15,header:123' \
 | |
| 	# --prompt=' ' \
 | |
|   	# --pointer=' ' \
 | |
| 	# --header="Select emoji to copy" \
 | |
| 	# --info=hidden \
 | |
| 	# --no-scrollbar \
 | |
| 	# --tiebreak=begin,chunk,length \
 | |
| 	# --reverse |
 | |
| 	wofi -dmenu 
 | |
| 	awk '{print $1}' |
 | |
| 	tr -d '\n' |
 | |
| 	# xclip -sel c
 | |
| 	wl-copy 	
 | |
| }
 | |
| 
 | |
| 
 | |
| ### Test terminal color codes and visual appearance
 | |
| alias colors="curl -s https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/ | bash"
 | |
| 
 | |
| 
 | |
| ### Launch PowerShell w fancy ps1
 | |
| alias pwsh="pwsh -NoExit -c /home/ez/OMP/pwshPromt.ps1"
 | |
| 
 | |
| 
 | |
| ### Pacnew file maintenance with pacdiff using meld
 | |
| alias pacnew="sudo DIFFPROG=meld pacdiff"
 | |
| 
 | |
| 
 | |
| ### IM A CHILD
 | |
| 🖕() {
 | |
| 	echo -e "\n\t\t🖕\n\tFuck you too, bud\n"
 | |
| }
 |