Hello, I’m thomjiji

This website is a mix of my blog, my learning journey, and what I’m up to recently ^^.

I fixed Rime and Neovide

TL;DR 问题:Rime 的自动切换到英文输入法的设置对 macOS 上的 Neovide 不生效! 原因:我一般是从 Terminal 启动 Neovide,这样其实调用的是 Homebrew 叫作 formula 的那个程序:/opt/homebrew/bin/neovide。而我们在 Rime 的配置文件 squirrel.yaml 设置的开启默认英文 ascii_mode: true 是给 Neovide 的 GUI app 的!那它自然就不生效了。 解决方案:给 Neovide 设置一个 alias,让它指向 Neovide GUI app 的可执行文件 /Applications/Neovide.app/Contents/MacOS/neovide。像我在 Fish shell 的 ~/.config/fish/config.fish 就是这样设置: alias neovide "/Applications/Neovide.app/Contents/MacOS/neovide" 这样你在 Terminal 输入 neovide 就不会调用那个 formula /opt/homebrew/bin/neovide,而是 Neovide GUI app 的可执行文件。Rime 的默认英文的设置也就正常生效了。 前情提要、问题浮现 Neovide 是一个我前阵子发现的宝藏 app,它让 neovim 拥有 vscode 一般的顺滑操控和鼠标动画。我第一次知道这个 app 的那天晚上,下班一回到家,等不及迅速安装配置好了,然后就被惊到。这个动画的顺畅程度跟 vscode 真的有过之而无不及。那天晚上真是惊叹不已,要知道 neovim 在 Terminal 里的体验你是绝对不会奢求它有多好的 animation 的。即便 LazyVim 的 snacks 插件有通过一个 Animate 的模块做了一点点让 neovim 稍微顺滑一点的努力,但远不及 Neovide 这个顺滑。Neovide 属于你用了就回不去了的那种。 ...

2025-05-04

Tips and tricks

Firefox 的 Profile 文件夹可以在这里获取:Firefox 左上角菜单栏 > Help > More Troubleshooting Information > Application Basics > Profile Folder. 在这个 Profile folder 里创建一个叫做 user.js 的文件,就可以实现导出 Firefox 的全局用户设置(修改过的 Firefox 的默认设置)。 所有在 about:config 里修改的设置都在一个叫做 prefs.js 的文件里。=> Prefs.js file 我的 Firefox 用户设置(about:config): mousewheel.with_control.action: 3 Reference: https://support.mozilla.org/en-US/questions/1197798 Change author name in commit message: git config --global user.name <name> git config --global user.email <email> 安装 LazyVim 之后,LSP 的下载会遇到一些网络问题,比如每次都是 pyright 由于一些网络原因安装失败:set -Ux https_proxy 127.0.0.1:7890 和 set -Ux http_proxy 127.0.0.1:7890 都不好使,使用 sing-box 也不行。这时只需要取消系统代理就可以成功联网安装。 ...

2025-01-08

Create dummy directories using Rsync

Use rsync to create dummy dirs: rsync -avPih --include '*/' --exclude '*' videos/ ~/Desktop/videos-dummy/ Here’s a breakdown of the command: -avPih: These flags stand for: -a: Archive mode, which preserves permissions, timestamps, symbolic links, etc. -v: Verbose, which provides detailed output. -P: Combines –progress and –partial, showing progress during transfer and allowing for partial transfers to be resumed. -i: Output a change-summary for all updates. -h: Output numbers in a human-readable format. --include '*/': Includes all directories (and subdirectories) in the transfer. --exclude '*': Excludes all files.

2024-06-25

Best practice for grading stack in Baselight

Colour Online: Developing Digital Images > Best Practice Stack Start at 59:04:

2024-03-31

Setup Rime on Fedora Asahi Remix

Install fcitx5 and fcitx5-rime via sudo dnf install fcitx5-rime fcitx5. Go to System Setting > Input Devices > Virtual Keyboard, select “Fcitx 5”. Edit environment file via: sudo vi /etc/environment. Add the following content, reference: INPUT_METHOD=fcitx XMODIFIERS=@im=fcitx Open Input Method Selector > Use fcitx5 > Log out. Clone 雾凇拼音 repo into ~/.local/share/fcitx5/, rename it to rime: $ mv rime-ice rime Restart fcitx5 in the lower right corner of your Desktop. ...

