commit ced5b5ed63fd6a4e707a2e3e5eb9f3b1e8959817
parent 13c17ef14125627d7cc715ebb18d38150b2b7a11
Author: oscarbenedito <oscar@obenedito.org>
Date:   Fri, 24 Jan 2020 02:01:55 +0100

Fixed bugs and added aliases

Diffstat:
MREADME.md | 14++++++++++++++
Mdot_aliases.tmpl | 11+++++++++++
Mdot_scripts/executable_deploy-website.sh | 17+++++++++--------
Mdot_scripts/executable_tmux-website.sh | 10+++++-----
Mdot_vimrc | 6++++--
Mdot_zshrc | 3+++
6 files changed, 46 insertions(+), 15 deletions(-)

diff --git a/README.md b/README.md @@ -4,5 +4,19 @@ This directory hosts some of my dotfiles. It is currently a work in progress. ## Setup I use [chezmoi](https://github.com/twpayne/chezmoi) to manage varying configs across different machines. +I also have the terminal emulator set up with the following colors (based on the +onedark vim theme): + +| Color code | Color | Color number | +| :--------: | :-----: | :----------: | +| 30 | black | #282C34 | +| 31 | red | #E06C75 | +| 32 | green | #98C379 | +| 33 | yellow | #E5C07B | +| 34 | blue | #61AFEF | +| 35 | magenta | #C678DD | +| 36 | cyan | #56B6C2 | +| 37 | white | #FFFFFF | + ## License This repository is licensed under the CC0 1.0 Universal license and therefore is part of the public domain. To the extent possible under law, Oscar Benedito, who associated CC0 with this work, has waived all copyright and related or neighboring rights to this work. You can find a copy of the CC0 license [here](https://gitlab.com/oscarbenedito/dotfiles/blob/master/COPYING). diff --git a/dot_aliases.tmpl b/dot_aliases.tmpl @@ -1,5 +1,16 @@ alias clear="printf '\033c'" + +# Colors alias ls="ls --color=auto" +alias grep="grep --color=auto" +alias fgrep="fgrep --color=auto" +alias egrep="egrep --color=auto" +alias diff="diff --color=auto" + +# Chezmoi +alias c="chezmoi" +alias ce="chezmoi edit" + {{ if ne .chezmoi.hostname "fme-desktop" -}} alias upgrade=" {{- if eq .chezmoi.osRelease.id "debian" -}} diff --git a/dot_scripts/executable_deploy-website.sh b/dot_scripts/executable_deploy-website.sh @@ -1,14 +1,15 @@ -#!/bin/bash +#!/bin/sh HUGO_PATH="$HOME/Git/obenedito.org" TEMP_DIR="$HOME/.tmp-webdav" MOUNT_PATH="/media/obenedito" WEBDAV_FOLDER="html-obenedito.org" -rm -rf $HUGO_PATH/public -hugo -s $HUGO_PATH --minify -mount $MOUNT_PATH -mkdir $TEMP_DIR -rsync -ruvc --progress --delete --temp-dir=$TEMP_DIR $HUGO_PATH/public/ $MOUNT_PATH/$WEBDAV_FOLDER -rmdir $TEMP_DIR -umount $MOUNT_PATH +rm -rf "$HUGO_PATH/public" +hugo -s "$HUGO_PATH" --minify +mount "$MOUNT_PATH" +mkdir "$TEMP_DIR" +rsync -ruvc --progress --delete --temp-dir="$TEMP_DIR $HUGO_PATH/public/" \ + "$MOUNT_PATH/$WEBDAV_FOLDER" +rmdir "$TEMP_DIR" +umount "$MOUNT_PATH" diff --git a/dot_scripts/executable_tmux-website.sh b/dot_scripts/executable_tmux-website.sh @@ -1,20 +1,20 @@ -#!/bin/bash +#!/bin/sh SESSION=$USER # New tmux session -tmux -2 new-session -d -s $SESSION +tmux -2 new-session -d -s "$SESSION" # New window called Hugo running 'hugo server' in website folder -tmux new-window -t $SESSION:1 -n 'hugo' +tmux new-window -t "$SESSION:1" -n 'hugo' tmux send-keys "cd ~/Git/obenedito.org" C-m tmux send-keys "hugo server" C-m # Back to window #0, open file with atom, run local server and open it on firefox -tmux select-window -t $SESSION:0 +tmux select-window -t "$SESSION:0" tmux send-keys "cd ~/Git/obenedito.org" C-m tmux send-keys "atom . &" C-m tmux send-keys "firefox http://localhost:1313/ &" C-m # Attach session -tmux -2 attach-session -t $SESSION +tmux -2 attach-session -t "$SESSION" diff --git a/dot_vimrc b/dot_vimrc @@ -31,10 +31,12 @@ set linebreak set splitbelow set splitright -imap <C-o> <Plug>IMAP_JumpForward " switch C-j to C-o on latex-suite +" switch C-j to C-o on latex-suite +imap <C-o> <Plug>IMAP_JumpForward nmap <C-o> <Plug>IMAP_JumpForward -map <C-h> <C-w>h " set up vim-like commands to switch panels +" set up vim-like commands to switch panels +map <C-h> <C-w>h map <C-j> <C-w>j map <C-k> <C-w>k map <C-l> <C-w>l diff --git a/dot_zshrc b/dot_zshrc @@ -7,6 +7,9 @@ HISTSIZE=1000 SAVEHIST=1000 HISTFILE=~/.zsh_history +setopt HIST_IGNORE_DUPS +setopt HIST_FIND_NO_DUPS + # Set up navigation menu when pressing tab multiple times autoload -U compinit zstyle ':completion:*' menu select