ファイル名に使うと問題がある文字の備忘録

ディレクトリ名の一部に @ を使ってると MSYS2 64 bit のインストーラーに

The installation path must not contain "@".

と怒られる。

今できるだけローカル PC には何も保存しないように試みていて、NAS 内にインストールしたかったのだけど、まず MSYS2 のインストーラーはネットワークドライブのパスを受け付けなかったので、仕方がなくドライブレターにマップする事にした。

そしたらネットワークドライブの直下はマップできなくて、仕方がなく一階層入ったディレクトリをマップした。

最後に上記の通りディレクトリ名に @ を含んでいたから更に奥の階層でマッピングしなおすことになった。

 

ネットワークドライブを C: 内のどこかにマウントできたらいいんだけど。

Mac は使いづらくて好きじゃないけど、最近本当に Windows もなんでこんなに不便なんだろうって思う。いや、今さら MSYS なのかって感じだろうけど、"Developper! Developper! Developper!" って叫んで発表された WSL がストア経由でディストリビューションを取得するような仕組みだったりするのも本当に嫌。

MacWindows も嫌なら、次は Chromebook に行くしかないのかね?(まともなデスクトップ Linux っていうのは何度も夢を見てるけどやっぱり幻想だし)

 

追記: この方法でセットアップしたら全ての動作がありえないくらい重い。やっぱり NTFS 前提なのかもしれない。

まく使いの憂鬱(Karabiner-Elements)の設定ファイル

何度も備忘録として見に来るけど、旧 Karabinerの設定しか書いてなくて毎回凹むので Karabiner-Elements の設定を残しておく。
json は自分で beautify して欲しい(自分には標準的な json のインデントは受け入れられない)。
主に PC 用キーボードを繋いで Windows 風に使いたい人向けの設定のつもり。

追記: ここに書いておくより gist に置いておくほうが参照しやすいかもと思ったので gist に置いた。
今後も追記しそうだけど修正するのは gist 側だけになるかも。
some PC-esque settings for Karabiner Elements · GitHub

追記2: 結局1ファイルに収まらなくなってきてファイルを分割した。
もう gist の方を見てもらうしかない。

Apple の日本語キーボードの場合だけ Control を Command 扱いと、Caps Lock を Ctrl 扱いにする。Apple の日本語キーボード以外では Caps Lock を Command 扱いにする。ProductID で JIS キーボードかどうか区別できてない気もするし、手持ちの2個だけなので自分の環境の ProductID に上手い事書き換えて下さい。

{
    "title": "karabiner - around Ctrl and Command-key settings",
    "rules":
    [
        {
            "description": "change left-Control(⌃) to left-Command(⌘) on Apple JIS keyboards",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "left_control",
                        "modifiers": {"optional": "any"}
                    },
                    "to":
                    [
                        {
                            "key_code": "left_command"
                        }
                    ],
                    "conditions":
                    [
                        {
                            "type": "device_if",
                            "identifiers":
                            [
                                {
                                    "vendor_id": 1452,
                                    "product_id": 633,
                                    "description": "Apple Internal Keyboard (MacBook (Retina, 12-inch, 2017))"
                                },
                                {
                                    "vendor_id": 1452,
                                    "product_id": 656,
                                    "description": "Apple Internal Keyboard (MacBook Air (11-inch, Early 2014))"
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "description": "change Caps-lock(⇪) to left-Control(⌃) on Apple JIS keyboards",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "caps_lock",
                        "modifiers": {"optional": "any"}
                    },
                    "to":
                    [
                        {
                            "key_code": "left_control"
                        }
                    ],
                    "conditions":
                    [
                        {
                            "type": "device_if",
                            "identifiers":
                            [
                                {
                                    "vendor_id": 1452,
                                    "product_id": 633,
                                    "description": "Apple Internal Keyboard (MacBook (Retina, 12-inch, 2017))"
                                },
                                {
                                    "vendor_id": 1452,
                                    "product_id": 656,
                                    "description": "Apple Internal Keyboard (MacBook Air (11-inch, Early 2014))"
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "description": "change Caps-lock(⇪) to left-Command(⌘) on non-Apple JIS keyboard",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "caps_lock",
                        "modifiers": {"optional": "any"}
                    },
                    "to":
                    [
                        {
                            "key_code": "left_command"
                        }
                    ],
                    "conditions":
                    [
                        {
                            "type": "device_unless",
                            "identifiers":
                            [
                                {
                                    "vendor_id": 1452,
                                    "product_id": 633,
                                    "description": "Apple Internal Keyboard (MacBook (Retina, 12-inch, 2017))"
                                },
                                {
                                    "vendor_id": 1452,
                                    "product_id": 656,
                                    "description": "Apple Internal Keyboard (MacBook Air (11-inch, Early 2014))"
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}

Home と End がありえない挙動をするので、こちらの望む挙動に変更。

{
    "title": "Karabiner - functional keys settings",
    "rules":
    [
        {
            "description": "change Home(↖) to Command(⌘) + left-arrow",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "home",
                        "modifiers": {"optional": "any"}
                    },
                    "to":
                    [
                        {
                            "key_code": "left_arrow",
                            "modifiers": "command"
                        }
                    ]
                }
            ]
        },
        {
            "description": "change End(↘) to Command(⌘) + right-arrow",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "end",
                        "modifiers": {"optional": "any"}
                    },
                    "to":
                    [
                        {
                            "key_code": "right_arrow",
                            "modifiers": "command"
                        }
                    ]
                }
            ]
        }
    ]
}

古き良き XFER と NFER (いやこれPC-98での名前だろ、俺はPC-98から入ったから好きだが)を英数とかなに置き換えるのと、
バックスラッシュ周りで要らん事しやがるのを回避。この Apple の愚行は MS が日本語フォントのバックスラッシュを円記号のグリフにしてるのと同じ程度の愚行だと思う。
誰得なのか3秒程度考える知恵があったらこんな仕様にならないだろ。

{
    "title": "Karabiner - Japanese keyboard settings",
    "rules":
    [
        {
            "description": "change Yen-sign(\u00a5) to Backslash(\\)",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "international3"
                    },
                    "to":
                    [
                        {
                            "key_code": "international3",
                            "modifiers": "option"
                        }
                    ]
                }
            ]
        },
        {
            "description": "change Option(⌥) + Yen-sign(\u00a5) to Yen-sign(\u00a5)",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "international3",
                        "modifiers":
                        {
                            "mandatory": "option"
                        }
                    },
                    "to":
                    [
                        {
                            "key_code": "international3"
                        }
                    ]
                }
            ]
        },
        {
            "description": "change nfer(\u7121\u5909\u63db) to eisuu(\u82f1\u6570)",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "japanese_pc_nfer",
                        "modifiers": {"optional": "any"}
                    },
                    "to":
                    [
                        {
                            "key_code": "japanese_eisuu"
                        }
                    ]
                }
            ]
        },
        {
            "description": "change xfer(\u5909\u63db) to kana(\u304b\u306a)",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "japanese_pc_xfer",
                        "modifiers": {"optional": "any"}
                    },
                    "to":
                    [
                        {
                            "key_code": "japanese_kana"
                        }
                    ]
                }
            ]
        }
    ]
}

これは完全にアプリ単位での処理

