1
0
Fork 0
mirror of https://github.com/kou029w/dotfiles.git synced 2025-02-03 15:48:37 +00:00

Compare commits

...

3 commits

Author SHA1 Message Date
3944615286
add docker cask 2023-08-08 21:57:04 +09:00
adb3537c6e
add .zshrc 2023-08-08 21:51:52 +09:00
b82f68a44b
add cask packages 2023-08-08 21:18:23 +09:00
6 changed files with 53 additions and 13 deletions

View file

@ -9,10 +9,17 @@ brew "hadolint"
brew "jq"
brew "mdbook"
brew "mkcert"
brew "sqlite"
brew "rclone"
brew "shellcheck"
brew "sqlite"
brew "tea"
brew "ykman"
brew "drone/drone/drone"
brew "oven-sh/bun/bun"
if OS.mac?
cask "docker"
cask "logseq"
cask "slack"
cask "visual-studio-code"
end

View file

@ -5,8 +5,7 @@ HISTCONTROL=ignoreboth:erasedups
HISTFILESIZE=$((0x7fffffff))
HISTSIZE=$((0x7fffffff))
PROMPT_COMMAND='[[ $_PWD == $PWD ]] || { _PWD=$PWD; ls; }'
PS1=$PS1'\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
PS1=${PS1%'\$ '}'$(__git_ps1 " \[\033[32m\](%s)\[\033[00m\]")\n\$ '
PS1=$PS1'\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] $(__git_ps1 "\[\033[32m\](%s)\[\033[00m\]")\n\$ '
alias ..='cd ..'
alias cp='cp --reflink=auto'
alias diff='diff --color=auto'

View file

@ -1,11 +1,20 @@
export EDITOR=nano
export PATH="$HOME/.local/bin:$PATH"
export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew";
export HOMEBREW_CELLAR="/home/linuxbrew/.linuxbrew/Cellar";
export HOMEBREW_REPOSITORY="/home/linuxbrew/.linuxbrew/Homebrew";
export PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin${PATH+:$PATH}";
export MANPATH="/home/linuxbrew/.linuxbrew/share/man${MANPATH+:$MANPATH}:";
export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:${INFOPATH:-}";
export DENO_INSTALL_ROOT="${HOME}/.local"
[ -f "$HOME/.cargo/env" ] && . "$HOME/.cargo/env"
[ -n "$BASH_VERSION" ] && . "$HOME/.bashrc"
if [ -d /usr/local/Homebrew ]; then
export HOMEBREW_PREFIX="/usr/local"
export HOMEBREW_CELLAR="/usr/local/Cellar"
export HOMEBREW_REPOSITORY="/usr/local/Homebrew"
export PATH="/usr/local/bin:/usr/local/sbin${PATH+:$PATH}"
export MANPATH="/usr/local/share/man${MANPATH+:$MANPATH}:"
export INFOPATH="/usr/local/share/info:${INFOPATH:-}"
else
export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew"
export HOMEBREW_CELLAR="/home/linuxbrew/.linuxbrew/Cellar"
export HOMEBREW_REPOSITORY="/home/linuxbrew/.linuxbrew/Homebrew"
export PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin${PATH+:$PATH}"
export MANPATH="/home/linuxbrew/.linuxbrew/share/man${MANPATH+:$MANPATH}:"
export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:${INFOPATH:-}"
fi

1
.zsh/functions/_git Symbolic link
View file

@ -0,0 +1 @@
/Library/Developer/CommandLineTools/usr/share/git-core/git-completion.zsh

19
.zshrc Normal file
View file

@ -0,0 +1,19 @@
. /Library/Developer/CommandLineTools/usr/share/git-core/git-prompt.sh
zstyle ':completion:*:*:git:*' script /Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash
fpath=(~/.zsh/functions $fpath)
autoload -Uz compinit && compinit
alias ..='cd ..'
alias cp='cp --reflink=auto'
alias diff='diff --color=auto'
alias grep='grep --color=auto'
alias ll='ls -alF'
alias ls='ls --color=auto'
precmd() {
[[ "$TERM" == xterm-256color ]] && print -Pn -- '\e]2;%n@%m %~\a'
[[ "$_PWD" == "$PWD" ]] && return
_PWD="$PWD"
ls
}
setopt PROMPT_SUBST
PROMPT='%B%F{green}%n@%m%f%b:%B%F{blue}%~%f%b $(__git_ps1 "%%F{green}(%s)%%f")
%# '

View file

@ -8,9 +8,14 @@ function install_homebrew_packages() {
sudo --user="#$uid" \
NONINTERACTIVE=1 \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
if [[ -x /usr/local/bin/brew ]]; then
sudo --user="#$uid" \
/usr/local/bin/brew bundle --global
else
sudo --user="#$uid" \
/home/linuxbrew/.linuxbrew/bin/brew bundle --global
fi
}
[[ $(uname -sm) =~ ^(Linux x86_64)$ ]] \
&& install_homebrew_packages
[[ $(uname -sm) =~ ^(Linux x86_64|Darwin x86_64)$ ]] &&
install_homebrew_packages