Python 更改Arch默认启动背景画面

Python 更改Arch默认启动背景画面

无聊没事干,练习下python,就用来更改Arch默认启动背景吧

准备工作:一张喜欢的背景图片,我用的是Blackarch自带的PNG格式的,其它的格式没试过。运行完成后重启看下效果

#!/usr/bin/env python

import shutil,os,sys

banner = '''\033[2;34m
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|                           Notice:                                         |
|   This python script is test SUCCESSFULLY on Archlinux distrubtion        |
|            for changed the GRUB's default background                      |
|   It will modifield the config file "/etc/defalut/grub"                   |
|        You can choice one favorite IMAGE.PNG replace defalut              |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
\033[0m '''

def change_grub_image(image_name):
    try:
        grub_config_path = '/etc/default/grub'
        contents = 'GRUB_THEME="/usr/share/grub/themes/starfield/them
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
引用提供了一个使用arch库的示例代码,用于对时间序列数据进行ADF检验。首先导入库并引入ADF和arch模块,然后设置数据并进行ADF检验。最后打印出检验结果的摘要信息。给出了arch模块的arch_model函数的参数说明。该函数用于拟合时间序列模型,并可以设置均值方程、滞后阶数、波动率模型等参数。提供了一个使用arch模块的示例代码。首先导入pandas和arch模块,然后使用arch_model函数创建模型并生成模拟数据。接着将数据设置为日期索引,再次使用arch_model函数拟合模型并进行拟合。最后使用hedgehog_plot函数绘制模型的均值方程图。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [pythonarch包的安装](https://blog.csdn.net/qq_54423921/article/details/129635665)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *2* *3* [关于PythonARCH包(二)](https://blog.csdn.net/liuxoxo/article/details/85218135)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值