Skip to content

Commit

Permalink
Inicial dotfiles configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Danillo Souza committed Jun 7, 2020
0 parents commit e109535
Show file tree
Hide file tree
Showing 15 changed files with 670 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Better ls.
alias lll="ls -lha"

# Human-readable disk usage.
alias dfh="df -Tha --total"

# Show IP addresses.
alias myip="dig +short myip.opendns.com @resolver1.opendns.com"
alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'"
alias whois="whois -h whois-servers.net"

# Show processes.
alias psg="ps -e -o pid,comm | grep "

# History.
alias hig="history | grep"

# Find matching files.
alias lsg='ll | grep'

# Reload shell.
alias reload="exec $SHELL -l"

# Git grep.
alias gg='git grep'

# Fast diff for large files.
alias fdiff='diff --speed-large-files'
22 changes: 22 additions & 0 deletions .config/Code/User/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"editor.fontFamily": "'Fira Code', Source Code Pro, Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": true,
"editor.fontSize": 13,
"editor.tabSize": 2,
"editor.rulers": [
80,
120
],
"editor.minimap.enabled": false,
"editor.renderIndentGuides": false,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/*.pyc": true
},
"files.trimTrailingWhitespace": true,
"telemetry.enableTelemetry": false
}
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# EditorConfig: http://EditorConfig.org

# Top-most config file
root = true

# All files
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
33 changes: 33 additions & 0 deletions .exports
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Set default editor to Vim.
set -x EDITOR vim
set -x VISUAL vim

# US English (UTF-8)
set -x LC_COLLATE en_US.UTF-8
set -x LC_CTYPE en_US.UTF-8
set -x LC_MESSAGES en_US.UTF-8
set -x LC_MONETARY en_US.UTF-8
set -x LC_NUMERIC en_US.UTF-8
set -x LC_TIME en_US.UTF-8
set -x LC_ALL en_US.UTF-8
set -x LANG en_US.UTF-8
set -x LANGUAGE en_US.UTF-8
set -x LESSCHARSET utf-8

# PATH
set PATH /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin $PATH

# dotfiles
set PATH $PATH $HOME/dotfiles/scripts

# Use GNU core utils on macOS if available.
if test -e /usr/local/opt/coreutils
set PATH /usr/local/opt/coreutils/libexec/gnubin $PATH
end

# Go
if test -e $HOME/dev/go
set -x GOPATH $HOME/dev/go
set PATH $PATH $GOPATH/bin
end

19 changes: 19 additions & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[user]
name = Danillo Souza
email = [email protected]
[alias]
co = checkout
st = status
ci = commit
br = branch
uncommit = reset HEAD~
[github]
user = paniko0
[color]
branch = auto
diff = auto
interactive = auto
status = auto
[core]
editor = vim
excludesfile = ~/.dotfiles/gitignore_global
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Fonts
fonts/*
!fonts/*.sh
48 changes: 48 additions & 0 deletions .gitignore_global
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# macOS
*.DS_Store
.AppleDouble
.LSOverride
._*
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Linux
*~
.fuse_hidden*
.directory
.Trash-*

# Tags
TAGS
.TAGS
!TAGS/
tags
.tags
!tags/

# VSCode
.vscode

# dotenvs
!.env.test
!.env.development
.env.*local
.env.*
.env

# bundle
/.bundle

# IntelliJ
.idea
.idea/**
125 changes: 125 additions & 0 deletions .tmux.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# -----------------------------------------------------------------------------
# Plugins
# -----------------------------------------------------------------------------

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'

set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-yank'

# -----------------------------------------------------------------------------
# General
# -----------------------------------------------------------------------------

# Change prefix to C-a
set -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix

# Support 256 colors
set -g default-terminal "screen-256color"

# Integrate with OS X pasteboard.
set -g default-command "reattach-to-user-namespace -l fish"

# Automatically rename window
set-window-option -g automatic-rename
setw -g automatic-rename

# Automatically set title
set-option -g set-titles on

# Start window numbering at 1 so you don't need to reach for 0.
set -g base-index 1

# Don't wait for escape sequence.
set -sg escape-time 0

# Renumber windows if anything changes
set-option -g renumber-windows on

# Update every 5 seconds
set -g status-interval 5

# Monitor activity
set-window-option -g monitor-activity on
set -g visual-activity off
set -g visual-bell off

# Vim mode
setw -g mode-keys vi

# -----------------------------------------------------------------------------
# Nesting
# -----------------------------------------------------------------------------

bind -T root F12 \
set prefix None \;\
set key-table off \;\
set window-status-current-format "#[fg=black,bg=brightyellow,nobold,nounderscore,noitalics]#[fg=white,bg=brightyellow] #I #[fg=white,bg=brightyellow] #W #[fg=brightyellow,bg=black,nobold,nounderscore,noitalics]" \;\
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
refresh-client -S \;\

bind -T off F12 \
set -u prefix \;\
set -u key-table \;\
set -u window-status-current-format \;\
refresh-client -S

# -----------------------------------------------------------------------------
# Theme
# -----------------------------------------------------------------------------

# Status bar
set -g status "on"
set -g status-style "none"
set -g status-justify "left"
set -g status-bg "black"

# Status left
set -g status-left-style "none"
set -g status-left-length "100"
set -g status-left "#[fg=white,bg=brightcyan,bold] #S #[fg=brightcyan,bg=brightyellow,nobold,nounderscore,noitalics] #[fg=white]#I:#P #[fg=brightyellow,bg=black,nobold,nounderscore,noitalics]"

# Status right
set -g status-right-style "none"
set -g status-right-length "100"
set -g status-right "#[fg=brightyellow,bg=black,nobold,nounderscore,noitalics]#[fg=white,bg=brightyellow] #(uptime | sed 's/.*load average//' | awk '{print $2, $3, $4}')  %Y-%m-%d %H:%M #[fg=brightcyan,bg=brightyellow,nobold,nounderscore,noitalics]#[fg=white,bg=brightcyan] #h "

# Window
setw -g window-status-style "none"
setw -g window-status-separator ""
setw -g window-status-format "#[fg=white,bg=black] #I #[fg=white,bg=black] #W "

# Active window
setw -g window-status-activity-style "bold"
setw -g window-status-current-format "#[fg=black,bg=white,nobold,nounderscore,noitalics]#[fg=black,bg=white] #I #[fg=black,bg=white] #W #[fg=white,bg=black,nobold,nounderscore,noitalics]"

# Panes
set -g pane-active-border-style "fg=white"
set -g pane-border-style "fg=brightgreen"

# -----------------------------------------------------------------------------
# Key Bindings
# -----------------------------------------------------------------------------

# Re-Load tmux config
bind R source-file ~/.tmux.conf \; display-message "Reloaded ~/.tmux.conf"

# Join pane
bind P choose-window 'join-pane -h -s "%%"'

# Move the current window left or right
bind S-left swap-window -t -1
bind S-right swap-window -t +1

# -----------------------------------------------------------------------------
# Tmux Plugin Manager
# -----------------------------------------------------------------------------

# Initialize TMUX plugin manager
# (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
1 change: 1 addition & 0 deletions .vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set number
Loading

0 comments on commit e109535

Please sign in to comment.