manjaro配置fcitx5输入法

1. 安装 yay -S fcitx5 fcitx5-rime fcitx5-input-support fcitx5-chinese-addons fcitx5-qt fcitx5-gtk fcitx5-configtool rime-double-pinyin rime-double-pinyin 是双拼输入法,我使用小鹤双拼。 开机自启: cp /usr/share/applications/org.fcitx.Fcitx5.desktop ~/.config/autostart/ 配置 fcitx5的配置目录在:mkdir ~/.local/share/fcitx5/rime/ 在这个目录下创建default.custom.yaml: patch: schema_list: - schema: double_pinyin_flypy 使用小鹤双拼输入方案。 若想对某个输入方案进行自定义,例如小鹤双拼,其原配置文件为:~/.local/share/fcitx5/rime/double_pinyin_flypy.schema.yaml.则需要在~/.local/share/fcitx5/rime/下创建double_pinyin_flypy.custom.yaml,然后在其中进行自定义。 例如: # encoding: utf-8 patch: "switches/@0/reset": 1 switches: - name: ascii_mode reset: 1 states: [ 中文, 西文 ] # 默认英语 - name: full_shape reset: 0 # 默认半角 states: [ 半角, 全角 ] - name: zh_simp # 注意這裏(※1) reset: 1 # 默认简体 states: [ 漢字, 汉字 ] switches/@next: name: emoji_suggestion reset: 1 # 默认开启emoji states: [ "🈚︎", "🈶" ] 'engine/filters/@before 0': simplifier@emoji_suggestion emoji_suggestion: opencc_config: emoji....

August 21, 2023 · 1 min · 李昌

在manjaro台式机上使用罗技蓝牙鼠标

0. 软硬环境 系统:manjaro(内核6.1.44) 鼠标:mx anywhere 2s 无蓝牙 1. 通过优联连接鼠标与主机 这里需要下载solaar包来进行连接。 yay -S solaar Solaar 是许多罗技键盘、鼠标和触控板的 Linux 管理器,可无线连接到 USB Unifying、Bolt、Lightspeed 或 Nano 接收器; 通过 USB 线直接连接; 或通过蓝牙连接。 Solar 不能与其他公司的外围设备配合使用。 安装完成之后,打开solaar,将有如下ui界面出现,按步骤连接鼠标即可。 2. 设置鼠标按键 我的鼠标mx anywhere 2s上有一些按键,如果只用solaar连接到电脑,这些按键可能并不能发挥它的作用,因此我们需要将这些按键和快捷键进行绑定。 这里使用logiops 安装: yay -S logiops 配置: sudo vim /etc/logid.cfg 在logid.cfg中添加如下内容: devices: ({ name: "Wireless Mobile Mouse MX Anywhere 2"; // A lower threshold number makes the wheel switch to free-spin mode // quicker when scrolling fast....

August 21, 2023 · 2 min · 李昌

常用工具集合

1. draw.io 在线画图工具 https://app.diagrams.net/ 2. sql to Gorm SQL语句转化为go结构体 https://sql2gorm.mccode.info/ 3. 一些编程字体 https://www.nerdfonts.com/font-downloads 4. 团队协作工具 https://www.devbefore.com/product 5. markdown 写作工具(开源免费) https://marktext.app/ 6. z 目录快速跳转 (强烈推荐) https://github.com/rupa/z (安装)https://yangchnet.github.io/Dessert/posts/tool/z/ 7. nvm npm多版本管理 (强烈推荐) https://github.com/nvm-sh/nvm 8. lazydocker 容器查看工具 https://github.com/jesseduffield/lazydocker 9. dive 镜像查看工具 https://github.com/wagoodman/dive 10. corc 文件转发工具(任意主机) (强烈推荐) https://github.com/schollz/croc 11. asciinema 终端会话记录工具 https://github.com/asciinema/asciinema 12. tree 目录树工具 sudo apt-get install tree 13. Dev hints 技术速查表 https://devhints.io/ 15. utools 快捷启动工具 (强烈推荐) https://u.tools/ 16. 语雀 文档写作工具(团队/个人) https://www.yuque.com/ 17. fehelper 一些小工具的集合(浏览器插件)(强烈推荐) https://www....

August 21, 2023 · 1 min · 李昌

vim配置

1. 安装插件系统 使用的是vim-plug curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 2. 安装插件 打开~/.vimrc, 在其中写入: " Specify a directory for plugins " - For Neovim: stdpath('data') . '/plugged' " - Avoid using standard Vim directory names like 'plugin' call plug#begin('~/.vim/plugged') " Make sure you use single quotes " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align Plug 'junegunn/vim-easy-align' " Any valid git URL is allowed Plug 'https://github.com/junegunn/vim-github-dashboard.git' " Multiple Plug commands can be written in a single line using | separators Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' " On-demand loading Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } Plug 'tpope/vim-fireplace', { 'for': 'clojure' } " Using a non-default branch Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' } " Using a tagged release; wildcard allowed (requires git 1....

December 29, 2021 · 2 min · 李昌

z

install z # Download to latest to home dir wget https://raw.githubusercontent.com/rupa/z/master/z.sh -O ~/z.sh # Add to .bashrc echo . /path/to/z.sh >> ~/.bashrc # Add to .zshrc echo . /path/to/z.sh >> ~/.zshrc

December 12, 2021 · 1 min · 李昌

pm2使用指南

1. 安装pm2 npm install pm2 -g 或 yarn global add pm2 使用pm2 -v查看版本号 2. 基本使用 2.1 启动应用 pm2 start app.js # 不止是js文件,其他可执行文件也可以执行 pm2 start script.sh # 启动bash脚本 pm2 start python3 -- app.py # -- 后跟要传给命令的参数 pm2 start binary -- -port 8080 在启动应用时还有一些参数 --name <app_name> # 为应用设置一个名字 --watch # 监视源文件并在源文件存在更改时重启应用 --max-memory-restart <200MB> # 设置应用占用内存上限 --log <log_path> # 设置log文件路径 -- arg1 arg2 arg3 # 传递参数 --restart-delay <delay in ms> # 重启前延时 --time 在日志前增加时间戳 --no-autorestart # 不要自动重启 2....

August 6, 2021 · 5 min · 李昌