Code Monkey home page Code Monkey logo

dotfiles's Introduction

Hi there 👋

I'm Daniel, a developer interested in web technologies 🌐, linux 🐧 and open source.
Feel free to check out my repositories or reach out to me:

⬇️
💼 Linkedin: Daniel Vera Gilliard
🐦 Twitter: @DVG3012
🔑 Keybase: @dvg
✍️ dev.to: @dvg3012
  • 🔭 I’m currently working on different projects, just checkout my repos 🤖
  • 🌱 I’m currently learning flutter, go, linux, vim, gRPC, APIs, Kubernetes, ....
  • 💬 Ask me about linux, web dev, ...
  • ⚡ Fun fact: That guy in the picture is me 👨‍💻

dotfiles's People

Contributors

daniel-vera-g avatar

Stargazers

 avatar

Watchers

 avatar

dotfiles's Issues

tmux improvements

https://mutelight.org/practical-tmux | Practical Tmux
https://www.sitepoint.com/10-killer-tmux-tips/ | 10 Killer Tmux Tips — SitePoint
http://www.deanbodenham.com/learn/tmux-conf-file.html | tmux: making a conf file - Statistically Irrelevant


config file for TMUX 2.1

good practice: don't use different aliases for the same command

set --> set-option

setw --> set-window-option

run --> run-shell

bind --> bind-key

-r flag: enable keep hitting bind key without prefix

-n flag: enable bind key without prefix

-g flag: global

always use bash :)

set -g default-shell /bin/bash
set -g default-terminal "screen-256color"
set -g default-command "bash"

command history

set -g history-limit 100000

set 1 default first window number

set -g base-index 1
setw -g pane-base-index 1

use unicode

set -g utf8 on

set -g status-utf8 on

use xterm keys

setw -g xterm-keys on

no more bell messages

set -g bell-action any
set -g visual-bell off
set -g visual-activity off
set -g visual-silence off

When a smaller terminal connects to a tmux client, it shrinks to fit it.

setw -g aggressive-resize on

kill pane/window/session

bind x confirm-before -p 'Kill pane (y/N)?' kill-pane

bind X confirm-before -p 'Kill session (y/N)?' '
run-shell "
if [ $(tmux list-sessions | wc -l) -ge 2 ]; then
tmux switch-client -ln;
fi;
tmux kill-session -t "#S";
tmux refresh-client -S;
"'

bind C-x command-prompt -p 'Windows to kill:' '
run-shell "
for w in $(echo %% | sort -n -r); do
tmux kill-window -t $w;
done;
"'

