v1.5.5 fix bugs and new theme
This commit is contained in:
18
theme/sus/theme.py
Normal file
18
theme/sus/theme.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import os
|
||||
theme_name = "sus"
|
||||
theme_version = "1.0.0"
|
||||
|
||||
user = os.getlogin()
|
||||
address = os.getcwd()
|
||||
head = f"\033[31mSUS的{user}\033[0m@\033[32m{address}\033[0m$ "
|
||||
|
||||
# 获取当前文件的绝对路径
|
||||
current_file_path = os.path.abspath(__file__)
|
||||
|
||||
# 从绝对路径中提取目录
|
||||
current_file_dir = os.path.dirname(current_file_path)
|
||||
# 拼接成配置文件路径
|
||||
current_file_dir = current_file_dir.split("/")
|
||||
current_file_dir = "/".join(current_file_dir[:-1])
|
||||
with open(current_file_dir + "text", "w") as f:
|
||||
f.write(head)
|
||||
Reference in New Issue
Block a user