diff --git a/.gitignore b/.gitignore index 1ce4f40..91dfed8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,104 +1,2 @@ -### Node ### -# Logs -logs -*.log -npm-debug.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules -jspm_packages - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - - - -### CoffeeScript ### -*.js - - -### Sass ### -.sass-cache/ -*.css.map - - -### Windows ### -# Windows image file caches -Thumbs.db -ehthumbs.db - -# Folder config file -Desktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msm -*.msp - -# Windows shortcuts -*.lnk - - -### OSX ### -*.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon -# Thumbnails -._* -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk +.DS_Store +node_modules \ No newline at end of file diff --git a/.installers/install_bash.sh b/.installers/install_bash.sh deleted file mode 100644 index 9bbe052..0000000 --- a/.installers/install_bash.sh +++ /dev/null @@ -1,10 +0,0 @@ -echo "Hello $USER!" -echo "Give me a second please..." - -mkdir ~/.shells/ -cp -rf ../dist/.* ~/.shells/ - -# BASH -cat dist/rcfile.sh >> ~/.bashrc - -echo "Done! Please visit https://www.github.com/Rawnly for more infos." diff --git a/.installers/install_oh-my-zsh.sh b/.installers/install_oh-my-zsh.sh deleted file mode 100755 index 855284f..0000000 --- a/.installers/install_oh-my-zsh.sh +++ /dev/null @@ -1,9 +0,0 @@ -echo "Hello $USER!" -echo "Give me a second please..." - -cp -rf ../zsh/dotfiles ~/.oh-my-zsh/custom/plugins - -# ZSH or OH-MY-ZSH -cat ../dist/rcfile.sh >> ~/.zshrc - -echo "Done! Please visit https://www.github.com/Rawnly for more infos." diff --git a/.installers/install_zsh.sh b/.installers/install_zsh.sh deleted file mode 100755 index 2f3c50e..0000000 --- a/.installers/install_zsh.sh +++ /dev/null @@ -1,10 +0,0 @@ -echo "Hello $USER!" -echo "Give me a second please..." - -mkdir ~/.shells/ -cp -rf ../dist/.* ~/.shells/ - -# ZSH -cat ../dist/rcfile.sh >> ~/.zshrc - -echo "Done! Please visit https://www.github.com/Rawnly for more infos." diff --git a/.installers/remote/_bash.sh b/.installers/remote/_bash.sh deleted file mode 100644 index e761d51..0000000 --- a/.installers/remote/_bash.sh +++ /dev/null @@ -1,16 +0,0 @@ -echo "Hello $USER!" -echo "Give me a second please..." - -mkdir ~/.shells/ -cd ~/.shells/ - -curl -O --silent https://raw.githubusercontent.com/Rawnly/dot-files/master/dist/aliases.sh -curl -O --silent https://raw.githubusercontent.com/Rawnly/dot-files/master/dist/profile.sh - -mv aliases.sh .aliases.sh -mv profile.sh .profile.sh - -# BASH -cat dist/rcfile.sh >> ~/.bashrc - -echo "Done! Please visit \e[34mhttps://www.github.com/Rawnly for more infos.\e[0m" diff --git a/.installers/remote/_oh-my-zsh.sh b/.installers/remote/_oh-my-zsh.sh deleted file mode 100644 index 94c0672..0000000 --- a/.installers/remote/_oh-my-zsh.sh +++ /dev/null @@ -1,14 +0,0 @@ -echo "Hello $USER!" -echo "Give me a second please..." - -cd ~/.oh-my-zsh/custom/plugins - -mkdir dotfiles && cd dotfiles - -curl -O --silent https://raw.githubusercontent.com/Rawnly/dot-files/master/zsh/dotfiles/dotfiles.plugin.zsh - - -# ZSH or OH-MY-ZSH -cat dist/rcfile.sh >> ~/.zshrc - -echo "Done! Please visit https://www.github.com/Rawnly for more infos." diff --git a/.installers/remote/_zsh.sh b/.installers/remote/_zsh.sh deleted file mode 100644 index 9f5d903..0000000 --- a/.installers/remote/_zsh.sh +++ /dev/null @@ -1,16 +0,0 @@ -echo "Hello $USER!" -echo "Give me a second please..." - -mkdir ~/.shells/ -cd ~/.shells/ - -curl -O --silent https://raw.githubusercontent.com/Rawnly/dot-files/master/dist/aliases.sh -curl -O --silent https://raw.githubusercontent.com/Rawnly/dot-files/master/dist/profile.sh - -mv aliases.sh .aliases.sh -mv profile.sh .profile.sh - -# ZSH or OH-MY-ZSH -cat dist/rcfile.sh >> ~/.zshrc - -echo "Done! Please visit \e[34mhttps://www.github.com/Rawnly for more infos.\e[0m" diff --git a/README.md b/README.md index d5621a3..a70a71c 100755 --- a/README.md +++ b/README.md @@ -1,68 +1,51 @@ # Dot Files My personal dot files. -![alt](img/screenshot.png) +

+

iTerm2
+ iterm -## Installation - -> Please be sure to have installed [node](http://nodejs.org) and [brew](http://brew.sh). +
Hyper Terminal
+ hyper +

-Via **Browser**:
-Simply download the [latest][lat] release or clone this repo and run -```bash - cd ../path/to/dot-files/ - npm install && chmod +x install.sh && ./install.sh -``` - -or run the following line without cloning the repo: +## Installation +> ##### :warning: Please make sure you have `curl` installed. -**bash** -```bash -# Bash Shell -source <(curl -s https://raw.githubusercontent.com/Rawnly/dot-files/master/.installers/remote/_bash.sh) -``` +### Installation (MacOS or Linux) +Download the latest release and run the `setup.sh` script. +This will start the installation process that make sure you have all the missing packages/components. -**zsh** -```bash -# ZSH Shell -source <(curl -s https://raw.githubusercontent.com/Rawnly/dot-files/master/.installers/remote/_zsh.sh) -``` -## OH-MY-ZSH plugin -Run the following: +## MISC +### Font +The font used in the screenshot is [Fira Code][firacode] -```bash -# OH-MY-ZSH Shell -source <(curl -s https://raw.githubusercontent.com/Rawnly/dot-files/master/.installers/remote/_oh-my-zsh.sh) -``` +### Terminal APP +My main terminal is currently [iTerm2][iterm]. I moved from [hyper][hyperjs] because [iTerm][iterm] is faster. -or clone this repo and copy `zsh/dotfiles` folder to `~/.oh-my-zsh/custom/plugins/` +#### iTerm2 +You can find my [configuration file](terminal-config/iTerm2/config.json) and [colorscheme](terminal-config/iTerm2/rawnly.itermcolors) in [`terminal-config/iTerm2`](terminal-config/iTerm2/) +#### Hyper JS +You can fund my [`.hyper.js`](terminal-config/Hyper/hyper.js) in [`terminal-config/Hyper`](terminal-config/Hyper) +Many people asked me a few times my hyper config in the past. Sincerely I don't remember it, it's past quite a few time since i moved to iTerm and I've lost my custom configuration (no theme...), however I strongly recommend these 2 plugins (*this is also my current configuration*): -Extra +- [hyper-spotify][hyperspotify] +- [verminal theme][verminal] + > NOTE: If you want to make verminal look more minimal, see [#19](https://github.com/defringe/verminal/issues/19) or just look at [my config](terminal-config/Hyper/hyper.js) --- -##### Dependecies -* [weather-commandline](http://github.com/rawnly/weather-commandline) -* [node.js](http://nodejs.org) - -##### The Screenshot -- Terminal: [Hyper](http://hyper.is) with [hyper-snazzy](https://github.com/sindresorhus/hyper-snazzy) theme by [@sindresorhus](http://github.com/sindresorhus). -- Shell: [Zsh]() with [simple](https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/simple.zsh-theme) zsh theme. - -