bind C-d run-shell "
if [ #{session_windows} -eq 1 ] &&
[ #{window_panes} -eq 1 ] &&
[ #{pane_current_command} = 'bash' ]; then
if [ $(tmux list-sessions | wc -l) -ge 2 ]; then
tmux switch-client -ln;
fi; tmux kill-session -t "#S";
else
tmux display-message "Ignoring kill session...";
fi;
"

bind D confirm-before -p 'Kill tmux (y/N)?' '
run-shell "
for s in $(tmux list-sessions -F "##{session_name}"); do
for w in $(tmux list-windows -t $s -F "##{window_index}"); do
for p in $(tmux list-panes -t "$s:$w" -F "##{pane_index}"); do
t="$s:$w.$p";
bin=$(tmux display-message -t $t -p -F "##{pane_current_command}");
if [ "$bin" = "vim" ]; then
tmux send-keys -t $t Escape;
tmux send-keys -t $t :qa;
tmux send-keys -t $t Enter;
sleep 0.5; tmux refresh-client -S;
bin=$(tmux display-message -t $t -p -F "##{pane_current_command}");
if [ "$bin" = "vim" ]; then
tmux send-keys -t $t Escape;
tmux select-pane -t $t;
tmux select-window -t "$s:$w";
tmux display-message "Exit vim and re-run the command...";
exit 0;
fi;
fi;
done;
done;
done;
tmux confirm-before -p "Confirm kill tmux (y/N)?" kill-server;
"'

tmux confirm-before -p "Proceed to kill server (y/N)?" kill-server

force a reload of the config file

bind r source-file ~/.tmux.conf; display-message "Config reloaded..."

enabele mouse support

set -g mouse on

toggle print to all panes in a window at once!!

bind e setw synchronize-panes

refresh time interval, escape pause time and message time

set -g status-interval 1
set -sg escape-time 0
set -g display-time 1500
set -g display-panes-time 10000

act like gnu screen

unbind C-b
set -g prefix C-a

for nested tmux sessions, with prefix 'C-a C-s'

bind C-s send-prefix

clear terminal in focus

bind C-t run-shell '
bin=$(tmux display-message -p -F "#{pane_current_command}");
if [ "$bin" = "bash" ]; then
tmux send-keys C-c;
tmux send-keys clear;
sleep 0.1;
tmux send-keys Enter;
fi;
'; clear-history; display-message "History cleared...";

act like vim

setw -g mode-keys vi
unbind [
bind v copy-mode
bind C-v copy-mode

bind -t vi-copy C-e start-of-line
bind -t vi-copy C-r end-of-line
bind -t vi-copy e start-of-line
bind -t vi-copy r end-of-line
bind -t vi-copy v begin-selection
bind -t vi-copy V rectangle-toggle
bind -t vi-copy K halfpage-up
bind -t vi-copy J halfpage-down
bind -t vi-copy h cursor-left
bind -t vi-copy j cursor-down
bind -t vi-copy k cursor-up
bind -t vi-copy l cursor-right
bind -t vi-copy Escape cancel
bind -t vi-copy f cancel
bind -t vi-copy C-f cancel
bind -t vi-copy C-y copy-pipe "cat | xsel -i -b"
bind -t vi-copy Y copy-pipe "cat | xclip -i"
bind -t vi-copy y copy-pipe "cat > ~/.buffer"
bind C-p run-shell "tmux set-buffer "$(xsel --clipboard)"; tmux paste-buffer"
bind P run-shell "tmux set-buffer "$(xclip -o)"; tmux paste-buffer"
bind p run-shell "tmux set-buffer "$(cat ~/.buffer)"; tmux paste-buffer"
bind -t vi-copy C-y copy-pipe "cat | xsel -i -b"
bind -t vi-copy y copy-pipe "cat | xclip -i"

fix for weird output upon copy

set -g set-clipboard off

workaround for global copy: copy to and from file buffer

bind -t vi-copy y copy-pipe "cat >~/.copybuffer"

bind p run "tmux load-buffer ~/.copybuffer; tmux paste-buffer;"

reorder window numbering

set -g renumber-windows off
bind R
move-window -r;
display-message "Windows reordered..."

session navigation

bind s choose-session -F 'session #{session_name} #{?session_attached,(attached), } : #{session_windows} windows (#{window_name}#{pane_title})' ; refresh-client -S
bind n switch-client -n ; refresh-client -S
bind N switch-client -p ; refresh-client -S

window/pane navigation

bind k select-pane -U; refresh-client -S
bind j select-pane -D; refresh-client -S
bind l select-pane -R; refresh-client -S
bind h select-pane -L; refresh-client -S

window navigation

bind C-a last-window ; refresh-client -S
bind -r C-h previous-window ; refresh-client -S
bind -r C-l next-window ; refresh-client -S
bind 0 select-window -t 10 ; refresh-client -S

window creation/splitting

bind [ split-window -h -p 50 -c "#{pane_current_path}"
bind ] split-window -v -p 50 -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
bind C
run-shell 'tmux set-environment -g PANE_CURRENT_PATH #{pane_current_path}' ;
new-session 'cd $(eval "$(tmux showenv -g PANE_CURRENT_PATH)"; echo $PANE_CURRENT_PATH); bash -l'

bind i command-prompt -p 'Insert window at:' 'new-window -c "#{pane_current_path}" -a -t %1; swap-window -t -1'
bind I command-prompt -p 'New window at:' 'new-window -c "#{pane_current_path}" -t %1'

resize pane

bind -r K resize-pane -U
bind -r J resize-pane -D
bind -r L resize-pane -R
bind -r H resize-pane -L
bind m resize-pane -Z # toggle maximize pane

window manipulations

bind a command-prompt -p "Rename window:" "rename-window %%"
bind A command-prompt -p "Rename session:" "rename-session %%"
bind M command-prompt -p "Move window to:" "move-window -t %%"
bind S command-prompt -p "Swap window with:" "swap-window -t %%"

set bar at the bottom (can also be 'top')

set-option -g status-position bottom

tmux session name

set -g set-titles on
set -g set-titles-string '[#H:#S] #W #T' # session name, active program, pane title

rename window with currently running command

setw -g automatic-rename on

------------------------------------------------------------------------------

tmux color scheme

------------------------------------------------------------------------------

used colours

GREY="colour233"
LGREY="colour235"
BLUE="colour4"
BLACK="#000000"
ORANGE="colour172"
GREEN="colour76"
WHITE="colour252"

status bar formats

WINDOW="[#I #W#T]"
STATUS_LEFT=" #H #S #[fg=$WHITE]| "
STATUS_RIGHT="#{?client_prefix,PRE ,}#(bash -c 'source ~/.bash_tmux; tmuxstatusline;')%d-%m-%Y %H:%M "

setw -g window-status-current-format $WINDOW
setw -g window-status-format $WINDOW
set -g status-left-length 20
set -g status-left-attr bright
set -g status-left $STATUS_LEFT

set -g status-right-length 40
set -g status-right-attr dim
set -g status-right $STATUS_RIGHT

default statusbar colors

set -g status-fg $WHITE
set -g status-bg $GREY
set -g status-attr dim

default left status colors

set -g status-left-bg $GREY
set -g status-left-fg $BLUE
set -g status-left-attr bright

default right status colors

set -g status-right-bg $GREY
set -g status-right-fg $WHITE
set -g status-right-attr dim

default window title colors

setw -g window-status-fg $WHITE
setw -g window-status-bg $GREY
setw -g window-status-attr dim

active windows status colors

setw -g window-status-current-fg $ORANGE
setw -g window-status-current-bg $GREY
setw -g window-status-current-attr bright

last window status colors

setw -g window-status-last-fg white
setw -g window-status-last-bg $GREY
setw -g window-status-last-attr bright

watch for activity in background windows

setw -g monitor-activity on
setw -g window-status-activity-fg $GREEN
setw -g window-status-activity-bg $GREY
setw -g window-status-activity-attr dim

set active/pasive pane background colours

set -g window-style fg=default
set -g window-style bg=$GREY
set -g window-active-style fg=default
set -g window-active-style bg=$BLACK

pane colors

set -g display-panes-active-colour $ORANGE
set -g display-panes-colour $WHITE
set -g pane-active-border-fg $LGREY
set -g pane-active-border-bg $GREY
set -g pane-border-fg $LGREY
set -g pane-border-bg $GREY

message colors

set -g message-command-attr bright
set -g message-command-bg $ORANGE
set -g message-command-fg $GREY
set -g message-attr bright
set -g message-bg $ORANGE
set -g message-fg $GREY

https://github.com/rothgar/awesome-tmux#tutorials | rothgar/awesome-tmux: A list of awesome resources for tmux
https://blog.petrzemek.net/2016/02/11/my-tmux-configuration/ | My Tmux Configuration | Petr Zemek
https://hackernoon.com/customizing-tmux-b3d2a5050207 | Customizing Tmux – Hacker Noon
https://www.sitepoint.com/10-killer-tmux-tips/ | 10 Killer Tmux Tips — SitePoint
https://medium.com/@joe_wolfe_21/the-ultimate-terminal-67e93665459d | The Ultimate Terminal – Joe Wolfe – Medium
https://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/ | Making tmux Pretty and Usable - A Guide to Customizing your tmux.conf
https://github.com/rothgar/awesome-tmux | rothgar/awesome-tmux: A list of awesome resources for tmux
https://github.com/rothgar/awesome-tmux | rothgar/awesome-tmux: A list of awesome resources for tmux
https://linuxize.com/post/getting-started-with-tmux/?utm_source=hackernewsletter&utm_medium=email&utm_term=code | Getting started with Tmux | Linuxize

Vim Markdown

Configurate markdown, so that it is great to write markdown with it

https://www.swamphogg.com/2015/vim-setup/ | Vim Setup for Markdown – Swamp Hogg
http://www.joeloliveira.com/2016/01/02/writing-in-markdown-with-vim.html | Writing in Markdown With Vim
http://www.naperwrimo.org/wiki/index.php?title=Vim_for_Writers | Vim for Writers - NaperWriMo Wiki
https://github.com/plasticboy/vim-markdown | GitHub - plasticboy/vim-markdown: Markdown Vim Mode
https://stackoverflow.com/questions/10964681/enabling-markdown-highlighting-in-vim | Enabling markdown highlighting in Vim - Stack Overflow
https://blog.sourcerer.io/making-vim-great-again-cdfbc281428b

https://www.swamphogg.com/2015/vim-setup/ | Vim Setup for Markdown – Swamp Hogg
http://www.joeloliveira.com/2016/01/02/writing-in-markdown-with-vim.html | Writing in Markdown With Vim
http://www.naperwrimo.org/wiki/index.php?title=Vim_for_Writers | Vim for Writers - NaperWriMo Wiki
https://github.com/plasticboy/vim-markdown | GitHub - plasticboy/vim-markdown: Markdown Vim Mode
https://stackoverflow.com/questions/10964681/enabling-markdown-highlighting-in-vim | Enabling markdown highlighting in Vim - Stack Overflow

Install Solaar

Install Solaar to use Logitec Hardware
sudo apt install solaar

Add sudo

Add sudo command to app installations.
This is causing, that f.ex the spaceship theme can not be installed.

Install firefox developer edition

  1. cd ~/Downloads
  2. wget "https://download-installer.cdn.mozilla.net/pub/devedition/releases/63.0b11/linux-x86_64/de/firefox-63.0b11.tar.bz2" -> update
  3. tar xjf firefox-63.0b11.tar.bz2
  4. sudo mv firefox /usr/local/firefox_dev
  5. vim ~/.local/share/applications/firefox_dev.desktop
  6. Paste in the File:
[Desktop Entry]
  2 Name=Firefox Developer
  3 GenericName=Firefox Developer Edition
  4 Exec=/usr/local/firefox_dev/firefox
  5 Terminal=false
  6 Icon=/usr/local/firefox_dev/browser/chrome/icons/default/default64.png
  7 Type=Application
  8 Categories=Application;Network;X-Developer;
  9 Comment=Firefox Developer Edition Web 

https://tecadmin.net/install-firefox-developer-edition-on-ubuntu/
https://askubuntu.com/questions/548003/how-do-i-install-the-firefox-developer-edition
https://www.google.com/search?q=install+firefox+developer+edition+ubuntu&oq=install+firefox+developer+edition+ubuntu&aqs=chrome..69i57j69i60j0l4.5866j0j4&sourceid=chrome&ie=UTF-8

Improve vim

https://davidosomething.com/blog/vim-for-javascript/ | davidosomething.com | Setting up Vim for JavaScript development
https://medium.com/full-stack-web-development/web-development-with-vim-5aacd4d07c93 | Web Development with Vim � Full Stack Web Development � Medium
https://gosukiwi.svbtle.com/vim-configuration-for-web-development | Using Vim for web development
https://github.com/vim-dist/webvim | vim-dist/webvim: WebVim is a vim based distribution targeting JavaScript and Web development
https://github.com/davidyezsetz/.vim | davidyezsetz/.vim: Vim setup for web development
https://blog.envylabs.com/osx-vim-setup-for-a-designer-front-end-dev-566aa0690e84 | Vim setup for a designer/front-end dev on macOS � Insightful Software
https://ncona.com/2015/09/quick-vim-setup/ | Quick Vim setup | A web developer's blog
https://javascriptplayground.com/vim-for-javascript/ | Setting up Vim for modern JavaScript Development
https://stackoverflow.com/questions/9383651/what-is-the-best-configuration-of-vim-for-web-developing | php - What is the best configuration of vim for web developing? - Stack Overflow
https://micropyramid.com/blog/vim-for-python-web-development/ | Vim for Python Web Development - MicroPyramid
https://medium.com/@alexlafroscia/writing-js-in-vim-4c971a95fd49 | Writing JS in Vim � Alex LaFroscia � Medium
https://medium.com/@alexlafroscia/writing-js-in-vim-4c971a95fd49 | Writing JS in Vim � Alex LaFroscia � Medium
https://github.com/pangloss/vim-javascript | pangloss/vim-javascript: Vastly improved Javascript indentation and syntax support in Vim.
https://blog.hellojs.org/configure-vim-from-scratch-efe5cbc1c563 | Configure Vim from scratch � hello JS
https://hackernoon.com/5-vim-plugins-i-cant-live-without-for-javascript-development-f7e98f98e8d5 | 5 Vim Plugins I Can�t Live Without for Javascript Development
https://blog.cloudboost.io/vim-for-js-development-a4d2e54ecb58 | Vim For JS Development � CloudBoost
http://www.dotnetsurfers.com/blog/2016/02/08/using-vim-as-a-javascript-ide | Using Vim as a JavaScript IDE - DotNetSurfers
https://yourwebsitefirst.com/setting-vim-modern-javascript-development/ | Setting Up Vim for Modern JavaScript Development - OnlineMagz
https://medium.com/full-stack-web-development/web-development-with-vim-5aacd4d07c93 | Web Development with Vim � Full Stack Web Development � Medium
https://github.com/L0stSoul/vim-config | L0stSoul/vim-config: Nice vim config for front-end development
https://coderoncode.com/tools/2017/04/16/vim-the-perfect-ide.html | Vim Is The Perfect IDE
https://benfrain.com/learning-vim-front-end-coding-month/ | Learning Vim for front-end coding: a month in � Ben Frain
https://www.taniarascia.com/my-front-end-web-development-setup/ | My Complete Front End Web Development Setup � Tania Rascia

https://www.ostechnix.com/vim-plug-a-minimalist-vim-plugin-manager/ | Vim-plug : A Minimalist Vim Plugin Manager - OSTechNix

https://medium.com/@huntie/10-essential-vim-plugins-for-2018-39957190b7a9 | 10 essential Vim plugins for 2018 � Alex Hunt � Medium
https://github.com/junegunn/fzf | junegunn/fzf: A command-line fuzzy finder
https://github.com/terryma/vim-multiple-cursors | terryma/vim-multiple-cursors: True Sublime Text style multiple selections for Vim
https://github.com/scrooloose/nerdtree | scrooloose/nerdtree: A tree explorer plugin for vim.
http://kushellig.de/beste-vim-plugins/ | 20 Top Vim Plugins Die Du Kennen Solltest // kushellig
https://vimawesome.com/ | Vim Awesome
https://github.com/akrawchyk/awesome-vim | akrawchyk/awesome-vim: The Vim plugin shortlist
https://www.reddit.com/r/vim/comments/6562vs/top_5_best_vim_plugins_in_2017/ | Top 5 Best Vim Plugins In 2017 : vim
https://t3n.de/news/vim-plugins-editor-580624/ | VimAwesome: Die besten Plugins für den Editor in der Übersicht | ? t3n
http://joelhooks.com/blog/2013/04/23/5-essential-vim-plugins/ | 5 Essential VIM Plugins That Greatly Increase my Productivity - @jhooks
https://www.quora.com/Which-are-the-best-Vim-plugins | Which are the best Vim plugins? - Quora

Create vimrc file:
https://github.com/mre/dotVim/blob/master/.vimrc | dotvim/.vimrc at master · mre/dotvim
https://github.com/amix/vimrc | amix/vimrc: The ultimate Vim configuration: vimrc
https://gist.github.com/JeffreyWay/6753834 | My .vimrc file
https://stackoverflow.com/questions/10921441/where-is-my-vimrc-file | vim - Where is my .vimrc file? - Stack Overflow
http://vim.wikia.com/wiki/Open_vimrc_file | Open vimrc file | Vim Tips Wiki | FANDOM powered by Wikia
http://vim.wikia.com/wiki/Example_vimrc | Example vimrc | Vim Tips Wiki | FANDOM powered by Wikia
https://dougblack.io/words/a-good-vimrc.html | A Good Vimrc
https://emanuelduss.ch/2011/04/meine-konfigurationsdatei-fur-vim-vimrc/ | Meine Konfigurationsdatei für VIM (.vimrc) | Blog von Emanuel Duss | emanuelduss.ch
http://learnvimscriptthehardway.stevelosh.com/chapters/07.html | Editing Your Vimrc / Learn Vimscript the Hard Way
https://andrew.stwrt.ca/posts/project-specific-vimrc/ | Project Specific .vimrc Files � Andrew Stewart
https://vim-bootstrap.com/ | Vim Bootstrap

Install MikTex

Install MikTex to be able to convert Markdown/LaTex files int PDF.

Eslint/prettier

set up eslint/prettier for better formating while js coding

Fix oh-my-zsh right issues

/home/dvg/.oh-my-zsh/plugins/npm/npm.plugin.zsh:5: permission denied: /home/dvg/.oh-my-zsh/cache/npm_completion
/home/dvg/.oh-my-zsh/oh-my-zsh.sh:source:116: no such file or directory: /home/dvg/.oh-my-zsh/themes/spaceship.zsh-theme

Test everything

Test all the features in the VM to be sure everything works at the first time.

Npm plugin issue zsh

The npm plugin seems to have an issue with the permissions -> related issue with sudo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.