2023-12-30

Use mouse wheel to scroll less in iTerm2

在 iTerm2 中使用 less command 有一个奇怪的点:你不能用鼠标来滚动页面。只能使用 Vim 的 keybinding Ctrl+d 和 Ctrl+u 来上下翻页。而且当你比如在查看一个 command 的 man page 时,因为 man page 默认是使用 less 来打开的,你查看完某个 man page 按 q 退出,然后使用鼠标滚轮往上面滚一下,滚到上面一屏,你会发现你的 Terminal 变得很乱,有很多刚刚你查看的那个 man page 的残留。 我的需求总结来说就是: 能够在 less 里使用鼠标滚轮来翻页,滚动。 退出 less 之后不要有残留。 其实,这里有一个概念叫作 alternate screen。你用 less 打开查看一个什么文件的时候进入的就是一个 alternate sceen,按 q 退出就是退出那个 alternate screen,回到 normal screen。Alternate screen 就是一个单独的 buffer,独立于当前 terminal 的。 When activated, the current screen is saved and replaced with the alternate screen.1 ...

2023-12-17

Use native file picker on KDE Plasma

For Firefox Starting with version 64, Firefox can optionally use XDG Desktop Portals to handle various desktop features, such as opening a file picker, or handling MIME types. — Arch Wiki | Firefox | XDG Desktop Portal integration Type about:config in Firefox address bar. Search widget.use-xdg-desktop-portal.file-picker, set it to 1. 0 – Never 1 – Always 2 – Auto (typically depends on whether Firefox is run from within Flatpak or whether the GDK_DEBUG=portals environment is set) Done. For VS Code These two environment variables: GTK_USE_PORTAL=1, GDK_DEBUG=portals. ...

2023-12-09

Pin apps to KDE Panel, not KDE Task Manager

比如你想把 Konsole 和 Firefox 这些最最常用的 app pin 到底部的 bar/dock 上(实际上 KDE 叫它 Panel),最直观的,你下意识的右键 Task Manager 上已经打开的 app,这里有一个“Pin to Task Manager”的选项,勾选上它。但这好像不是你想要的,因为你发现即使 pin 上去了,只要你打开那个 app 的一个 instance,那个刚刚被你 pin 上去的 app 就又不见了。这似乎不是你期待中的“pin”。这时你想要打开那个 app 的第二个 instance,就没法去到老地方,你最初 pin 它的那个地方打开。得找到现在的正在运行的那个 instance 所在的 Task Manager 的地方,右键 > “Open a New Window”。 其实,你刚刚 pin 上去的那个地方,是 Task Manager 的区域。Task Manager 外层还有一个区域,叫作 Panel。你应该,或者说你其实想把它 pin 到 Panel 上。这样不管你开几个 instance,那个 app 的图标还是在那,当你想开第 n+1 的 instance 的时候,还是去那个 pin 的地方点一下就行了。 总的来说,KDE 底部栏的层级是这样的: Panel: Application Launcher Pager Task Manager System tray Digital clock Peak at Desktop 你其实想把 Konsole 和 Firefox pin 到这里: ...

2023-12-04

sshfs

How to mount remote machine’s directory on current host? This question originally came up when I wanted to use Kate to edit a configuration file on macOS. I normally ssh into macOS, cd to that directory, and then type kate <file> to try opening the file for editing. But huh? There’s no kate command. Oh right, because I’m in the macOS environment, of course there’s no kate! But this is a problem - am I restricted to only using vi to edit remote files? I see Asahi Lina smoothly using Kate to open projects and files across multiple Mac machines around her to edit back and forth during development. There must be some way to make this work. ...

2023-12-03

gpg-agent doesn't work anyway!

Solved by this command: gpg-connect-agent updatestartuptty /bye >/dev/null

2023-12-02