{
    "title": "Karabiner - Windows-esque style settings",
    "rules":
    [
        {
            "description": "open Developer Tools/Web Inspector with Ctrl+Shift+I in Chrome/Safari/Firefox/Vivaldi",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "i",
                        "modifiers":
                        {
                            "mandatory": ["left_command", "shift"]
                        }
                    },
                    "to":
                    [
                        {
                            "key_code": "i",
                            "modifiers": ["option", "left_command"]
                        }
                    ],
                    "conditions":
                    [
                        {
                            "type": "frontmost_application_if",
                            "bundle_identifiers":
                            [
                                "^com\\.google\\.Chrome$",
                                "^com\\.google\\.Chrome.canary$",
                                "^com\\.google\\.Chrome.beta$",
                                "^com\\.google\\.Chrome.dev$",
                                "^org\\.chromium\\.Chromium$",
                                "^org\\.mozilla\\.firefox$",
                                "^com\\.vivaldi\\.Vivaldi$"
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "description": "move file to trash with Delete on finder",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "delete_forward"
                    },
                    "to":
                    [
                        {
                            "key_code": "delete_or_backspace",
                            "modifiers": ["left_command"]
                        }
                    ],
                    "conditions":
                    [
                        {
                            "type": "frontmost_application_if",
                            "bundle_identifiers": ["^com\\.apple\\.finder$"]
                        }
                    ]
                }
            ]
        },
        {
            "description": "delete file immediately with Shift+Delete on finder",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "delete_forward",
                        "modifiers":
                        {
                            "mandatory": ["shift"]
                        }
                    },
                    "to":
                    [
                        {
                            "key_code": "delete_or_backspace",
                            "modifiers": ["option", "left_command"]
                        }
                    ],
                    "conditions":
                    [
                        {
                            "type": "frontmost_application_if",
                            "bundle_identifiers": ["^com\\.apple\\.finder$"]
                        }
                    ]
                }
            ]
        }
    ]
}

これは適用しなくていいです。UK キーボード(US じゃない UK だ)で日本語どうやって入力すんだよ!と思って調べた知識の確認なので。
もしこっちを使いたかったら上の英数とかなへの変換の方を適用しないでおく。

{
    "title": "Karabiner - additional settings for compatibility",
    "rules":
    [
        {
            "description": "change nfer(\u7121\u5909\u63db) to Option(⌥) + Shift(⇧) + S",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "japanese_pc_nfer",
                        "modifiers": {"optional": "any"}
                    },
                    "to":
                    [
                        {
                            "key_code": "s",
                            "modifiers": ["option", "left_shift"]
                        }
                    ]
                }
            ]
        },
        {
            "description": "change xfer(\u5909\u63db) to Option(⌥) + Shift(⇧) + Z",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "japanese_pc_xfer",
                        "modifiers": {"optional": "any"}
                    },
                    "to":
                    [
                        {
                            "key_code": "z",
                            "modifiers": ["option", "left_shift"]
                        }
                    ]
                }
            ]
        }
    ]
}

まく使いの憂鬱(Karabiner-Elements)の設定ファイル

何度も備忘録として見に来るけど、旧 Karabinerの設定しか書いてなくて毎回凹むので Karabiner-Elements の設定を残しておく。
json は自分で beautify して欲しい(自分には標準的な json のインデントは受け入れられない)。
主に PC 用キーボードを繋いで Windows 風に使いたい人向けの設定のつもり。

{
    "title": "My Settings",
    "rules":
    [
        {
            "description": "Change left-Control(⌃) to left-Command(⌘)",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "left_control",
                        "modifiers": {"optional": "any"}
                    },
                    "to":
                    [
                        {
                            "key_code": "left_command"
                        }
                    ]
                }
            ]
        },
        {
            "description": "Change Caps-lock(⇪) to left-Control(⌃) anyway",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "caps_lock",
                        "modifiers": {"optional": "any"}
                    },
                    "to":
                    [
                        {
                            "key_code": "left_command"
                        }
                    ]
                }
            ]
        },
        {
            "description": "Change Home(↖) to Command(⌘) + left-arrow",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "home",
                        "modifiers": {"optional": ["any"]}
                    },
                    "to":
                    [
                        {
                            "key_code": "left_arrow",
                            "modifiers": "command"
                        }
                    ]
                }
            ]
        },
        {
            "description": "Change End(↘) to Command(⌘) + right-arrow",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "end",
                        "modifiers": {"optional": ["any"]}
                    },
                    "to":
                    [
                        {
                            "key_code": "right_arrow",
                            "modifiers": "command"
                        }
                    ]
                }
            ]
        },
        {
            "description": "Change Yen-sign(¥) to Backslash(\\)",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "international3"
                    },
                    "to":
                    [
                        {
                            "key_code": "international3",
                            "modifiers": "option"
                        }
                    ]
                }
            ]
        },
        {
            "description": "Change Option(⌥)+Yen-sign(¥) to Yen-sign(¥)",
            "manipulators":
            [
                {
                    "type": "basic",
                    "from":
                    {
                        "key_code": "international3",
                        "modifiers":
                        {
                            "mandatory": "option"
                        }
                    },
                    "to":
                    [
                        {
                            "key_code": "international3"
                        }
                    ]
                }
            ]
        }
    ]
}

