Browse Source

it works

master
LER0ever 1 year ago
parent
commit
d59b034254
7 changed files with 249 additions and 3 deletions
  1. BIN
      .DS_Store
  2. 11
    3
      Dockerfile
  3. 2
    0
      aosc-dbk
  4. 71
    0
      git/gitconfig
  5. 2
    0
      git/gitignore_global
  6. 59
    0
      zsh/void-mod.zsh-theme
  7. 104
    0
      zsh/zshrc

BIN
.DS_Store View File


+ 11
- 3
Dockerfile View File

@@ -1,6 +1,8 @@
FROM aosc/aosc-os-buildkit:latest
MAINTAINER LER0ever (https://rongyi.blog)
ENV HOSTNAME LER0ever-AOSC-BK
ENV SHELL /bin/zsh
ENV HOME /root

# Fuck that localegen
COPY locale.gen /etc/locale.gen
@@ -10,14 +12,20 @@ RUN apt update && \
apt full-upgrade -y

# EverVim minimal
COPY EverVim.vimrc /root/.EverVim.vimrc
COPY EverVim.bundles /root/.EverVim.bundles
COPY EverVim.vimrc $HOME/.EverVim.vimrc
COPY EverVim.bundles $HOME/.EverVim.bundles
RUN apt install neovim -y && \
curl -sLf https://raw.githubusercontent.com/LER0ever/EverVim/master/Boot-EverVim.sh | bash && \
echo -e "Installing EverVim Distribution ...\n" && \
nvim --headless +PlugInstall +qa &> /dev/null

# ZSH
RUN apt install zsh thefuck -y && \
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
COPY zsh/zshrc $HOME/.zshrc
COPY zsh/void-mod.zsh-theme $HOME/.oh-my-zsh/custom/themes/

# Default to abbs
WORKDIR /var/lib/acbs/repo

CMD [ "/bin/bash" ]
CMD [ "/bin/zsh" ]

+ 2
- 0
aosc-dbk View File

@@ -7,6 +7,8 @@ main() {
--name "LER0ever-AOSC-BK" \
--hostname "LER0ever-AOSC-BK" \
--volume "$PWD":/var/lib/acbs/repo \
--volume "$PWD/../pkgs/os-amd64":/os-amd64 \
--volume "$PWD/../pkgs/os-noarch":/os-noarch \
--volume ~/.ssh/id_rsa:/home/everette/.ssh/id_rsa \
local/aosc-dbk "$@"
}

+ 71
- 0
git/gitconfig View File

@@ -0,0 +1,71 @@
[user]
name = LER0ever
email = etasry@gmail.com
[core]
email = etasry@gmail.com
user = Everette Rong
editor = /usr/bin/nvim
autocrlf = input
excludesfile = ~/.gitignore_global
[alias]
amend = commit --amend -C HEAD
authors = "!git log --pretty=format:%aN | sort | uniq -c | sort -rn"
changes = diff --name-status -r
dad = !curl https://icanhazdadjoke.com/ && git add
l = log --oneline --decorate
last = log -2 --graph --abbrev-commit --decorate --all --format=format:\"%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(dim white) - %an%C(reset) %C(bold green)(%ar)%n %C(white)%s%C(reset)\"
lg = log --graph --pretty=format:'%Cred%h%Creset %an -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
ls-ignored = ls-files --exclude-standard --ignored --others
merge = merge --no-ff
msg = commit --allow-empty -m
remote-status = "!git log HEAD..origin/$(git rev-parse --abbrev-ref HEAD | sed -e 's/heads\\///') --oneline --decorate=short -3"
short = status --short --branch
sl = shortlog
gl = log --graph --abbrev-commit --decorate --all --format=format:\"%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(dim white) - %an%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n %C(white)%s%C(reset)\"
tree = log --graph --pretty=oneline --decorate
undo = reset --soft HEAD^
unwatch = update-index --assume-unchanged
watch = update-index --no-assume-unchanged
wd = diff --color-words
wds = diff --color-words --staged
[color]
branch = auto
diff = auto
status = auto
interactive = auto
ui = true
pager = true
[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
[help]
autocorrect = 0
[apply]
whitespace = nowarn
[mergetool]
keepBackup = false
prompt = false
[push]
default = simple
[difftool]
prompt = false
[difftool "diffmerge"]
cmd = diffmerge \"$LOCAL\" \"$REMOTE\"
[filter "media"]
clean = git media clean %f
smudge = git media smudge %f
required = true
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true

+ 2
- 0
git/gitignore_global View File

@@ -0,0 +1,2 @@
.tags
.DS_Store

+ 59
- 0
zsh/void-mod.zsh-theme View File

@@ -0,0 +1,59 @@
#!/usr/bin/env zsh

local LAMBDA="%(?,%{$fg_bold[green]%}∅,%{$fg_bold[red]%}∅)"
if [[ "$USER" == "root" ]]; then USERCOLOR="red"; else USERCOLOR="yellow"; fi

# Git sometimes goes into a detached head state. git_prompt_info doesn't
# return anything in this case. So wrap it in another function and check
# for an empty string.
function check_git_prompt_info() {
if git rev-parse --git-dir > /dev/null 2>&1; then
if [[ -z $(git_prompt_info) ]]; then
echo "%{$fg[blue]%}detached-head%{$reset_color%}) $(git_prompt_status)
%{$fg[yellow]%}→ "
else
echo "$(git_prompt_info) $(git_prompt_status)
%{$fg_bold[cyan]%}→ "
fi
else
echo "%{$fg_bold[cyan]%}→ "
fi
}

function get_right_prompt() {
if git rev-parse --git-dir > /dev/null 2>&1; then
echo -n "$(git_prompt_short_sha)%{$reset_color%}"
else
echo -n "%{$reset_color%}"
fi
}

PROMPT=$'\n'$LAMBDA'\
%{$fg_bold[$USERCOLOR]%}%n %{$fg_bold[white]%}@ %{$fg_bold[$USERCOLOR]%}%M\
%{$fg_no_bold[magenta]%}[%3~]\
$(check_git_prompt_info)\
%{$reset_color%}'

RPROMPT='$(get_right_prompt)'

# Format for git_prompt_info()
ZSH_THEME_GIT_PROMPT_PREFIX="at %{$fg[blue]%} "
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%} ✔"

# Format for git_prompt_status()
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg_bold[green]%}+"
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg_bold[blue]%}!"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg_bold[red]%}-"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg_bold[magenta]%}>"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg_bold[yellow]%}#"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[cyan]%}?"

# Format for git_prompt_ahead()
ZSH_THEME_GIT_PROMPT_AHEAD=" %{$fg_bold[white]%}^"


# Format for git_prompt_long_sha() and git_prompt_short_sha()
ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$fg_bold[white]%}[%{$fg_bold[blue]%}"
ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$fg_bold[white]%}]"

+ 104
- 0
zsh/zshrc View File

@@ -0,0 +1,104 @@
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh

# 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
ZSH_THEME="void-mod"

# 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=13

# 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)

source $ZSH/oh-my-zsh.sh

# User configuration

# export MANPATH="/usr/local/man:$MANPATH"

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

export EDITOR="nvim"
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"

zstyle ':completion:*' rehash true

# 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`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"

alias v=nvim
alias cslw="rdesktop -g 960x1080 -d CS.WISC.EDU -u rong -p - rd.cs.wisc.edu"

# Locale
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

# The Fuck
eval $(thefuck --alias)

# Go Env
export GOPATH="/Users/everette/Code/Go"
export PATH="$PATH:$GOPATH/bin"
export PATH="$PATH:~/.cargo/bin"
export PATH="/usr/local/opt/qt/bin:$PATH"

Loading…
Cancel
Save