Skip to content

Latest commit

 

History

302 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ツールの説明と設定

AeroSpace

i3 ライクな Window Manager

Mission Control のサムネイルが小さくなる問題

Mission Control を起動するとアプリのサムネイルがとても小さく表示される不具合があります。

次のコマンドを打つと解決します。

defaults write com.apple.spaces spans-displays -bool true && killall SystemUIServer

Bat

better cat

Theme

Theme には Catppuccin Frappe を使用しています。

初回のみキャッシュをリビルドしましょう。

bat cache --build

DeskPad

画面共有用に仮想ディスプレイ (Virtual Display) を作るアプリ

Emacs

(emacs-version)

see https://github.com/ataka/emacs-d.git

Eza

Better ls

brew install eza

システム情報取得ツール。Neofetch の後継。

Fontforge

フォントを編集するアプリ。

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 だったのでそのままスルーします。

fzf

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.

Git

  • .gitconfig

GitHub Copilot

GitHub Copilot for Xcode

初期設定

  1. GitHub Copilot for Xcode を開く
  2. アクセシビリティ機能へのアクセス許可を与える
    • 「システム設定 > プライバシーとセキュリティ > アクセシビリティ」から GitHub Copilot for Xcode Extension を許可する
  3. 歯車マークをクリックして、設定画面を開く
    • 「システム設定 > ログイン項目と機能拡張」から Xcode Source EditorGitHub Copilot for Xcode Extension を許可する
  4. GitHub Copilot for Xcode に戻り、サインインする
    • GitHub への Activation 画面が開くので、その通り実行する

使い方

  • TAB 提案されたコードを受け入れる
  • Option 複数行の提案を表示する

自前のキーカスタマイズ

  • Ctrl + [ Previous Suggestion
  • Ctrl + ] Next Suggestion
  • Ctrl + { Open chat in GitHub Copilot for Xcode

GitHub Copilot for Emacs

see README.org in .emacs.d

GitHub Copilot for VSCode

  1. 画面左のサイドバーから「拡張機能」をクリック
  2. 「GitHub Copilot」 (と欲しければ「GitHub Copilot Chat」) をインストール
  3. 画面右下の GitHub アイコンから「Sign in to use Copilot」を実行

Gnuplot

ポータブルなグラフ描画ツール

Clickable な要素にキーボードショートカットを用意するツール。

Homebrew 版は用意されていません。

多採な画像操作ツール

JankyBorders

ウィンドウ枠に色を付けるツール。

コマンド名は borders

Just

コマンドランナー。

補完機能の追加

~/.zsh/completion/_just に次のファイルを置きます。

#compdef _just just
#autoload

_just () {
    local -a subcmds

    subcmds=($(just --summary))

    _describe 'command' subcmds
}

_just "$@"

Karabiner Elements

KMonad と相性が悪いので Makefile からインストール・スクリプトを消します。

Install

インストールする場合は下記コマンドを実行します。

brew install --cask karabiner-elements

Dvorak Layout

'   ,   .   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

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

KMonad

インストール

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 + . を使います。

KMonad を実行する

sudo を使って起動します

sudo ~/.local/bin/kmonad ~/project/dotfiles/kmonad/foo.kbd

起動時に KMonad を実行する

<?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>

起動時に DText Daemon を実行する

<?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>

KMonad を適用するキーボードを限定する

(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

作成した kbd ファイル

ファイル名対象キーボードLayoutIMメモ
なしKinesis Advantage 360 ProDvorakQw
home-row-modsKinesis Advantage 2DvorakQw
home-row-mods-qwertyInternal KeyboardQwertyDv基本利用しない
home-row-mods-qwerty-appleInternal KeyboardQwertyQw
home-row-mods-qwerty-apple-space-cadetInternal KeyboardQwertyQwHyper, Super 対応

MacTcode

https://github.com/mad-p/MacTcode/

アップデート

  1. dmg ファイルをダウンロード & 展開する
  2. 古いディレクトリーを削除して、新しいものをコピーする
  3. ログインし直す
cd /Library/Input\ Methods
sudo rm -rf MacTcode.app
cd ~/Downloads
sudo cp -r MacTcode.app /Library/Input\ Methods/

Raycast

ランチャーアプリ

利用している Extension

標準

  • Clipboard History
  • Navigation / Search Menu Items
  • QUicklinks

サードパーティー

  • Kill Process
  • Quit Applications
  • Toggl Track
  • Zoom

GNU Screen

  • .screenrc

Serie

Rust 製の git graph ツール

SketchyBar

Better メニューバー

デフォルトのメニューバーを隠す

完全にメニューバーを非表示にする方法はないので、自動表示を「常に」に設定します。

  • 設定アプリ > コントロールセンター > 「メニューバーを自動的に表示/非表示」 > 常に

SkeychyBar の起動

brew services start sketchybar

SketchyBar 用アイコン

oh my posh

oh my posh のインストール

brew install jandedobbeleer/oh-my-posh/oh-my-posh

Vivaldi

Quick Command

  1. 「現在のタブでリンクを開く」を選択する
  2. コマンドパラメーターに Bookmarklet 相当の JavaScript を貼り付ける

Copy URL

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);};

Copy as Markdown

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);};

Copy as Plain Text

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);};

Copy as Org

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);};

WezTerm

WezTerm のインストール

brew install --cask wezterm

WezTerm の使い方

  • Cmd + T タブを新しく作る
  • Cmd + W タブを閉じる

Theme

Catppuccin Frappe テーマを使用しています。

Wezterm はシステムのライト/ダークテーマの切替に対応していますが、その機能を利用していません。 Wezterm 上で使う CUI ツールが対応していないためです。

zoxide

Better cd

brew install zoxide

zsh

  • .zshrc
  • .zprofile

zsh (homebrew 版)

brew install zsh

zsh (homebrew 版) の設定

/etc/shells に次の行を追加します。

/opt/homebrew/bin/zsh

その後、ログイン・シェルの変更を実施します。

chsh -s /opt/homebrew/bin/zsh

プログラミング言語の設定

Mermaid

mmdc

Mermaid のソースコードから画像等を作成するコマンドラインツール。

mmdc のインストール

npm install -g @mermaid-js/mermaid-cli

Rakefile のサンプル

次の 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}"
end

PlantUML

plantuml

PlantUML のソースコードから画像等を作成するコマンドラインツール。

plantuml のインストール

brew install plantuml

Rakefile のサンプル

次の 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}"
end

フォントの設定

UDEV Gothic

BIZ UDGothic と JetBrains Mono を組み合わせたフォント。

JetBrains Mono は Ligature に対応しています。

Nerd Fonts に対応した UDEVGothic_NF_v2.0.0.zip をダウンロードしています。

Victor Mono

Ligature に対応した英文フォント。

Theme

ANSI Escape Sequences

  • 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 NameForeground ColorBackground Color
Black3040
Red3141
Green3242
Yellow3343
Blue3444
Magenta3545
Cyan3646
White3747
Bright Black90100
Bright Red91101
Bright Green92102
Bright Yellow99109
Bright Blue94104
Bright Magenta95105
Bright Cyan96106
Bright White97107

Catppuccine

Frappe

Color NameANSIBrightANSI NameBright Name
Black#51576d#626880surface1surface2
Red#e78284#e78284redred
Green#a6d189#a6d189greengreen
Yellow#e5c890#e5c890yellowyellow
Blue#8caaee#8caaeeblueblue
Magenta#f4b8e4#f4b8e4pinkpink
Cyan#81c8be#81c8betealteal
White#b5bfe2#a5adcesubtext1subtext0

マイブログ

Prism.js

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"/>

同僚etc.が使っているアプリ

Microsoft が開発しているマルチプラットフォームな IDE

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages