Skip to content

Instantly share code, notes, and snippets.

@lijigang
lijigang / gist:cbb9d052266eb6f050c4011f87fc232c
Created February 23, 2021 05:18
hide orgmode headline's tags for a better look
;; Hide tags
(defun org-toggle-tag-visibility (state)
"Run in `org-cycle-hook'."
(message "%s" state)
(cond
;; global cycling
((memq state '(overview contents showall))
(org-map-entries
(lambda ()
(let ((tagstring (nth 5 (org-heading-components)))
@lijigang
lijigang / init-agenda-block.el
Created May 5, 2020 10:16
orgmode configuraion of agenda (colorful block)
;; agenda 里面时间块彩色显示
;; From: https://emacs-china.org/t/org-agenda/8679/3
(defun ljg/org-agenda-time-grid-spacing ()
"Set different line spacing w.r.t. time duration."
(save-excursion
(let* ((background (alist-get 'background-mode (frame-parameters)))
(background-dark-p (string= background "dark"))
(colors (list "#1ABC9C" "#2ECC71" "#3498DB" "#9966ff"))
pos
duration)
@lijigang
lijigang / init.el
Created May 5, 2020 10:12
orgmode configuration of agenda (sunrise and sunset)
;; learn from https://github.com/AbstProcDo/Master-Emacs-From-Scrach-with-Solid-Procedures/blob/master/05.Emacs-as-a-Agenda-by-Org.org
(setq org-agenda-include-diary t)
(setq org-agenda-diary-file "your/path/to/standard-diary")
(setq diary-file "your/path/to/standard-diary")
;; 设置本地经纬度坐标
(setq calendar-latitude 39.9042)
(setq calendar-longitude 116.4074)
@lijigang
lijigang / ljg.svimrc
Last active August 8, 2019 02:00
safari vim extension config
let mapleader = ","
map "u" lastClosedTab
map "d" quit
map "h" previousTab
map "l" nextTab