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 @@
1 1
 FROM aosc/aosc-os-buildkit:latest
2 2
 MAINTAINER LER0ever (https://rongyi.blog)
3 3
 ENV HOSTNAME LER0ever-AOSC-BK
4
+ENV SHELL /bin/zsh
5
+ENV HOME /root
4 6
 
5 7
 # Fuck that localegen
6 8
 COPY locale.gen /etc/locale.gen
@@ -10,14 +12,20 @@ RUN apt update && \
10 12
     apt full-upgrade -y
11 13
 
12 14
 # EverVim minimal
13
-COPY EverVim.vimrc /root/.EverVim.vimrc
14
-COPY EverVim.bundles /root/.EverVim.bundles
15
+COPY EverVim.vimrc $HOME/.EverVim.vimrc
16
+COPY EverVim.bundles $HOME/.EverVim.bundles
15 17
 RUN apt install neovim -y && \
16 18
     curl -sLf https://raw.githubusercontent.com/LER0ever/EverVim/master/Boot-EverVim.sh | bash && \
17 19
     echo -e "Installing EverVim Distribution ...\n" && \
18 20
     nvim --headless +PlugInstall +qa &> /dev/null
19 21
 
22
+# ZSH
23
+RUN apt install zsh thefuck -y && \
24
+    sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
25
+COPY zsh/zshrc $HOME/.zshrc
26
+COPY zsh/void-mod.zsh-theme $HOME/.oh-my-zsh/custom/themes/
27
+
20 28
 # Default to abbs
21 29
 WORKDIR /var/lib/acbs/repo
22 30
 
23
-CMD [ "/bin/bash" ]
31
+CMD [ "/bin/zsh" ]

+ 2
- 0
aosc-dbk View File

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

+ 71
- 0
git/gitconfig View File

@@ -0,0 +1,71 @@
1
+[user]
2
+	name = LER0ever
3
+	email = etasry@gmail.com
4
+[core]
5
+	email = etasry@gmail.com
6
+	user = Everette Rong
7
+	editor = /usr/bin/nvim
8
+  	autocrlf = input
9
+	excludesfile = ~/.gitignore_global
10
+[alias]
11
+	amend = commit --amend -C HEAD
12
+	authors = "!git log --pretty=format:%aN | sort | uniq -c | sort -rn"
13
+	changes = diff --name-status -r
14
+	dad = !curl https://icanhazdadjoke.com/ && git add
15
+	l = log --oneline --decorate
16
+	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)\"
17
+	lg = log --graph --pretty=format:'%Cred%h%Creset %an -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
18
+	ls-ignored = ls-files --exclude-standard --ignored --others
19
+	merge = merge --no-ff
20
+	msg = commit --allow-empty -m
21
+	remote-status = "!git log HEAD..origin/$(git rev-parse --abbrev-ref HEAD | sed -e 's/heads\\///') --oneline --decorate=short -3"
22
+	short = status --short --branch
23
+	sl = shortlog
24
+	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)\"
25
+	tree = log --graph --pretty=oneline --decorate
26
+	undo = reset --soft HEAD^
27
+	unwatch = update-index --assume-unchanged
28
+	watch = update-index --no-assume-unchanged
29
+	wd = diff --color-words
30
+	wds = diff --color-words --staged
31
+[color]
32
+	branch = auto
33
+	diff = auto
34
+	status = auto
35
+	interactive = auto
36
+	ui = true
37
+	pager = true
38
+[color "branch"]
39
+	current = yellow reverse
40
+	local = yellow
41
+	remote = green
42
+[color "diff"]
43
+	meta = yellow bold
44
+	frag = magenta bold
45
+	old = red bold
46
+	new = green bold
47
+[color "status"]
48
+	added = yellow
49
+	changed = green
50
+	untracked = cyan
51
+[help]
52
+	autocorrect = 0
53
+[apply]
54
+	whitespace = nowarn
55
+[mergetool]
56
+	keepBackup = false
57
+  prompt = false
58
+[push]
59
+	default = simple
60
+[difftool]
61
+	prompt = false
62
+[difftool "diffmerge"]
63
+	cmd = diffmerge \"$LOCAL\" \"$REMOTE\"
64
+[filter "media"]
65
+	clean = git media clean %f
66
+	smudge = git media smudge %f
67
+	required = true
68
+[filter "lfs"]
69
+	clean = git-lfs clean %f
70
+	smudge = git-lfs smudge %f
71
+	required = true

+ 2
- 0
git/gitignore_global View File

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

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

@@ -0,0 +1,59 @@
1
+#!/usr/bin/env zsh
2
+
3
+local LAMBDA="%(?,%{$fg_bold[green]%}∅,%{$fg_bold[red]%}∅)"
4
+if [[ "$USER" == "root" ]]; then USERCOLOR="red"; else USERCOLOR="yellow"; fi
5
+
6
+# Git sometimes goes into a detached head state. git_prompt_info doesn't
7
+# return anything in this case. So wrap it in another function and check
8
+# for an empty string.
9
+function check_git_prompt_info() {
10
+    if git rev-parse --git-dir > /dev/null 2>&1; then
11
+        if [[ -z $(git_prompt_info) ]]; then
12
+            echo "%{$fg[blue]%}detached-head%{$reset_color%}) $(git_prompt_status)
13
+%{$fg[yellow]%}→ "
14
+        else
15
+            echo "$(git_prompt_info) $(git_prompt_status)
16
+%{$fg_bold[cyan]%}→ "
17
+        fi
18
+    else
19
+        echo "%{$fg_bold[cyan]%}→ "
20
+    fi
21
+}
22
+
23
+function get_right_prompt() {
24
+    if git rev-parse --git-dir > /dev/null 2>&1; then
25
+        echo -n "$(git_prompt_short_sha)%{$reset_color%}"
26
+    else
27
+        echo -n "%{$reset_color%}"
28
+    fi
29
+}
30
+
31
+PROMPT=$'\n'$LAMBDA'\
32
+ %{$fg_bold[$USERCOLOR]%}%n %{$fg_bold[white]%}@ %{$fg_bold[$USERCOLOR]%}%M\
33
+ %{$fg_no_bold[magenta]%}[%3~]\
34
+ $(check_git_prompt_info)\
35
+%{$reset_color%}'
36
+
37
+RPROMPT='$(get_right_prompt)'
38
+
39
+# Format for git_prompt_info()
40
+ZSH_THEME_GIT_PROMPT_PREFIX="at %{$fg[blue]%} "
41
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
42
+ZSH_THEME_GIT_PROMPT_DIRTY=""
43
+ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%} ✔"
44
+
45
+# Format for git_prompt_status()
46
+ZSH_THEME_GIT_PROMPT_ADDED="%{$fg_bold[green]%}+"
47
+ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg_bold[blue]%}!"
48
+ZSH_THEME_GIT_PROMPT_DELETED="%{$fg_bold[red]%}-"
49
+ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg_bold[magenta]%}>"
50
+ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg_bold[yellow]%}#"
51
+ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[cyan]%}?"
52
+
53
+# Format for git_prompt_ahead()
54
+ZSH_THEME_GIT_PROMPT_AHEAD=" %{$fg_bold[white]%}^"
55
+
56
+
57
+# Format for git_prompt_long_sha() and git_prompt_short_sha()
58
+ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$fg_bold[white]%}[%{$fg_bold[blue]%}"
59
+ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$fg_bold[white]%}]"

+ 104
- 0
zsh/zshrc View File

@@ -0,0 +1,104 @@
1
+# If you come from bash you might have to change your $PATH.
2
+# export PATH=$HOME/bin:/usr/local/bin:$PATH
3
+
4
+# Path to your oh-my-zsh installation.
5
+  export ZSH=$HOME/.oh-my-zsh
6
+
7
+# Set name of the theme to load. Optionally, if you set this to "random"
8
+# it'll load a random theme each time that oh-my-zsh is loaded.
9
+# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
10
+ZSH_THEME="void-mod"
11
+
12
+# Uncomment the following line to use case-sensitive completion.
13
+# CASE_SENSITIVE="true"
14
+
15
+# Uncomment the following line to use hyphen-insensitive completion. Case
16
+# sensitive completion must be off. _ and - will be interchangeable.
17
+# HYPHEN_INSENSITIVE="true"
18
+
19
+# Uncomment the following line to disable bi-weekly auto-update checks.
20
+# DISABLE_AUTO_UPDATE="true"
21
+
22
+# Uncomment the following line to change how often to auto-update (in days).
23
+# export UPDATE_ZSH_DAYS=13
24
+
25
+# Uncomment the following line to disable colors in ls.
26
+# DISABLE_LS_COLORS="true"
27
+
28
+# Uncomment the following line to disable auto-setting terminal title.
29
+# DISABLE_AUTO_TITLE="true"
30
+
31
+# Uncomment the following line to enable command auto-correction.
32
+ENABLE_CORRECTION="true"
33
+
34
+# Uncomment the following line to display red dots whilst waiting for completion.
35
+# COMPLETION_WAITING_DOTS="true"
36
+
37
+# Uncomment the following line if you want to disable marking untracked files
38
+# under VCS as dirty. This makes repository status check for large repositories
39
+# much, much faster.
40
+# DISABLE_UNTRACKED_FILES_DIRTY="true"
41
+
42
+# Uncomment the following line if you want to change the command execution time
43
+# stamp shown in the history command output.
44
+# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
45
+# HIST_STAMPS="mm/dd/yyyy"
46
+
47
+# Would you like to use another custom folder than $ZSH/custom?
48
+# ZSH_CUSTOM=/path/to/new-custom-folder
49
+
50
+# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
51
+# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
52
+# Example format: plugins=(rails git textmate ruby lighthouse)
53
+# Add wisely, as too many plugins slow down shell startup.
54
+plugins=(git)
55
+
56
+source $ZSH/oh-my-zsh.sh
57
+
58
+# User configuration
59
+
60
+# export MANPATH="/usr/local/man:$MANPATH"
61
+
62
+# You may need to manually set your language environment
63
+# export LANG=en_US.UTF-8
64
+
65
+export EDITOR="nvim"
66
+# Preferred editor for local and remote sessions
67
+# if [[ -n $SSH_CONNECTION ]]; then
68
+#   export EDITOR='vim'
69
+# else
70
+#   export EDITOR='mvim'
71
+# fi
72
+
73
+# Compilation flags
74
+# export ARCHFLAGS="-arch x86_64"
75
+
76
+# ssh
77
+# export SSH_KEY_PATH="~/.ssh/rsa_id"
78
+
79
+zstyle ':completion:*' rehash true
80
+
81
+# Set personal aliases, overriding those provided by oh-my-zsh libs,
82
+# plugins, and themes. Aliases can be placed here, though oh-my-zsh
83
+# users are encouraged to define aliases within the ZSH_CUSTOM folder.
84
+# For a full list of active aliases, run `alias`.
85
+#
86
+# Example aliases
87
+# alias zshconfig="mate ~/.zshrc"
88
+# alias ohmyzsh="mate ~/.oh-my-zsh"
89
+
90
+alias v=nvim
91
+alias cslw="rdesktop -g 960x1080 -d CS.WISC.EDU -u rong -p - rd.cs.wisc.edu"
92
+
93
+# Locale
94
+export LC_ALL=en_US.UTF-8
95
+export LANG=en_US.UTF-8
96
+
97
+# The Fuck
98
+eval $(thefuck --alias)
99
+
100
+# Go Env
101
+export GOPATH="/Users/everette/Code/Go"
102
+export PATH="$PATH:$GOPATH/bin"
103
+export PATH="$PATH:~/.cargo/bin"
104
+export PATH="/usr/local/opt/qt/bin:$PATH"

Loading…
Cancel
Save