i3 ライクな Window Manager
Mission Control を起動するとアプリのサムネイルがとても小さく表示される不具合があります。
次のコマンドを打つと解決します。
defaults write com.apple.spaces spans-displays -bool true && killall SystemUIServer
better cat
Theme には Catppuccin Frappe を使用しています。
初回のみキャッシュをリビルドしましょう。
bat cache --build
画面共有用に仮想ディスプレイ (Virtual Display) を作るアプリ
(emacs-version)see https://github.com/ataka/emacs-d.git
Better ls
brew install eza
システム情報取得ツール。Neofetch の後継。
フォントを編集するアプリ。
ARM 用のアプリは提供されていない? `brew` でインストールすると、次の警告が出ます。
==> Caveats fontforge is built for Intel macOS and so requires Rosetta 2 to be installed. You can install Rosetta 2 with: softwareupdate --install-rosetta --agree-to-license Note that it is very difficult to remove Rosetta 2 once it is installed.
幸い手元の環境は既に Rosetta 2 だったのでそのままスルーします。
zoxide との連携で力を発揮する Fazzy Finder
brew install fzf
ZIG 言語で書かれたターミナル
Warning: Your terminal does not have App Management permissions, so Homebrew will delete and reinstall the app. This may result in some configurations (like notification settings or location in the Dock/Launchpad) being lost. To fix this, go to System Settings > Privacy & Security > App Management and add or enable your terminal.
.gitconfig
- GitHub Copilot for Xcode を開く
- アクセシビリティ機能へのアクセス許可を与える
- 「システム設定 > プライバシーとセキュリティ > アクセシビリティ」から
GitHub Copilot for Xcode Extensionを許可する
- 「システム設定 > プライバシーとセキュリティ > アクセシビリティ」から
- 歯車マークをクリックして、設定画面を開く
- 「システム設定 > ログイン項目と機能拡張」から
Xcode Source EditorでGitHub Copilot for Xcode Extensionを許可する
- 「システム設定 > ログイン項目と機能拡張」から
- GitHub Copilot for Xcode に戻り、サインインする
- GitHub への Activation 画面が開くので、その通り実行する
TAB提案されたコードを受け入れるOption複数行の提案を表示する
Ctrl + [Previous SuggestionCtrl + ]Next SuggestionCtrl + {Open chat in GitHub Copilot for Xcode
see README.org in .emacs.d
- 画面左のサイドバーから「拡張機能」をクリック
- 「GitHub Copilot」 (と欲しければ「GitHub Copilot Chat」) をインストール
- 画面右下の GitHub アイコンから「Sign in to use Copilot」を実行
ポータブルなグラフ描画ツール
Clickable な要素にキーボードショートカットを用意するツール。
Homebrew 版は用意されていません。
多採な画像操作ツール
ウィンドウ枠に色を付けるツール。
コマンド名は borders
コマンドランナー。
~/.zsh/completion/_just に次のファイルを置きます。
#compdef _just just
#autoload
_just () {
local -a subcmds
subcmds=($(just --summary))
_describe 'command' subcmds
}
_just "$@"KMonad と相性が悪いので Makefile からインストール・スクリプトを消します。
インストールする場合は下記コマンドを実行します。
brew install --cask karabiner-elements
' , . p y f g c r l a o e u i d h t n s ; q j k x b m w v z
Home Row Mods の設定は https://github.com/Leo-keeb/Karabiner-Elements-Advanced-Settings を参考にしました。
' , . p y f g c r l Cmd Sft Opt Ctl i d Ctl Opt Sft Cmd ; q j k x b m w v z
Karabiner-Elements が入っているなら、事前に Karabiner-Elements をアンインストールしておきます。
brew uninstall --cask karabiner-elements
必要なパッケージをインストールします。
make install-kmonad
KMonad を取得します。
cd ~/project git clone --recursive https://github.com/kmonad/kmonad.git cd kmonad
Karabiner-DriverKit-VirtualHIDDevice をインストール (対話的) します
open c_src/mac/Karabiner-DriverKit-VirtualHIDDevice/dist/Karabiner-DriverKit-VirtualHIDDevice-5.0.0.pkg
Karabiner-DriverKit-VirtualHIDDevice をインストール後に Activate (対話的) します
/Applications/.Karabiner-VirtualHIDDevice-Manager.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Manager activate
「設定 > 一般 > ログイン項目と機能拡張 > 機能拡張 > ドライバ機能拡張」から org.pqrs.Karabiner-DriverKit-VirtualHIDDevice をオンにします。
Daemon を起動します。
sudo '/Library/Application Support/org.pqrs/Karabiner-DriverKit-VirtualHIDDevice/Applications/Karabiner-VirtualHIDDevice-Daemon.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Daemon'
Daemon 起動は kmonad 実行前に必須?
ビルドして ~/.local/bin にインストールします。
stack install --flag kmonad:dext
Catalina (10.15) からキーイベントのキャプチャーにはシステム設定でパーミッションを与える必要があります。
「設定 > プライバシーとセキュリティ > プライバシー > 入力監視」から KMonad を実行するアプリ (~/.local/bin/kmonad) を追加します。
Finder で隠しフォルダーを表示するには Command + Shift + . を使います。
sudo を使って起動します
sudo ~/.local/bin/kmonad ~/project/dotfiles/kmonad/foo.kbd
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.kmonad</string>
<key>Program</key>
<string>/Users/[user]/.local/bin/kmonad</string>
<key>ProgramArguments</key>
<array>
<string>/Users/[user]/.local/bin/kmonad</string>
<string>/Users/[user]/.config/config.kbd</string>
</array>
<key>RunAtLoad</key>
<true />
<key>StandardOutPath</key>
<string>/tmp/kmonad.stdout</string>
<key>StandardErrorPath</key>
<string>/tmp/kmonad.stderr</string>
</dict>
</plist><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.pqrs.service.daemon.Karabiner-VirtualHIDDevice-Daemon</string>
<key>KeepAlive</key>
<true/>
<key>ProcessType</key>
<string>Interactive</string>
<key>ProgramArguments</key>
<array>
<string>/Library/Application Support/org.pqrs/Karabiner-DriverKit-VirtualHIDDevice/Applications/Karabiner-VirtualHIDDevice-Daemon.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Daemon</string>
</array>
</dict>
</plist>(defcfg input (iokit-name "キーボードのデバイス名") output (kext) fallthrough true )
キーボードのデバイス名は list-keyboards コマンドで取得できます。
❯ ./list-keyboards Apple Internal Keyboard / Trackpad Karabiner DriverKit VirtualHIDKeyboard 1.8.0
list-keyboards コマンドは kmonad リポジトリー内で作成します。
cd ~/project/kmonad cd c_src/mac make
| ファイル名 | 対象キーボード | Layout | IM | メモ |
|---|---|---|---|---|
| なし | Kinesis Advantage 360 Pro | Dvorak | Qw | |
home-row-mods | Kinesis Advantage 2 | Dvorak | Qw | |
home-row-mods-qwerty | Internal Keyboard | Qwerty | Dv | 基本利用しない |
home-row-mods-qwerty-apple | Internal Keyboard | Qwerty | Qw | |
home-row-mods-qwerty-apple-space-cadet | Internal Keyboard | Qwerty | Qw | Hyper, Super 対応 |
https://github.com/mad-p/MacTcode/
- dmg ファイルをダウンロード & 展開する
- 古いディレクトリーを削除して、新しいものをコピーする
- ログインし直す
cd /Library/Input\ Methods sudo rm -rf MacTcode.app cd ~/Downloads sudo cp -r MacTcode.app /Library/Input\ Methods/
ランチャーアプリ
- Clipboard History
- Navigation / Search Menu Items
- QUicklinks
- Kill Process
- Quit Applications
- Toggl Track
- Zoom
.screenrc
Rust 製の git graph ツール
Better メニューバー
完全にメニューバーを非表示にする方法はないので、自動表示を「常に」に設定します。
- 設定アプリ > コントロールセンター > 「メニューバーを自動的に表示/非表示」 > 常に
brew services start sketchybar
brew install jandedobbeleer/oh-my-posh/oh-my-posh
- 「現在のタブでリンクを開く」を選択する
- コマンドパラメーターに Bookmarklet 相当の JavaScript を貼り付ける
javascript:(function(){e = document.createElement('textarea');e.textContent = document.URL;document.body.appendChild(e);e.select();document.execCommand('copy');e.remove();})();if(history.replaceState){history.replaceState({},null,location.href);};
javascript:(function(){e = document.createElement('textarea');e.textContent = '['+document.title +']('+ document.URL+')';document.body.appendChild(e);e.select();document.execCommand('copy');e.remove();})();if(history.replaceState){history.replaceState({},null,location.href);};
javascript:(function(){e = document.createElement('textarea');e.textContent = '- '+document.title +'\n'+ document.URL;document.body.appendChild(e);e.select();document.execCommand('copy');e.remove();})();if(history.replaceState){history.replaceState({},null,location.href);};
javascript:(function(){e = document.createElement('textarea');e.textContent = '[['+document.URL +']['+ document.title+']]';document.body.appendChild(e);e.select();document.execCommand('copy');e.remove();})();if(history.replaceState){history.replaceState({},null,location.href);};
brew install --cask wezterm
Cmd + Tタブを新しく作るCmd + Wタブを閉じる
Catppuccin Frappe テーマを使用しています。
Wezterm はシステムのライト/ダークテーマの切替に対応していますが、その機能を利用していません。 Wezterm 上で使う CUI ツールが対応していないためです。
Better cd
brew install zoxide
.zshrc.zprofile
brew install zsh
/etc/shells に次の行を追加します。
/opt/homebrew/bin/zsh
その後、ログイン・シェルの変更を実施します。
chsh -s /opt/homebrew/bin/zsh
Mermaid のソースコードから画像等を作成するコマンドラインツール。
npm install -g @mermaid-js/mermaid-cli
次の Rakefile を用意しておくと、ビルドが楽になります。
# frozen_string_literal: true
task :default => :uml
desc "UML 図を更新する"
task :uml => %w[
foo.png
]
rule '.png' => '.mmdc' do |t|
sh "mmdc --input #{t.source} --output #{t.name} --scale 4"
end
rule '.svg' => '.mmdc' do |t|
sh "mmdc --input #{t.source} --output #{t.name}"
endPlantUML のソースコードから画像等を作成するコマンドラインツール。
brew install plantuml
次の Rakefile を用意しておくと、ビルドが楽になります。
# frozen_string_literal: true
PLANTUML = "/opt/homebrew/bin/plantuml"
task :default => :uml
desc "UML 図を更新する"
task :uml => %w[
foo.png
]
rule '.png' => '.plantuml' do |t|
sh "#{PLANTUML} -Pteoz=true #{t.source}"
end
rule '-simple.plantuml' => '.plantuml' do |t|
sh "sed -e \"s/' hide members/hide members/g\" #{t.source} > #{t.name}"
endBIZ UDGothic と JetBrains Mono を組み合わせたフォント。
JetBrains Mono は Ligature に対応しています。
Nerd Fonts に対応した UDEVGothic_NF_v2.0.0.zip をダウンロードしています。
Ligature に対応した英文フォント。
- Text Attributes
- 0 : All attributes off
- 1 : Bold on
- 2 : Dim/Faint on
- 3 : Italic on
- 4 : Underscore
- 5 : Blink on
- 6 : Hidden on
- 7 : Reverse video on
- 8 : Concealed on
- 9 : Strikethrough on
| Color Name | Foreground Color | Background Color |
|---|---|---|
| Black | 30 | 40 |
| Red | 31 | 41 |
| Green | 32 | 42 |
| Yellow | 33 | 43 |
| Blue | 34 | 44 |
| Magenta | 35 | 45 |
| Cyan | 36 | 46 |
| White | 37 | 47 |
| Bright Black | 90 | 100 |
| Bright Red | 91 | 101 |
| Bright Green | 92 | 102 |
| Bright Yellow | 99 | 109 |
| Bright Blue | 94 | 104 |
| Bright Magenta | 95 | 105 |
| Bright Cyan | 96 | 106 |
| Bright White | 97 | 107 |
| Color Name | ANSI | Bright | ANSI Name | Bright Name |
|---|---|---|---|---|
| Black | #51576d | #626880 | surface1 | surface2 |
| Red | #e78284 | #e78284 | red | red |
| Green | #a6d189 | #a6d189 | green | green |
| Yellow | #e5c890 | #e5c890 | yellow | yellow |
| Blue | #8caaee | #8caaee | blue | blue |
| Magenta | #f4b8e4 | #f4b8e4 | pink | pink |
| Cyan | #81c8be | #81c8be | teal | teal |
| White | #b5bfe2 | #a5adce | subtext1 | subtext0 |
JavaScript
<script src="https://cdn.jsdelivr.net/combine/npm/prismjs@1/components/prism-core.min.js,npm/prismjs@1/components/prism-bash.min.js,npm/prismjs@1/components/prism-css.min.js,npm/prismjs@1/components/prism-diff.min.js,npm/prismjs@1/components/prism-git.min.js,npm/prismjs@1/components/prism-javascript.min.js,npm/prismjs@1/components/prism-json.min.js,npm/prismjs@1/components/prism-jsonp.min.js,npm/prismjs@1/components/prism-lisp.min.js,npm/prismjs@1/components/prism-markdown.min.js,npm/prismjs@1/components/prism-mermaid.min.js,npm/prismjs@1/components/prism-ruby.min.js,npm/prismjs@1/components/prism-shell-session.min.js,npm/prismjs@1/components/prism-sql.min.js,npm/prismjs@1/components/prism-swift.min.js,npm/prismjs@1/components/prism-toml.min.js,npm/prismjs@1/components/prism-xml-doc.min.js,npm/prismjs@1/components/prism-yaml.min.js,npm/prismjs@1/components/prism-lua.min.js,npm/prismjs@1,npm/prismjs@1/plugins/line-numbers/prism-line-numbers.min.js,npm/prismjs@1/plugins/line-highlight/prism-line-highlight.min.js,npm/prismjs@1/plugins/toolbar/prism-toolbar.min.js,npm/prismjs@1/plugins/show-language/prism-show-language.min.js,npm/prismjs@1/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js,npm/prismjs@1/plugins/treeview/prism-treeview.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1/plugins/autoloader/prism-autoloader.min.js"></script>CSS
<link rel="stylesheet" href="https://cdn.jsdelivr.net/combine/npm/prismjs@1/themes/prism.min.css,npm/prismjs@1/plugins/line-numbers/prism-line-numbers.min.css,npm/prismjs@1/plugins/line-highlight/prism-line-highlight.min.css,npm/prismjs@1/plugins/toolbar/prism-toolbar.min.css,npm/prismjs@1/plugins/treeview/prism-treeview.min.css"/>Microsoft が開発しているマルチプラットフォームな IDE