Skip to content

Instantly share code, notes, and snippets.

# System Info:
1. `uname -a`:
Linux mypc 6.6.59-1-lts #1 SMP PREEMPT_DYNAMIC Fri, 01 Nov 2024 06:29:43 +0000 x86_64 GNU/Linux
2. `lsb_release -a`:
LSB Version: n/a
Distributor ID: Arch
Description: Arch Linux
@QiangF
QiangF / .el
Created December 30, 2025 01:04
(require 'dbus)
(defvar fcitx-ic-path nil)
(defvar fcitx-preedit-string "")
(defvar fcitx-commit-string "")
(defvar fcitx-candidates nil)
;; 1. Create Context
(setq fcitx-ic-path
(car (dbus-call-method :session
q@mypc:~$ dbus-monitor "interface='org.fcitx.Fcitx.InputContext1'"
signal time=1767015961.017875 sender=:1.5 -> destination=:1.671 serial=5783 path=/org/freedesktop/portal/inputcontext/2; interface=org.fcitx.Fcitx.InputContext1; member=CurrentIM
string "Pinyin"
string "pinyin"
string "zh_CN"
method call time=1767015962.993409 sender=:1.671 -> destination=:1.5 serial=603 path=/org/freedesktop/portal/inputcontext/2; interface=org.fcitx.Fcitx.InputContext1; member=Reset
method call time=1767015964.231803 sender=:1.671 -> destination=:1.5 serial=604 path=/org/freedesktop/portal/inputcontext/2; interface=org.fcitx.Fcitx.InputContext1; member=ProcessKeyEvent
uint32 110
uint32 57
HTTP/2 200
content-location: index.en.html
vary: negotiate,accept-language,Accept-Encoding,cookie
tcn: choice
x-content-type-options: nosniff
x-frame-options: sameorigin
referrer-policy: no-referrer
x-xss-protection: 1
permissions-policy: interest-cohort=()
strict-transport-security: max-age=15552000
#!/usr/bin/python
# symlinking.py need to be run under the root dir of the script
import os
from os import path, system
def symlink(symlink_dir, symlink_name, relative_target_path):
print("make symlink {} to {}".format(symlink_name, relative_target_path))
symlink = path.join(symlink_dir, symlink_name)
@QiangF
QiangF / emacs-guix-setup.org
Created July 18, 2025 09:22 — forked from noah-evans/emacs-guix-setup.org
Using the guix package manager for a cross-distro, reproducible emacs environment.

Using the guix package manager for a cross-distro, reproducible emacs environment

GNU guix is a functional package manager, that can be installed on any distribution and used to manage packages, including emacs packages.

How is this different from straight.el

straight.el is also a functional package manager, but unlike guix, it only manages emacs packages, while with guix you can include external programs that you will make use of from emacs (like ripgrep), emacs

07-05 14:55:28.894 364 424 I ActivityManager: Start proc 5820:com.lanxin.agjts/u0a70 for pre-top-activity {com.lanxin.agjts/com.lite.lanxin.startuppage.DefaultActivity}
07-05 14:55:28.903 606 732 D StartingSurfaceDrawer: addSplashScreen: apply overrideConfig{1.0 ?mcc?mnc [en_US] ldltr sw360dp w360dp h568dp 320dpi nrml port -touch -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 720, 1280) mAppBounds=Rect(0, 0 - 720, 1184) mMaxBounds=Rect(0, 0 - 720, 1280) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.1 fontWeightAdjustment=0} to starting window resId=2131235310
07-05 14:55:28.903 606 733 D StartingSurfaceDrawer: window attributes color: 0 icon null duration 0 brandImage null
07-05 14:55:28.904 606 733 D StartingSurfaceDrawer: The icon is not an AdaptiveIconDrawable
07-05 14:55:28.910 5820 5820 I Zygote : seccomp disabled by setenforce 0
07-05 14:55:28.911 606 733 D SplashScreenView: Build android.window.S
@QiangF
QiangF / org-zettel.el
Created June 6, 2025 14:19 — forked from c4droid369/org-zettel.el
My homebrew implementation for zettelkasten in org-mode
;;; org-zettel --- Simple zettelkasten implement in Org-mode -*- lexical-binding: t -*-
;; Copyright (C) 2025 c4droid
;; Author: c4droid <c4droid@foxmail.com>
;; URL: https://codeberg.org/c4dr01d/org-zettel
;; Version: 0.1
;; Package-Requires: ((emacs "27.1"))
;; Keywords: org
[*scratch*] 0.000 Log enabled.
[*mistty*] 5.953 set-process-window-size 151x22
[*mistty*] 5.959 set-process-window-size 151x22
[*mistty*] 5.993 RECV[^[[5 q]
[*mistty*] 5.993 refresh (quick)
[*mistty*] 7.311 RECV[^Z//home/q/.emacs.d/elpa.30/mistty-20250424.1707^M^J]
[*mistty*] 7.311 refresh (quick)
[ mistty tty *mistty*] 7.352 Detected bracketed-paste prompt #1 [0-]
[*mistty*] 7.352 RECV[(pip) ^[[1;32mq@mypc:mistty-20250424.1707$^[[0m ]
[*mistty*] 7.352 refresh (quick)
Debugger entered--Lisp error: (args-out-of-range " " 0 -143)
term-emulate-terminal(#<process mistty tty *mistty*> "\33[47h\33[?7l\33[?1000h\33[?1002h\33[?1006h\33[44A\33[G\33[K\15\15\33[;m \15\33[1B\15\33[;m \15\33[1B\15\33[;m \15\33[1B\15\33[;m \15\33[1B\15\33[;m \15\33