Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
takyshu98 committed Jan 8, 2024
1 parent fb25ce6 commit 77a6157
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 23 deletions.
7 changes: 5 additions & 2 deletions .config/sheldon/plugins.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ apply = ["defer"]

# ref: https://sheldon.cli.rs/Examples.html#deferred-loading-of-plugins-in-zsh
[templates]
defer = "{% for file in files %}zsh-defer source \"{{ file }}\"\n{% endfor %}"
defer = "{{ hooks?.pre | nl }}{% for file in files %}zsh-defer source \"{{ file }}\"\n{% endfor %}{{ hooks?.post | nl }}"

[plugins]

Expand All @@ -31,7 +31,7 @@ github = "romkatv/zsh-defer"
apply = ["source"]

[plugins.compinit]
inline = 'autoload -Uz compinit && zsh-defer compinit'
inline = 'autoload -Uz compinit && zsh-defer compinit -d "${XDG_CACHE_HOME}/.zcompdump"'

# ref: https://docs.brew.sh/Shell-Completion#configuring-completions-in-zsh
[plugins.brew-completion]
Expand All @@ -54,6 +54,9 @@ apply = ["source"]
[plugins.enhancd]
github = "b4b4r07/enhancd"

[plugins.enhancd.hooks]
pre = 'export ENHANCD_DIR="${XDG_STATE_HOME}/.enhancd"'

# [plugins.asdf]
# github = "asdf-vm/asdf"

Expand Down
2 changes: 1 addition & 1 deletion .config/zsh/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bindkey -e
alias ls='ls -FG'

# set history options
export HISTFILE="${ZDOTDIR}/.zsh_history"
export HISTFILE="${XDG_STATE_HOME}/.zsh_history"
export HISTSIZE=3000
export SAVEHIST=3000

Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
.DS_Store
.config/zsh/.zcompdump
.config/zsh/.zsh_history
Brewfile.lock.json
7 changes: 6 additions & 1 deletion .zshenv
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ elif [ "${arch_type}" = "arm64" ]; then
eval "$(/opt/homebrew/bin/brew shellenv)" # for Apple silicon
fi

# set zdotdir
# set xdg
export XDG_CONFIG_HOME="${HOME}/.config"
export XDG_CACHE_HOME="${HOME}/.cache"
export XDG_DATA_HOME="${HOME}/.local/share"
export XDG_STATE_HOME="${HOME}/.local/state"

# set zdotdir
export ZDOTDIR="${XDG_CONFIG_HOME}/zsh"
22 changes: 5 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,11 @@

![dotfile workflow](https://github.com/takyshu98/dotfiles/actions/workflows/main.yml/badge.svg)

## ☑ Install Command Line Tools
## Installation

```
xcode-select --install
$ xcode-select --install
$ bash -c "$(curl -L https://raw.githubusercontent.com/takyshu98/dotfiles/master/install.sh)"
$ mise install
$ sudo reboot
```

## ☑ Run install script
```
bash -c "$(curl -L https://raw.githubusercontent.com/takyshu98/dotfiles/master/install.sh)"
```

## ☑ Setup Runtime
```
rtx install
```

## ☑ Reboot Machine
```
sudo reboot
```
9 changes: 9 additions & 0 deletions scripts/symlink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ done
mkdir -p "${XDG_CONFIG_HOME}"
find "${DOTPATH}/.config" -maxdepth 1 -exec ln -fvns {} "${XDG_CONFIG_HOME}" \;

[[ -z "${XDG_CACHE_HOME}" ]] && XDG_CACHE_HOME="${HOME}/.cache"
mkdir -p "${XDG_CACHE_HOME}"

[[ -z "${XDG_DATA_HOME}" ]] && XDG_DATA_HOME="${HOME}/.local/share"
mkdir -p "${XDG_DATA_HOME}"

[[ -z "${XDG_STATE_HOME}" ]] && XDG_STATE_HOME="${HOME}/.local/state"
mkdir -p "${XDG_STATE_HOME}"

# make directories with reference to Filesystem Hierarchy Standard
mkdir -p ~/bin # for original commands
find "${DOTPATH}/bin/" -type f -perm 0755 -exec ln -fvns {} ~/bin/ \;
Expand Down

0 comments on commit 77a6157

Please sign in to comment.