Skip to content

A lightweight Emacs configuration works on Linux, macOS and Windows.

Notifications You must be signed in to change notification settings

chuxubank/cat-emacs

Repository files navigation

Cat Emacs

https://github.com/chuxubank/cat-emacs/actions/workflows/ci.yml/badge.svg

Docker

macOS

Docker X11 macOS

brew install XQuartz
open -a /System/Volumes/Data/Applications/Utilities/XQuartz.app
DISPLAY=:0 xhost +localhost     # localhost being added to access control list
docker run -it -e "DISPLAY=host.docker.internal:0" chuxubank/cat-emacs:main

Windows with WSLg

Containerizing GUI applications with WSLg

sudo docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -v /mnt/wslg:/mnt/wslg \
  -e DISPLAY=$DISPLAY -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY \
  -e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR -e PULSE_SERVER=$PULSE_SERVER \
  chuxubank/cat-emacs:main

System

Windows

MSYS2

You can use

C:\msys64\usr\bin\mintty.exe -w hide /bin/env MSYSTEM=MINGW64 MSYS2_PATH_TYPE=inherit /bin/zsh -l -c "/mingw64/bin/emacsclientw -n -c -a ''"

to create a shortcut to start Emacs. You may also set HOME environment and start path to %USERPROFILE%

WSL

To use Wayland and set GTK theme, you can add these to your shell script.

export MOZ_ENABLE_WAYLAND=1

isLight=$(reg.exe query "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" | grep AppsUseLightTheme | awk '{print $3}')

if [ "${isLight:2:1}" == 1 ]; then
    export GTK_THEME=Arc
else
    export GTK_THEME=Arc-Darker
fi

Rime

Sync

https://github.com/rime/home/wiki/UserGuide#同步用戶資料

Pass

https://www.masteringemacs.org/article/keeping-secrets-in-emacs-gnupg-auth-sources $HOME/.gnupg/gpg-agent.conf

allow-emacs-pinentry

Latex

If you want to include svg file in latex file and generate the pdf file you need to

  • Add set_tex_cmds( '--shell-escape %O %S' ); to $HOME/.latexmkrc
  • Install inkscape

To indent tex file you need to

sudo cpan -i File::HomeDir

About

A lightweight Emacs configuration works on Linux, macOS and Windows.

Topics

Resources

Stars

Watchers

Forks

Packages