tmux のマウスオプションでコピペが直感的じゃない件

~/.tmux.conf に setw -g mouse on を書いてコピーモードにしたらマウスでのコピペが不便な感じになった。
iTerm2 on Mac なら option キー(gnome-terminal on X だと shift らしい)を押しながらだとわりと自然な感じになる。

 

I'll be implemented the assertive interface.

人間の言葉で人間に言っても上手く伝えられないだろうという気持ちがある時点でもう人間という存在から離れているのかもしれない。

 

I'll be implemented the assertive interface.

So I would behave as an assertive person.

But I'm not the assertive interface itself.

I'm me. Not an assertion itself.

 

まず伝わらないだろうと思うのと、伝わったら「そうだね、それで?」で終わる。

 

だから何なのかというと、それを伝えたかったんだ。

小さな子供が外の世界で見聞きしてきた事をただ伝えたいだけなのと同じように。

産んでくれて、育ててくれてありがとう

ここ数か月は自分の人生の中でも最大級レベルに自分が高まる期間になっていると思う。

過去にも数回そういう期間があったけれど、今回は最大級レベルと言っていいと思う。

 

実家に帰って母親に「産んでくれて、育ててくれてありがとう。あなたの息子で本当に良かった」とちゃんと伝える事ができた。

正直恥ずかしいので、言おうと思っても実際は言えないかと思ったが、ちゃんと言えたw

 

今回突然それを言ったのは、結婚する気ももうなかった中で、ちょっと別に大事な事を伝えなきゃいけないタイミングだったからなのだけど、伝える事ができた結果として、当然のように母親からはちゃんと結婚して欲しいという思いを伝えられたので、やっぱりもう一度、結婚はできないと思う理由の解消も含めて頑張ってみようかな。

 

父親には生前のうちにちゃんと言葉では伝えられなかったのが悔やまれるんだけど、まあ過ぎたことは仕方がないし、ウチの父親と自分とは言葉を交わすまでもなく100%伝わっていると信じられる、そんな父子だったので、それほど深い後悔にはなっていない。

どうせ生きてても「そうか、よかった、ありがとう」くらいしか言わなかっただろうしw

 

ただ認めてくれるだけで、あれこれ蛇足を言わないのが父。

何も言われてなくても「あぁ、ああも言いたかったんじゃないかな?こうも言いたかったんじゃないかな?」と想定するのが自分。

本当に言葉でのやりとりが要らない不思議な父子だった。

 

今回母親には言葉ではっきり伝えて、人生で為すべきことの大事な一部はしっかりできたなと

オブジェクト指向は今でも大人気だ(メタな意味で)

Qiita で定期的に "オブジェクト指向が" という記事が人気になるという話を受けてなのか夢の中でこんな言葉が出てきた。

 

『現実世界の物の方が、ソフトウェアエンジニアリングの世界のオブジェクトのように看做せるんじゃないの?』

 

起きてどういう意味なのか考えたけどよくわからなくなった。

 

同じ夢の中で、何かの災害なのか、他人とすし詰めで寝なくちゃいけなくなって、壁にミノムシっぽくくっつく寝袋を使ってる人が羨ましいと思った。

 

だがあれだな、落ちてきたら下の人困るから現実では無理だな。

寝袋あるなら外で寝てくださいって話だな。