hack のためのネタ帳, etc,,,

やりたいこと

explorer.exe のコンテキストメニューに
chere -cim -t mintty -s bash -e "Cygwin64 mintty here"
みたいにして追加した、「Cygwin64 mintty here」にアイコンとして Cygwin.ico を追加したい。

 解法

とりあえず -f オプションで上書きするとともに、-p オプションでレジストリに書き込まず regtool のコマンドのみ出力するようにして、/command/ 以降を sed で icon $ROOT/Cygwin.ico に置換して以下のような感じに。
chere -fpcim -t mintty -s bash -e "Cygwin64 mintty here" | grep /command/ | sed -E "s@/command/.*@icon \"$(cygpath -aw /Cygwin.ico|sed -E 's/\\/\\\\/g')\"@g"

コメントをかく


「http://」を含む投稿は禁止されています。

利用規約をご確認のうえご記入下さい

Wiki内検索

フリーエリア

管理人/副管理人のみ編集できます