Page 5 of 18 FirstFirst ... 3456715 ... LastLast
Results 41 to 50 of 173

Thread: Show us your .bashrc!

  1. #41
    Join Date
    Aug 2007
    Beans
    2,132

    Re: Show us your .bashrc!

    Mostly pirated from this thread, but it does what I need

    Code:
    #bashrc
    #cardinals_fan
    #3/6/2008
    
    alias ll="ls -al --color"
    alias nautilus="nautilus --no-desktop"
    alias aterm="aterm -fg white -tr"
    export PS1='\u[\W]\$ '
    export PAGER="most"
    
    #aliases
    alias cdperl='cd /home/jesse/Desktop/Programs/Perl\!\!\!\!\!/'
    alias cdphoto='cd /home/jesse/Documents\ \&\ Other\ Cool\ Stuff/Pictures/Photos/'
    alias zenpanel='gksu zenpanel'
    alias gslapt='gksu gslapt'
    alias settings='xfce-setting-show'
    alias conkyreset='killall -SIGUSR1 conky'
    
    #extracter
    extract () {
         if [ -f $1 ] ; then
             case $1 in
                 *.tar.bz2)   tar xjf $1        ;;
                 *.tar.gz)    tar xzf $1     ;;
                 *.bz2)       bunzip2 $1       ;;
                 *.rar)       rar 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    ;;
                 *)           echo "'$1' cannot be extracted via extract()" ;;
             esac
         else
             echo "'$1' is not a valid file"
         fi
    }
    
    # Define a few Colours
    BLACK='\e[0;30m'
    BLUE='\e[0;34m'
    GREEN='\e[0;32m'
    CYAN='\e[0;36m'
    RED='\e[0;31m'
    PURPLE='\e[0;35m'
    BROWN='\e[0;33m'
    LIGHTGRAY='\e[0;37m'
    DARKGRAY='\e[1;30m'
    LIGHTBLUE='\e[1;34m'
    LIGHTGREEN='\e[1;32m'
    LIGHTRED='\e[1;31m'
    LIGHTPURPLE='\e[1;35m'
    YELLOW='\e[1;33m'
    WHITE='\e[1;37m'
    NC='\e[0m' # No Color
    
    # WELCOME SCREEN
    
    clear
    
    echo -ne "${LIGHTGREEN}""Hello, $USER. today is, "; date
    echo -e "${LIGHTGREEN}"; cal ;
    echo -e "${WHITE}"; uname -a ;
    echo ""
    Screenshot:
    Attached Images Attached Images

  2. #42
    Join Date
    Oct 2006
    Location
    Kansas City
    Beans
    1,509
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Show us your .bashrc!

    Quote Originally Posted by ayoli View Post
    I thought it was impossible to have a bash prompt as fancy as zsh's ones, but I've found a way
    The whole article is here :
    http://ayozone.org/2008/02/25/bash-f...d-improvments/
    and the bashrc file (you'll have to rename it) :
    http://ayozone.org/wp-content/upload.../02/bashrc.txt
    Great article and prompt, but i have one problem...
    Its filling with blocks... here's a screenshot with the terminal open and the relevant section of my bashrc since im sure copy paste will just display wonky characters...

    Also, any suggestions on getting that bad boy to work in eterm at all??? eterm apaprently REALLY doesnt like those characters
    EDIT: ok, so switching from konsole to rxvt-unicode solved that issue, any reason why konsole is having trouble though???
    Attached Images Attached Images
    Last edited by Nythain; March 12th, 2008 at 06:24 PM. Reason: semi answered

  3. #43
    Join Date
    Jun 2006
    Location
    Millau, France
    Beans
    1,492
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Show us your .bashrc!

    Quote Originally Posted by Nythain View Post
    Great article and prompt, but i have one problem...
    Its filling with blocks... here's a screenshot with the terminal open and the relevant section of my bashrc since im sure copy paste will just display wonky characters...

    Also, any suggestions on getting that bad boy to work in eterm at all??? eterm apaprently REALLY doesnt like those characters
    Actually, I only tested this in gnome-terminal, a known issue is that it doesn't work with many polices (the better one is monospace).
    The strange thing in your screenshot is that the char that draw the lines work every where but not in the fill.
    I'll try to find a fix for that.
    edit : I think it can work only in term that can use truetype fonts (eterm doesn't afaik)
    Last edited by ayoli; March 12th, 2008 at 06:01 PM.

  4. #44
    Join Date
    Oct 2006
    Location
    Kansas City
    Beans
    1,509
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Show us your .bashrc!

    yeah, its really odd, especially since the opening and trailing -'s display right, just not the fill one, and that it works in rxvt-unicode and gnome-terminal, but not was wonky in konsole (i tried changing from PixelCarnageMonoTT to Monospace and had the same problem) but its really cool, because it forced me to figure out how to set up rxvt-unicode to do what i want

    the only reason i defaulted to Eterm to begin with was because i was more familiar with it... i like rxvt better now

  5. #45
    Join Date
    Aug 2007
    Location
    Torrington, Wyoming
    Beans
    372
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Show us your .bashrc!

    I have my first bash custom set up.

    Code:
    # Sample .bashrc for SuSE Linux
    # Copyright (c) SuSE GmbH Nuernberg
    
    # There are 3 different types of shells in bash: the login shell, normal shell
    # and interactive shell. Login shells read ~/.profile and interactive shells
    # read ~/.bashrc; in our setup, /etc/profile sources ~/.bashrc - thus all
    # settings made here will also take effect in a login shell.
    #
    # NOTE: It is recommended to make language settings in ~/.profile rather than
    # here, since multilingual X sessions would not work properly if LANG is over-
    # ridden in every subshell.
    
    # Some applications read the EDITOR variable to determine your favourite text
    # editor. So uncomment the line below and enter the editor of your choice :-)
    #export EDITOR=/usr/bin/vim
    export EDITOR=/usr/bin/gedit
    
    # For some news readers it makes sense to specify the NEWSSERVER variable here
    #export NEWSSERVER=your.news.server
    
    # If you want to use a Palm device with Linux, uncomment the two lines below.
    # For some (older) Palm Pilots, you might need to set a lower baud rate
    # e.g. 57600 or 38400; lowest is 9600 (very slow!)
    #
    #export PILOTPORT=/dev/pilot
    #export PILOTRATE=115200
    
    PS1='\[\e[01;36m\]Welcome Lostincyberspace \@ \w: \[\e[m\]\[\e[1;37m\]'
    alias cdpic='cd /home/lee/Pictures/'
    alias cdmedia='cd /home/media/'
    alias cddata='cd /home/data/'
    alias cdfat='cd /home/media/fat/'
    alias sl='ls'
    alias cdd='cd /home/lee/Desktop/'
    test -s ~/.alias && . ~/.alias || true
    すべてと、そして、すべてへのリナックスは自由を鳴らせました。
    Linux to all, and to all, let freedom ring.

  6. #46
    Join Date
    Jun 2006
    Location
    Millau, France
    Beans
    1,492
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Show us your .bashrc!

    Quote Originally Posted by Nythain View Post
    yeah, its really odd, especially since the opening and trailing -'s display right, just not the fill one, and that it works in rxvt-unicode and gnome-terminal, but not was wonky in konsole (i tried changing from PixelCarnageMonoTT to Monospace and had the same problem) but its really cool, because it forced me to figure out how to set up rxvt-unicode to do what i want

    the only reason i defaulted to Eterm to begin with was because i was more familiar with it... i like rxvt better now
    glad to know you've managed this
    and thanks for your feedback, I'll add a note about working and non working terms in my article based on your feedback.

  7. #47
    Join Date
    Sep 2007
    Beans
    Hidden!

    Re: Show us your .bashrc!

    @ urukrama - Great thread, I'm learning something new.

    Quote Originally Posted by corney91 View Post
    Here's a handy one for conky:
    Code:
    alias conkyreset='killall -SIGUSR1 conky'
    It resets conky from the config, so you don't have to go through killing and restarting after making a minor adjustment.
    Doesn't work for me. I only changed one thing:

    Code:
    alias kiacs='killall -SIGUSR1 conky'
    meaning KilledInActionConkyStart

    Conky doesn't stop or restart
    Code:
    bruloo@bruloo:~$ kiacs
    bruloo@bruloo:~$
    Normally I use:

    Code:
    killall conky
    ./.startconky
    Just what is: -SIGUSR1

    In layman terms please, I'm a green bean here.

    Bruce

  8. #48
    Join Date
    Apr 2007
    Location
    Derby, UK
    Beans
    228

    Re: Show us your .bashrc!

    Quote Originally Posted by Bruce M. View Post

    Just what is: -SIGUSR1

    In layman terms please, I'm a green bean here.
    I believe it just means 'reload config'
    Last.fm | Linux User#449102 | Ubuntu User#15213
    NEVER type a command you don't understand eg. sudo rm -rf / or something similar
    Learn about them here or here.

  9. #49
    Join Date
    Jul 2007
    Location
    /earth/USA/WA/Spokane
    Beans
    299
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Show us your .bashrc!

    http://ubuntuforums.org/showthread.php?t=616875
    Already an epic thread on this subject.
    Ubuntu User # 17031
    Quote Originally Posted by RAV TUX View Post
    who needs support when you use Linux.
    Quote Originally Posted by asjdfwejqrfjcvm msz34rq33 View Post
    Open-Source: The power to create completely useless, but extremely cool, programs.

  10. #50
    Join Date
    Sep 2007
    Beans
    Hidden!

    Re: Show us your .bashrc!

    Quote Originally Posted by corney91 View Post
    I believe it just means 'reload config'
    But it's not doing anything that I can see.

    EDIT: From file:///usr/share/doc/conky/docs.html
    You Should Know

    An easy way to force Conky to reload your ~/.conkyrc: "killall -SIGUSR1 conky". Saves you the trouble of having to kill and then restart.
    Wherein lies my problem I think, I'm not using ~/.conkyrc

    So I changed the alias I have ( conky in action):

    Code:
    alias cia='killall conky && ./.startconky'
    Last edited by Bruce M.; March 13th, 2008 at 10:31 PM.

Page 5 of 18 FirstFirst ... 3456715 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •