Skip to content

Commit

Permalink
use homebrew
Browse files Browse the repository at this point in the history
  • Loading branch information
cappyzawa committed Sep 29, 2024
1 parent fb9e7a4 commit be44a5c
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 27 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ node_modules/
.tmux/plugins
.config/raycast
.config/1Password/ssh/agent.toml
Brewfile.lock.json
12 changes: 12 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
tap "homebrew/bundle"

cask "alacritty"
cask "arc"
cask "1password"
cask "raycast"
cask "google-chrome"
cask "google-japanese-ime"
cask "karabiner-elements"

brew "tmux"
brew "wget"
24 changes: 6 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,20 @@ DOTFILES := $(filter-out $(EXCLUSIONS), $(CANDIDATES))

.DEFAULT_GOAL := help

all:
all: brew install

brew: ## Install brew
@sh ./etc/scripts/brew.sh
@brew bundle

list: ## Show dot files in this repo
@$(foreach val, $(DOTFILES), /bin/ls -dF $(val);)

deploy: ## Create symlink to home directory
install: ## Create symlink to home directory
@echo '==> Start to deploy dotfiles to home directory.'
@echo ''
@$(foreach val, $(DOTFILES), ln -sfnv $(abspath $(val)) $(HOME)/$(val);)

init: ## Setup environment settings
@DOTPATH=$(DOTPATH) bash $(DOTPATH)/etc/install

test: ## Test dotfiles and init scripts
@#DOTPATH=$(DOTPATH) bash $(DOTPATH)/etc/test/test.sh
@echo "test is inactive temporarily"

update: ## Fetch changes for this repo
git pull origin master
git submodule init
git submodule update
git submodule foreach git pull origin master

install: update deploy init ## Run make update, deploy, init
@exec $$SHELL

clean: ## Remove the dot files and this repo
@echo 'Remove dot files in your home directory...'
@-$(foreach val, $(DOTFILES), rm -vrf $(HOME)/$(val);)
Expand Down
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@

[![BuildStatus](https://github.com/cappyzawa/dotfiles/workflows/CI/badge.svg)](https://github.com/cappyzawa/dotfiles/actions?query=workflow%3ACI)

dotfile for cappyzawa
dotfile for cappyzawa (using macOS).

## Setup

```bash
curl -sL https://raw.githubusercontent.com/cappyzawa/dotfiles/master/etc/install | bash
$ xcode-select --install
$ git clone https://github.com/cappyzawa/dotfiles.git ~/.dotfiles
$ make all
```

## Required

- `git`
- `tmux` 3.2+
- [yuru7/moralerspace: Moralerspace は、欧文フォント Monaspace と日本語フォント IBM Plex Sans JP を合成したプログラミング向けフォントです。](https://github.com/yuru7/moralerspace)
- [alacritty/alacritty: A cross\-platform, OpenGL terminal emulator\.](https://github.com/alacritty/alacritty)
8 changes: 8 additions & 0 deletions etc/scripts/brew.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

if command -v brew &>/dev/null; then
echo "${0}: brew is already installed"
exit 0
fi

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
7 changes: 7 additions & 0 deletions etc/scripts/font.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

version=1.0.2
curl -fL https://github.com/yuru7/moralerspace/releases/download/v${version}/MoralerspaceNF_v${version}.zip -o /tmp/MoralerspaceNF_v${version}.zip
unzip -o /tmp/MoralerspaceNF_v${version}.zip -d /tmp/
mv /tmp/MoralerspaceNF_v${version}/*.ttf ~/Library/Fonts/
rm -rf /tmp/MoralerspaceNF_v${version}*
8 changes: 8 additions & 0 deletions etc/scripts/rust.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

if command -v rustup &>/dev/null; then
echo "${0}: rustup is already installed"
exit 0
fi

curl https://sh.rustup.rs -sSf | sh

0 comments on commit be44a5c

Please sign in to comment.