#author("2024-11-11T10:24:02+09:00","default:nobuoki","nobuoki")
#author("2024-11-11T10:24:29+09:00","default:nobuoki","nobuoki")
* 動機 / Motivation [#hcf9a7b9]

- wslttyが起動しなくなった / wsltty has stopped starting
-- [[wsltty exits immediately after Windows 11 update KB5032190 · Issue #343 · mintty/wsltty>https://github.com/mintty/wsltty/issues/343]]
-- [[wslttyからWindows Terminalに乗り換えた話 & ターミナルへのドラッグアンドドロップでWSL版のパスが入るようにした - naiの日記>https://nai62.hatenablog.jp/entry/2024/10/08/205652]]

- なぜかcygwinはインストールしてある / For some reason, cygwin is installed.

そうだ、minttyでwslを叩こう / That's right, let's run WSL on Mintty!
そうだ、minttyでwslを叩こう!
That's right, let's run WSL on Mintty!


* minttyでwslを使うためのショートカットの作り方 [#sd372f74]

How to create a shortcut to launch WSL in mintty

パスを端折るとこんな感じ
If you omit the path, it looks like this:

  mintty.exe wsl bash --login

cygwinとwslでconfigを別にするには、-c オプションで上書きするconfigを指定
To use different configs for cygwin and wsl, use the -c option to specify the config to be overwritten.

  mintty.exe -c \path\to\.minttyrc.wsl wsl bash --login


* tmux で Esc キーが効かない [#a6e16d52]

Esc key doesn't work in tmux

例)vimでEscキーが使えなくなる・・・地獄
ex.: The Esc key no longer works in vim... it's hell!


原因がわからない。。。
I don't know the cause...

対症療法で AutoHotKey を使い、mintty.exe のウィンドウでは Esc -> Ctrl+[ にキーコードを置き換えている
As a workaround, I use AutoHotKey to replace the key code with Esc -> Ctrl+[ in the mintty.exe window.

#prism(autohotkey){{{
#SingleInstance
SendMode("Input")  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir(A_ScriptDir)  ; Ensures a consistent starting directory.
SetKeyDelay(20) ; https://bit.ly/3yIPG4x AutoHotkey設定メモ

#HotIf WinActive("ahk_exe mintty.exe")
  Esc::Send "^["
#HotIf
}}}


* 余談 / Digression [#x5cd02d4]

最初は Windows Terminal に乗り換えたのですが、tmuxで上下分割しているときに、上ペインで大量のテキストを表示させると下ペインの下段がバタついて選択文字列が外れたりするので使うのを止めました。

At first I switched to Windows Terminal, but when I used tmux with a top-bottom split, if I displayed a large amount of text in the top pane, the bottom row of the bottom pane would flap around and the selected text would get lost, so I stopped using it.

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS