Skip to content

Commit

Permalink
Move my-home to home
Browse files Browse the repository at this point in the history
  • Loading branch information
erichlf committed Jun 30, 2024
1 parent 004238a commit dc82416
Show file tree
Hide file tree
Showing 9 changed files with 314 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
*.swp
*.swo
.ropeproject
.pentadactyl/info
my-home/dot-tmux/plugins/*
home/dot-tmux/plugins/*
config/*/lazy-lock.json
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
url = git@github.com:erichlf/dotfiles-private.git
branch = master
[submodule "my-home/dot-tmux/plugins/tpm"]
path = my-home/dot-tmux/plugins/tpm
path = home/dot-tmux/plugins/tpm
url = https://github.com/tmux-plugins/tpm
12 changes: 12 additions & 0 deletions home/dot-aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
alias vi='lvim'
alias emacs='emacsclient -c -a emacs'
alias tmux='tmux -2'
ls --color=auto &> /dev/null && alias ls='ls --color=auto'
alias ll='ls -lh'
alias la='ls -a'
alias lla='ls -lah'
alias grep='grep --color=always'

# nas docker aliases
alias youtube-dl='docker run --rm -i -e PGID=$(id -g) -e PUID=$(id -u) -v ${PWD}:/workdir:rw ghcr.io/mikenye/docker-youtube-dl:latest'
alias tvnamer='docker run --rm -i -e PGID=$(id -g) -e PUID=$(id -u) -v ${PWD}:/workdir:rw -v /share/Public/Videos/Series/mytvnamerconfig.json:/config/tvnamerconfig.json:ro tvnamer'
23 changes: 23 additions & 0 deletions home/dot-exports
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export HISTCONTROL=ignoreboth:erasedups
export HISTSIZE=10000
export TIMEFORMAT=$'\nreal %3R\tuser %3U\tsys %3S\tpcpu %P\n'
[ -f /usr/share/X11/locale/en_US.UTF-8 ] && export LC_ALL="en_US.UTF-8"
export PROMPT_COMMAND='history -a'
export TERM=xterm # this is to fix some annoying things with screen
export EDITOR='lvim'
export VISUAL='vim'
export dockerclean='docker image prune -a --filter "until=12h"'
export HALCONROOT=$HOME/MVTec/HALCON-22.11-Steady
export HALCONARCH="x64-linux"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$HALCONROOT/lib/$HALCONARCH"

# check if we are on OSX and then set CLICOLOR
unamestr=`uname`
if [[ "$unamestr" == 'Darwin' ]]; then
export CLICOLOR=1
fi

path+=($HOME/.local/bin $HOME/.npm-global/bin $HOME/.rvm/bin $path)
export PATH
export ROS_DOMAIN_ID="3"
export GPG_TTY=$(tty)
84 changes: 84 additions & 0 deletions home/dot-gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
[user]
name = Erich L Foster
email = erichlf@gmail.com
# signingkey = 08A7E764EC1713A9
[core]
editor = nvim
autocrlf = input
excludesfile = ~/.gitexcludes
[push]
default = upstream
recurseSubmodules = check
[color]
branch = auto
diff = auto
status = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[credential]
helper = /usr/share/doc/git/contrib/credential/gnome-keyring/git-credential-gnome-keyring
helper =
helper = /usr/local/bin/git-credential-manager
credentialStore = secretservice
[merge]
ff = false
tool = meld
[merge "tool.meld"]
trustExitCode = true
conflictstyle = diff3
ff = false
[pull]
rebase = merges
recurseSubmodules = yes
[rebase]
autoSquash = true
[submodule]
recurse = true
[status]
submodulesummary = 1
[diff]
tool = meld
submodule = log
compactionHeuristic = true
[diff "jpg"]
textconv = exif
[difftool]
prompt = false
[difftool "meld"]
cmd = meld -n "$LOCAL" "$REMOTE"
[includeIf "gitdir:~/ros_ws/src/**"]
path = ~/ros_ws/.samxl-gitconfig
[includeIf "gitdir:/workspaces/src/**"]
path = /workspaces/.samxl-gitconfig
[alias]
diffall = difftool -d
diffeach = "!f(){\
git diff --name-only "$@" | while read filename; do git difftool "$@" --no-prompt "$filename" & done \
}; f"
prettylog = log --graph --pretty=format:\"%C(auto)%d %h %C(magenta)%(trailers:key=Refs,separator= ) %C(cyan)%cn %C(auto)%s\"
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
[commit]
gpgSign = true
[grep]
lineNumber = true
[credential "https://dev.azure.com"]
useHttpPath = true
[init]
defaultBranch = main
[safe]
directory = *
16 changes: 16 additions & 0 deletions home/dot-gitexcludes
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.#*
.clang_complete
.clangd
.ccls-cache
.dir-locals.el
.gitlab.nvim
.org-gcal-token
.org-generic-id-locations
.ropeproject
cc_args.py
compile_commands.json
logview-cache.extmap
org-gcal---sync-tokens
persist
settings.el
__pycache__
85 changes: 85 additions & 0 deletions home/dot-tmux.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# reload tmux config
bind r source-file ${HOME}/.tmux.conf

set-option -g default-terminal "screen-256color"
set-option -g terminal-overrides ",xterm-256color:RGB"
set-option -g automatic-rename on
set-option -g automatic-rename-format "#{b:pane_current_path}"

set -g prefix C-a

set -g mouse on

set -g renumber-windows on
set -g set-clipboard on
set -g status-position bottom
set -g default-terminal "${TERM}"
setw -g mode-keys vi
set -g pane-active-border-style "fg=magenta,bg=default"
set -g pane-border-style "fg=brightblack,bg=default"

# Use Alt-arrow keys without prefix key to switch panes
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
bind P paste-buffer
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"

bind -n C-h select-pane -L
bind -n C-j select-pane -D
bind -n C-k select-pane -U
bind -n C-l select-pane -R

bind -n C-Left previous-window
bind -n C-Right next-window
bind -n C-Tab last-window
bind w list-windows
bind n new-window

bind s split-window -v -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"

bind z resize-pane -Z
bind x swap-pane -D
bind c kill-pane

bind * setw synchronize-panes
bind P set pane-border-status

bind S choose-session

bind l refresh-client

bind R command-prompt "rename-window %%"
bind : command-prompt

# List of plugins
set -g @plugin "tmux-plugins/tpm"
set -g @plugin "dracula/tmux"
set -g @plugin "sainnhe/tmux-fzf"
set -g @plugin "wfxr/tmux-fzf-url"
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin "tmux-plugins/tmux-sensible"
set -g @plugin "omerxx/tmux-sessionx"
set -g @plugin 'alexwforsythe/tmux-which-key'

set -g @sessionx-bind "o"
set -g @sessionx-x-path "${HOME}/dotfiles"
set -g @dracula-show-powerline true
set -g @dracula-plugins "cpu-usage ram-usage time"
set -g @dracula-time-format "%F %R"
set -g @dracula-cpu-usage-colors "pink dark_gray"
set -g @dracula-ram-usage-colors "orange dark_gray"
set -g @dracula-time-colors "dark_purple white"
set -g @dracula-show-left-icon session
set -g @dracula-show-flags true

set -g status-position top

# Other examples:
# set -g @plugin "github_username/plugin_name"
# set -g @plugin "github_username/plugin_name#branch"
# set -g @plugin "git@github.com:user/plugin"
# set -g @plugin "git@bitbucket.com:user/plugin"

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run "~/.tmux/plugins/tpm/tpm"
91 changes: 91 additions & 0 deletions home/dot-zshrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# automatically run `zgenom reset` if we modify our .zshrc
ZGEN_COMPINIT_FLAGS="-u"
ZGEN_RESET_ON_CHANGE=("${HOME}/.zshrc")

# load zgenom
source "${HOME}/.zgenom/zgenom.zsh"

zgenom selfupdate

# if the init scipt doesn't exist
if ! zgenom saved; then
zgenom ohmyzsh

# plugins
zgenom ohmyzsh plugins/1password
zgenom ohmyzsh plugins/colored-man-pages
zgenom ohmyzsh plugins/colorize
zgenom ohmyzsh plugins/command-not-found
zgenom ohmyzsh plugins/common-aliases
zgenom ohmyzsh plugins/copyfile
zgenom ohmyzsh plugins/copypath
zgenom ohmyzsh plugins/cp
zgenom ohmyzsh plugins/dirhistory
zgenom ohmyzsh plugins/docker
zgenom ohmyzsh plugins/docker-compose
zgenom ohmyzsh plugins/emacs
zgenom ohmyzsh plugins/fzf
zgenom ohmyzsh plugins/git
zgenom ohmyzsh plugins/git
zgenom ohmyzsh plugins/man
zgenom ohmyzsh plugins/pass
zgenom ohmyzsh plugins/rsync
zgenom ohmyzsh plugins/safe-paste
zgenom ohmyzsh plugins/sudo
zgenom ohmyzsh plugins/sudo
zgenom ohmyzsh plugins/ubuntu
zgenom ohmyzsh plugins/web-search
zgenom ohmyzsh plugins/zsh-interactive-cd

zgenom load zsh-users/zsh-autosuggestions
zgenom load zsh-users/zsh-history-substring-search
zgenom load zsh-users/zsh-syntax-highlighting

# theme
# zgenom ohmyzsh themes/arrow

# save all to init script
zgenom save
fi

# automatically upgrade ohmyzsh without asking
DISABLE_UPDATE_PROMPT=true
zstyle ':omz:update' mode auto # update automatically without asking

# enable command auto-correction.
ENABLE_CORRECTION="true"

# display red dots whilst waiting for completion.
COMPLETION_WAITING_DOTS="true"

extensions=(
1password.plugin.zsh
zmv
zcp
zln
)

for extension in $extensions; do
autoload -U $extension;
done

# no point in rewriting my aliases
[ -f ~/.exports ] && source ~/.exports
[ -f ~/.aliases ] && source ~/.aliases

eval "$(zoxide init --cmd cd zsh)"

setopt nonomatch

eval "$(starship init zsh)"

set -o vi

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
2 changes: 1 addition & 1 deletion scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ DOTFILES_DIR: $DOTFILES_DIR
function sym_links(){
INFO "Creating symlinks..."
mkdir -p $HOME/.config
stow -v --dotfiles --adopt --dir $DOTFILES_DIR --target $HOME --restow my-home
stow -v --dotfiles --adopt --dir $DOTFILES_DIR --target $HOME --restow home
stow -v --adopt --dir $DOTFILES_DIR/private/ --target $HOME/.ssh --restow .ssh
stow -v --adopt --dir $DOTFILES_DIR --target $HOME/.config/ --restow config
# if the adopt made a local change then undo that
Expand Down

0 comments on commit dc82416

Please sign in to comment.