保姆级 | Windows 复古风格终端样式设置

0x00 前言

        前段时间有朋友询问我 Windows 终端的样式是如何设置的,我也进行了一些简单的回复。在之前的 Windows 11 版本中,系统提供了一个界面按钮,可以直接将终端样式设置为复古风格。然而,系统更新之后,这个按钮好像不见了。

        

        

0x01 环境说明

Windows11 23H2
Corporation 1.18.10301.0

        

        

0x02 打开终端界面

按下 win + R 打开运行窗口,输入 cmd 并回车进入命令行。

        

        

0x03 打开JSON文件

按下 Ctrl + , 打开设置界面,点击左下角设置按钮打开 JSON 文件。

        

        

0x04 设置复古风格样式

使用 Ctrl + F 快捷查找 defaulst

defaults

        

在 defaults 中设置样式,设置 experimental.retroTerminalEffect 开启即可启用复古终端效果。设置完成后使用 Ctrl + S 进行保存。

"defaults": {
    "experimental.retroTerminalEffect": true,  // 启用实验性的复古终端效果
    "useAcrylic": true,  // 启用亚克力效果(终端透明背景)
    "acrylicOpacity": 0.6  // 设置亚克力效果的不透明度为 0.6
},

        

        

0x05 检查命令行状态

重新查看命令行可以看到复古风格样式设置成功。

        

        

0x06 总结

至此Windows复古风格终端样式设置完成。由于作者水平有限,文中若有错误与不足欢迎留言,便于及时更正。 

  • 5
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
好的,下面是一个基于Python的BBS论坛保姆教程,适用于Windows操作系统。 首先,你需要安装Python和一些必要的库。推荐使用Anaconda或Miniconda,因为它们包含了常用的Python库。在命令行中输入以下命令来安装Flask和SQLAlchemy: ``` pip install Flask pip install SQLAlchemy ``` 接下来,你需要创建一个Flask应用程序。在你的工作目录中创建一个名为`app.py`的文件,并输入以下代码: ```python from flask import Flask, render_template, request, redirect, url_for from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///bbs.db' db = SQLAlchemy(app) class Post(db.Model): id = db.Column(db.Integer, primary_key=True) title = db.Column(db.String(80)) content = db.Column(db.Text) author = db.Column(db.String(50)) def __repr__(self): return '<Post %r>' % self.title @app.route('/') def index(): posts = Post.query.all() return render_template('index.html', posts=posts) @app.route('/post/<int:id>') def post(id): post = Post.query.get(id) return render_template('post.html', post=post) @app.route('/new_post', methods=['GET', 'POST']) def new_post(): if request.method == 'POST': title = request.form['title'] content = request.form['content'] author = request.form['author'] post = Post(title=title, content=content, author=author) db.session.add(post) db.session.commit() return redirect(url_for('index')) return render_template('new_post.html') if __name__ == '__main__': app.run(debug=True) ``` 这个应用程序使用了Flask和SQLAlchemy,定义了一个名为`Post`的数据库模型,并创建了三个路由函数。`index`函数会渲染主页,`post`函数会渲染帖子页面,`new_post`函数会渲染新帖子页面,并将新帖子添加到数据库中。 接下来,你需要创建模板。在你的工作目录中创建一个名为`templates`的文件夹,并在其中创建三个HTML文件:`index.html`、`post.html`和`new_post.html`。 `index.html`模板: ```html <!doctype html> <html> <head> <title>BBS</title> </head> <body> <h1>BBS</h1> <ul> {% for post in posts %} <li><a href="{{ url_for('post', id=post.id) }}">{{ post.title }}</a> by {{ post.author }}</li> {% endfor %} </ul> <a href="{{ url_for('new_post') }}">New Post</a> </body> </html> ``` `post.html`模板: ```html <!doctype html> <html> <head> <title>{{ post.title }}</title> </head> <body> <h1>{{ post.title }}</h1> <p>{{ post.content }}</p> <p>by {{ post.author }}</p> <a href="{{ url_for('index') }}">Back to Index</a> </body> </html> ``` `new_post.html`模板: ```html <!doctype html> <html> <head> <title>New Post</title> </head> <body> <h1>New Post</h1> <form method="post"> <label for="title">Title:</label> <input type="text" id="title" name="title"><br><br> <label for="content">Content:</label> <textarea id="content" name="content"></textarea><br><br> <label for="author">Author:</label> <input type="text" id="author" name="author"><br><br> <input type="submit" value="Submit"> </form> <a href="{{ url_for('index') }}">Back to Index</a> </body> </html> ``` 最后,你需要创建一个SQLite数据库。在命令行中输入以下命令: ``` python from app import db db.create_all() exit() ``` 现在你可以运行应用程序了。在命令行中输入以下命令: ``` python app.py ``` 然后在浏览器中访问`http://localhost:5000`即可。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

尼泊罗河伯

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值