added bashrc
This commit is contained in:
		
							parent
							
								
									bb1e5e4c87
								
							
						
					
					
						commit
						0c150719a9
					
				
							
								
								
									
										224
									
								
								.bashrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										224
									
								
								.bashrc
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,224 @@ | ||||
| # | ||||
| # ~/.bashrc | ||||
| # | ||||
| 
 | ||||
| #Ibus settings if you need them | ||||
| #type ibus-setup in terminal to change settings and start the daemon | ||||
| #delete the hashtags of the next lines and restart | ||||
| #export GTK_IM_MODULE=ibus | ||||
| #export XMODIFIERS=@im=dbus | ||||
| #export QT_IM_MODULE=ibus | ||||
| 
 | ||||
| # If not running interactively, don't do anything | ||||
| [[ $- != *i* ]] && return | ||||
| 
 | ||||
| export HISTCONTROL=ignoreboth:erasedups | ||||
| 
 | ||||
| PS1='[\u@\h \W]\$ ' | ||||
| 
 | ||||
| if [ -d "$HOME/.bin" ] ; | ||||
|   then PATH="$HOME/.bin:$PATH" | ||||
| fi | ||||
| 
 | ||||
| if [ -d "$HOME/.local/bin" ] ; | ||||
|   then PATH="$HOME/.local/bin:$PATH" | ||||
| fi | ||||
| 
 | ||||
| #ignore upper and lowercase when TAB completion | ||||
| bind "set completion-ignore-case on" | ||||
| 
 | ||||
| #list | ||||
| alias ls='ls --color=auto' | ||||
| alias la='ls -a' | ||||
| alias ll='ls -la' | ||||
| alias l='ls' | ||||
| alias l.="ls -A | egrep '^\.'" | ||||
| 
 | ||||
| #fix obvious typo's | ||||
| alias cd..='cd ..' | ||||
| alias pdw="pwd" | ||||
| alias udpate='sudo pacman -Syyu' | ||||
| alias upate='sudo pacman -Syyu' | ||||
| alias updte='sudo pacman -Syyu' | ||||
| alias updqte='sudo pacman -Syyu' | ||||
| 
 | ||||
| ## Colorize the grep command output for ease of use (good for log files)## | ||||
| alias grep='grep --color=auto' | ||||
| alias egrep='egrep --color=auto' | ||||
| alias fgrep='fgrep --color=auto' | ||||
| 
 | ||||
| #readable output | ||||
| alias df='df -h' | ||||
| 
 | ||||
| #pacman unlock | ||||
| alias unlock="sudo rm /var/lib/pacman/db.lck" | ||||
| alias rmpacmanlock="sudo rm /var/lib/pacman/db.lck" | ||||
| 
 | ||||
| #arcolinux logout unlock | ||||
| alias rmlogoutlock="sudo rm /tmp/arcologout.lock" | ||||
| 
 | ||||
| #free | ||||
| alias free="free -mt" | ||||
| 
 | ||||
| #use all cores | ||||
| alias uac="sh ~/.bin/main/000*" | ||||
| 
 | ||||
| #continue download | ||||
| alias wget="wget -c" | ||||
| 
 | ||||
| #userlist | ||||
| alias userlist="cut -d: -f1 /etc/passwd" | ||||
| 
 | ||||
| #merge new settings | ||||
| alias merge="xrdb -merge ~/.Xresources" | ||||
| 
 | ||||
| # Aliases for software managment | ||||
| # pacman or pm | ||||
| alias pacman='sudo pacman --color auto' | ||||
| alias update='sudo pacman -Syyu' | ||||
| 
 | ||||
| # yay as aur helper - updates everything | ||||
| alias pksyua="yay -Syu --noconfirm" | ||||
| alias upall="yay -Syu --noconfirm" | ||||
| 
 | ||||
| #ps | ||||
| alias psa="ps auxf" | ||||
| alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e" | ||||
| 
 | ||||
| #grub update | ||||
| alias update-grub="sudo grub-mkconfig -o /boot/grub/grub.cfg" | ||||
| 
 | ||||
| #add new fonts | ||||
| alias update-fc='sudo fc-cache -fv' | ||||
| 
 | ||||
