Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # ,___
- # ¡ _`
- # ª_/() Kali Linux Noes1s Theme (Gnome GTK2.x)
- # |\` `, by Noesis Prada
- # _· l
- #
- # MANUAL:
- # This script requires INTERNET CONECTION to install and download themes, wallpapers, apps...
- #
- # 1) Give a name to the app that is going to be configured/installed
- # do not use spaces for the name
- # app=<name here, do not use caps>
- #
- # 2) The function "isInstalled NAME" will check if NAME is installed and return 0 if yes, 1+ if not
- #
- # 3) Commands for config/install, you must end this section with "output done" or "output fail"
- #
- # 4) The function "output" will show the results on the terminal
- # If you use "output" it will show "wait" on the terminal for every app= on this script
- # If you use "output done" it will show "done" on the terminal for the last app used
- # If you use "output fail" it will show "fail" on the terminal for the last app used
- #
- # Example, we will check if gedit is installed, if it's not, we will try to install it
- # if it's installed or we manage to install it, we will use output done
- # if the instalation fails, we will use output fail
- #
- # app=<name here, do not use caps>
- # if isInstalled gedit; then
- # output done
- # else
- # if apt-get install -y gedit; then
- # output done
- # else
- # output fail
- # fi
- # fi
- # Get architecture
- [ $(uname -m) = "i686" ] && arch="i386" || arch="amd64"
- # output variables, do not touch
- wt='\e[0;33mwait'
- ok='\e[1;32mdone'
- ko='\e[1;31mfail'
- # generate apps array
- a=("$(sed '/app=[a-z]/!d;s/app=//g' $0)")
- # generate apps status array
- for x in ${a[@]}; do
- b=("${b[@]}" "$wt")
- done
- # stores array position of "status" relative to an "app"
- j=0
- # output: show status of app configuration: wait, done, fail
- output(){
- clear
- case $1 in
- done) b[((j++))]="$ok";;
- fail) b[((j++))]="$ko";;
- *) ;;
- esac
- echo -e "\n\e[1;37m KaliConf \e[1;30mby Noes1s"
- i=0
- for x in ${a[@]}; do
- printf "\e[0;36m [ ${b[((i++))]}\e[0;36m ]"
- printf "\e[0;36m\e[0;36m $x\n"
- done
- echo ""
- }
- # Confirm if the program is installed, return 0 = yes, 1+ = no
- isInstalled(){
- type -p $1 > /dev/null
- return $?
- }
- # Create a new gnome-terminal profile
- newProfile(){
- gconftool-2 --dump /apps/gnome-terminal/profiles/Default | sed "s/Default/$1/g" > /tmp/dump
- gconftool-2 --load /tmp/dump
- rm /tmp/dump
- gconftool-2 --set /apps/gnome-terminal/global/profile_list --type list --list-type string $(echo [$(echo $(gconftool-2 -R /apps/gnome-terminal/profiles |sed -e '/profiles/!d;s/.*\/\(.*\):/\1/') |sed 's/ /,/g')])
- gconftool-2 --set -t string /apps/gnome-terminal/global/default_profile $1
- }
- # starting output, all apps on "wait"
- output
- #
- # TouchPad
- #
- app=touchpad-scroll
- edit='gsettings set org.gnome.settings-daemon.peripherals.touchpad'
- $edit scroll-method two-finger-scrolling 2>/dev/null && output done || output fail
- # Fix Elantech
- app=elantech-fix
- [ ! -f /etc/modprobe.d/options.conf ] &&
- echo 'options psmouse proto=imps' >> /etc/modprobe.d/options.conf &&
- output done
- ! grep 'proto=imps' /etc/modprobe.d/options.conf &&
- echo 'options psmouse proto=imps' >> /etc/modprobe.d/options.conf &&
- output done || output fail
- # Spanish locale
- app=es_ES
- (
- echo 'LANG="en_US.UTF-8"
- LC_TIME="es_ES.UTF-8"
- LC_PAPER="es_ES.UTF-8"
- LC_MEASUREMENT="es_ES.UTF-8"
- LC_MONETARY="es_ES.UTF-8"' > /etc/default/locale
- gsettings set org.gnome.system.locale region 'es_ES.utf8'
- gsettings set org.gnome.libgnomekbd.keyboard layouts "['es']"
- ) && output done || output fail
- # Enable real transparency
- app=transparency
- gsettings set org.gnome.metacity compositing-manager true && output done || output fail
- #
- # Terminal Theme: BlueGhost
- #
- app=gnome-terminal
- isInstalled $app && isInstalled gconftool-2 &&
- (
- name='BlueGhost'
- newProfile $name
- path="/apps/gnome-terminal/profiles/$name"
- gstring="gconftool-2 -t string -s $path"
- gbool="gconftool-2 -t bool -s $path"
- gint="gconftool-2 -t int -s $path"
- # Terminal-General
- $gbool/use_system_font "true"
- $gbool/allow_bold "true"
- $gbool/default_show_menubar "false"
- $gbool/use_custom_default_size "true"
- $gint/default_size_columns "100"
- $gint/default_size_rows "20"
- $gbool/silent_bell "true"
- # Terminal-Title
- $gstring/title "#!"
- $gstring/title_mode "ignore"
- # Terminal-Colors
- $gbool/use_theme_colors "false"
- $gstring/foreground_color "#00008A51FFFF"
- $gstring/background_color "#000000000000"
- $gbool/bold_color_same_as_fg "true"
- # Terminal-Background
- $gbool/use_theme_background "false"
- $gstring/background_type "transparent"
- $gint/background_darkness "0.76165801286697388"
- # Terminal-Scrolling
- $gstring/scrollbar_position "hidden"
- $gbool/scrollback_unlimited "true"
- ) && output done || output fail
- # Repository
- app=repository
- path='/etc/apt/sources.list'
- #'deb http://ftp.debian.org/debian wheezy main contrib non-free'
- #'deb http://ftp.debian.org/debian sid main contrib non-free'
- #'deb http://ftp.debian.org/debian experimental main contrib non-free'
- repositories=(
- 'deb http://http.kali.org/ /kali main contrib non-free'
- 'deb http://http.kali.org/ /wheezy main contrib non-free'
- 'deb http://http.kali.org/kali kali-dev main contrib non-free'
- 'deb http://http.kali.org/kali kali-dev main/debian-installer'
- 'deb-src http://http.kali.org/kali kali-dev main contrib non-free'
- 'deb http://http.kali.org/kali kali main contrib non-free'
- 'deb http://http.kali.org/kali kali main/debian-installer'
- 'deb-src http://http.kali.org/kali kali main contrib non-free'
- 'deb http://security.kali.org/kali-security kali/updates main contrib non-free'
- 'deb-src http://security.kali.org/kali-security kali/updates main contrib non-free'
- 'deb http://repos.codelite.org/debian/ wheezy contrib'
- )
- for i in "${repositories[@]}"; do
- grep "$i" $path || echo "$i" >> $path
- done
- apt-get update
- output done
- #
- # Gedit
- #
- app=gedit
- isInstalled $app || apt-get install gedit -y
- isInstalled $app &&
- (
- edit='gsettings set org.gnome.gedit.preferences.editor'
- $edit auto-indent true
- $edit auto-save true
- #$edit auto-save-interval
- $edit bracket-matching true
- #$edit create-backup-copy
- $edit display-line-numbers true
- $edit display-right-margin false
- $edit ensure-trailing-newline true
- $edit highlight-current-line true
- $edit insert-spaces true
- #$edit max-undo-actions
- #$edit restore-cursor-position
- #$edit right-margin-position
- $edit scheme 'cobalt'deb http://repos.codelite.org/debian/ wheezy contrib
- $edit search-highlighting true
- #$edit smart-home-end
- $edit syntax-highlighting true
- $edit tabs-size 'uint32 2'
- #$edit undo-actions-limit
- $edit wrap-mode 'word'
- #aptitude install ttf-inconsolata -y
- #$edit editor-font 'Inconsolata Medium 14'
- #$edit use-default-font false
- ) && output done || output fail
- #
- # Prompt
- #
- app=prompt
- # delete duplicates (unfinished)
- #sed '/#noes1sSTART/,/#noes1sEND/d' ~/.bash_aliases 1>~/.bash_aliases 2>/dev/null
- # add new aliases
- ! grep noes1s ~/.bash_aliases >/dev/null && (
- echo '#noes1sSTART
- # ,___
- # ¡ _`
- # ª_/() Kaliconfig aliases
- # |\` `, by Noes1s
- # _· l
- # this bash_aliases file should be loaded by a default .bashrc
- # prompt
- PS1="\[\e[0;36m\]┌╸\[\e[1;36m\]\u\[\e[0;36m\]╺─╸\[\e[1;37m\]\w\[\e[0;36m\]╺\n└─╍\[\e[0m\] "
- # apt-get
- alias upd="sudo apt-get update"
- alias upg="sudo apt-get upgrade"
- alias ins="sudo apt-get install"
- alias rem="sudo apt-get purge"
- alias fix="sudo apt-get install -f"
- # cd
- alias ..="cd .."
- alias ...="cd ../.."
- alias ....="cd ../../.."
- alias .....="cd ../../../.."
- # grep
- alias grep="grep --color=auto"
- alias fgrep="fgrep --color=auto"
- alias egrep="egrep --color=auto"
- # ls
- alias ll="ls -alF"
- alias la="ls -A"
- alias l="ls -CF"
- #noes1sEND
- ' > ~/.bash_aliases
- ) && output done || output fail
- # Wallpaper
- app=wallpaper
- [ ! -f /usr/share/wallpapers/noes1s.jpg ] && (
- wget -qO /usr/share/wallpapers/noes1s.jpg http://i.imgur.com/7tVfiBL.jpg
- gsettings set org.gnome.desktop.background picture-uri file:///usr/share/wallpapers/noes1s.jpg
- gconftool-2 -t string -s /desktop/gnome/background/picture_filename /usr/share/wallpapers/noes1s.jpg
- ) && output done || output fail
- # Gnome theme editor
- app=gnome-tweak-tool
- apt-get install gnome-tweak-tool -y && output done || output fail
- # Delorean-dark Theme
- # http://killhellokitty.deviantart.com/art/DeLorean-Dark-1-55-318612217
- app=delorean-dark-theme
- [ ! -d /usr/share/themes/delorean-dark ] && (
- aptitude install -y gtk3-engines-unico gtk2-engines-murrine gtk2-engines-pixbuf
- wget http://www.deviantart.com/download/318612217/delorean_dark_1_55_by_killhellokitty-d59oyrd.zip -O /tmp/delorean.zip
- unzip /tmp/delorean.zip -d /usr/share/themes
- rm /tmp/delorean.zip
- ) && output done || output fail
- # Chromium Browser
- app=chromium-browser
- aptitude install -y chromium-browser && output done || output fail
- echo '# Default settings for chromium.
- # This file is sourced by /bin/sh from /usr/bin/chromium
- # Options to pass to chromium
- CHROMIUM_FLAGS="--user-data-dir=/root/.config/chromium"' > /etc/chromium/default
- # Enable PDF Plugin
- # http://www.webdweb.com/2012/10/pdf-viewer-in-chromium/
- # wget libpdf.so -O /usr/lib/chromium/libpdf.so
- #BugFix https://aur.archlinux.org/packages/chromium-stable-libpdf/ @uffuji
- apt-get install ttf-droid ttf-liberation ttf-dejavu #ttf-ms-fonts <- pkg not found
- # GUI for compressed files
- app=file-roller
- aptitude install -y file-roller && output done || output fail
- # Codelite IDE
- app=codelite
- r=''
- apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc
- apt-get install codelite wxcrafter && output done || output fail
- # transset-df
- # Compton (Composite-manager, real transparency + shadows)
- # https://github.com/chjj/compton/blob/master/README.md
- #cd /tmp
- #git clone https://github.com/chjj/compton/
- #cd /compton
- # Required for compton RUNTIME
- #aptitude install -y libx11-dev libxcomposite-dev libxdamage-dev libxfixes-dev libxext-dev libxrender-dev libxrandr-dev bash libpcre3-dev libconfig-dev libgl1-mesa-dev libdbus-1-dev
- # Required for compton BUILD-TIME (MAKE)
- #aptitude install -y pkg-config make libdrm-dev
- # Required for MAN (MAKE INSTALL)
- #aptitude install -y libxml2-utils docbook-xml xsltproc docbook-xsl asciidoc
- # VirtualBox Guest
- #apt-get install -y linux-headers-$(uname -r)
- #cp /media/cdrom/VBoxLinuxAdditions.run /root/
- #chmod 755 /root/VBoxLinuxAdditions.run
- #cd /root
- #./VBoxLinuxAdditions.run
- #reboot
- # reset terminal
- bash
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement