Skip to content

Instantly share code, notes, and snippets.

@QiangF
QiangF / fmg-biff.el
Created April 21, 2024 01:01 — forked from fgilham/fmg-biff.el
Emacs Wanderlust mail notifier
;;; -*- Mode: EMACS-LISP -*-
;;; A fancy notify hook for Wanderlust.
;;;
;;; Time-stamp: <2019-09-26 15:45:18 fred>
;;;
;;;; Usage:
;;;
;;; 1. Set the variable wl-biff-check-folder-list to the list of
@QiangF
QiangF / repeat-mode-config.el
Created April 11, 2024 06:01 — forked from karthink/repeat-mode-config.el
repeat-mode configuration with which-key for Emacs 28
(use-package repeat
:if (version< "28.0" emacs-version)
:bind ("H-z" . repeat)
:hook (after-init . my/repeat-mode)
:config
(defun my/repeat-mode ()
(let ((inhibit-message t)
(message-log-max nil))
(repeat-mode)))
@QiangF
QiangF / hlwm.el
Created April 7, 2024 09:53 — forked from wdkrnls/hlwm.el
hlwm.el: control herbstluftwm from emacs
;;;; HLWM convience tools
;; author: Kyle Andrews
;; license: GPL V3 or later
(defun bash-path ()
"Return all the executables in the path according to bash.
This does not work as well as dmenu-path since it includes bash
reserved words in the result."
@QiangF
QiangF / hideshow-config.el
Created February 10, 2024 06:46 — forked from dsjt/hideshow-config.el
hideshow config for python
(require 'hideshow)
(define-key hs-minor-mode-map (kbd "C-^") 'hs-toggle-hiding)
(add-hook 'python-mode-hook 'hs-minor-mode)
(defun display-code-line-counts (ov)
(when (eq 'code (overlay-get ov 'hs))
(overlay-put ov 'display
(format " ... [%d]"
(count-lines (overlay-start ov)
(overlay-end ov))))
(overlay-put ov 'face '(:foreground "yellow green"))))
@QiangF
QiangF / init.el
Created January 1, 2024 08:37 — forked from include-yy/init.el
include-yy's emacs config file
;;; init.el --- include-yy's emacs config -*- lexical-binding:t; -*-
;; Copyright (C) 2023 include-yy <yy@egh0bww1.com>
;; Author: include-yy <yy@egh0bww1.com>
;; Created: 17 Jun 2023
;; Version: 0.1
;; Keywords: config
;; URL: https://gist.github.com/include-yy/e70dcbfc1a80403814d0b7a7357971d9
@QiangF
QiangF / .dir-locals.el
Created January 1, 2024 02:46 — forked from doolio/.dir-locals.el
.dir-locals.el for use with the Emacs Eglot LSP client and python-lsp-server (pylsp) LSP server
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")
;;; Commentary:
;; .dir-locals.el for use with the Emacs Eglot LSP client and
;; python-lsp-server (pylsp) LSP server v1.9.0.
;; Default values in accordance with
;; https://github.com/python-lsp/python-lsp-server/blob/v1.9.0/CONFIGURATION.md
@QiangF
QiangF / MiniConda_Windows_Portable.md
Created December 22, 2023 01:25 — forked from CypherpunkSamurai/MiniConda_Windows_Portable.md
MiniConda portable installation
@QiangF
QiangF / emacs-ahkv2.ahk
Created December 11, 2023 13:15 — forked from tado/emacs-ahkv2.ahk
Emacs-like keybindings for AutoHotKey v2 (ref. https://qiita.com/asublue/items/0e3fad2667545793466d)
#Requires AutoHotkey v2.0
;;
;; An autohotkey script that provides emacs-like keybinding on Windows
;;
;; global constants
DEBUG_MODE := 0
;; global variables
@QiangF
QiangF / wm.el
Created October 22, 2023 02:10 — forked from pervognsen/wm.el
Dynamic tiling window manager for Emacs (inspired by dwm/awesome/xmonad for Linux)
; This code is hereby released by its author (Per Vognsen) into the public domain.
; It's mostly a proof of concept though it was surprisingly usable for how simple it was to code.
; If you want to use it as a starting point for a more polished package, go right ahead.
(require 'cl)
(defstruct wm-window buffer (point 0) (start 0) (hscroll 0) dedicated)
(defvar wm-windows)
(defvar wm-windows-alist)
@QiangF
QiangF / x11-gnome-do.py
Created October 11, 2023 09:05 — forked from BurntSushi/x11-gnome-do.py
Hacky Python script to switch focus between monitors in GNOME while respecting window stacking order.
#!/usr/bin/env python3
# This script serves as duct tape to make the multiple monitor experience
# on GNOME 3 just a little bit better. Currently, the only functionality of
# this script is to switch focus from one monitor to the next, while respecting
# the stacking order of windows inside each individual monitor. However, the
# script is designed to make it easy to add more functionality later. Namely,
# when the script is run, it reads the current monitor, desktop and window
# configuration into a convenient in-memory data structure.
#