Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # If you come from bash you might have to change your $PATH.
- export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
- # Path to your Oh My Zsh installation.
- export ZSH="$HOME/.oh-my-zsh"
- # Set name of the theme to load --- if set to "random", it will
- # load a random theme each time Oh My Zsh is loaded, in which case,
- # to know which specific one was loaded, run: echo $RANDOM_THEME
- # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
- ZSH_THEME="random"
- # Set list of themes to pick from when loading at random
- # Setting this variable when ZSH_THEME=random will cause zsh to load
- # a theme from this variable instead of looking in $ZSH/themes/
- # If set to an empty array, this variable will have no effect.
- # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
- # Uncomment the following line to use case-sensitive completion.
- # CASE_SENSITIVE="true"
- # Uncomment the followi64728abe9ced1337317a7d8777993ef8%ng line to use hyphen-insensitive completion.
- # Case-sensitive completion must be off. _ and - will be interchangeable.
- HYPHEN_INSENSITIVE="true"
- # Uncomment one of the following lines to change the auto-update behavior
- # zstyle ':omz:update' mode disabled # disable automatic updates
- zstyle ':omz:update' mode auto # update automatically without asking
- # zstyle ':omz:update' mode reminder # just remind me to update when it's time
- # Uncomment the following line to change how often to auto-update (in days).
- zstyle ':omz:update' frequency 7
- # Uncomment the following line if pasting URLs and other text is messed up.
- # DISABLE_MAGIC_FUNCTIONS="true"
- # Uncomment the following line to disable colors in ls.
- # DISABLE_LS_COLORS="true"
- # Uncomment the following line to disable auto-setting terminal title.
- DISABLE_AUTO_TITLE="true"
- # Uncomment the following line to enable command auto-correction.
- #ENABLE_CORRECTION="true"
- # Uncomment the following line to display red dots whilst waiting for completion.
- # You can also set it to another string to have that shown instead of the default red dots.
- # Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
- COMPLETION_WAITING_DOTS="true"
- COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
- # Uncomment the following line if you want to disable marking untracked files
- # under VCS as dirty. This makes repository status check for large repositories
- # much, much faster.
- DISABLE_UNTRACKED_FILES_DIRTY="true"
- # Uncomment the following line if you want to change the command execution time
- # stamp shown in the history command output.
- # You can set one of the optional three formats:
- # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
- # or set a custom format using the strftime function format specifications,
- # see 'man strftime' for details.
- HIST_STAMPS="%A %B %I:%Mpm"
- # Would you like to use another custom folder than $ZSH/custom?
- # ZSH_CUSTOM=/path/to/new-custom-folder
- # Which plugins would you like to load?
- # Standard plugins can be found in $ZSH/plugins/
- # Custom plugins may be added to $ZSH_CUSTOM/plugins/
- # Example format: plugins=(rails git textmate ruby lighthouse)
- # Add wisely, as too many plugins slow down shell startup.
- plugins=(git web-search sudo copyfile copypath )
- source $ZSH/oh-my-zsh.sh
- # User configuration
- # export MANPATH="/usr/local/man:$MANPATH"
- # You may need to manually set your language environment
- export LANG=en_US.UTF-8
- # Preferred editor for local and remote sessions
- if [[ -n $SSH_CONNECTION ]]; then
- export EDITOR='nano'
- else
- export EDITOR='tilde'
- fi
- #appmenu-gtk-module
- # Compilation flags
- # export ARCHFLAGS="-arch $(uname -m)"
- # Set personal aliases, overriding those provided by Oh My Zsh libs,FPATH=~/.rbenv/completions:"$FPATH"
- autoload -U compinit
- compinit
- # plugins, and themes. Aliases can be placed here, though Oh My Zsh
- # users are encouraged to define aliases within a top-level file in
- # the $ZSH_CUSTOM folder, with .zsh extension. Examples:
- # - $ZSH_CUSTOM/aliases.zsh
- # - $ZSH_CUSTOM/macos.zsh
- # For a full list of active aliases, run `alias`.
- #
- # Example aliases
- # alias zshconfig="mate ~/.zshrc"
- # alias ohmyzsh="mate ~/.oh-my-zsh"
- ########################################################################################
- ## BEGIN CUSTOM <[email protected]> ##
- ## AREA FOR FUNCTIONS AND ALIASES ITSolutions ##
- ########################################################################################
- ## START ##
- cpv() {
- gcp -rfLP --fix-filenames auto $
- }
- mvv() {
- rsync -a --no-group --no-owner --no-perms -cvzW --inplace -h --stats --force --trust-sender --fsync --ignore-errors --delete-after --remove-source-files --recursive --progress $
- }
- alias mv=mvv
- alias cp='cpv'
- quick-dir-list-server() {
- echo -e "Enter IP address from ifconfig: "
- read ADDR
- python3 -m http.server --bind $ADDR
- }
- alias quicklist='quick-dir-list-server'
- alias torb='cd ~/.torb; ./start-tor-browser.desktop && cd $HOME; clear'
- servstart() {
- echo -e "\n\nStart What Service: "
- read DRT
- sudo service $DRT start
- }
- servstop() {
- echo -e "\n\nStop What Service: "
- read DMTX
- sudo service $DMTX stop
- }
- alias sss='sudo service --status-all'
- alias ifc='ifconfig'
- alias imdone='sudo killall -u $(whoami)'
- alias smnt='sudo mount $'
- alias cno='cat ~/notes'
- alias myweather='wget en.wttr.in/ | tr "37.7440,-77.1316 " +; cat index.html; rm index.html'
- alias adbin='adb install $'
- alias nmpf='npm fund'
- alias nn='\cat - >> /home/$USER/notes'
- alias reinstall='sudo apt-get install --reinstall $'
- alias carmir='cat $HOME/.mir | xsel -ib'
- H() {
- cd $HOME
- }
- BIN() {
- cd $HOME/bin
- }
- DOWNLOADS() {
- cd $HOME/Downloads
- }
- MEDIA() {
- cd /media/$USER
- }
- DESKTOP() {
- cd $HOME/Desktop
- }
- alias h=H
- alias bin=BIN
- alias media=MEDIA
- alias desktop=DESKTOP
- alias dls=DOWNLOADS
- # Function to remove duplicate directories from the current PATH
- clean_current_path() {
- if [ -n "$PATH" ]; then
- local old_path="$PATH"
- # Convert PATH to an array, remove duplicates, and reassemble
- export PATH=$(echo "$PATH" | tr ':' '\n' | awk '!seen[$0]++ && NF' | paste -sd: -)
- if [ "$PATH" != "$old_path" ]; then
- echo "PATH has been cleaned."
- echo "Old PATH: $old_path"
- echo "New PATH: $PATH"
- echo "To make this permanent, edit your shell rc file (e.g., ~/.zshrc or ~/.bashrc)."
- else
- echo "PATH is already clean (no duplicates found)."
- fi
- else
- echo "PATH is not set."
- fi
- }
- # Function to identify duplicate alias definitions in ~/.zshrc
- # This helps you find aliases defined multiple times in your config file.
- find_duplicate_aliases_in_zshrc() {
- echo " Searching for duplicate alias definitions in ~/.zshrc..."
- local temp_alias_file
- temp_alias_file=$(mktemp "${TMPDIR:-/tmp}/zshrc_aliases.XXXXXX")
- # Extract alias names
- grep -E '^\salias\s+' "$HOME/.zshrc" | \
- sed -E 's/\s#.//' | \
- grep -E '^\salias\s+' | \
- sed -E 's/^\salias\s+([^=]+)=./\1/' | \
- sort > "$temp_alias_file"
- # Find duplicates
- local duplicates
- duplicates=$(uniq -d "$temp_alias_file")
- if [ -n "$duplicates" ]; then
- echo -e "\n Found potential duplicate alias definitions in ~/.zshrc:"
- echo "$duplicates" | sed 's/^/ → /'
- echo -e "\n Line numbers in ~/.zshrc:\n"
- while IFS= read -r alias_name; do
- [ -n "$alias_name" ] && {
- echo "--- Alias: '$alias_name' ---"
- grep -n --color=always -E "^\salias\s+${alias_name}=" "$HOME/.zshrc"
- echo ""
- }
- done <<< "$duplicates"
- else
- echo " No duplicate alias definitions found in ~/.zshrc."
- fi
- rm -f "$temp_alias_file"
- echo ""
- echo " Note: Zsh uses the last alias definition if multiple exist."
- echo "You can check currently active ones with the 'alias' command."
- }
- # Lines configured by zsh-newuser-install
- HISTFILE=~/.zsh_history
- HISTSIZE=1000000
- SAVEHIST=1000000
- bindkey -e
- alias cd -1='cd ..;clear;ls'
- alias cd -2='cd ..;cd ..;clear;ls'
- alias cd -3='cd ..;cd ..;cd ..;clear;ls'
- alias cd -4='cd ..;cd ..;cd ..;cd ..;clear;ls'
- alias cd -5='cd ..;cd ..;cd ..;cd ..;cd ..;clear;ls'
- alias 1='cd -1'
- alias 2='cd -2'
- alias 3='cd -3'
- alias 4='cd -4'
- alias 5='cd -5'
- alias 6='cd -6'
- alias 7='cd -7'
- alias 8='cd -8'
- alias 9='cd -9'
- reload1() {
- . $HOME/.zshrc
- cat $HOME/.zshrc
- }
- alias adbin='adb install '
- alias allpkgs='dpkg --get-selections | grep -v deinstall'
- alias c=clear
- alias x=exit
- alias which-command=whence
- alias sss='sudo service --status-all'
- alias smnt='sudo mount 'sdpkgi='sudo dpkg -i ""'
- alias nrc='\cat - >> /home/b3ar_/.zshrc; reload1'
- alias nn='\cat - >> /home/b3ar_/notes'
- alias catno='cat $HOME/notes'
- alias catrc='cat $HOME/.zshrc'
- alias _reload='reload1; echo -e "Hit [E]nter to continue: "; read NULLl; clear;ls'
- alias gedrc='gedit $HOME/.zshrc'
- alias s='sudo $*'
- alias clipc='clipcopy'
- alias clipp='clippaste'
- alias chx='chmod +x $*'
- alias rm='trash-put $*'
- 2DAV() {
- read FILE < <(zenity --file-selection)
- curl -u b3ar_:lol -a http://127.0.0.53/webdav/ --upload $FILE
- }
- alias sdpkgi='sudo dpkg -i $*'
- alias ITSpeed="/bin/speedtest"
- alias ..='cd ..;clear;ls'
- alias up2dav='2DAV'
- alias lsblkinfo='lsblk --output NAME,SERIAL,MODEL,TYPE,SIZE,FSAVAIL,FSTYPE,MOUNTPOINT,SUBSYSTEMS,VENDOR,TRAN,HCTL,WWN,PHY-SEC,LOG-SEC,ALIGNMENT,MODE,GROUP,OWNER,STATE,SIZE,HOTPLUG,PARTFLAGS,MOUNTPOINTS,FSROOTS,PATH,KNAME'
- isize() {
- FILE=$*
- du -ah $FILE
- }
- WINE() {
- cd $HOME/.wine
- }
- alias 2wine='WINE'
- export THEOS=~/theos
- alias gitc='git clone $*'
- alias sin=' sudo apt-get install -y $'
- ITS-GUI-CAT() {
- FILE="$*"
- cat "$FILE" | yad --title="ITS-GUI-CAT" \
- --height=850 --width=1500 \
- --text-info
- }
- alias cat=ITS-GUI-CAT
- alias open='xdg-open $*'
- eval "$(~/.rbenv/bin/rbenv init - --no-rehash zsh)"
- FPATH=~/.rbenv/completions:"$FPATH"
- autoload -U compinit
- compinit
Add Comment
Please, Sign In to add comment