Skip to content

Instantly share code, notes, and snippets.

View thetrung's full-sized avatar

thetrung

View GitHub Profile
@thetrung
thetrung / hypridle.conf
Last active January 5, 2026 05:43
Update Omarchy / HyprIdle to suspend after 10 mins @ ~/.config/hypr/hypridle.conf
general {
lock_cmd = omarchy-lock-screen # lock screen and 1password
before_sleep_cmd = loginctl lock-session # lock before suspend.
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
inhibit_sleep = 3 # wait until screen is locked
}
listener {
timeout = 150 # 2.5min
on-timeout = pidof hyprlock || omarchy-launch-screensaver # start screensaver (if we haven't locked already)
@thetrung
thetrung / boot_eZ80.asm
Created July 15, 2026 03:51
Sample Asm code for eZ80
; =========================================================================
; Minimal eZ80 Assembly Boot Code
; Targets: eZ80F91 / General eZ80 Series
; =========================================================================
ASSUME ADL = 1 ; Instruct assembler to output 24-bit ADL opcodes
ORG $000000 ; Power-On Reset Vector
reset_vector:
; ==============================================================================
; Minimal Z180 Boot & Serial Test Code
; Target: Z8S180
; ==============================================================================
; Z180 Internal I/O Register Addresses (Default Map: 00h - 3Fh)
DREQ0 equ 04h ; DMA Request 0
STAT0 equ 08h ; ASCI Status Register Channel 0
TDR0 equ 09h ; ASCI Transmit Data Register Channel 0
CNTLA0 equ 00h ; ASCI Control Register A Channel 0
@thetrung
thetrung / install_udev.sh
Last active August 10, 2026 09:10
Xgpro UDev Rules for Xgecu T48 on Linux/Wine
# 1. Create the missing plugdev group
sudo groupadd plugdev
# 2. Add your user to it
sudo usermod -aG plugdev $USER
# 3. Apply the group change immediately to your current terminal
newgrp plugdev
# 4. Add current user to the required USB access groups