---- -

-Get powerfull experience with oh-my-zsh & Hyper terminal -

-

Made with :heart: by Rawnly

+

Made with a ⌨️ in 🇮🇹 

-[installation]: https://github.com/Rawnly/dot-files/blob/master/install.sh -[lat]: https://github.com/Rawnly/dot-files/releases/ -[me]: https://www.github.com/Rawnly/ -[plugin]: http://github.com/Rawnly/dot-files/plugin/dotfiles.plugin.zsh +[lat]: https://github.com/Rawnly/dot-files/releases/latest +[iterm]: https://www.iterm2.com +[hyperjs]: https://hyper.is +[firacode]: https://github.com/tonsky/FiraCode +[verminal]: https://github.com/defringe/verminal +[hyperspotify]: https://github.com/panz3r/hyper-spotify \ No newline at end of file diff --git a/dist/aliases.sh b/dist/aliases.sh old mode 100755 new mode 100644 index b0a74ab..88901c4 --- a/dist/aliases.sh +++ b/dist/aliases.sh @@ -1,71 +1,60 @@ -# === ALIAS === -alias cd..='cd ../' # Go back 1 directory level (for fast typers) -alias ..='cd ../' # Go back 1 directory level -alias ...='cd ../../' # Go back 2 directory levels -alias .3='cd ../../../' # Go back 3 directory levels -alias .4='cd ../../../../' # Go back 4 directory levels -alias .5='cd ../../../../../' # Go back 5 directory levels -alias .6='cd ../../../../../../' # Go back 6 directory levels -alias pub="dig +short myip.opendns.com @resolver1.opendns.com" +alias rcfile="$EDITOR ~/.zshrc" -# === END ALIAS === +alias c="clear"; +alias g="git"; +# Reload the shell (i.e. invoke as a login shell) +alias reload="exec ${SHELL} -l" -# ADB and Fastboot to prevent ./adb or ./fastboot < command > -alias adb='./adb' -alias fastboot='./fastboot' - -alias rf='rm -rf' - -# Config File -alias zshrc="atom ~/.zshrc" -alias ohmyzsh="cd ~/.oh-my-zsh; show" +# Print each PATH entry on a separate line +alias path='echo -e ${PATH//:/\\n}' -# Go to Desktop -alias de="cd ~/Desktop" +# PHP artisan shortcut +alias artisan="php artisan"; -# Gulp --silent Shortcut -alias guls="gulp --silent" +alias federico="ssh root@138.68.102.254"; -# List files colorized in column format. -alias ls="ls ${colorflag}" +alias cpf="cp -rf" +alias rmf="rm -rf" -# Do what I fucking tell you to, machine. -alias fucking='sudo ' -alias _="sudo" +alias codef="cd $CODE_FOLDER" +alias mkdirp="mkdir -p"; +alias cra="create-react-app"; -# Lock the screen (when going AFK) -alias lock="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend" +# YARN Shortcut +alias y="yarn"; -# Figlet -# alias hyper='figlet hyper.app | lolcat' +# IP addresses +alias ip="dig +short myip.opendns.com @resolver1.opendns.com" +alias localip="ipconfig getifaddr en0" +alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'" -# Reload the shell (i.e. invoke as a login shell) -alias reload="clear; zsh" +# Copy my public key to the pasteboard +alias pbk="more ~/.ssh/id_rsa.pub | pbcopy | printf '=> Public key copied to pasteboard.\n'" -# Clear Shortcuts -alias c="clear" -alias cc="clear" +alias mono="/Library/Frameworks/Mono.framework/Commands/mono" +alias csc="/Library/Frameworks/Mono.framework/Commands/csc" -# Prevents errors -alias claer="clear" +# Google Chrome +alias chrome='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome' -# Remove folders -alias rm="rm -rf" +# URL-encode strings +alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1]);"' -# Prevents NPM authorization error -# alias npm="sudo npm" -alias run="npm start" -alias nlist="ls `npm root -g`" +# Recursively delete `.DS_Store` files +alias cleanup="find . -type f -name '*.DS_Store' -ls -delete" -# Same as wget -alias download="curl -O" +# Empty the Trash on all mounted volumes and the main HDD. +# Also, clear Apple’s System Logs to improve shell startup speed. +# Finally, clear download history from quarantine. https://mths.be/bum +alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl; sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'delete from LSQuarantineEvent'" -# CRA | Craeate React Application -# alias react="create-react-app ${1} && cd $1" +# Show/hide hidden files in Finder +alias show="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder" +alias hide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder" -# Cute files -# Before be sure to have installed `cute-files` -# with sudo npm install -g cute-files -# alias cute="cute-files -p ${1}" +# Hide/show all desktop icons (useful when presenting) +alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder" +alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder" +alias getBranch="test -d .git && (git rev-parse --abbrev-ref HEAD) || (echo 'Not a repo')" diff --git a/dist/extra.sh b/dist/extra.sh new file mode 100644 index 0000000..30c385c --- /dev/null +++ b/dist/extra.sh @@ -0,0 +1,181 @@ +# https://transfer.sh +function 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; +} + +function update { + if [ -z $1 ]; then + echo "No args received!" + fi + + case $1 in + yarn) + curl -o- -L https://yarnpkg.com/install.sh | bash + ;; + brew) + brew update + ;; + *) + echo "Invalid arg ${1}" + ;; + esac + +} + +# Create a new directory and enter it +function mkd() { + mkdir -p "$@" && cd "$_"; +} + +# Change working directory to the top-most Finder window location +function cdf() { + # short for `cdfinder` + + if [ -z "$1" ]; then + open . -a Finder + else + open $1 -a Finder + fi +} + +# Create a .tar.gz archive, using `zopfli`, `pigz` or `gzip` for compression +function targz() { + local tmpFile="${@%/}.tar"; + tar -cvf "${tmpFile}" --exclude=".DS_Store" "${@}" || return 1; + + size=$( + stat -f"%z" "${tmpFile}" 2> /dev/null; # macOS `stat` + stat -c"%s" "${tmpFile}" 2> /dev/null; # GNU `stat` + ); + + local cmd=""; + if (( size < 52428800 )) && hash zopfli 2> /dev/null; then + # the .tar file is smaller than 50 MB and Zopfli is available; use it + cmd="zopfli"; + else + if hash pigz 2> /dev/null; then + cmd="pigz"; + else + cmd="gzip"; + fi; + fi; + + echo "Compressing .tar ($((size / 1000)) kB) using \`${cmd}\`…"; + "${cmd}" -v "${tmpFile}" || return 1; + [ -f "${tmpFile}" ] && rm "${tmpFile}"; + + zippedSize=$( + stat -f"%z" "${tmpFile}.gz" 2> /dev/null; # macOS `stat` + stat -c"%s" "${tmpFile}.gz" 2> /dev/null; # GNU `stat` + ); + + echo "${tmpFile}.gz ($((zippedSize / 1000)) kB) created successfully."; +} + +# Determine size of a file or total size of a directory +function fs() { + if du -b /dev/null > /dev/null 2>&1; then + local arg=-sbh; + else + local arg=-sh; + fi + if [[ -n "$@" ]]; then + du $arg -- "$@"; + else + du $arg .[^.]* ./*; + fi; +} + +# Create a data URL from a file +function dataurl() { + local mimeType=$(file -b --mime-type "$1"); + if [[ $mimeType == text/* ]]; then + mimeType="${mimeType};charset=utf-8"; + fi + echo "data:${mimeType};base64,$(openssl base64 -in "$1" | tr -d '\n')"; +} + +# Start an HTTP server from a directory, optionally specifying the port +function server() { + local port="${1:-8000}"; + sleep 1 && open "http://localhost:${port}/" & + # Set the default Content-Type to `text/plain` instead of `application/octet-stream` + # And serve everything as UTF-8 (although not technically correct, this doesn’t break anything for binary files) + python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port"; +} + +# Start a PHP server from a directory, optionally specifying the port +# (Requires PHP 5.4.0+.) +function phpserver() { + local port="${1:-4000}"; + local ip=$(ipconfig getifaddr en1); + sleep 1 && open "http://${ip}:${port}/" & + php -S "${ip}:${port}"; +} + +# Compare original and gzipped file size +function gz() { + local origsize=$(wc -c < "$1"); + local gzipsize=$(gzip -c "$1" | wc -c); + local ratio=$(echo "$gzipsize * 100 / $origsize" | bc -l); + printf "orig: %d bytes\n" "$origsize"; + printf "gzip: %d bytes (%2.2f%%)\n" "$gzipsize" "$ratio"; +} + +# Syntax-highlight JSON strings or files +# Usage: `json '{"foo":42}'` or `echo '{"foo":42}' | json` +function json() { + if [ -t 0 ]; then # argument + python -mjson.tool <<< "$*" | pygmentize -l javascript; + else # pipe + python -mjson.tool | pygmentize -l javascript; + fi; +} + +# `tre` is a shorthand for `tree` with hidden files and color enabled, ignoring +# the `.git` directory, listing directories first. The output gets piped into +# `less` with options to preserve color and line numbers, unless the output is +# small enough for one screen. + +# If you don't have the `tree` command, install it via: `brew install tree` +function tre() { + tree -aC -I '.git|node_modules|bower_components' --dirsfirst "$@" | less -FRNX; +} + +# Shorthand to `brew cask` +function cask() { + brew cask "$@" +} + +# List all process on a port +function checkport() { + if [ -z "$1" ]; then + lsof -i :80 + else + lsof -i ":$1" + fi +} + +# Copy file content +# ONLY MACOS +function cc() { + if [ -< "$1" ]; then + cat $1 | pbcopy + else + echo "Argument required!" + fi +} \ No newline at end of file diff --git a/dist/profile.sh b/dist/profile.sh deleted file mode 100755 index 43309e4..0000000 --- a/dist/profile.sh +++ /dev/null @@ -1,237 +0,0 @@ -welcome() { - # echo -ne "Good STAUTS, \e[1;35m$NICKNAME\e[0m! It's "; date '+%A, %B %-d %Y' - greetings - - echo "" - echo "" - echo "LOCAL IP: $LOCALIP" - echo -ne "PUBLIC IP: "; pub - echo "" - echo "" -} - -greetings() { - h=`date +%H` - if [ $h -lt 12 ]; then - echo -ne "Good morning, \e[1;35m$NICKNAME\e[0m! It's "; date '+%A, %B %-d %Y' - elif [ $h -lt 18 ]; then - echo -ne "Good afternoon, \e[1;35m$NICKNAME\e[0m! It's "; date '+%A, %B %-d %Y' - else - echo -ne "Good evening, \e[1;35m$NICKNAME\e[0m! It's "; date '+%A, %B %-d %Y' - fi -} - -dayStat() { - p=`date +%p` - if [ $p != 'PM' ]; then - echo "Morning" - else - echo "Evening" - fi -} - - -website() { - echo -ne "Good "; dayStat; - - echo "Give me a second please..." - - # Website folders - mkdir dist/ - mkdir dist/js/ - mkdir dist/css/ - - sleep 0.2 - - # Files - touch dist/js/index.js | echo "Touching Index.js" - touch dist/css/style.css | echo "Touching Style.css" - touch dist/index.html | echo "Touching Index.html" - - sleep 0.2 - - # Non Compiled Folders - mkdir sass/ - mkdir coffee/ - - sleep 0.2 - - # Files - touch coffee/index.coffee | echo "Touching Index.coffee" - touch sass/style.scss | echo "Touching Style.scss" - - sleep 0.2 - - touch Gulpfile.js | echo "Touching Gulpfile" - - sleep 0.2 - - # Inits - git init - npm init - - - # Node Modules - # npm install gulp gulp-util gulp-sass gulp-coffee chalk browser-sync gulp-connect-php --save-dev > /dev/null - - PS3="Do you want download Chili Scale and MDL COLORS? " - select option in yes no - do - case $option in - yes) - cd sass - curl --silent -O https://raw.githubusercontent.com/Rawnly/Material-Design-Colors-SASS/master/md_var.scss > /dev/null - cd .. - cd dist/css - curl --silent -O https://raw.githubusercontent.com/Rawnly/Chili.css/master/dist/chili.css > /dev/null - cd .. - cd js - curl --silent -O https://raw.githubusercontent.com/Rawnly/scale.js/master/dist/scale.js > /dev/null - cd ../.. - echo "Byeee!" - atom . - exit 0;; - no) - echo "Byeee!" - atom . - exit 0;; - esac - done - - - -} - -new() { - if [ -z ${1} ]; then - echo "Empty name!" - else - touch $1 - fi -} - - -gkit() { - echo "- Gulp" - sleep 0.2 - - echo "- Gulp Sass" - sleep 0.2 - - echo "- Gulp Coffee" - sleep 0.2 - - echo "- Gulp Util" - sleep 0.2 - - echo "- Gulp Connect PHP" - sleep 0.2 - - echo "- Browser Sync" - sleep 0.2 - - echo "- Chalk" - sleep 0.2 - - npm install gulp gulp-util gulp-sass gulp-coffee chalk browser-sync gulp-connect-php --save-dev -} - - - -server() { - if [ -z "${1}" ] - then - #Default Options - a='0.0.0.0' - p='8000' - open "http://$a:$p" && python -m SimpleHTTPServer $p - else - if [ -z "${2}" ] - then - $p = '4000' - open "http://${1}:$p" && python -m SimpleHTTPServer $p - else - open "http://${1}:${2}" && python -m SimpleHTTPServer $2 - fi - fi -} - - -# Check if a folder or a file exists -check() { - if [ -z "${1}" ] - then - echo "\e[31m》ERROR: \e[34mMissing file name." - else - if [ -e ${1} ] - then - echo "\e[34;1m》$1\e[0m \e[33mFounded\e[0m" - else - echo "\e[31m》ERROR 404: \e[34m $1 not found." - fi - fi -} - -# Open current folder in finder -show() { - open . -a Finder -} - -# # Edit file with Atom Editor -# atomize() { -# if [ -z "${1}" ] -# then -# echo "\e[31m》ERROR: \e[34mMissing file name." -# else -# if [ -e ${1} ] -# then -# open ${1} -a Atom -# else -# echo "\e[31m》ERROR 404: \e[34m File not found." -# fi -# fi -# -# # Use dot for current dir -# # EXAMPLE: atomize . -# } - -edit() { - if [ -z "${1}" ] - then - echo "\e[31m》ERROR: \e[34mMissing file name." - else - if [ -z "${2}" ] - then - echo "\e[31m》ERROR: \e[34mNo editor specified." - else - if [ -e ${1} ] - then - open ${1} -a ${2} - else - echo "\e[31m》ERROR 404: \e[34m File not found." - fi - fi - fi - # Use dot for current dir - # EXAMPLE: edit . -} - -ignore() { - if [ -z "${1}" ] - then - gi node,coffeescript,sass,windows,osx > .gitignore && gi node,coffeescript,sass,windows,osx > .npmignore - else - gi ${1} > .gitignore && gi ${1} > .npmignore - fi - echo "\e[32;1m》Done\e" -} - -devInstall() { - npm install -g Gulp browser-sync create-react-app electron electron-packager weather-commandline -} - -pushit() { - git add * - git commit -m "$@"; - git push -u origin master -} diff --git a/dist/rcfile.sh b/dist/rcfile.sh old mode 100755 new mode 100644 index 6738a4c..c4d2303 --- a/dist/rcfile.sh +++ b/dist/rcfile.sh @@ -1,17 +1,112 @@ -# Your .bashrc or .zshrc -export LOCALIP=$(LANG=C /sbin/ifconfig | sed -ne $'/127.0.0.1/ ! { s/^[ \t]*inet[ \t]\\{1,99\\}\\(addr:\\)\\{0,1\\}\\([0-9.]*\\)[ \t\/].*$/\\2/p; }') -export NAME="FULL" -export SURNAME="NAME" -export FULLNAME="$NAME $SURNAME" -export NICKNAME="edit this in ~/.zshrc" - -# Source files -source ~/.shells/aliases.sh -source ~/.shells/profile.sh - -# Invoke welcome message function in profile.sh -welcome - -# before install weather-commandline with the following -# 'sudo npm install -g weather-commandline' -weather +# Path to your oh-my-zsh installation. +export ZSH=/Users/$USER/.oh-my-zsh; + +export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" +export SSH_KEY_PATH="~/.ssh/rsa_id"; +export EDITOR='vim'; +export CODE_FOLDER="~/code"; +export NODE_ENV="devlopment"; +# export PS1="$PS1 $(it2setkeylabel set status $(test -d .git && (git rev-parse --abbrev-ref HEAD || (echo -n 'Not a repo'))))" + +# Set name of the theme to load. Optionally, if you set this to "random" +# it'll load a random theme each time that oh-my-zsh is loaded. +# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes + +# SpaceShip Theme: https://github.com/denysdovhan/spaceship-prompt +ZSH_THEME="spaceship" + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. Case +# sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment the following line to disable bi-weekly auto-update checks. +# DISABLE_AUTO_UPDATE="true" + +# Uncomment the following line to change how often to auto-update (in days). +export UPDATE_ZSH_DAYS=10 + +# 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. +COMPLETION_WAITING_DOTS="true" + +# 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. +# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +HIST_STAMPS="mm/dd/yyyy" + +# 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? (plugins can be found in ~/.oh-my-zsh/plugins/*) +# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=(git, npm, brew, zsh-syntax-highlighting) + +source $ZSH/oh-my-zsh.sh +source ~/zsh-plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +source ~/zsh-plugins/zsh-autosuggestions/zsh-autosuggestions.zsh +# source /usr/local/etc/profile.d/z.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='vim' +else + export EDITOR='vim' +fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. + +# Custom Files + +# Aliases +source ~/shell/.aliases.sh; + +# Stuff +source ~/shell/.extra.sh; + + +# Iterm2 Integration +test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh" + +# Added by travis gem +[ -f /Users/$USER/.travis/travis.sh ] && source /Users/$USER/.travis/travis.sh + + +################ END ########################### +# tabtab source for electron-forge package +# uninstall by removing these lines or running `tabtab uninstall electron-forge` +[[ -f /Users/$USER/.config/yarn/global/node_modules/electron-forge/node_modules/tabtab/.completions/electron-forge.zsh ]] && . /Users/$USER/.config/yarn/global/node_modules/electron-forge/node_modules/tabtab/.completions/electron-forge.zsha + +#export PS1="$(it2setkeylabel set status "$(getBranch)")" +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion diff --git a/img/keyboard.png b/img/keyboard.png deleted file mode 100755 index d3e8a7e..0000000 Binary files a/img/keyboard.png and /dev/null differ diff --git a/img/screenshot.png b/img/screenshot.png deleted file mode 100755 index 4bdf44f..0000000 Binary files a/img/screenshot.png and /dev/null differ diff --git a/install.sh b/install.sh deleted file mode 100755 index dccfffc..0000000 --- a/install.sh +++ /dev/null @@ -1,14 +0,0 @@ -echo "Hello $USER" -echo "Now i'll install all dependecies and files.." - -sudo npm install -g weather-commandline - -if [[ $SHELL == '/bin/zsh' ]] -then - echo "Your are using $SHELL" - ./.installers/install_zsh.sh -elif [[ $SHELL == '/bin/sh' ]] -then - echo "Your are using $SHELL" - ./.installers/install_bash.sh -fi diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..1340e80 --- /dev/null +++ b/setup.sh @@ -0,0 +1,52 @@ +source "./utils/libs.sh" + +macos = false + +if [["$OSTYPE" =~ ^darwin ]]; then + macos = true +fi + + +if [[ macos == true ]]; then + # Install Brew if not found on MacOS + command -v brew >/dev/null 2>&1 || installBREW +fi + +# Install ZSH if not found +command -v zsh >/dev/null 2>&1 || installZSH + +# Install OH MY ZSH +sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" + + +# Install SpaceShip Prompt +git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" +ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme" + +# Install NODE +command -v node >/dev/null 2>&1 || installNODE + +# Install NVM +echo "If you dont'. You should install NVM" + +command -v yarn >/dev/null 2>&1 || installYARN + +# Create the plugins folder +mkdir -p ~/zsh-plugins + +# Install SyntaxHighlighting & Suggestions +cd ~/zsh-plugins +git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/zsh-plugins/zsh-syntax-highlighting +git clone https://github.com/zsh-users/zsh-syntax-autocomplete.git ~/zsh-plugins/zsh-syntax-autocomplete +cd .. + +# Setup .zshrc +mv ~/.zshrc ~/.zshrc.bk +cp ./dist/rcfile ~/.zshrc + +# Setup shell folder +mkdir -p ~/shell +cd ~/shell + +cp ./dist/aliases.sh ~/shell/.aliases +cp ./dist/extra.sh ~/shell/.extra diff --git a/terminal-config/Hyper/hyper.js b/terminal-config/Hyper/hyper.js new file mode 100644 index 0000000..7222014 --- /dev/null +++ b/terminal-config/Hyper/hyper.js @@ -0,0 +1,152 @@ +// Future versions of Hyper may add additional config options, +// which will not automatically be merged into this file. +// See https://hyper.is#cfg for all currently supported options. + +module.exports = { + config: { + // choose either `'stable'` for receiving highly polished, + // or `'canary'` for less polished but more frequent updates + updateChannel: 'stable', + + // default font size in pixels for all tabs + fontSize: 16, + + // font family with optional fallbacks + fontFamily: '"Fira Code", Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace', + + // default font weight: 'normal' or 'bold' + fontWeight: 'normal', + + // font weight for bold characters: 'normal' or 'bold' + fontWeightBold: 'bold', + + // terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) + cursorColor: 'rgba(248,28,229,0.8)', + + // terminal text color under BLOCK cursor + cursorAccentColor: '#000', + + // `'BEAM'` for |, `'UNDERLINE'` for _, `'BLOCK'` for █ + cursorShape: 'BLOCK', + + // set to `true` (without backticks and without quotes) for blinking cursor + cursorBlink: false, + + // color of the text + foregroundColor: '#fff', + + // terminal background color + // opacity is only supported on macOS + backgroundColor: '#000', + + // terminal selection color + selectionColor: 'rgba(248,28,229,0.3)', + + // border color (window, tabs) + borderColor: '#333', + + // custom CSS to embed in the main window + css: '', + + // custom CSS to embed in the terminal window + termCSS: '', + + // if you're using a Linux setup which show native menus, set to false + // default: `true` on Linux, `true` on Windows, ignored on macOS + showHamburgerMenu: '', + + // set to `false` (without backticks and without quotes) if you want to hide the minimize, maximize and close buttons + // additionally, set to `'left'` if you want them on the left, like in Ubuntu + // default: `true` (without backticks and without quotes) on Windows and Linux, ignored on macOS + showWindowControls: '', + + // custom padding (CSS format, i.e.: `top right bottom left`) + padding: '12px 14px', + + // the full list. if you're going to provide the full color palette, + // including the 6 x 6 color cubes and the grayscale map, just provide + // an array here instead of a color map object + colors: { + black: '#000000', + red: '#C51E14', + green: '#1DC121', + yellow: '#C7C329', + blue: '#0A2FC4', + magenta: '#C839C5', + cyan: '#20C5C6', + white: '#C7C7C7', + lightBlack: '#686868', + lightRed: '#FD6F6B', + lightGreen: '#67F86F', + lightYellow: '#FFFA72', + lightBlue: '#6A76FB', + lightMagenta: '#FD7CFC', + lightCyan: '#68FDFE', + lightWhite: '#FFFFFF', + }, + + // the shell to run when spawning a new session (i.e. /usr/local/bin/fish) + // if left empty, your system's login shell will be used by default + // + // Windows + // - Make sure to use a full path if the binary name doesn't work + // - Remove `--login` in shellArgs + // + // Bash on Windows + // - Example: `C:\\Windows\\System32\\bash.exe` + // + // PowerShell on Windows + // - Example: `C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe` + shell: '', + + // for setting shell arguments (i.e. for using interactive shellArgs: `['-i']`) + // by default `['--login']` will be used + shellArgs: ['--login'], + + // for environment variables + env: {}, + + // set to `false` for no bell + bell: 'SOUND', + + // if `true` (without backticks and without quotes), selected text will automatically be copied to the clipboard + copyOnSelect: false, + + // if `true` (without backticks and without quotes), hyper will be set as the default protocol client for SSH + defaultSSHApp: true, + + // if `true` (without backticks and without quotes), on right click selected text will be copied or pasted if no + // selection is present (`true` by default on Windows and disables the context menu feature) + // quickEdit: true, + + // URL to custom bell + // bellSoundURL: 'http://example.com/bell.mp3', + + // for advanced config flags please refer to https://hyper.is/#cfg + verminal: { + css: ` + #hyper .header_header { + background-color: transparent !important; + } + ` + }, + }, + + // a list of plugins to fetch and install from npm + // format: [@org/]project[#version] + // examples: + // `hyperpower` + // `@company/project` + // `project#1.0.1` + plugins: ["verminal", "hyper-spotify"], + + // in development, you can create a directory under + // `~/.hyper_plugins/local/` and include it here + // to load it and avoid it being `npm install`ed + localPlugins: [], + + keymaps: { + // Example + // 'window:devtools': 'cmd+alt+o', + }, +}; diff --git a/terminal-config/iTerm2/config.json b/terminal-config/iTerm2/config.json new file mode 100644 index 0000000..18a5183 --- /dev/null +++ b/terminal-config/iTerm2/config.json @@ -0,0 +1,415 @@ +{ + "Working Directory": "\/Users\/federicovitale", + "Prompt Before Closing 2": false, + "Selected Text Color": { + "Red Component": 0, + "Color Space": "sRGB", + "Blue Component": 0, + "Alpha Component": 1, + "Green Component": 0 + }, + "Rows": 25, + "Ansi 11 Color": { + "Red Component": 1, + "Color Space": "sRGB", + "Blue Component": 0.38809695839881897, + "Alpha Component": 1, + "Green Component": 0.79957360029220581 + }, + "Use Italic Font": true, + "Foreground Color": { + "Red Component": 1, + "Color Space": "sRGB", + "Blue Component": 1, + "Alpha Component": 1, + "Green Component": 1 + }, + "Right Option Key Sends": 0, + "Character Encoding": 4, + "Selection Color": { + "Red Component": 1, + "Color Space": "sRGB", + "Blue Component": 1, + "Alpha Component": 1, + "Green Component": 1 + }, + "Mouse Reporting": true, + "Cursor Boost": 0, + "Ansi 4 Color": { + "Red Component": 0, + "Color Space": "sRGB", + "Blue Component": 1, + "Alpha Component": 1, + "Green Component": 0.58431372549019611 + }, + "Non-ASCII Anti Aliased": true, + "Sync Title": false, + "Disable Window Resizing": true, + "Description": "Default", + "Close Sessions On End": true, + "Jobs to Ignore": [ + "rlogin", + "ssh", + "slogin", + "telnet" + ], + "Scrollback Lines": 1000, + "Hide After Opening": false, + "Prevent Opening in a Tab": false, + "Flashing Bell": false, + "Cursor Guide Color": { + "Red Component": 0, + "Color Space": "sRGB", + "Blue Component": 0, + "Alpha Component": 0.0353546142578125, + "Green Component": 0 + }, + "BM Growl": true, + "Ansi 3 Color": { + "Red Component": 1, + "Color Space": "sRGB", + "Blue Component": 0.38809695839881897, + "Alpha Component": 1, + "Green Component": 0.79957360029220581 + }, + "Use Non-ASCII Font": false, + "Link Color": { + "Red Component": 0, + "Color Space": "sRGB", + "Blue Component": 0.73423302173614502, + "Alpha Component": 1, + "Green Component": 0.35916060209274292 + }, + "Shortcut": "", + "Background Image Location": "", + "Bold Color": { + "Red Component": 0.68367141485214233, + "Color Space": "sRGB", + "Blue Component": 0.80040305852890015, + "Alpha Component": 1, + "Green Component": 0.75589150190353394 + }, + "Use Cursor Guide": true, + "Unlimited Scrollback": false, + "Custom Command": "No", + "Keyboard Map": { + "0xf700-0x260000": { + "Text": "[1;6A", + "Action": 10 + }, + "0x37-0x40000": { + "Text": "0x1f", + "Action": 11 + }, + "0x32-0x40000": { + "Text": "0x00", + "Action": 11 + }, + "0xf709-0x20000": { + "Text": "[17;2~", + "Action": 10 + }, + "0xf70c-0x20000": { + "Text": "[20;2~", + "Action": 10 + }, + "0xf729-0x20000": { + "Text": "[1;2H", + "Action": 10 + }, + "0xf72b-0x40000": { + "Text": "[1;5F", + "Action": 10 + }, + "0xf705-0x20000": { + "Text": "[1;2Q", + "Action": 10 + }, + "0xf703-0x260000": { + "Text": "[1;6C", + "Action": 10 + }, + "0xf700-0x220000": { + "Text": "[1;2A", + "Action": 10 + }, + "0xf701-0x280000": { + "Text": "0x1b 0x1b 0x5b 0x42", + "Action": 11 + }, + "0x38-0x40000": { + "Text": "0x7f", + "Action": 11 + }, + "0x33-0x40000": { + "Text": "0x1b", + "Action": 11 + }, + "0xf703-0x220000": { + "Text": "[1;2C", + "Action": 10 + }, + "0xf701-0x240000": { + "Text": "[1;5B", + "Action": 10 + }, + "0xf70d-0x20000": { + "Text": "[21;2~", + "Action": 10 + }, + "0xf702-0x260000": { + "Text": "[1;6D", + "Action": 10 + }, + "0xf729-0x40000": { + "Text": "[1;5H", + "Action": 10 + }, + "0xf706-0x20000": { + "Text": "[1;2R", + "Action": 10 + }, + "0x34-0x40000": { + "Text": "0x1c", + "Action": 11 + }, + "0xf700-0x280000": { + "Text": "0x1b 0x1b 0x5b 0x41", + "Action": 11 + }, + "0x2d-0x40000": { + "Text": "0x1f", + "Action": 11 + }, + "0xf70e-0x20000": { + "Text": "[23;2~", + "Action": 10 + }, + "0xf702-0x220000": { + "Text": "[1;2D", + "Action": 10 + }, + "0xf703-0x280000": { + "Text": "0x1b 0x1b 0x5b 0x43", + "Action": 11 + }, + "0xf700-0x240000": { + "Text": "[1;5A", + "Action": 10 + }, + "0xf707-0x20000": { + "Text": "[1;2S", + "Action": 10 + }, + "0xf70a-0x20000": { + "Text": "[18;2~", + "Action": 10 + }, + "0x35-0x40000": { + "Text": "0x1d", + "Action": 11 + }, + "0xf70f-0x20000": { + "Text": "[24;2~", + "Action": 10 + }, + "0xf703-0x240000": { + "Text": "[1;5C", + "Action": 10 + }, + "0xf701-0x260000": { + "Text": "[1;6B", + "Action": 10 + }, + "0xf702-0x280000": { + "Text": "0x1b 0x1b 0x5b 0x44", + "Action": 11 + }, + "0xf72b-0x20000": { + "Text": "[1;2F", + "Action": 10 + }, + "0x36-0x40000": { + "Text": "0x1e", + "Action": 11 + }, + "0xf708-0x20000": { + "Text": "[15;2~", + "Action": 10 + }, + "0xf701-0x220000": { + "Text": "[1;2B", + "Action": 10 + }, + "0xf70b-0x20000": { + "Text": "[19;2~", + "Action": 10 + }, + "0xf702-0x240000": { + "Text": "[1;5D", + "Action": 10 + }, + "0xf704-0x20000": { + "Text": "[1;2P", + "Action": 10 + } + }, + "Ansi 14 Color": { + "Red Component": 0.48821777105331421, + "Color Space": "sRGB", + "Blue Component": 0.76116067171096802, + "Alpha Component": 1, + "Green Component": 0.78893893957138062 + }, + "Ansi 2 Color": { + "Red Component": 0, + "Color Space": "sRGB", + "Blue Component": 0.31764705882352939, + "Alpha Component": 1, + "Green Component": 0.87058823529411766 + }, + "Background Image Is Tiled": false, + "Send Code When Idle": false, + "ASCII Anti Aliased": true, + "Tags": [ + + ], + "Ansi 9 Color": { + "Red Component": 1, + "Color Space": "sRGB", + "Blue Component": 0.43036305904388428, + "Alpha Component": 1, + "Green Component": 0.3144170343875885 + }, + "Use Bold Font": true, + "Silence Bell": false, + "Ansi 12 Color": { + "Red Component": 0, + "Color Space": "sRGB", + "Blue Component": 1, + "Alpha Component": 1, + "Green Component": 0.58431372549019611 + }, + "Window Type": 0, + "Use Bright Bold": true, + "Cursor Text Color": { + "Red Component": 1, + "Color Space": "sRGB", + "Blue Component": 1, + "Alpha Component": 1, + "Green Component": 1 + }, + "Default Bookmark": "No", + "Cursor Color": { + "Red Component": 0, + "Color Space": "sRGB", + "Blue Component": 1, + "Alpha Component": 1, + "Green Component": 0.50196078431372548 + }, + "Ansi 1 Color": { + "Red Component": 1, + "Color Space": "sRGB", + "Blue Component": 0.43036305904388428, + "Alpha Component": 1, + "Green Component": 0.3144170343875885 + }, + "Name": "Default", + "Blinking Cursor": true, + "Guid": "511A0584-B3DF-4751-961C-93D4BF1EF040", + "Idle Code": 0, + "Ansi 10 Color": { + "Red Component": 0, + "Color Space": "sRGB", + "Blue Component": 0.31764705882352939, + "Alpha Component": 1, + "Green Component": 0.87058823529411766 + }, + "Ansi 8 Color": { + "Red Component": 0.4141845703125, + "Color Space": "sRGB", + "Blue Component": 0.4141845703125, + "Alpha Component": 1, + "Green Component": 0.4141845703125 + }, + "Badge Color": { + "Red Component": 1, + "Color Space": "sRGB", + "Blue Component": 0, + "Alpha Component": 0.5, + "Green Component": 0.1491314172744751 + }, + "Smart Cursor Color": false, + "Ambiguous Double Width": false, + "Blur Radius": 30, + "Cursor Type": 2, + "Ansi 0 Color": { + "Red Component": 0.202789306640625, + "Color Space": "sRGB", + "Blue Component": 0.202789306640625, + "Alpha Component": 1, + "Green Component": 0.202789306640625 + }, + "Blur": true, + "Vertical Spacing": 1, + "Normal Font": "FiraCode-Regular 14", + "Use Underline Color": false, + "Ansi 7 Color": { + "Red Component": 1, + "Color Space": "sRGB", + "Blue Component": 1, + "Alpha Component": 1, + "Green Component": 1 + }, + "Command": "", + "Terminal Type": "xterm-256color", + "Horizontal Spacing": 1, + "Option Key Sends": 0, + "Only The Default BG Color Uses Transparency": true, + "Blink Allowed": true, + "Minimum Contrast": 0, + "Ansi 15 Color": { + "Red Component": 1, + "Color Space": "sRGB", + "Blue Component": 1, + "Alpha Component": 1, + "Green Component": 1 + }, + "Open Toolbelt": false, + "Ansi 6 Color": { + "Red Component": 0.48821777105331421, + "Color Space": "sRGB", + "Blue Component": 0.76116067171096802, + "Alpha Component": 1, + "Green Component": 0.78893893957138062 + }, + "Transparency": 0.40385072969543157, + "Background Color": { + "Red Component": 0, + "Color Space": "sRGB", + "Blue Component": 0, + "Alpha Component": 1, + "Green Component": 0 + }, + "Screen": -1, + "Non Ascii Font": "Monaco 12", + "Ansi 13 Color": { + "Red Component": 0.78302878141403198, + "Color Space": "sRGB", + "Blue Component": 0.92526674270629883, + "Alpha Component": 1, + "Green Component": 0.5611909031867981 + }, + "Use Tab Color": false, + "Columns": 80, + "Visual Bell": true, + "ASCII Ligatures": true, + "Custom Directory": "No", + "Ansi 5 Color": { + "Red Component": 0.78302878141403198, + "Color Space": "sRGB", + "Blue Component": 0.92526674270629883, + "Alpha Component": 1, + "Green Component": 0.5611909031867981 + } +} \ No newline at end of file diff --git a/terminal-config/iTerm2/rawnly.itermcolors b/terminal-config/iTerm2/rawnly.itermcolors new file mode 100644 index 0000000..c8cd6e7 --- /dev/null +++ b/terminal-config/iTerm2/rawnly.itermcolors @@ -0,0 +1,344 @@ + + + + + Ansi 0 Color + + Alpha Component + 1 + Blue Component + 0.202789306640625 + Color Space + sRGB + Green Component + 0.202789306640625 + Red Component + 0.202789306640625 + + Ansi 1 Color + + Alpha Component + 1 + Blue Component + 0.43036305904388428 + Color Space + sRGB + Green Component + 0.3144170343875885 + Red Component + 1 + + Ansi 10 Color + + Alpha Component + 1 + Blue Component + 0.31764706969261169 + Color Space + sRGB + Green Component + 0.87058824300765991 + Red Component + 0.0 + + Ansi 11 Color + + Alpha Component + 1 + Blue Component + 0.38809695839881897 + Color Space + sRGB + Green Component + 0.79957360029220581 + Red Component + 1 + + Ansi 12 Color + + Alpha Component + 1 + Blue Component + 1 + Color Space + sRGB + Green Component + 0.58431375026702881 + Red Component + 0.0 + + Ansi 13 Color + + Alpha Component + 1 + Blue Component + 0.92526674270629883 + Color Space + sRGB + Green Component + 0.5611909031867981 + Red Component + 0.78302878141403198 + + Ansi 14 Color + + Alpha Component + 1 + Blue Component + 0.76116067171096802 + Color Space + sRGB + Green Component + 0.78893893957138062 + Red Component + 0.48821777105331421 + + Ansi 15 Color + + Alpha Component + 1 + Blue Component + 1 + Color Space + sRGB + Green Component + 1 + Red Component + 1 + + Ansi 2 Color + + Alpha Component + 1 + Blue Component + 0.31764706969261169 + Color Space + sRGB + Green Component + 0.87058824300765991 + Red Component + 0.0 + + Ansi 3 Color + + Alpha Component + 1 + Blue Component + 0.38809695839881897 + Color Space + sRGB + Green Component + 0.79957360029220581 + Red Component + 1 + + Ansi 4 Color + + Alpha Component + 1 + Blue Component + 1 + Color Space + sRGB + Green Component + 0.58431375026702881 + Red Component + 0.0 + + Ansi 5 Color + + Alpha Component + 1 + Blue Component + 0.92526674270629883 + Color Space + sRGB + Green Component + 0.5611909031867981 + Red Component + 0.78302878141403198 + + Ansi 6 Color + + Alpha Component + 1 + Blue Component + 0.76116067171096802 + Color Space + sRGB + Green Component + 0.78893893957138062 + Red Component + 0.48821777105331421 + + Ansi 7 Color + + Alpha Component + 1 + Blue Component + 1 + Color Space + sRGB + Green Component + 1 + Red Component + 1 + + Ansi 8 Color + + Alpha Component + 1 + Blue Component + 0.4141845703125 + Color Space + sRGB + Green Component + 0.4141845703125 + Red Component + 0.4141845703125 + + Ansi 9 Color + + Alpha Component + 1 + Blue Component + 0.43036305904388428 + Color Space + sRGB + Green Component + 0.3144170343875885 + Red Component + 1 + + Background Color + + Alpha Component + 1 + Blue Component + 0.0 + Color Space + sRGB + Green Component + 0.0 + Red Component + 0.0 + + Badge Color + + Alpha Component + 0.5 + Blue Component + 0.0 + Color Space + sRGB + Green Component + 0.1491314172744751 + Red Component + 1 + + Bold Color + + Alpha Component + 1 + Blue Component + 0.80040305852890015 + Color Space + sRGB + Green Component + 0.75589150190353394 + Red Component + 0.68367141485214233 + + Cursor Color + + Alpha Component + 1 + Blue Component + 1 + Color Space + sRGB + Green Component + 0.50196081399917603 + Red Component + 0.0 + + Cursor Guide Color + + Alpha Component + 0.0353546142578125 + Blue Component + 0.0 + Color Space + sRGB + Green Component + 0.0 + Red Component + 0.0 + + Cursor Text Color + + Alpha Component + 1 + Blue Component + 1 + Color Space + sRGB + Green Component + 1 + Red Component + 1 + + Foreground Color + + Alpha Component + 1 + Blue Component + 1 + Color Space + sRGB + Green Component + 1 + Red Component + 1 + + Link Color + + Alpha Component + 1 + Blue Component + 0.73423302173614502 + Color Space + sRGB + Green Component + 0.35916060209274292 + Red Component + 0.0 + + Selected Text Color + + Alpha Component + 1 + Blue Component + 0.0 + Color Space + sRGB + Green Component + 0.0 + Red Component + 0.0 + + Selection Color + + Alpha Component + 1 + Blue Component + 1 + Color Space + sRGB + Green Component + 1 + Red Component + 1 + + + diff --git a/utils/libs.sh b/utils/libs.sh new file mode 100644 index 0000000..85f71a7 --- /dev/null +++ b/utils/libs.sh @@ -0,0 +1,40 @@ +macos=true +linux=false + +if [[ $OSTYPE =~ ^darwin ]]; then + macos=true + linux=false +else if [[ $OSTYPE =~ ^linux ]]; then + macos=false + linux=true +fi + +function checkCURL() { + command -v curl >/dev/null 2>&1 || echo "CURL NOT INSTALLED, OPERATION ABORTED!"; exit +} + +function installBREW() { + if [["$OSTYPE" =~ ^darwin]]; then + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + fi +} + +function installZSH() { + if [ macos ]; then + brew install zsh + else if [ linux ]; then + apt-get install zsh || yum install zsh || apt install zsh; + fi +} + +function installNODE() { + curl -Ls https://install-node.now.sh | $SHELL +} + +function installNVM() { + curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | $SHELL +} + +function installYARN() { + curl -o- -L https://yarnpkg.com/install.sh | $SHELL +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..fb57ccd --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + diff --git a/zsh/dotfiles/dotfiles.plugin.zsh b/zsh/dotfiles/dotfiles.plugin.zsh deleted file mode 100644 index c5910d8..0000000 --- a/zsh/dotfiles/dotfiles.plugin.zsh +++ /dev/null @@ -1,251 +0,0 @@ -############################## -## Rawnly ## -## fedevitale99@gmail.com ## -############################## - -# === ALIAS === -alias cd..='cd ../' # Go back 1 directory level (for fast typers) -alias ..='cd ../' # Go back 1 directory level -alias ...='cd ../../' # Go back 2 directory levels -alias .3='cd ../../../' # Go back 3 directory levels -alias .4='cd ../../../../' # Go back 4 directory levels -alias .5='cd ../../../../../' # Go back 5 directory levels -alias .6='cd ../../../../../../' # Go back 6 directory levels -alias pub="dig +short myip.opendns.com @resolver1.opendns.com" - -# === END ALIAS === - - -# ADB and Fastboot to prevent ./adb or ./fastboot < command > -alias adb='./adb' -alias fastboot='./fastboot' - -alias rf='rm -rf' - -# Config File -alias zshrc="atom ~/.zshrc" -alias ohmyzsh="cd ~/.oh-my-zsh; show" - -# Go to Desktop -alias de="cd ~/Desktop" - -# Gulp --silent Shortcut -alias guls="gulp --silent" - -# List files colorized in column format. -alias ls="ls ${colorflag}" - -# Do what I fucking tell you to, machine. -alias fucking='sudo ' -alias _="sudo" - - -# Lock the screen (when going AFK) -alias lock="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend" - -# Figlet -# alias hyper='figlet hyper.app | lolcat' - -# Reload the shell (i.e. invoke as a login shell) -alias reload="clear; zsh" - -# Clear Shortcuts -alias c="clear" -alias cc="clear" - -# Prevents errors -alias claer="clear" - -# Remove folders -alias rm="rm -rf" - -# Prevents NPM authorization error -# alias npm="sudo npm" - -alias run="npm start" -alias nlist="ls `npm root -g`" - -# Same as wget -alias download="curl -O" - -# Uncomment the following if you have installed them. -# -# CRA | Craeate React Application -# alias react="create-react-app ${1} && cd $1" - -# Cute files -# Before be sure to have installed `cute-files` -# with sudo npm install -g cute-files -# alias cute="cute-files -p ${1}" - - - -# .profile.sh - - -welcome() { - # echo -ne "Good STAUTS, \e[1;35m$NICKNAME\e[0m! It's "; date '+%A, %B %-d %Y' - greetings - - echo "" - echo "" - echo "LOCAL IP: $LOCALIP" - echo -ne "PUBLIC IP: "; pub - echo "" - echo "" -} - -greetings() { - h=`date +%H` - if [ $h -lt 12 ]; then - echo -ne "Good morning, \e[1;35m$NICKNAME\e[0m! It's "; date '+%A, %B %-d %Y' - elif [ $h -lt 18 ]; then - echo -ne "Good afternoon, \e[1;35m$NICKNAME\e[0m! It's "; date '+%A, %B %-d %Y' - else - echo -ne "Good evening, \e[1;35m$NICKNAME\e[0m! It's "; date '+%A, %B %-d %Y' - fi -} - -website() { - echo -ne "Good "; dayStat; - - echo "Give me a second please..." - - # Website folders - mkdir dist/ - mkdir dist/js/ - mkdir dist/css/ - - sleep 0.2 - - # Files - touch dist/js/index.js | echo "Touching Index.js" - touch dist/css/style.css | echo "Touching Style.css" - touch dist/index.html | echo "Touching Index.html" - - sleep 0.2 - - # Non Compiled Folders - mkdir sass/ - mkdir coffee/ - - sleep 0.2 - - # Files - touch coffee/index.coffee | echo "Touching Index.coffee" - touch sass/style.scss | echo "Touching Style.scss" - - sleep 0.2 - - touch Gulpfile.js | echo "Touching Gulpfile" - - sleep 0.2 - - # Inits - git init - npm init - - echo "Install gulp and dependecies?" - read gAnsw - - if [ $gAnsw == "Yy*" ]; then - gkit(); - else - break;; - fi -} - -# Install gulp basic -gkit() { - echo "- Gulp" - sleep 0.2 - - echo "- Gulp Sass" - sleep 0.2 - - echo "- Gulp Coffee" - sleep 0.2 - - echo "- Gulp Util" - sleep 0.2 - - echo "- Gulp Connect PHP" - sleep 0.2 - - echo "- Browser Sync" - sleep 0.2 - - echo "- Chalk" - sleep 0.2 - - npm install gulp gulp-util gulp-sass gulp-coffee chalk browser-sync gulp-connect-php --save-dev -} - - -# Python SimpleHTTPServer -server() { - if [ -z "${1}" ] - then - #Default Options - a='0.0.0.0' - p='8000' - open "http://$a:$p" && python -m SimpleHTTPServer $p - else - if [ -z "${2}" ] - then - $p = '4000' - open "http://${1}:$p" && python -m SimpleHTTPServer $p - else - open "http://${1}:${2}" && python -m SimpleHTTPServer $2 - fi - fi -} - -# Open current folder in finder -show() { - open . -a Finder -} - -edit() { - if [ -z "${1}" ] - then - echo "\e[31m》ERROR: \e[34mMissing file name." - else - if [ -z "${2}" ] - then - echo "\e[31m》ERROR: \e[34mNo editor specified." - else - if [ -e ${1} ] - then - open ${1} -a ${2} - else - echo "\e[31m》ERROR 404: \e[34m File not found." - fi - fi - fi - # Use dot for current dir - # EXAMPLE: edit . -} - -# Add all and push -pushit() { - if [ -z "${1}" ]; then - echo "Usage: " - echo -ne "pushit " - echo "# Push & Add all with commit" - else - git add * - git commit -m "$1"; - git push -u origin master - fi -} - - -# dayStat() { -# p=`date +%p` -# if [ $p != 'PM' ]; then -# echo "Morning" -# else -# echo "Evening" -# fi -# }