CharlesScripts
My awesome scripts for Arch Linux or Ubuntu Gnome latest LTS or MacBook.
Install / Use
/learn @the0demiurge/CharlesScriptsREADME
<a href="https://996.icu"><img src="https://img.shields.io/badge/link-996.icu-red.svg" alt="996.icu" /></a>
你为什么要安装本项目?
凡是喜欢折腾的朋友肯定经常会遇到下面几个困扰:
- 操作系统被自己搞烂,需要重装,难受!
- 换了新电脑 / 工作环境,一切常用工具又需要重新部署,麻烦!
- 许多插件配置起来太复杂了,缺少自动或版自动化的工具
- 常用的命令就那么几个,还又长又复杂(说的就是你!
apt和git)
内容介绍
最初因为我经常会因为愚蠢的操作把操作系统搞得崩溃,写下了本项目以便减轻重装系统之痛。后来我写了许多方便的小工具和脚本,把它们整合起来就变成了本项目:
1. 备份/恢复
本项目会将所有资料备份到 $CHARLES_BACKUP 即 ~/.config/CharlesBackup,可以使用网盘或git自动上传备份(git备份已经集成在charles-update命令中)
下面是是相关命令介绍:
add-ppa: 添加ppa的时候同时备份ppa列表,在fish-shell中运行add-ppa (add-ppa)可以自动添加列表中全部 ppainst: 使用apt安装软件的时候同时备份软件名,在fish-shell中运行inst (inst)可以自动安装列表中全部软件gnome-shell-extensions-backup和gnome-shell-extensions-restore: 备份和恢复Gnome桌面的插件omf-backup和omf-restore: 备份和恢复oh-my-fish(fish-shell的包管理器)的插件列表charles-backup: 调用上述部分命令备份各种插件(可以放到cronjob里面实现自动备份)charles-update: 更新本项目及相关依赖;自动使用git上传备份
2. 小工具
通知类:
effifo:ef相当于一个短时备忘录,可以用来记录笔记,相当于编辑fifo命令;输入fifo即可运行之前写入的内容。notify: 提醒你一定时间之后做某事tomato: 简单的蕃茄钟,定时运行fifo命令
系统操作:
update: 相当于pacman -Syyu,更新所有软件apt-unlock: 删除apt因为异常退出而没有删掉的文件锁get-path: 获得选定的文件绝对路径,并放到剪贴板内mac-addr-flush: 重置 MAC 地址(重启失效)wallpaper-earthview: 更新桌面壁纸(需要先设置好桌面壁纸位置为~/.cache/wallpaper/background-image.jpg)
其他:
ssr: ShadowSocksR 的一键安装、配置、使用客户端aria2c-daemon-start: 启动aria2的下载服务gh-md-toc: Forked from gh-md-toc, 为 GitHub 的 Markdown 文件加入目录gojuon: 日语五十音学习小工具ipgwipgw_py: 命令行版的东北大学校园网登录器
网页相关:
wechat: 打开微信pocket: 打开 Pocketshanbay: 打开扇贝单词
包含在 .bashrc 或 fish-shell config.fish 中的简便操作:
写在CharlesScripts/charles/shell.rc.d中的脚本函数:
backup: 将文件备份(复制一份并添加.bak后缀)cls:cd到指定文件夹然后lsdict: 将dict查到的单词输出到less内,以免单词解释过长显示不完还要再翻回去看g: 使用git一条龙地执行git add -A,git diff --cached,git status,git commit -m <commit message>,git push,并检查 push 是否成功,若失败则提醒你检查一下mcd: 先mkdir再cd到刚刚创建的文件夹内md5check:md5check <file> <md5>,用grep检查md5是否一样viz: 使用graphviz编译为指定格式的图片,用法为viz source.dot png
在CharlesScripts/charles/installation.d/conf.d/config-fish配置好的命令缩写
...->cd ...c->clear; cdcl->cd ..;lseg->grep -Eftps->python3 -m http.server 8080: 快速开启一个简易 ftp 服务器gaa->git add -Agb->git branch -cgck->git checkoutgcm->git commit -mgl->git l: 显示结构化的 git 日志gm->git merge --no-ffgp->git pushgpl->git pullgst->git statushistg->history | grepi->ipython --no-confirm-exit --no-banner --pprint -i --pylab=autol->ls --color=autola->ls --almost-all --color=autole->ls --almost-all --color=auto|egreplg->ls --almost-all --color=auto|grepll->ls --almost-all -lh --color=auton->xdg-open .o->xdg-openp->pythonpdb->python -mpowerline.bindings.pdbsu->sudo suu->update
3. 安装软件
脚本在 CharlesScripts/charles/installation.d/get.d
标 * 的是推荐安装的
get.d/
├── get-calibre
├── get-docker
├──*get-fasd
├──*get-oh-my-fish
├──*get-powerline
├── get-spacemacs
├── get-spacevim
├── get-sublime-text-3
├──*get-thefuck
└── get-xsh
4. 配置软件
脚本在 CharlesScripts/charles/installation.d/conf.d
标 * 的是推荐安装的
conf.d/
├──*config-bash
├──*config-fish
├──*config-git
├──*config-gnome
├──*config-powerline-bash
├── config-powerline-ipython
└──*config-tmux
安装指南
装前必读:
- 本项目并未经过大量测试,需要读者有基本的 Linux 问题处理能力
- 支持的操作系统:Arch Linux 或 Ubuntu Gnome 最新LTS版
- 依赖项(需要用户自行安装): Nerd Fonts, Google Chrome, curl
- 可选项:Anaconda, ipython (>=5.0), fortune-zh
逐步安装:
- 安装依赖
- 下载本项目:
git clone https://github.com/the0demiurge/CharlesScripts.git ~/.local/share/CharlesScripts cd ~/.local/share/CharlesScripts/charles/installation.d- 阅读并运行相关软件安装脚本和配置脚本。
安装脚本(测试中):
bash <(curl -L https://git.io/get-charles)
效果图:
按照Ubuntu Gnome 酷炫完整指南系列介绍的内容配置后如下图所示。

Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
