Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
3
Help us understand the problem. What is going on with this article?
@dharry

Tera TermのThemeをDesertにしてみる

More than 1 year has passed since last update.

Puttyテーマが羨ましい

個人的にPuttyよりTera Termのほうが好みなのですが、Puttyにはカラーテーマが用意されていて(作ってくれている人がいて)羨ましい、、、と思っていたのですが、Tera Termにもカラーテーマ機能あるんですね。

このTera Termのカラースキーマには Solarized はあれども Desert がない。
私には色彩センスがないのでチマチマ自分で設定も自信がない。はてどうしたものか。

しかたがないので、https://github.com/AlexAkulov/putty-color-themes で 公開されている putty用のカラーテーマ を Tera Term用に変換してみるました。

Tera Term カラーテーマプラグイン インストール

https://ja.osdn.net/users/doda/pf/TTXColorTheme/wiki/FrontPage
ダウンロードして TTXColorTheme.dll を Tera Termのインストールフォルダに入れておきます。

PuttyカラーテーマをTera Termカラーテーマへ変換スクリプト

正しく変換できているかどうかは保証できないけど、それっぽくはなっているかな。

conv.py
#!/usr/bin/python3
import sys, os

args = sys.argv

def is_colour(s):
        return True if s[0:7] == '"Colour' else False

def conv_dict(arr):
        dict = {}
        for e in arr:
                kp = e.split("=")
                k = int(kp[0][6:9])
                dict[k] = kp[1]
        return dict

def main():
        if len(sys.argv) != 2:
                print("Usage: hoge.py putty.theme.reg")
                sys.exit(1)

        if (not os.path.exists(sys.argv[1])):
                print("{file} not found.".format(file=sys.argv[1]))
                sys.exit(1)

        with open(sys.argv[1], "r") as f:
                elems = [ s.strip().replace("\"","") for s in f.readlines() if is_colour(s)]

        d = conv_dict(elems)
        arr = [d[3], d[9], d[11], d[13], d[15], d[17], d[19], d[21], d[4], d[8], d[10], d[12], d[14], d[16], d[18], d[20]]
        print("[Color Theme]")
        print("Theme_1 = &Desert")
        print("VTColor_1 = 1,1,{0},{1}".format(d[0], d[2]))
        print("VTBoldColor_1 = 1,1,{0},{1}".format(d[1], d[3]))
        print("ANSIColor_1 = 1,1,{0}".format(",".join(arr)))

if __name__ == "__main__":
    main()

Puttyのカラーテーマレジストリをダウンロードして、スクリプトを実行。

$ curl -s -O https://raw.githubusercontent.com/AlexAkulov/putty-color-themes/master/08.%20Desert.reg
$ python3 conv.py 08.%20Desert.reg
[Color Theme]
Theme_1 = &Desert
VTColor_1 = 1,1,255,255,255,51,51,51
VTBoldColor_1 = 1,1,255,215,0,51,51,51
ANSIColor_1 = 1,1,51,51,51,255,85,85,85,255,85,255,255,85,135,206,255,255,85,255,255,215,0,255,255,255,0,255,0,255,43,43,152,251,152,240,230,140,205,133,63,255,222,173,255,160,160,245,222,179

TERATERM.INI にカラーテーマを設定

TERATERM.INIの最後あたりに [Color Theme]セクションを貼り付けてください。
Tera Term の メニュー [設定]->[Color Theme] から Desert を選んで終わり。

tt-desert.png

コピペ用カラーテーマ

私のコピペ用です。

[Color Theme]
Theme_1 = &Desert
VTColor_1 = 1,1,255,255,255,51,51,51
VTBoldColor_1 = 1,1,255,215,0,51,51,51
ANSIColor_1 = 1,1,51,51,51,255,85,85,85,255,85,255,255,85,135,206,255,255,85,255,255,215,0,255,255,255,0,255,0,255,43,43,152,251,152,240,230,140,205,133,63,255,222,173,255,160,160,245,222,179

Theme_2 = Blazer
VTColor_2 = 1,1,217,230,242,13,25,38
VTBoldColor_2 = 1,1,217,230,242,13,25,38
ANSIColor_2 = 1,1,13,25,38,219,189,189,189,219,189,219,219,189,189,189,219,219,189,219,189,219,219,255,255,255,217,230,242,184,122,122,122,184,122,184,184,122,122,122,184,184,122,184,122,184,184,217,217,217

Theme_3 = Chalkboard
VTColor_3 = 1,1,217,230,242,41,38,47
VTBoldColor_3 = 1,1,217,111,95,41,38,47
ANSIColor_3 = 1,1,41,38,47,219,170,170,170,219,170,218,219,170,170,170,219,219,170,218,170,218,219,255,255,255,217,230,242,195,115,114,114,195,115,194,195,114,115,114,195,195,114,194,114,194,195,217,217,217

Theme_4 = Github
VTColor_4 = 1,1,62,62,62,244,244,244
VTBoldColor_4 = 1,1,201,85,0,244,244,244
ANSIColor_4 = 1,1,244,244,244,222,0,0,135,213,162,241,208,7,46,108,186,255,162,159,28,250,254,255,255,255,63,63,63,151,11,22,7,150,42,248,238,199,0,62,138,233,70,145,137,209,236,255,255,255

Theme_5 = Solarized Darcula
VTColor_5 = 1,1,210,216,217,61,63,65
VTBoldColor_5 = 1,1,236,236,236,61,63,65
ANSIColor_5 = 1,1,61,63,65,242,72,64,98,150,85,182,136,0,32,117,199,121,127,212,21,150,141,210,216,217,112,130,132,242,72,64,98,150,85,182,136,0,32,117,199,121,127,212,21,150,141,210,216,217

Theme_6 = Invisibone
VTColor_6 = 1,1,160,160,160,35,35,35
VTBoldColor_6 = 1,1,207,207,207,35,35,35
ANSIColor_6 = 1,1,35,35,35,255,167,218,163,213,114,239,189,139,152,203,254,229,176,255,117,218,169,255,255,255,160,160,160,211,112,163,109,158,63,181,136,88,96,149,197,172,123,222,59,162,117,207,207,207

Theme_7 = Liquid Carbon
VTColor_7 = 1,1,175,194,194,48,48,48
VTBoldColor_7 = 1,1,255,255,255,48,48,48
ANSIColor_7 = 1,1,48,48,48,255,48,48,85,154,112,204,172,0,0,153,204,204,105,200,122,196,204,188,204,204,48,48,48,255,48,48,85,154,112,204,172,0,0,153,204,204,105,200,122,196,204,188,204,204

Theme_8 = Tomorrow
VTColor_8 = 1,1,77,77,76,250,250,250
VTBoldColor_8 = 1,1,234,234,234,0,0,0
ANSIColor_8 = 1,1,0,0,0,200,40,41,113,140,0,245,135,31,66,113,174,137,89,168,62,153,159,214,214,214,214,214,214,255,51,52,158,196,0,234,183,0,87,149,230,183,119,224,84,206,214,239,239,239

Theme_9 = Tomorrow Night
VTColor_9 = 1,1,197,200,198,29,31,33
VTBoldColor_9 = 1,1,234,234,234,0,0,0
ANSIColor_9 = 1,1,0,0,0,213,78,83,185,202,74,231,197,71,122,166,218,195,151,216,112,192,177,234,234,234,197,200,198,204,102,102,181,189,104,240,198,116,129,162,190,178,148,187,138,190,183,192,200,198


3
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
dharry
SolarisとLinuxとWindowsは好きだけどHP-UXは嫌いです。

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
3
Help us understand the problem. What is going on with this article?