Terminal.appがダメなのでiTermをいじる

投稿者: | 2007年11月5日

 LeopardのTerminal.appをしばらく使っているうちに、こいつは使えない代物だと分かった。

 まず、「○」とか「△」とかの記号を倍幅文字と認識してくれない。これは再描画しても直らないのでTigerのTerminal.appよりひどい。もしかすると、日本語フォントの記号グリフに沿った文字幅情報を含むエンコーディング定義を追加することできれいに対処できるのかもしれないが、その方法は未調査。ていうか、こんなのデベロッパープレビュー段階で気づかなかったんだろうか。Appleには日本人ハッカーはいないの?

 二番目に、CommandキーをMetaキーとして使えないのが不便。TigerではAPE+Cmd2Optでなんとかなったが、今のところLeopardには対応していない。ていうかCmd2Optの配布物ってWeb Archive等を漁らないと手に入らなかった気がする。なんにせよ、Emacs使いにとってMetaキーが左下のちっこいOptionキーひとつというのは致命的だ。小指をつって死ねと言うに等しい。小指が休職したら、Ctrl+[で亀のようなもたもた人生を遅れというのか。

 あと、ANSIカラーを調整できないので目に優しくない。頼みの綱はTerminalColorsだが、作者のサイトを見るとLeopardのTerminal.appに対応するのは当分先になりそうだ。

 どうにかしようにもソースがない。じゃあソースがあるものをいじろう、ということでiTermに手を入れました。まず、第一の記号問題を解決するパッチがこれ。

かなり手抜きながら、LANGja_JPっぽいときはU+2000以上の文字は倍幅とみなすものだ。

 次に第二のCommandキーをMetaキーにするパッチがこれ。

これは、一部の組合せを除き、CommandキーをOptionキーと同一視させる修正。もちろん、Keyboard Profileの「Option Key as」でOptionキーをMetaキーにしないと無意味だ。ふつうは日本語を直接入力したいだろうから、そこの設定は「Meta」ではなく「+Esc」にするだろう。

 なお、第三の色問題はiTermには存在しない。Display Profileでいじれるから。

 iTermのサイトからCVSでソースを取ってきて上のパッチを当て、好みに応じていじってビルドしてください。特にどのCommandキーショートカットを生かすかの部分は人それぞれのはず。ビルド方法は、iTerm.xcodeprojを開いてビルドボタンを押すだけ。Xcodeは最新版(Tigerなら2.5, Leopardなら3.0)にしておいた方がいい。Tiger 10.4.10 + Xcode 2.4だとうまくビルドできなかった。

 何か情報があれば寄せてください。みんな我慢しているのか、他にいい選択肢があって俺が知らないだけなのか、いつも不思議なんだよね。

 次に続く。

カテゴリー: Tech

Terminal.appがダメなのでiTermをいじる」への14件のフィードバック

  1. っき

    下記のURLの “Terminal 2 Release Notes” を参照してください。
    U+25B3(WHITE UP-POINTING TRIANGLE)やU+25EF(LARGE CIRCLE)のように文字幅が Ambiguous に分類される文字は文字幅を Narrow として扱うと記載されています。
    http://developer.apple.com/releasenotes/DeveloperTools/RN-Terminal/index.html
    尚、xterm の -cjk_width に相当するようなオプションは、探した限りでは見つかりませんでした。
    記号が重なって表示される件は、wcwidth()とTerminal.appは記号を Narrow として扱っているが、表示する時に(いわゆる)全角のグリフしか見つけられなかったという状況のようですから、これがもし修正されれば(いわゆる)半角で欠けずに表示されるようになるでしょう。
    要するに
    「ギリシャ文字やキリル文字が全角で表示されないと使いにくいと感じるお客様は、Terminal.app 以外のアプリをご利用ください」
    という話のようですね。

    返信
  2. musha

    なるほど。調べが足りなかった。
    ambiguousはwideと見なすというオプションが欲しいですね。
    ASCIIフォントからグリフを取得してその幅から…というのが利けばいいのだけど、それだとASCIIフォントに入ってしまっているグリフが常に優先されてしまうという問題がある。
    WindowsのFontLinkもASCII(というか先に指定したもの)優先なので、自分で好きなASCII & non-ASCIIフォントを合成したものを作ったりしています。
    FontForgeを使うと簡単。
    Ttyアプリケーションについては、個別に教える必要あり。
    以下が参考になります。
    http://d.hatena.ne.jp/macks/20061001

    返信
  3. sakamoto

    trackerにcomment追加させていただきました。もっと早くpatch送っとくべきでした。

    返信
  4. musha

    どうもありがとうございます。
    私の読み方が合っていれば、その実装と私のパッチの実装とで挙動に差はないのではないかと思います。
    というのも、mk_wcwidth_cjk()はnon-spacing characterかどうかも調べていますが、結局iTerm本体が幅1と2にしか対応していないので、幅0のケースを捨てているからです。
    また、そのパッチだとCJKエンコーディングかどうかの判定をしていないので、CJK friendlyな代わりにWestern unfriendlyな気がします。
    ということで、non-spacing charactersに対応するまでは私のパッチを使ってもらうように依頼してもいいでしょうか?
    (落としどころを伝えないと取り込んでもらえないので)

    返信
  5. sakamoto

    おまかせいたします。ひとつ質問があります。
    エンコーディングがUTF-8の場合に
    ロケールを見ているようですが、
    これは一般的な方法なのでしょうか?

    返信
  6. musha

    そこはただの手抜きです。本当は、上のissueのdescriptionにも書いた通り、non-ASCIIフォントがCJK用なのかどうかを見るべきなのだと思います。プロファイルごとにCJKだったりそうでなかったりする使い方は当然あるので。
    フォントやグリフの情報を取って残る不具合を直すのは別途やろうと思っているので、とりあえずのその場しのぎです。

    返信
  7. mat

    はじめまして。emacs使いにとってはTerminal.app + Cmd2optついでにVisorがないとなかなかLeopardにアップグードできません。ところでCmd2OptってWeb上にありますかね?探してもぜんぜん見つからないんで

    返信
  8. mat

    おお、ありがとうございます。いくら探してもなかったもので

    返信
  9. apri.gist.ac.kr

    These exercises alternate between intense bursts of exercise and brief restoration periods,
    maximizing calorie burn and muscle progress in a short
    period of time. After I competed in Olympic lifting, I often used a modified Javorek
    barbell complex. It was primarily to prepare my physique for heavy lifting
    and acted as a warm-up. However it also had a optimistic impact on muscle mass and even conditioning.

    This exercise is finished similar to other flys however
    from a decline position. Like the decline bench press, only use a 30% decline and keep the fly movement at about sternum degree.

    This is a variation of the bench press the place you hold the dumbbells pressed along with a impartial
    grip (palms facing each other). The dumbbells might be
    stored in contact with one another always during the exercise, so you will be
    squeezing them together as you press up and down in a straight
    path at your chest’s centerline. To begin, sit on the incline bench and maintain the dumbbells at
    your sides near your thighs together with your palms up and elbows barely bent.

    Right Here we have a full physique dumbbell exercise that is nice
    for constructing sturdiness and brute energy. We highly suggest this one for athletes who wish to construct energy and
    harm resilience. It is going to work your pretty much each muscle in your physique a technique
    or another (either isotonically or isometrically), nevertheless it emphasizes the abs, obliques, low back, shoulders, chest, triceps, upper
    back, hamstrings, and glutes.
    Lastly, the easy act of selecting up heavy crap and
    strolling with it is one of the most underrated strategies of strength coaching
    within the health club. Choose up a dumbbell, press it
    overhead and waiter stroll 30 ft, turn round, place it at your
    side, then carry it again like a suitcase. When you get back, pick
    up a second bell and farmer walk it forwards and
    backwards, then end off with 10 shrugs. Repeat
    the identical circuit on the other side, and inform me you want
    to do crunches to get an ab workout (you might be
    lying).
    By incorporating advanced methods, understanding
    the precept of progressive overload, and tapping into the
    mental benefits, you’ll be able to actually elevate your health routine.

    Embrace the problem, enjoy the journey, and witness the
    transformative energy of dumbbell complexes in shaping each your physique
    and mind. They symbolize a holistic strategy to fitness,
    blending power coaching with cardiovascular conditioning.
    For men seeking to break obstacles in their health journey,
    these routines offer a versatile, challenging, and efficient method.

    Plasmids generated in this research are described in Supplementary Desk four.

    For expression of the Dbf4 mutants, the plasmids were generated by GenScript.
    The serratus anterior works to attract your shoulder blades ahead round your ribs
    (scapula protraction). (Keep your arms broad and transfer in a straight path and you’ll be emphasizing the outer part).
    Some name it the center chest, some call it the internal chest.

    A dumbbell complicated is a series of dumbbell exercises performed consecutively with out relaxation. One set of each train is finished before transferring on to the next,
    and there are no rests between exercises. The aim is to engage a number of
    muscle groups, offering each a strength and cardiovascular workout.

    He reared his leg again and kneed him within the crotch full-tilt.
    Mikey – and this is the primary time I’ve ever seen this – reflexively
    puked in Mouth’s face! Mouth jumped off, utterly panicking,
    attempting like a madman to wipe the vomit from his eyes.
    Mikey scrambled and grabbed a phillips head off of the ground and
    mounted him. I grabbed Mikey by his shoulders and tried to throw him off, however he
    was holding on like a man possessed, screaming maniacal nonsense about
    his wife’s brow line and bodybuilding rep
    ranges. Throughout this system, I included HIIT workouts (e.g., Tabata units, hill sprints and barbell complexes), which instantly
    adopted my “Easy Strength” routine from Dan John and Pavel Tsatsouline as a “finisher”.
    While you can’t fully isolate any area, lower chest exercises
    will hone in on the decrease a half of the sternocostal head and some of the top area.

    Complexes are an attractive software for helping you obtain these tantric-level sarogasms.
    Repetition and set modifications additionally allow productive suffering.
    Rep scheme models such as ladders and pyramids let you create
    a less linear exercise – one than would possibly extra intently resemble the chaotic topography of the event
    you’re getting ready for. Frankly, actual toughness is found when a person wants nothing more than to quit halfway through their
    first 80 rep set, but pushes by way of the agony and finishes anyways – then does it once more three extra instances.
    Some might name that heart or grit, however when you get proper down to it, toughness is actually just a deep trust
    in one’s conditioning.
    To get you started, here’s a easy dumbbell advanced tailor-made for males.
    Guarantee you select a weight that challenges you however still allows
    you to keep correct kind. For beginners, it’s beneficial to start out light and gradually improve the
    burden. For the first motion, lie on the ground and squeeze
    the dumbbells together as you press up, which can bring more chest into
    the otherwise triceps-heavy floor press. Throughout the row, maintain a safe
    spinal place, and actually try to get a good squeeze on the top between your shoulder blades.

    When doing the cleans, use highly effective hip extension to explode the dumbbells up, very like you
    would in the barbell clear. 5kg just isn’t very much weight in any respect, so by
    average requirements you won’t build a large
    amount of muscle and you won’t be thought-about strong in any respect.
    If you wish to get greater and stronger you’re going to need to raise progressively
    heavier weights, have a good workout regime and have a good food plan. It’s completely nice to coach the
    same muscle group or perform the same exercise(s) multiple days in a row.

    At the top of the complicated, place the weights on the floor and relaxation for 2 minutes.
    Based on this, you will select a weight for the barbell
    high pull, then use that same weight for the relaxation of the
    workout routines. Earlier Than beginning the advanced, determine which of the
    4 workout routines is essentially the most difficult for you.

    In this context, it’s of curiosity that Rad53 additionally binds to the
    Dbf4-HBRCT domain, which may destabilise the MD complex3,15,52.
    Furthermore, Sld3 binds both the Mcm2 N-terminus and the Dbf4 HBRCT61,
    which could further regulate MD stability. Binding throughout the double-hexamer interface, may recommend that splitting of the DH throughout helicase activation may be
    required to release DDK46.
    Whether you handle these components in their very own contexts or as a single entity, pain free range of motion, and
    strength maintained at its fringes relies on consistent and deliberate movement.
    A good cool down ought to down-regulate your body from the battle you
    simply put it via. It should bring your heart fee down easy, and help facilitate even distribution of your circulatory
    system.
    Recently I’ve been considering outdoors the field with my
    complexes. Comparable to the clear and press, it requires
    a lot of explosive energy to row your dumbbells whereas remaining steady.

    Treatment this error by pushing your hips back as if you’re sitting in a chair.

    Simply squatting on its own prompts practically every muscle in the physique, from the quadriceps
    and hamstrings to the glutes and even the again muscular tissues
    (2). This is where the awesomeness of compound exercises
    is out there in. This two-month, field-tested strength-training program will show
    you one other way.
    Now determine the load of the dumbbells you utilized in essentially
    the most challenging exercise in Step 2 (when you
    have been figuring out your 5RM). The most challenging train would be the one during which you used the lightest
    weight. Once you could have that number, plug it into the next
    formulation to discover out your load (weight of dumbbells) for the advanced.
    Even circuit training — often hailed as the cardio king
    of the burden room — looks lazy in comparison. Finally, lunges are a great
    exercise for constructing the glutes, unilateral strength, and balance.
    Most of us have a stronger aspect, and unilateral exercises similar
    to this one let you concentrate on every leg independently.
    To carry out thrusters, merely do a full entrance squat and use the
    momentum on the concentric rep to “drive” the burden up overhead
    in one motion.
    The dumbbell ‘complex’ below takes this a step further by stringing a
    series of strikes collectively seamlessly, all with the same
    single piece of equipment. A session with absolutely no reprieve that cranks up the hassle.

    You are clearly not going to do all the above complete
    body workouts in a single exercise, so you’ll need to select and choose
    workouts that fit properly together. We love to include this kind of whole physique dumbbell train at
    the end of our workouts as a burnout. It also makes for an excellent
    addition to an intense HIIT workout. The dumbbell renegade row to squat is a posh train that involves a quantity of workouts combined into one.
    The step up alone is a good exercise for the quads,
    hamstrings and especially the glutes.
    This part collects any knowledge citations, knowledge
    availability statements, or supplementary materials included on this article.
    Furthermore, the Dbf4 SCR types a lasso round probably
    the most N-terminal resolved region of Mcm4 and in this way could contribute in path of
    the specificity of Cdc7 to Mcm4 (Fig. 4b-III).

    A giant number of backbone-to-backbone contacts, in the lasso structure latching on Mcm4, may accommodate similar binding
    modes when binding and phosphorylating different DDK substrates.

    In addition, we observed the unusual structural configuration of Cdc7, Dbf4
    and Mcm4. Right Here the Mcm4 tail is threaded via a Dbf4 loop, which may help, together with the SCR, to restrain and guide the Mcm4
    N-terminus through the phosphorylation course of (Fig. 
    9b–e). This speculative mechanism could clarify how the Mcm4 N-terminal tail turns into phosphorylated in a extra efficient manner.

    The simulation also reiterates the importance of a negatively
    charged acidic residue near the target serine and explains how even a preceding acidic residue to the
    target web site might help obtain phosphorylation. The dumbbell is probably
    the first piece of equipment you’d record out if somebody were
    to ask what belongs in a gym.
    Collectively these Dbf4-Mcm interactions place Cdc7 on the MCM2-7 double-hexamer in a
    novel means (Fig. 1d), which shields the kinase domain from N-terminal extensions of different Mcm proteins aside from the Mcm4-N-terminal tail.
    Thus, the noticed kinase-substrate interaction is enhancing substrate selection for Mcm4.
    Substrate interplay III (SIII) entails a Dbf4 motif -M
    and -C connector (aa509–538), which is very conserved
    between different species of budding yeast (Fig. 4b-III, Supplementary Fig. 5b).
    Curiously, a bit of region III (aa509–538; labelled as SCR in Fig. 1e–g) is situated in shut proximity to the Cdc7 P-loop and generates a floor alongside the energetic website cleft of Cdc7 directly opposite the substrate-binding site.
    Kinases mainly kind transient, weak interactions with their substrates involving a small
    region alongside the cleft of the kinase energetic site47.
    Weak interactions enable for fast release of the substrate as
    soon as phosphorylation has occurred. This steady interplay presents the chance to characterise the massive DDK-substrate interplay
    surface and investigate how various structurally disordered
    Mcm N-termini are focused for phosphorylation.
    It’s important that you just practice your chest
    with totally different rep schemes and quantity. Bear In Mind, growing a powerful mind-muscle connection, utilizing proper type, and specializing in engaging
    your chest muscles all through the train will assist be sure
    that you feel the focused work in your chest rather than just your arms.
    If you’ve been within the fitness center for some time, you’ve most likely seen this train being accomplished with a
    weight plate. The Svend press is a standing chest train where you
    press the weight straight ahead along with your palms in a prayer-like position. The dumbbell reverse bench press is kind of a common bench press besides you are holding
    the dumbbells in reverse (underhand grip) and your arm positioning is a little nearer to the
    body.
    This isn’t potential with dumbbells clearly as all sides has its separate weight.

    With dumbbells, in case your weak aspect lags, you’ll instantly discover it.
    With barbells, the bar touches your chest before your pectoral muscle tissue have reached their full vary of motion. But dumbbells let you
    decrease previous your chest, stretching your pecs to the max, and thus activating the most potential
    muscle fibers. A lot of trainers use this train for individuals who have shoulder issues and bodybuilders use it because
    it is very efficient at hitting the higher chest and triceps with out the shoulders doing an excessive quantity of
    work. By merely altering your grip, you might be putting extra
    emphasis in your higher chest and you take pressure and tension off your shoulders.

    As the push-press will most likely be your weakest exercise, use that transfer to determine your coaching weight
    for the the rest of the complex. For six reps, that’s the burden you must use for the entire sequence.
    Remember, begin your advanced workout with an applicable
    warm-up. A few minutes of light cardio and a few dynamic
    mobility and adaptability workout routines are an excellent place to begin. End up with a couple of simple reps of each exercise in your complicated using a light-weight load.

    Here is my web page legal steroids that work (apri.gist.ac.kr)

    返信

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です