Fun about emacs and linux

Some helpers to avoid repeating time (defun +git-push(dir) "Run git push in a specific directory" (interactive) (with-dir dir (shell-command "git add .") (--> (format-time-string "%Y-%m-%d %H:%M" (current-time)) (concat "git commit -m \"" it "\"") (shell-command it)) (shell-command "git push"))) ;;; git sync ;;;###autoload (defun +git-pull(dir) "Run git push in a specific directory" (interactive) (with-dir dir (shell-command "git pull"))) (+general-global-menu! "file" "f" "f" '(:ignore t :which-key "find file") "S" '((lambda () (interactive) (progn (+git-push "~/EnvSetup") (+git-push "~/.
Read more →

Update to debian 11

Updating debian 11 bullseys Install the gnome desktop Prefer the exwm as windows manager Modulize evil.emacs.d settings Installed all-the-icons from doom and now works! Persist xterm settings xrdb -merge .Xdefaults Snapshot and Print Screen <WIN> + <Print> qutebrowser quickstart To go to a new webpage, press o, then type a url, then press Enter (Use O to open the url in a new tab, go to edit the current URL)
Read more →

Continue journey to Emacs Desktop

Configure better the desktop environment 进入Linux下新的Emacs桌面系统 Keys Description Sys-1 Switch to workspace 1 Sys-2 Switch to workspace 2 Sys-3 Switch to workspace 3 Sys-4 Switch to workspace 4 Sys-SPC App Launcher Syc-R Reload session Dive in the font of emacs What’s the font? What’s the font face ? What’s the font set ? What’s the font family? New tab functions 21.17 Tab Bars 标签是一个命名的持久化窗口配置,包括多个缓冲区和窗口。 M-x tab-bar-mode. This command applies to all frames, including frames yet to be created.
Read more →

Emacs字体设置方法总结 - CodeAntenna

[2021-11-12 周五 11:13] 由于目前的状况是两种字体系统并存,我们安装字体时就必须同时照顾到两者。 有时候在网上我们会看到一些字体安装经验介绍,比如:“安装字体太简单了, 把字体丢到 ~/.fonts 下面,执行一下 fc-cache 命令,你就可以在 firefox 中 使用这个字体了。”实际上,这只是为 xft 字体系统安装字体的方法,按这种方 法安装的字体,采用核心字体系统的程序无法使用,也就是说 emacs 无法使用这 样安装的字体。 第一步,拷贝字体。选择一个目录,把想用的字体拷贝到这个目录下。比如: cp simsun.ttf /path/to/my/truetype/font/simsun.ttf 第二步,生成 fonts.scale 与 fonts.dir 在你的字体目录下用 mkfontscale 命令生成 fonts.scale 文件,用 mkfontdir 命令生成 fonts.dir 文件,注意 命令的顺序不能颠倒,否则生成 的 fonts.dir 是空文件。其实这两个文件的内 容是一样的,因此也可以直接 cp fonts.scale fonts.dir 不知道是什么原因 mkfontscale/mkfontdir 命令生成的 fonts.scale 文件中 缺少对 gbk 字体的支持,因此需要手工编辑 fonts.scale,添加一行: simsun.ttf -misc-simsun-medium-r-normal--0-0-0-0-p-0-gbk-0 如果你用的是不同的字体,这一行的内容可能不太一样,但需要注意的是必须要 加上一个以 gbk-0 结尾的行。同时,文件第一行的那个数字要加1。 fonts.dir文件也要进行相应的修改,使这两个文件保持一致。如果不进行这 一步,就无法使用 gbk 字体。 第三步,修改 /etc/X11/xorg.conf (如果你在用 XFree86, 那就修改 XF86Config-4): 找到 Section “Module”, 加载 freetype 模块: Section “Module” …… Load “freetype” …… EndSection 找到 Section “Files”, 添加你的字体路径: Section “Files” …… FontPath “/path/to/my/truetype/font” …… EndSection 最后重新启动 X,这时候用 xlsfonts 命令应该能看到你安装的字体。
Read more →

Creating Timestamps (The Org Manual)

[学习] 创建活动时间戳 Org mode 识别专门标识的时间戳 C-c . (org-time-stamp) 提示日期和时间。如果时间戳已经存在,进行修改。 连续输入2次,插入时间段。 Prompt for a date and insert a corresponding timestamp. When point is at an existing timestamp in the buffer, the command is used to modify this timestamp instead of inserting a new one. When this command is used twice in succession, a time range is inserted 如果包括前缀,这采用替代格式。默认时间可以以5分钟倍数的形式取整。 When called with a prefix argument, use the alternative format which contains date and time.
Read more →