| #copy/paste all content of /etc/skel over to home folder - backup of config created - beware | ||||
| alias skel='cp -Rf ~/.config ~/.config-backup-$(date +%Y.%m.%d-%H.%M.%S) && cp -rf /etc/skel/* ~' | ||||
| #backup contents of /etc/skel to hidden backup folder in home/user | ||||
| alias bupskel='cp -Rf /etc/skel ~/.skel-backup-$(date +%Y.%m.%d-%H.%M.%S)' | ||||
| 
 | ||||
| #copy bashrc-latest over on bashrc - cb= copy bashrc | ||||
| alias cb='sudo cp /etc/skel/.bashrc ~/.bashrc && source ~/.bashrc' | ||||
| #copy /etc/skel/.zshrc over on ~/.zshrc - cb= copy zshrc | ||||
| #alias cz='sudo cp /etc/skel/.zshrc ~/.zshrc && source ~/.zshrc' | ||||
| 
 | ||||
| #switch between bash and zsh | ||||
| alias tobash="sudo chsh $USER -s /bin/bash && echo 'Now log out.'" | ||||
| alias tozsh="sudo chsh $USER -s /bin/zsh && echo 'Now log out.'" | ||||
| 
 | ||||
| #quickly kill conkies | ||||
| alias kc='killall conky' | ||||
| 
 | ||||
| #hardware info --short | ||||
| alias hw="hwinfo --short" | ||||
| 
 | ||||
| #skip integrity check | ||||
| alias yayskip='yay -S --mflags --skipinteg' | ||||
| alias trizenskip='trizen -S --skipinteg' | ||||
| 
 | ||||
| #check vulnerabilities microcode | ||||
| alias microcode='grep . /sys/devices/system/cpu/vulnerabilities/*' | ||||
| 
 | ||||
| #get fastest mirrors in your neighborhood | ||||
| alias mirror="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist" | ||||
| alias mirrord="sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist" | ||||
| alias mirrors="sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist" | ||||
| alias mirrora="sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist" | ||||
| 
 | ||||
| #mounting the folder Public for exchange between host and guest on virtualbox | ||||
| alias vbm="sudo /usr/local/bin/arcolinux-vbox-share" | ||||
| 
 | ||||
| #shopt | ||||
| shopt -s autocd # change to named directory | ||||
| shopt -s cdspell # autocorrects cd misspellings | ||||
| shopt -s cmdhist # save multi-line commands in history as single line | ||||
| shopt -s dotglob | ||||
| shopt -s histappend # do not overwrite history | ||||
| shopt -s expand_aliases # expand aliases | ||||
| 
 | ||||
| #youtube-dl | ||||
| alias yta-aac="youtube-dl --extract-audio --audio-format aac " | ||||
| alias yta-best="youtube-dl --extract-audio --audio-format best " | ||||
| alias yta-flac="youtube-dl --extract-audio --audio-format flac " | ||||
| alias yta-m4a="youtube-dl --extract-audio --audio-format m4a " | ||||
| alias yta-mp3="youtube-dl --extract-audio --audio-format mp3 " | ||||
| alias yta-opus="youtube-dl --extract-audio --audio-format opus " | ||||
| alias yta-vorbis="youtube-dl --extract-audio --audio-format vorbis " | ||||
| alias yta-wav="youtube-dl --extract-audio --audio-format wav " | ||||
| 
 | ||||
| alias ytv-best="youtube-dl -f bestvideo+bestaudio " | ||||
| 
 | ||||
| #Recent Installed Packages | ||||
| alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl" | ||||
| alias riplong="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -3000 | nl" | ||||
| 
 | ||||
| #iso and version used to install ArcoLinux | ||||
| alias iso="cat /etc/dev-rel | awk -F '=' '/ISO/ {print $2}'" | ||||
| 
 | ||||
| #Cleanup orphaned packages | ||||
| alias cleanup='sudo pacman -Rns $(pacman -Qtdq)' | ||||
| 
 | ||||
| #get the error messages from journalctl | ||||
| alias jctl="journalctl -p 3 -xb" | ||||
| 
 | ||||
| #nano for important configuration files | ||||
| #know what you do in these files | ||||
| alias nlightdm="sudo nano /etc/lightdm/lightdm.conf" | ||||
| alias npacman="sudo nano /etc/pacman.conf" | ||||
| alias ngrub="sudo nano /etc/default/grub" | ||||
| alias nmkinitcpio="sudo nano /etc/mkinitcpio.conf" | ||||
| alias nslim="sudo nano /etc/slim.conf" | ||||
| alias noblogout="sudo nano /etc/oblogout.conf" | ||||
| alias nmirrorlist="sudo nano /etc/pacman.d/mirrorlist" | ||||
| alias nconfgrub="sudo nano /boot/grub/grub.cfg" | ||||
| alias bls="betterlockscreen -u /usr/share/backgrounds/arcolinux/" | ||||
| 
 | ||||
| #gpg | ||||
| #verify signature for isos | ||||
| alias gpg-check="gpg2 --keyserver-options auto-key-retrieve --verify" | ||||
| #receive the key of a developer | ||||
| alias gpg-retrieve="gpg2 --keyserver-options auto-key-retrieve --receive-keys" | ||||
| 
 | ||||
| #maintenance | ||||
| alias big="expac -H M '%m\t%n' | sort -h | nl" | ||||
| alias downgrada="downgrade --ala-url 'https://bike.seedhost.eu/arcolinux/'" | ||||
| 
 | ||||
| #systeminfo | ||||
| alias probe="sudo -E hw-probe -all -upload" | ||||
| 
 | ||||
| #shutdown or reboot | ||||
| alias ssn="sudo shutdown now" | ||||
| alias sr="sudo reboot" | ||||
| 
 | ||||
| # # ex = EXtractor for all kinds of archives | ||||
| # # usage: ex <file> | ||||
| ex () | ||||
| { | ||||
|   if [ -f $1 ] ; then | ||||
|     case $1 in | ||||
|       *.tar.bz2)   tar xjf $1   ;; | ||||
|       *.tar.gz)    tar xzf $1   ;; | ||||
|       *.bz2)       bunzip2 $1   ;; | ||||
|       *.rar)       unrar x $1   ;; | ||||
|       *.gz)        gunzip $1    ;; | ||||
|       *.tar)       tar xf $1    ;; | ||||
|       *.tbz2)      tar xjf $1   ;; | ||||
|       *.tgz)       tar xzf $1   ;; | ||||
|       *.zip)       unzip $1     ;; | ||||
|       *.Z)         uncompress $1;; | ||||
|       *.7z)        7z x $1      ;; | ||||
|       *.deb)       ar x $1      ;; | ||||
|       *.tar.xz)    tar xf $1    ;; | ||||
|       *.tar.zst)   unzstd $1    ;; | ||||
|       *)           echo "'$1' cannot be extracted via ex()" ;; | ||||
|     esac | ||||
|   else | ||||
|     echo "'$1' is not a valid file" | ||||
|   fi | ||||
| } | ||||
| 
 | ||||
| #create a file called .bashrc-personal and put all your personal aliases | ||||
| #in there. They will not be overwritten by skel. | ||||
| 
 | ||||
| [[ -f ~/.bashrc-personal ]] && . ~/.bashrc-personal | ||||
| 
 | ||||
| neofetch | ||||
| @ -12,7 +12,9 @@ sudo pacman -S kitty i3-gaps picom polybar nitrogen --noconfirm | ||||
| 
 | ||||
| mkdir ~/.config/kitty ~/.config/i3 ~/.config/picom ~/.config/polybar | ||||
| 
 | ||||
| cp .config/kitty/kitty.conf ~/.config/kitty/kitty.conf | ||||
| cp .config/i3/config-laptop ~/.config/i3/config | ||||
| cp .config/picom/picom.conf ~/.config/picom/picom.conf | ||||
| cp .config/polybar/config-laptop ~/.config/polybar/config | ||||
| cp ../.config/kitty/kitty.conf ~/.config/kitty/kitty.conf | ||||
| cp ../.config/i3/config-laptop ~/.config/i3/config | ||||
| cp ../.config/picom/picom.conf ~/.config/picom/picom.conf | ||||
| cp ../.config/polybar/config-laptop ~/.config/polybar/config | ||||
| 
 | ||||
| cp ../.bashrc ~/.bashrc | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Luddifee
						Luddifee