Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # alias zenity='yad --text-info --title "$(yad --title "Title New GUI Box What")" --height=450 width=125'
- # alias yad='yad --text-info --title "$(yad --title "Title New GUI Box What")" --height=450 width=125'
- # ~/.bashrc: executed by bash(1) for non-login shells.
- # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
- # for examples
- # If not running interactively, don't do anything
- case $- in
- *i*) ;;
- *) return;;
- esac
- # don't put duplicate lines or lines starting with space in the history.
- # See bash(1) for more options
- HISTCONTROL=ignoreboth
- # append to the history file, don't overwrite it
- shopt -s histappend
- # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
- HISTSIZE=1000
- HISTFILESIZE=2000
- # check the window size after each command and, if necessary,
- # update the values of LINES and COLUMNS.
- shopt -s checkwinsize
- # If set, the pattern "**" used in a pathname expansion context will
- # match all files and zero or more directories and subdirectories.
- #shopt -s globstar
- # make less more friendly for non-text input files, see lesspipe(1)
- [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
- # set variable identifying the chroot you work in (used in the prompt below)
- if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
- debian_chroot=$(cat /etc/debian_chroot)
- fi
- # set a fancy prompt (non-color, unless we know we "want" color)
- case "$TERM" in
- xterm|xterm-color|*-256color) color_prompt=yes;;
- esac
- # uncomment for a colored prompt, if the terminal has the capability; turned
- # off by default to not distract the user: the focus in a terminal window
- # should be on the output of commands, not on the prompt
- #force_color_prompt=yes
- if [ -n "$force_color_prompt" ]; then
- if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
- # We have color support; assume it's compliant with Ecma-48
- # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
- # a case would tend to support setf rather than setaf.)
- color_prompt=yes
- else
- color_prompt=
- fi
- fi
- if [ "$color_prompt" = yes ]; then
- if [[ ${EUID} == 0 ]] ; then
- PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
- else
- PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w \$\[\033[00m\] '
- fi
- else
- PS1='${debian_chroot:+($debian_chroot)}\u@\h \w \$ '
- fi
- unset color_prompt force_color_prompt
- # If this is an xterm set the title to user@host:dir
- case "$TERM" in
- xterm*|rxvt*)
- PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h \w\a\]$PS1"
- ;;
- *)
- ;;
- esac
- # enable color support of ls and also add handy aliases
- if [ -x /usr/bin/dircolors ]; then
- test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
- #alias ls='ls --color=auto'
- #alias dir='dir --color=auto'
- #alias vdir='vdir --color=auto'
- alias grep='grep --color=auto'
- alias fgrep='fgrep --color=auto'
- alias egrep='egrep --color=auto'
- fi
- # colored GCC warnings and errors
- #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
- # some more ls aliases
- alias ll='ls -alF'
- alias la='ls -A'
- alias l='ls -CF'
- # Add an "alert" alias for long running commands. Use like so:
- # sleep 10; alert
- alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
- # Alias definitions.
- # You may want to put all your additions into a separate file like
- # ~/.bash_aliases, instead of adding them here directly.
- # See /usr/share/doc/bash-doc/examples in the bash-doc package.
- if [ -f ~/.bash_aliases ]; then
- . ~/.bash_aliases
- fi
- # enable programmable completion features (you don't need to enable
- # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
- # sources /etc/bash.bashrc).
- if ! shopt -oq posix; then
- if [ -f /usr/share/bash-completion/bash_completion ]; then
- . /usr/share/bash-completion/bash_completion
- elif [ -f /etc/bash_completion ]; then
- . /etc/bash_completion
- fi
- fi
- if [ -x /usr/bin/mint-fortune ]; then
- /usr/bin/mint-fortune
- fi
- #########################
- # START PERSONALIZATION #
- #########################
- alias apt='aptitude'
- alias apt-get='aptitude'
- export PATH=$HOME/bin:/usr/local/bin:$PATH
- #########################
- # START PERSONALIZATION #
- #########################
- new_clear() {
- \clear
- \ls
- echo Current Working Directory = ''$(pwd)''
- }
- alias c='new_clear'
- alias ls='ls --color='always' -h -S'
- new_backdir() {
- \clear
- \cd ..
- \ls
- echo Current Working Directory = '$(pwd)'
- }
- alias ..='new_backdir'
- new_cd() {
- \clear
- cd $*
- \ls
- echo Current Working Directory = '$(pwd)'
- }
- alias cd='new_cd'
- alias media='"/media/$(whoami)/$(\ls /media/$(whoami)/ | zenity --list --column "Choose Folder")"'
- aptg1() {
- echo -e "CHOICES: \n1) Update \n2) Upgrade \n3) Dist-Upgrade \n4) Apt Search \n5) Apt Download .deb [no install] \n6) Apt Autoclean && Autoremove \n7) Install a .deb With apt-get"
- read n
- case $n in
- 1) sudo apt-get -y update ;;
- 2) sudo apt-get -y upgrade ;;
- 3) sudo apt-get -y dist-upgrade ;;
- 4) echo "Search What: "; read SRC; apt search '$SRC' ;;
- 5) echo "Download What .deb: "; read DEB; sudo apt-get -y download $DEB ;;
- 6) sudo apt-get -y autoremove && sudo apt-get -y clean ;;
- 7) echo "Install What:"; read SIN ; sudo apt-get -y install $SIN ;;
- *) invalid option ;;
- esac
- }
- sin() {
- echo -e "\nInstall What: "
- read INS
- sudo apt-get -y install $INS
- }
- httpserver() {
- echo ""
- echo ""
- echo -e "You can Enter Any Begining [root] Directory To Start This Server, [press [E]nter to (c)ontinue: ]"
- read NULL
- echo ""
- echo ""
- echo "Checking Filesystem........ "
- sleep 2
- echo ""
- echo -e "\nPlease Now Enter Begining Directory For Server: "
- read SRVROOT
- echo -e "Specify A 4 Digit Number For The Port: "
- read PRT
- echo -e "Automatic Showing Of index.html On Or Off: \npress {Y}es or {N}o\n"
- read ANS
- if [[ $ANS == y ]]; then
- shttps --index -u -p $PRT $SRVROOT
- fi
- if [[ $ANS == n ]]; then
- shttps -u -p $PRT $SRVROOT
- fi
- }
- new_bash() {
- echo -e "\nBash Aliases, are formated \n like so, for example," | yad --width 500 --height 100 --title "New Bash-rc" --text-info
- echo -e "alias x='exit' \nSo for the formula we use \nalias abbreviation=definition" | yad --width 500 --height 100 --title "New Bash-rc" --text-info
- echo -e "So Lets Begin With ABREV, \n I have Already set the pre alias command" | yad --width 500 --height 100 --title "New Bash-rc" --text-info
- read ABREV
- echo -e "Okay Now The definition, \nAnd I will Give You A Graphical" | yad --title "New Bash-rc" --text-info
- echo -e "Interface to use, \nSo use as much room as you need" | yad --title "New Bash-rc" --text-info
- echo "alias "$(yad --width 500 --height 100 --title "New Bash-rc" --text-info --editable --button="Please Define The Aliases Abreviation"
- )"='$(kdialog --title='ImPerial TeK Solutions' --inputbox='Define Alias Command')'" >> $HOME/.bashrc
- cat $HOME/.bashrc
- }
- bookmarkurl() {
- URL="$(kdialog --title=Bookmarks --inputbox=URL/Files)"
- echo -e "\n`date` \n$URL" >> $HOME/bookmarks-url
- \cat $HOME/bookmarks-url
- }
- tarcz() {
- clear
- sudo tar czf "$(yad --title "Name New .tar.gz" --entry --width 500 --height 100)".tar.gz "$(yad --file-selection --directory)"
- }
- updupg() {
- sudo apt update -y
- sudo apt upgrade -y
- sudo apt dist-upgrade -y
- sudo apt-get -y update
- sudo apt-get -y upgrade
- sudo apt-get -y dist-upgrade
- sudo aptitude update
- sudo aptitude upgrade
- sudo aptitude dist-upgrade
- sudo apt clean
- sudo apt autoremove
- sudo apt-get -y clean
- sudo apt-get -y autoremove
- }
- transfer() { if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi
- tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; }
- nap() {
- echo -e "\nChoose any Video, \nFile by it Self, \nOr Directory, \nTo Play playlist, \n No Audio Video Player: \n"
- read PLY
- mpv --no-audio "$PLY"
- }
- new_rm() {
- sudo rm -R ./$@
- }
- white='\033[0m'
- red='\033[31m'
- green='\033[32m'
- orange='\033[33m'
- blue='\033[34m'
- blink='\e[5m'
- purple='\033[35m'
- cyan='\033[36m'
- gray='\033[37m'
- #############
- # PS1 == ?? #
- #############
- alias x='exit'
- alias h='cd $HOME'
- alias m='cd $MHOME'
- alias newb='new_bash'
- alias aptg='aptg1'
- alias a='alias'
- alias bmu='bookmarkurl'
- alias chx='chmod +x "$(ls . | zenity --list --column Files"'
- alias czf='tarcz'
- export MHOME='/media/$(whoami)/MISC.'
- alias media='"/media/$(whoami)/$(\ls /media/$(whoami)/ | zenity --list --column "Choose Folder")"'
- export MHOMEX='/media/$(whoami)/XVIDS'
- export MHOMEMUSIC='/media/$(whoami)/MUSIC'
- export MHOMEM='/media/$(whoami)/MOVIES'
- alias az='aptg'
- alias rm='new_rm'
- alias wspace='sudo bash /home/$(whoami)/bin/whitespace'
- alias catgui='kdialog --textbox $(ls . | zenity --list --column "Choose File To Cat") 512 286'
- alias zshrc='nano $HOME/.zshrc'
- alias fullup='updupg'
- alias gdl='drive download "$(kdialog --title "Copy/Paste Items ID #" --inputbox "File/Directorys ID")"'
- alias gup='drive upload $(ls | zenity --list --column "Choose File To Upload")'
- alias gupdir='drive upload --recursive $(kdialog --getexistingdirectory /)'
- alias smp='smplayer $(kdialog --title "Choose Directory For play-list; " --getexistingdirectory / )'
- alias nmp='mpv --no-video "$(kdialog --title "Choose Folder" --getexistingdirectory /)"'
- alias unz='unzip *.zip'
- alias ifc='ifconfig'
- alias mvp='mpv --no-audio "$(kdialog --title "Choose Folder" --getexistingdirectory /)"'
- alias calc='gnome-calculator'
- alias edit='xed $*'
- alias gdlir='drive download --recursive "$(kdialog --title "Copy/Paste Items ID #" --inputbox "File/Directorys ID")"'
- alias new_note='\echo -e "`yad --title "Add Notes" --entry`" >> ~/notes; cat ~/notes'
- alias ytv='youtube-viewer'
- alias xdgo='xdg-open $*'alias youtube-dl='youtube-dl --prefer-ffmpeg'
- alias a='\ls -x -lah -w 5 --color='always' --sort='size' $*'
- alias fbin='chmod +x /home/$USER/bin/*'
- alias ownbin='sudo -u "$(whoami)" chown -R "$(whoami)" /home/"$(whoami)"/bin'
- alias ac='\clear'
- PS1="\n\033[1mITS \033[04m<\@>\n\033[02m>>\033[000m\nCurrent Directory=<\w>\n\033[m\d>> \n>"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement