Skip to content

Instantly share code, notes, and snippets.

@QiangF
QiangF / gist:f8ae477d9e5eb1e7fff425c9c88360b1
Created January 4, 2026 02:42
when input not working
[00:09:41]exwm-input--on-KeyPress: major-mode=exwm-mode buffer=firefox::how to solve emacs "exwm" mode key confict with override-global-map - Google Search — Mozilla Firefox
[00:09:41]exwm-input--on-KeyPress-line-mode: (65507 . 0)
[00:09:41]exwm-input--on-KeyPress: major-mode=exwm-mode buffer=firefox::how to solve emacs "exwm" mode key confict with override-global-map - Google Search — Mozilla Firefox
[00:09:41]exwm-input--on-KeyPress-line-mode: (108 . 3)
[00:09:41]exwm-input--mimic-read-event:
[00:09:41]exwm-input--cache-event: 12
[00:09:41]exwm--on-PropertyNotify: atom=_NET_WM_USER_TIME(409)
[00:09:41]exwm-input--on-PropertyNotify:
[00:09:46]exwm--on-PropertyNotify: atom=_NET_WM_STATE(386)
[00:09:46]exwm-input--on-PropertyNotify:
import dbus
import dbus.mainloop.glib
from gi.repository import GLib
# Define the signal handler function
def update_client_side_ui_handler(flags):
"""Handler for the UpdateClientSideUI signal."""
print(f"Received UpdateClientSideUI signal with flags: {flags}")
# Add your custom logic here to update the client-side UI
# 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