Advertisement
noes1s

BlackBuntu's Theme r12

Jul 5th, 2011
585
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 8.80 KB | None | 0 0
  1. #!/bin/bash
  2. #  ,___    
  3. #  ¡  _`    BlackBuntu's Theme
  4. #  ª_/()    noes1s
  5. #  |\` `,   http://pastebin.com/u/noes1s
  6. # _·'   l   CC BY-SA 3.0
  7.  
  8. # Included: Icons, bashrc, wallpaper, mouse, gtk, metacity, fonts, terminal, gedit.
  9.  
  10. ! ((UID)) && echo -e "\n\e[1;31m"' (!) '"Dont use 'sudo'\e[m\n" && exit 1
  11.  
  12. clear
  13. echo -e "\n\e[1;32m BlackBuntu's Theme Setup\e[m"
  14. echo -e "\e[1;31m ________________________\e[m"
  15.  
  16. echo -e "\n\e[33m Checking internet connection...\e[m"
  17. { ping -w1c1 8.8.8.8 || ping -w1c1 8.8.4.4 || ping -w1c1 4.2.2.1 ;} >/dev/null &&
  18. echo -e "\e[32m Connection available.\e[m" || {
  19. echo -e "\n\e[1;31m"' (!) '"Ping failed, connect to internet and try again.\e[m\n" && exit 1 ;}
  20.  
  21.  
  22. # ROOT PERMISSIONS REQUIRED HERE:
  23. #________________________________________________________
  24. echo -e "\n\e[33m Starting theme installation...\e[m"
  25.  
  26. # Icons
  27. if [[ -e /usr/share/icons/Faenza ]]; then
  28.     sleep 0.5 && echo -e "\e[32m Faenza Icons already installed.\e[m"
  29. else
  30.     echo -e "\e[32m Downloading/Installing Faenza Icons...\e[m"
  31.     sudo add-apt-repository ppa:tiheum/equinox
  32.     sudo apt-get update
  33.     sudo apt-get install -y faenza-icon-theme && sleep 0.5
  34. fi
  35.  
  36. # Wallpaper
  37. if [[ -e /usr/share/backgrounds/blackbuntuwp.png ]]; then
  38.     sleep 0.5 && echo -e "\e[32m Wallpaper already installed.\e[m"
  39. else
  40.     echo -e "\e[33m Downloading/Installing Wallpaper...\e[m"
  41.     sudo wget http://dl.dropbox.com/u/15352114/blackbuntuwp.png -P \
  42.         /usr/share/backgrounds && sleep 0.5 || echo -e "\e[31m Download failed...\e[m"
  43. fi
  44.  
  45. # Mouse cursor
  46. if [[ -e /usr/share/icons/BbCursor ]]; then
  47.     sleep 0.5 && echo -e "\e[32m Mouse X11 theme already installed.\e[m"
  48. else
  49.     echo -e "\e[33m Downloading/Installing Mouse X11 theme...\e[m"
  50.     wget http://dl.dropbox.com/u/15352114/BbCursor.tar.gz -O- |\
  51.         sudo tar xz -C /usr/share/icons && sleep 0.5 || echo -e "\e[31m Download failed...\e[m"
  52. fi
  53.  
  54. # GTK+ and Metacity
  55. if [[ -e /usr/share/themes/BlackBuntu ]]; then
  56.     sleep 0.5 && echo -e "\e[32m GTK+/Metacity theme already installed.\e[m"
  57. else
  58.     echo -e "\e[33m Downloading GTK+/Metacity theme...\e[m"
  59.     wget http://dl.dropbox.com/u/15352114/BlackBuntu.tar.gz -O- |\
  60.         sudo tar xz -C /usr/share/themes && sleep 0.5 || echo -e "\e[31m Download failed...\e[m"
  61. fi
  62.  
  63. # BASHRC
  64. echo -e "\e[33m Creating new bashrc...\e[m"
  65. mv ~/.bashrc ~/.bashrc.bak 2>/dev/null
  66. sudo mv /root/.bashrc /root/.bashrc.bak 2>/dev/null
  67. sleep 0.5 && echo -e "\e[32m Backup done.\e[m"
  68.  
  69. echo '#  ,___    
  70. #  ¡  _`    BlackBuntu .bashrc
  71. #  ª_/()    noes1s
  72. #  |\` `,   http://pastebin.com/u/noes1s
  73. # _·    l   CC BY-SA 3.0
  74.    
  75. ### Extract file, example. "ex package.tar.bz2"
  76. ex() {
  77.    if [[ -f $1 ]]; then
  78.        case $1 in
  79.            *.tar.bz2)   tar xjf $1  ;;
  80.            *.tar.gz)    tar xzf $1  ;;
  81.            *.bz2)       bunzip2 $1  ;;
  82.            *.rar)       rar x $1    ;;
  83.            *.gz)        gunzip $1   ;;
  84.            *.tar)       tar xf $1   ;;
  85.            *.tbz2)      tar xjf $1  ;;
  86.            *.tgz)       tar xzf $1  ;;
  87.            *.zip)       unzip $1    ;;
  88.            *.Z)         uncompress $1  ;;
  89.            *.7z)        7z x $1     ;;
  90.            *)           echo $1 cannot be extracted ;;
  91.        esac
  92.    else
  93.        echo $1 is not a valid file
  94.    fi
  95. }
  96.  
  97. ### Directory navigation aliases
  98. alias ..="cd .."
  99. alias ...="cd ../.."
  100. alias ....="cd ../../.."
  101. alias .....="cd ../../../.."
  102.  
  103. ### Don not put duplicate lines in the history
  104.    HISTCONTROL=ignoredups:ignorespace
  105.    
  106. ### Resize terminal if necesary
  107.    shopt -s checkwinsize
  108.  
  109. ### Add more colors
  110.    [[ -x /usr/bin/dircolors ]] && {
  111.    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
  112.    alias ls="ls --color=auto"
  113.    alias dir="dir --color=auto"
  114.    alias vdir="vdir --color=auto"
  115.    alias grep="grep --color=auto"
  116.    alias fgrep="fgrep --color=auto"
  117.    alias egrep="egrep --color=auto"
  118.    }
  119.    
  120. ### Add more aliases
  121.    alias ll="ls -alF"
  122.    alias la="ls -A"
  123.    alias l="ls -CF"
  124.    
  125.    alias upd="sudo apt-get update"
  126.    alias upg="sudo apt-get upgrade"
  127.    alias ins="sudo apt-get install"
  128.    alias rem="sudo apt-get purge"
  129.    alias fix="sudo apt-get install -f"
  130.  
  131. ### Prompt    
  132. ((UID)) &&
  133. PS1="\[\e[1;32m\]\u\[\e[0;34m\]@\h\[\e[0;37m\]\w\[\e[1;32m\]\\$\[\e[m\] " ||
  134. PS1="\[\e[1;31m\]\u\[\e[0;34m\]@\h\[\e[0;37m\]\w\[\e[1;31m\]\\$\[\e[m\] "
  135.  
  136. ### BlackBuntu Variables
  137. RUBYOPT="rubygems"
  138. GEM_HOME="/var/lib/gems/1.8/gems/"
  139. PATH="/var/lib/gems/1.8/bin:$PATH"
  140. RUBYLIB="$RUBYLIB:/pentest/re/metasm"
  141. [[ -s "/usr/local/rvm/scripts/rvm" ]]&& source "/usr/local/rvm/scripts/rvm"
  142. ' > ~/.bashrc
  143. sleep 0.5
  144. sudo cp ~/.bashrc /root/.bashrc
  145. echo -e "\e[32m New bashrc created.\e[m"
  146.  
  147.  
  148. # ROOT PERMISSIONS NOT ALLOWED FOR THE NEXT:
  149. # ____________________________________________________________
  150.  
  151. echo -e "\n\e[33m Configuring Gnome...\e[m"
  152. gstring='gconftool-2 -t string -s'
  153. gbool='gconftool-2 -t bool -s'
  154. gint='gconftool-2 -t int -s'
  155.  
  156. sleep 0.5 && echo -e "\e[32m Fonts.\e[m"
  157. $gstring /desktop/gnome/interface/font_name "Ubuntu 9"
  158. $gstring /desktop/gnome/interface/document_font_name "Sans 10"
  159. $gstring /desktop/gnome/interface/monospace_font_name "Monospace 9"
  160. $gstring /apps/metacity/general/titlebar_font "Ubuntu Bold 9"
  161. $gbool /apps/metacity/general/tittlebar_uses_system_font "false"
  162.  
  163. sleep 0.5 && echo -e "\e[32m Style.\e[m"
  164. $gstring /desktop/gnome/background/picture_filename "/usr/share/backgrounds/blackbuntuwp.png"
  165. $gstring /desktop/gnome/background/picture_options "zoom"
  166. $gstring /desktop/gnome/interface/toolbar_style "both-horiz"
  167. $gstring /desktop/gnome/interface/toolbar_icons_size "large-toolbar"
  168. $gstring /desktop/gnome/peripherals/mouse/cursor_theme "BbCursor"
  169.  
  170. sleep 0.5 && echo -e "\e[32m Icons.\e[m"
  171. $gstring /desktop/gnome/interface/icon_theme "Faenza-Darkest"
  172. $gbool /desktop/gnome/interface/menus_have_icons "true"
  173. $gbool /desktop/gnome/interface/buttons_have_icons "false"
  174.  
  175. sleep 0.5 && echo -e "\e[32m Terminal.\e[m"
  176. # Terminal-General
  177. $gbool /apps/gnome-terminal/profiles/Default/use_system_font "true"
  178. $gbool /apps/gnome-terminal/profiles/Default/allow_bold "true"
  179. $gbool /apps/gnome-terminal/profiles/Default/default_show_menubar "false"
  180. $gbool /apps/gnome-terminal/profiles/Default/use_custom_default_size "true"
  181. $gint /apps/gnome-terminal/profiles/Default/default_size_columns "100"
  182. $gint /apps/gnome-terminal/profiles/Default/default_size_rows "20"
  183. $gbool /apps/gnome-terminal/profiles/Default/silent_bell "true"
  184. # Terminal-Title
  185. $gstring /apps/gnome-terminal/profiles/Default/title "ßlackßunłu"
  186. $gstring /apps/gnome-terminal/profiles/Default/title_mode "ignore"
  187. # Terminal-Colors
  188. $gbool /apps/gnome-terminal/profiles/Default/use_theme_colors "false"
  189. $gstring /apps/gnome-terminal/profiles/Default/foreground_color "#00008A51FFFF"
  190. $gstring /apps/gnome-terminal/profiles/Default/background_color "#000000000000"
  191. $gbool /apps/gnome-terminal/profiles/Default/bold_color_same_as_fg "true"
  192. # Terminal-Background
  193. $gbool /apps/gnome-terminal/profiles/Default/use_theme_background "false"
  194. $gstring /apps/gnome-terminal/profiles/Default/background_type "transparent"
  195. $gint /apps/gnome-terminal/profiles/Default/background_darkness "0.76165801286697388"
  196. # Terminal-Scrolling
  197. $gstring /apps/gnome-terminal/profiles/Default/scrollbar_position "right"
  198. $gbool /apps/gnome-terminal/profiles/Default/scrollback_unlimited "true"
  199.  
  200. sleep 0.5 && echo -e "\e[32m Gedit.\e[m"
  201. $gbool /apps/gedit-2/preferences/editor/line_numbers/display_line_numbers "true"
  202. $gint /apps/gedit-2/preferences/editor/right_margin/right_margin_position "100"
  203. $gbool /apps/gedit-2/preferences/editor/right_margin/display_right_margin "true"
  204. $gbool /apps/gedit-2/preferences/editor/tabs/insert_spaces "true"
  205. $gint  /apps/gedit-2/preferences/editor/tabs/tabs_size "4"
  206. $gstring /apps/gedit-2/preferences/editor/colors/scheme "oblivion"
  207. $gbool /apps/gedit-2/preferences/editor/auto_indent/auto_indent "true"
  208. $gbool /apps/gedit-2/preferences/editor/bracket_matching/bracket_matching "true"
  209.  
  210. sleep 0.5 && echo -e "\e[32m GTK+.\e[m"
  211. $gstring /desktop/gnome/interface/gtk_theme "BlackBuntu"
  212. $gstring /desktop/gnome/interface/gtk_color_scheme "progress_color:#f2f2f2
  213. progress_text_color:#101010
  214. fg_color:#04045a5affff
  215. bg_color:#151515151515
  216. text_color:#04045a5affff
  217. base_color:#141414141414
  218. selected_fg_color:#0535ffff0000
  219. selected_bg_color:#35ad35ad35ad
  220. tooltip_fg_color:#0ea8ffff0000
  221. tooltip_bg_color:#000000000000"
  222. $gstring /desktop/gnome/interface/gtk-im-preedit-style "callback"
  223. $gbool /desktop/gnome/interface/hide_decorator_tooltip "true"
  224.  
  225. sleep 0.5 && echo -e "\e[32m Metacity.\e[m"
  226. $gstring /apps/metacity/general/theme "BlackBuntu"
  227. $gstring /apps/metacity/general/button_layout "menu:minimize,maximize,close"
  228.  
  229. sleep 0.5 && echo -e "\n\e[1;32m Enjoy BlackBuntu's Theme\e[m\n"
  230. bash
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement