Skip to content

priscira/os-preference

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OsPreferences

方面 名称 链接 描述
Font Ubuntu Mono https://design.ubuntu.com/font
Font 字魂正文宋楷
Font OPPO Sans 4.0 https://www.coloros.com/article/A00000074
Gtk Andromeda https://www.pling.com/p/2039961
Icons Azure Glassy Dark Icons https://www.pling.com/p/2154036
Icons Elysia https://www.pling.com/p/2167806 cursor
Python Poetry https://python-poetry.org
Terminal Murex https://murex.rocks
Terminal Rio https://github.com/raphamorim/rio
Terminal Contour https://github.com/contour-terminal/contour
Terminal G https://github.com/equationzhao/g
Terminal Lf https://github.com/gokcehan/lf

Rio

Q&A

  • ssh连接退格异常:写export TERM=xterm-256color.bashrc

Poetry

Configuration

PATH: $HOME/.config/pypoetry/config.toml

  • cache-dir: Poetry缓存路径,默认"$HOME/.cache/pypoetry"
  • data-dir: Poetry数据路径,默认"$HOME/.local/share/pypoetry"
  • virtualenvs
    • create: 是否自动创建虚拟环境,默认true
    • in-project: 是否在项目根目录下建立虚拟环境.venv默认None,表示{cache-dir}/virtualenvs

      如果设置为falsePoetry将忽略任何项目下的.venv文件夹。

    • options
      • no-pip: 创建虚拟环境的时候不下载pip默认false
    • path: 虚拟环境目录,默认"{cache-dir}/virtualenvs"
    • prompt: 虚拟环境的提示词,默认{project_name}-py{python_version}

Environment

  • poetry new <PROJECT>: 创建新项目<PROJECT>
    • --flat: 平铺项目
    • -i(--interactive): 使用交互模式
    • --python <PYTHON>: 指定Python版本或路径
    • --name <NAME>: 指定项目名称
    • --author <AUTHOR>: 指定作者
    • --description <DESCRIPTION>: 项目描述
  • poetry init: 初始化当前文件夹为Poetry项目
    • --python <PYTHON>: 指定Python版本或路径
    • --name <NAME>: 指定项目名称
    • --author <AUTHOR>: 指定作者
    • --description <DESCRIPTION>: 项目描述
  • poetry build [OPTIONS]: 构建项目
    • -o <DIR>(--output <DIR>): 指定构建目录<DIR>,不指定默认**dist
    • --clean: 构建之前清除输出目录
    • --format <sdist|wheel>: 指定构建格式sdist|wheel
  • poetry env <COMMANDS>: 管理虚拟环境
    • activate: 输出执行激活脚本的SHELL命令,不激活脚本
    • use <PYTHON>: 创建虚拟环境,通过版本数字或者Python解释器的路径指定<PYTHON>
    • info: 输出本虚拟环境的 信息
    • list: 输出与本项目相关的所有虚拟环境
    • remove [--all] <ENV>: 移除虚拟环境<ENV>
      • [--all]: 移除所有虚拟环境
  • poetry source <COMMAND>: 管理仓库镜像,影响范围为当前项目
    • add [--priority (primary|supplemental|explicit)] <SOURCE_NAME> <SOURCE_URL>: 指定优先级为priority的镜像,其中 <SOURCE_NAME> != pypi
    • show [<SOURCE_NAME>]: 展示[<SOURCE_NAME>]的信息
    • remove <SOURCE_NAME>: 删除镜像<SOURCE_NAME>

