-
Notifications
You must be signed in to change notification settings - Fork 232
/
Copy pathexpand1.py
77 lines (75 loc) · 2.36 KB
/
expand1.py
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
import os
before_config = {
"session_name": "sampleconfig",
"start_directory": "~",
"windows": [
{
"window_name": "editor",
"panes": [
{"shell_command": ["vim", "top"]},
{"shell_command": ["vim"]},
{"shell_command": 'cowsay "hey"'},
],
"layout": "main-verticle",
},
{
"window_name": "logging",
"panes": [{"shell_command": ["tail -F /var/log/syslog"]}],
},
{
"start_directory": "/var/log",
"options": {"automatic-rename": True},
"panes": [{"shell_command": "htop"}, "vim"],
},
{"start_directory": "./", "panes": ["pwd"]},
{"start_directory": "./asdf/", "panes": ["pwd"]},
{"start_directory": "../", "panes": ["pwd"]},
{"panes": ["top"]},
],
}
after_config = {
"session_name": "sampleconfig",
"start_directory": os.path.expanduser("~"),
"windows": [
{
"window_name": "editor",
"panes": [
{"shell_command": [{"cmd": "vim"}, {"cmd": "top"}]},
{"shell_command": [{"cmd": "vim"}]},
{"shell_command": [{"cmd": 'cowsay "hey"'}]},
],
"layout": "main-verticle",
},
{
"window_name": "logging",
"panes": [{"shell_command": [{"cmd": "tail -F /var/log/syslog"}]}],
},
{
"start_directory": "/var/log",
"options": {"automatic-rename": True},
"panes": [
{"shell_command": [{"cmd": "htop"}]},
{"shell_command": [{"cmd": "vim"}]},
],
},
{
"start_directory": os.path.normpath(
os.path.join(os.path.expanduser("~"), "./")
),
"panes": [{"shell_command": [{"cmd": "pwd"}]}],
},
{
"start_directory": os.path.normpath(
os.path.join(os.path.expanduser("~"), "./asdf")
),
"panes": [{"shell_command": [{"cmd": "pwd"}]}],
},
{
"start_directory": os.path.normpath(
os.path.join(os.path.expanduser("~"), "../")
),
"panes": [{"shell_command": [{"cmd": "pwd"}]}],
},
{"panes": [{"shell_command": [{"cmd": "top"}]}]},
],
}