Open10

mac環境構築

ピン留めされたアイテム
steolasteola

目的構成

  • Yabai
  • skhd
  • Übersicht (Simple-ber)
  • BetterDiscord
  • Alacritty
  • Spotify (Spicetify)

基本的にはArchLinuxの思想に準拠
よって、超特殊な例外がない限りはbrewでのインストールが絶対

steolasteola

Simple-berをインストール

メニューバーからÜbersichtを探し
Open Wedgets FolderからWedgets用Folderを起動するか、

git clone https://github.com/Jean-Tinland/simple-bar $HOME/Library/Application\ Support/Übersicht/widgets/simple-bar

上記コマンドを叩く

Simple-ber Github
Simple-ber Website
Simple-ber Document

M1macOS の場合

YabaiPathが違うため要注意
Index.jsxのL37からL42付近を改変し、それでも変わらない場合はCmd+,の設定からYabaiPathを変更

中央のPath

その当時は↓を参照
Github Issues

steolasteola

SIPの無効化

ÜbersichtのSImple-berにデスクトップ追加の+を表示させるためにSIPを無効化する

これの中央の+のこと

  1. PCの電源を入れた後に電源ボタンを長押しする
  2. オプションを選択しリカバリーモードに入る
  3. 案内に従い、画面を先に進める
  4. メニューバーのユーティリティー ⇒ ターミナルを選択する
  5. コマンド【csrutil disable】を入力する
  6. 以下のメッセージが表示されたら【y】を入力する
メッセージ

Turning off System Integrity Protection requires modifying system security.
Allow booting unsigned operating systems and any kernel extensions for OS "●●"?
[y/n]:

  1. 以下のメッセージが表示されたらPCを再起動する
メッセージ

System Integrity Protection is off.
Restart the machine for the changes to take effect.

SIPを有効化する場合は、4.の手順で【csrutil enable】を入力する

参考記事
https://itochu-cable-systems.jp/esb/category/useful/other/2023/10/6653/

steolasteola

再起動後+をクリックしても反応しない場合

以下の画像の状態になっているか確認

Hide create space buttonにチェックがついていないか確認

まだ反応しない場合スクリプト追加の設定を行う

echo "$(whoami) ALL=(root) NOPASSWD: sha256:$(shasum -a 256 $(which yabai) | cut -d " " -f 1) $(which yabai) --load-sa" | sudo tee /private/etc/sudoers.d/yabai

上記のコマンドを叩いた後、以下のコマンドを叩く

yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
sudo yabai --load-sa

参考記事
https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)#configure-scripting-addition
https://github.com/Jean-Tinland/simple-bar/issues/387
https://github.com/Jean-Tinland/simple-bar/issues/322

steolasteola

python

brew install pyenv

brew update && brew upgrade pyenv # バージョンが低いとき

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
source ~/.zshrc

pyenv install --list
pyenv install $LATEST_VERSION

pyenv global $LATEST_VERSION
pyenv local $LATEST_VERSION
python --version
> $LASTEST_VERSION

curl -sSL https://install.python-poetry.org | python -
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

poetry self update #Poetryのupdate

curl -sSL https://install.python-poetry.org | python - --uninstall #アンインストールしたいとき

poetry config virtualenvs.in-project true #ディレクトリの中に.venvフォルダに作成するようにする

poetry config --list

参考記事

https://qiita.com/nokonoko_1203/items/a694be4e76da0872f51a
https://qiita.com/yokohama4580/items/dc6ba7259e99cad0dd65#プロジェクトを新規に作成する場合
https://zenn.dev/uchitaka/articles/37fa8c7bee50a6
https://vaaaaaanquish.hatenablog.com/entry/2021/03/29/221715#--pipenvとpoetryの技術的歴史的背景--
https://www.cfxlog.com/python_poetry/#install-pyenv
https://zenn.dev/wtkn25/articles/python-poetry#poetryのバージョンを確認する
https://qiita.com/ssf2xguile/items/4e5474deecd6d3195b9a
https://qiita.com/Ryku/items/512a6744bfa9903bf2dd#poetryのインストール
https://zenn.dev/takuty/articles/b83c70c32820bb
https://zenn.dev/wtkn25/articles/python-poetry#仮想環境の構築
https://halutino.hatenablog.com/entry/python-devenv#仮想環境
https://timesaving.hatenablog.com/entry/2022/10/01/150000
https://zenn.dev/canonrock/articles/poetry_basics
https://medium.com/music-and-technology/poetryのインストールと仮想環境作成先の変更-96e1bab83725
https://qiita.com/ssf2xguile/items/4e5474deecd6d3195b9a
https://minerva.mamansoft.net/Notes/Poetryで仮想環境を削除
https://scrapbox.io/miyamonz/poetryの仮想環境消す
https://qiita.com/espe0n/items/3f09c532e7037b3726d7
https://zenn.dev/t4aru/articles/fdc73127b895a5
https://qiita.com/dyuichi/items/e21d7c7510280cd87944
https://qiita.com/nassy20/items/bd84d67ca5051efc7ffa
https://clione33.online/poetry_permissiondenied/
https://qiita.com/sergicalsix/items/6d5be2249e41b702209b
https://zenn.dev/yamaday/scraps/51008245130dac