Dependency

  • poetry add [OPTIONS] <PACKAGES>: 添加依赖<PACKAGES>并下载
    • <PACKAGES>
      • <PACKAGE>[EXTRAS][(==|>=|<=)<VERSION>]: 特定版本
      • <LOCAL_PACKAGE_PATH>: 本地安装,模式必须符合^(\.)+/.+
      • git+https://github.com/<USER>/<REPOSITORY>.git: GITHUB发布页安装
    • [OPTIONS]
      • -D(--dev): 添加依赖到DEV环境
      • -G <GROUP>(--group <GROUP>): 添加依赖到组
      • --optional:
      • --lock: 只更新.lock文件,不安装
  • poetry update [OPTIONS] [<PACKAGES>]: 更新依赖[<PACKAGES>]
    • --with <GROUPS>: 更新组中的依赖,多个组的写法有
    • --without <GROUPS>: 更新组之外的依赖
    • --only: 激活后忽略 **--with** --without
    • --lock: 只更新.lock文件,不更新
    • --dry-run(--outdated): 只列出依赖的变化,而不修改.lock
  • poetry remove [OPTIONS] <PACKAGES>: 删除依赖<PACKAGES>
    • -D(--dev): 从DEV环境中删除依赖
    • -G <GROUP>(--group <GROUP>): 从组中删除依赖
    • --dry-run: 只列出依赖的变化,而不修改.lock
    • --lock: 只更新.lock文件,不删除
  • poetry install [OPTIONS]: 从.lock文件中下载依赖,如果没有.lock则隐式执行poetry lock
    • --with <GROUPS>: 安装组中的依赖
    • --without <GROUPS>: 安装组之外的依赖
    • --all-groups: 安装全部组中的依赖
    • --no-root: 不安装组default中的依赖
    • --dry-run: 只列出依赖的变化,而不修改.lock
  • poetry show [OPTIONS] [<PACKAGES>]: 列出当前工作空间中的依赖,可指定包[<PACKAGES>]
    • -o(--outdated): 展示过时依赖
    • --tree: 按树状结构展示依赖
    • --with <GROUPS>: 展示组中的依赖
    • --without <GROUPS>: 展示组之外的依赖
    • --top-level: 只输出顶层依赖
  • poetry lock [OPTIONS]: 生成锁文件
    • --regenerate: 忽略已有的.lock,重新生成
  • poetry sync [OPTIONS]: 同步当前环境依赖和锁文件,自动移除.lock中不存在的依赖
    • --with <GROUPS>: 下载组中的依赖
    • --without <GROUPS>: 忽略组中的依赖
    • --all-groups: 下载所有组中的依赖
    • --no-root: 不下载组default中的依赖
    • --dry-run: 只列出操作,而不修改.lock
  • poetry export [OPTIONS]: 导出项目元数据为其他格式

    插件: poetry-plugin-export

    当使用pip安装由poetry export导出的requirements.txt时,应该加上--no-deps参数,因为Poetry已经完成了所有依赖的解析工作。

    • -o <FILENAME>(--output <FILENAME>): 指定导出内容文件,不设置则输出到stdout
    • -f <FORMAT>(--format <FORMAT>): 指明文件格式,可选requirements.txtpylock.toml
    • --without-hashes: 导出文件不包含哈希值
    • --with <GROUPS>: 包含组中的依赖
  • poetry cache <COMMAND>: 管理项目依赖缓存
    • clear --all: 删除缓存
    • list: 列出构建的wheel缓存

Plugin

  • poetry-plugin-export: 导出pyproject.tomlrequirements.txtpylock.toml
  • poetry-plugin-sort: 在poetry add自动排序pyproject.toml中的dependencies。提供poetry sort命令手动触发排序。

Trae

Extension

插件 链接 作者 描述
Kiro Theme https://marketplace.visualstudio.com/items?itemName=MohdZaid.kiro-theme Mohd Zaid
Simple Icons https://marketplace.visualstudio.com/items?itemName=Comdec.simple-icons Comdec
Pylance https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance Microsoft python LSP

VSIX Download in Browser

(function gainVscVsix() {
  const scriptEle = document.querySelector('.jiContent');
  const { "Resources": { PublisherName, ExtensionName, Version } } = JSON.parse(scriptEle.textContent);
  const reap = `https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${PublisherName}/vsextensions/${ExtensionName}/${Version}/vspackage`;
  console.info(reap);
})()

Use

ln -s ~/Lokalius/OsPreferences/config/g ~/.config/g
ln -s ~/Lokalius/OsPreferences/config/trae/settings.json ~/.config/Trae/User/settings.json
ln -s ~/Lokalius/OsPreferences/config/pypoetry ~/.config/pypoetry
ln -s ~/Lokalius/OsPreferences/murex_profile ~/.murex_profile
ln -s ~/Lokalius/OsPreferences/profile ~/.profile

About

Preferences of Linux-OS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages