-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDefaultSettings.py
More file actions
141 lines (133 loc) · 4.61 KB
/
DefaultSettings.py
File metadata and controls
141 lines (133 loc) · 4.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# -*- coding: utf-8 -*-
# Falcon default setting config
# Copyright (C) 2019 yamahubuki <itiro.ishino@gmail.com>
# Note: All comments except these top lines will be written in Japanese.
from ConfigManager import *
class DefaultSettings:
"""
このクラスには、キーの削除が許されない設定のデフォルト値を設定する。
ここでの設定後にユーザが上書きできるが、ユーザ側ファイルに値がなければここでの値がそのまま利用される。
"""
def get():
config = ConfigManager()
config["general"] = {
"language": "ja-JP",
"fileVersion": "100",
"locale": "ja-JP",
"log_level": "0",
"update": True,
}
config["speech"] = {
"reader": "AUTO",
"fx_volume": 100
}
config["proxy"] = {
"usemanualsetting": False,
"server": "localhost",
"port": 8080,
}
config["FileList"] = {
"sorting": 0,
"descending": 0,
"column_width_0": "650",
"column_width_1": "150",
"column_width_2": "320",
"column_width_3": "70",
"column_width_4": "240"
}
config["GrepResultList"] = {
"sorting": 0,
"descending": 0,
"column_width_0": 300,
"column_width_1": 80,
"column_width_2": 300,
"column_width_3": 70,
"column_width_4": 150,
"column_width_5": 320,
"column_width_6": 70,
"column_width_7": 240
}
config["DriveList"] = {
"sorting": 1,
"descending": 0,
"column_width_0": 250,
"column_width_1": 120,
"column_width_2": 150,
"column_width_3": 150,
"column_width_4": 480
}
config["SearchResultList"] = {
"sorting": 0,
"descending": 0,
"column_width_0": "330",
"column_width_1": "150",
"column_width_2": "320",
"column_width_3": "320",
"column_width_4": "70",
"column_width_5": "240"
}
config["NetworkResourceList"] = {
"sorting": "0",
"descending": "0",
"column_width_0": "620"
}
config["view"] = {
"font": "bold 'MS ゴシック' 22 windows-932",
"colorMode": "normal",
"header_title_length": 20,
"textwrapping": "on"
}
config["mainView"] = {
"sizeX": "800",
"sizeY": "600",
}
config["browse"] = {
"startPath": ""
}
config["search"] = {
"history_count": 20,
}
config["sounds"] = {
"startup": "tip.ogg",
"boundary": "tip.ogg",
"checked": "click.ogg",
"check": "checked.ogg"
}
config["preview"] = {
"header_line_count": 10,
"footer_line_count": 10,
"audio_volume": 100
}
config["on_list_moved"] = {
"read_directory_level": True,
"read_directory_name": True,
"read_item_count": True
}
return config
initialValues = {}
"""
この辞書には、ユーザによるキーの削除が許されるが、初回起動時に組み込んでおきたい設定のデフォルト値を設定する。
ここでの設定はユーザの環境に設定ファイルがなかった場合のみ適用され、初期値として保存される。
"""
initialValues["favorite_directories"] = {
"ドキュメント": r"%userprofile%\documents",
"デスクトップ": r"%userprofile%\desktop"
}
initialValues["favorite_directories_shortcut"] = {
"ドキュメント": "alt+1",
"デスクトップ": "alt+2"
}
initialValues["open_here"] = {
"Explorer": "%windir%\\explorer.exe \"%1\"",
"コマンド プロンプト": "%windir%\\system32\\cmd.exe /K cd /d \"%1\"",
"Windows Power Shell": "%windir%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -command cd '%1'"
}
initialValues["open_here_shortcut"] = {
"Explorer": "ctrl+e",
"コマンド プロンプト": "ctrl+shift+o",
"Windows Power Shell": "ctrl+shift+p"
}
initialValues["originalAssociation"] = {
"<default_file>": r"C:\Program Files (x86)\KSD\MyEdit\MyEdit.exe",
"<default_dir>": "falcon.exe"
}