Compare commits

...

15 Commits

Author SHA1 Message Date
Ryan Yin 1581992b8d feat: ignore polybar's scripts in github linguist, it's copied from another repo 2024-01-08 01:26:22 +08:00
Ryan Yin abac10ac49 fix: vterm's color 2024-01-08 00:58:02 +08:00
Ryan Yin 06d7e9f7d5 fix: emacs - transparent on macOS 2024-01-07 23:49:55 +08:00
Ryan Yin c3ba586954 fix: emacs29-macport has problem to start via emacsclient, revert to emacs29 2024-01-07 23:34:47 +08:00
Ryan Yin 4eb5af38e3 docs: misc 2024-01-07 23:33:12 +08:00
Ryan Yin e629ece0eb docs: add screenshot for emacs 2024-01-07 23:23:48 +08:00
Ryan Yin b774bb99c8 fix: some font not found error 2024-01-07 23:01:55 +08:00
Ryan Yin 49e3b91e7e fix: emacs - failed to start in daemon mode 2024-01-07 22:56:12 +08:00
Ryan Yin 0cac1559b8 chore: Tapping homebrew/cask is no longer typically necessary, remove duplicate qqmusic/neteasecloudmusic 2024-01-07 22:45:59 +08:00
Ryan Yin 8ad6be56a5 chore: darwin - remove useless config 2024-01-07 22:15:34 +08:00
Ryan Yin 2d08fd3cb7 docs: gcc is required by nvim-treesitter 2024-01-07 22:09:16 +08:00
Ryan Yin ede2763756 fix: agenix on darwin - check if secrets already exists 2024-01-07 21:39:40 +08:00
Ryan Yin 474bd8ebf4 docs: emacs 2024-01-07 14:36:50 +08:00
Ryan Yin d66c4316aa docs: emacs 2024-01-07 13:58:13 +08:00
Ryan Yin 7d9abf1a01 docs: emacs 2024-01-07 13:37:58 +08:00
15 changed files with 78 additions and 43 deletions
+3
View File
@@ -0,0 +1,3 @@
# https://github.com/github-linguist/linguist/blob/master/docs/overrides.md
home/linux/desktop/i3/conf/polybar/** linguist-vendored
+3 -1
View File
@@ -54,12 +54,14 @@ As for Flakes, refer to [Introduction to Flakes - NixOS & Nix Flakes Book](https
Wallpapers: https://github.com/ryan4yin/wallpapers
## Hyprland + AstroNvim
## Hyprland + AstroNvim + DoomEmacs
![](./_img/hyprland_2023-07-29_1.webp)
![](./_img/hyprland_2023-07-29_2.webp)
![](./_img/emacs-2024-01-07.webp)
## I3 + AstroNvim
![](./_img/i3_2023-07-29_1.webp)
Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

+1 -1
View File
@@ -2,5 +2,5 @@
1. `server`: Configuration which is suitable for both servers and desktops.
1. `desktop`: Configuration for desktop environments, such as Hyprland, I3, etc.
1. `base.nix`: Common configuration for both servers and desktops.
1. `core.nix`: Minimal home-manager's config
+24 -16
View File
@@ -1,23 +1,31 @@
# Emacs Editor
- Framework: <https://github.com/doomemacs/doomemacs>
- key bindings:
- source code: <https://github.com/doomemacs/doomemacs/blob/master/modules/config/default/%2Bevil-bindings.el>
- docs: <https://github.com/doomemacs/doomemacs/blob/master/modules/editor/evil/README.org>
- module index: <https://github.com/doomemacs/doomemacs/blob/master/docs/modules.org>
- Chinese(rime) support: <https://github.com/DogLooksGood/emacs-rime>
- modal editing:
- <https://github.com/emacs-evil/evil>: evil mode, enabled by default in doom-emacs.
- <https://github.com/meow-edit/meow>
- LSP Client: <https://github.com/manateelazycat/lsp-bridge>
- Emacs Wiki: <https://www.emacswiki.org/emacs/SiteMap>
- Awesome Emacs: <https://github.com/emacs-tw/awesome-emacs#lsp-client>
## Why emacs?
1. Explore the unknown, just for fun!
2. Org Mode
3. Lisp Coding
4. A top-level tutorial for Emacs(Chinese): <https://nyk.ma/tags/emacs/>
5. A Beginner's Guide to Emacs(Chinese): <https://github.com/emacs-tw/emacs-101-beginner-survival-guide>
## Screenshot
![](/_img/emacs-2024-01-07.webp)
## Usefull Links
- Framework: <https://github.com/doomemacs/doomemacs>
- key bindings:
- source code: <https://github.com/doomemacs/doomemacs/blob/master/modules/config/default/%2Bevil-bindings.el>
- docs: <https://github.com/doomemacs/doomemacs/blob/master/modules/editor/evil/README.org>
- module index: <https://github.com/doomemacs/doomemacs/blob/master/docs/modules.org>
- LSP Client: <https://github.com/manateelazycat/lsp-bridge>
- Emacs Wiki: <https://www.emacswiki.org/emacs/SiteMap>
- Awesome Emacs: <https://github.com/emacs-tw/awesome-emacs#lsp-client>
- Chinese(rime) support: <https://github.com/DogLooksGood/emacs-rime>
- modal editing:
- <https://github.com/emacs-evil/evil>: evil mode, enabled by default in doom-emacs.
- <https://github.com/meow-edit/meow>
## Install or Update
@@ -51,14 +59,14 @@ Here is the cheetsheet related to my DoomEmacs configs. Please read vim's common
> Terminal(vterm) is useful in GUI mode, I use Zellij instead in terminal mode.
> We can run any emacs command via `M-x`(Alt + x).
| Action | Shortcut |
| ---------------------- | ------------- |
| ---------------------- | ------------------------------------------------- |
| Popup Terminal(vterm) | `SPC + o + t` |
| Open Terminal | `SPC + o + T` |
| Open file tree sidebar | `SPC + o + p` |
| Exit | `M-x C-c` |
| Execute Command | `M-x`(hold on `Alt`/`option`, and then press `x`) |
| Eval Lisp Code | `M-:`(hold on `Alt`/`option`, and then press `:`) |
### Window Navigation
+5 -2
View File
@@ -24,6 +24,9 @@ with lib; let
};
librime-dir = "${config.xdg.dataHome}/emacs/librime";
parinfer-rust-lib-dir = "${config.xdg.dataHome}/emacs/parinfer-rust";
myEmacsPackagesFor = emacs: ((pkgs.emacsPackagesFor emacs).emacsWithPackages (epkgs: [
epkgs.vterm
]));
in {
options.modules.editors.emacs = {
enable = mkEnableOption "Emacs Editor";
@@ -92,7 +95,7 @@ in {
# Do not use emacs-nox here, which makes the mouse wheel work abnormally in terminal mode.
# pgtk (pure gtk) build add native support for wayland.
# https://www.gnu.org/savannah-checkouts/gnu/emacs/emacs.html#Releases
emacsPkg = (pkgs.emacsPackagesFor pkgs.emacs29-pgtk).emacsWithPackages (epkgs: [epkgs.vterm]);
emacsPkg = myEmacsPackagesFor pkgs.emacs29-pgtk;
in {
home.packages = [emacsPkg];
services.emacs = {
@@ -111,7 +114,7 @@ in {
let
# macport adds some native features based on GNU Emacs 29
# https://bitbucket.org/mituharu/emacs-mac/src/master/README-mac
emacsPkg = (pkgs.emacsPackagesFor pkgs.emacs29-macport).emacsWithPackages (epkgs: [epkgs.vterm]);
emacsPkg = myEmacsPackagesFor pkgs.emacs29;
in {
home.packages = [emacsPkg];
launchd.enable = true;
+25 -3
View File
@@ -21,7 +21,7 @@
;; See 'C-h v doom-font' for documentation and more examples of what they
;; accept. For example:
;;
(setq doom-font (font-spec :family "JetBrainsMono Nerd Font" :size 18 :weight 'normal)
(setq doom-font (font-spec :family "JetBrainsMono Nerd Font" :size 18)
doom-variable-pitch-font (font-spec :family "DejaVu Sans")
doom-symbol-font (font-spec :family "Symbols Nerd Font Mono")
doom-big-font (font-spec :family "JetBrainsMono Nerd Font" :size 28))
@@ -46,9 +46,17 @@
;; other doom's official themes:
;; https://github.com/doomemacs/themes
(setq doom-theme 'doom-dracula) ;; doom-one doom-dracula doom-nord
;; Transparent Background
(if (eq system-type 'darwin)
;; Transparent Backgroud - for macOS
;;(set-frame-parameter (selected-frame) 'alpha '(<active> . <inactive>))
;;(set-frame-parameter (selected-frame) 'alpha <both>)
(progn
(set-frame-parameter (selected-frame) 'alpha '(85 . 70))
(add-to-list 'default-frame-alist '(alpha . (85 . 70))))
;; Transparent Background - for Linux Xorg/Wayland
(set-frame-parameter nil 'alpha-background 93) ; For current frame
(add-to-list 'default-frame-alist '(alpha-background . 93)); For all new frames henceforth
(add-to-list 'default-frame-alist '(alpha-background . 93))); For all new frames henceforth
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type t)
@@ -88,6 +96,20 @@
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented.
;; fix vterm's color
(set-face-attribute 'vterm-color-default nil :foreground fg)
(set-face-attribute 'vterm-color-black nil :background base0 :foreground base0)
(set-face-attribute 'vterm-color-red nil :background red :foreground red)
(set-face-attribute 'vterm-color-green nil :background green :foreground green)
(set-face-attribute 'vterm-color-yellow nil :background yellow :foreground yellow)
(set-face-attribute 'vterm-color-blue nil :background blue :foreground blue)
(set-face-attribute 'vterm-color-magenta nil :background magenta :foreground magenta)
(set-face-attribute 'vterm-color-cyan nil :background cyan :foreground cyan)
(set-face-attribute 'vterm-color-white nil :background base8 :foreground base8)
(after! vterm
(setq vterm-shell "nu")) ; use nushell by defualt
(use-package! lsp-bridge
:config
(setq lsp-bridge-enable-log nil) ;; disabled for performance
+1 -1
View File
@@ -34,7 +34,7 @@
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
(emoji +unicode)
;; (emoji +unicode) ; Emacs 29 provides native support for inserting Unicode emojis.
; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
indent-guides ; highlighted indent columns
+1 -1
View File
@@ -9,7 +9,7 @@
llvmPackages.clang-unwrapped # c/c++ tools with clang-tools such as clanvimPlugins.nvim-treesitter-parsers.vuegd
lldb
# c/c++ compiler, required by nvim-treesitter!
# gcc has to be installed after clang, so that `cc` will be gcc instead of clang(on macOS)
# to avoid conflicts, you can comment clang-unwrapped first to compile all nvim-treesitter-parsers.
gcc
#-- python
+1
View File
@@ -1,6 +1,7 @@
# Home Manager's Darwin Submodules
1. `core.nix`: some basic configuration.
2. `shell.nix`: shell related.
3. `rime-squirrel.nix`: [rime-squirrel](https://github.com/rime/squirrel)'s configuration.
4. `default.nix`: the entrypoint of darwin's configuration, it import all the submodules above.
-3
View File
@@ -106,7 +106,6 @@ in {
};
taps = [
"homebrew/cask"
"homebrew/cask-fonts"
"homebrew/services"
"homebrew/cask-versions"
@@ -155,8 +154,6 @@ in {
# IM & audio & remote desktop & meeting
"telegram"
"discord"
"neteasemusic"
"qqmusic"
"microsoft-remote-desktop"
# "anki"
-5
View File
@@ -10,15 +10,10 @@
# Fix: https://github.com/LnL7/nix-darwin/issues/149#issuecomment-1741720259
# nix is installed via DeterminateSystems's nix-installer.
environment.etc."zshrc".knownSha256Hashes = [
"b9902f2020c636aeda956a74b5ae11882d53e206d1aa50b3abe591a8144fa710" # nix-installer on harmonica
];
environment.etc."bashrc".knownSha256Hashes = [
"53ab77cddb5c9aa2954efe42e9af0b8a2829f94dd31b6c33f8082ed194dcc0cb" # nix-installer on harmonica
"6ffdf5a198ffe73fbcd17def767f52093b42b29149d4a3e911b49ebcb9785101" # nix-installer on fern
];
environment.etc."zshenv".knownSha256Hashes = [
"bb96fe80a72ea9cd3291f09e4dc13a64e7db3b401f5889e43edc1fe34ed02d2c" # nix-installer on harmonica
"0c544e42afe7836de9ba933d93f46043b12f58ae484ff8cfb02716353f1dba5f" # nix-installer on fern
];
+2 -2
View File
@@ -249,8 +249,8 @@ chown -R ryan:ryan ~/nix-config
cd ~/nix-config
# deploy the configuration
make hypr
# deploy the configuration via Justfile
just hypr
```
Finally, to enable secure boot, follow the instructions in [lanzaboote - Quick Start](https://github.com/nix-community/lanzaboote/blob/master/docs/QUICK_START.md) and [nix-config/ai/secure-boot.nix](https://github.com/ryan4yin/nix-config/blob/main/hosts/idols/ai/secureboot.nix)
+1 -1
View File
@@ -234,7 +234,7 @@ chown -R ryan:ryan ~/nix-config
cd ~/nix-config
# deploy the configuration
make s-hypr
just s-hypr
```
Finally, to enable secure boot, follow the instructions in [lanzaboote - Quick Start](https://github.com/nix-community/lanzaboote/blob/master/docs/QUICK_START.md) and [nix-config/ai/secure-boot.nix](https://github.com/ryan4yin/nix-config/blob/main/hosts/idols/ai/secureboot.nix)
+4
View File
@@ -77,6 +77,10 @@
#
# activationScripts are executed every time you run `nixos-rebuild` / `darwin-rebuild` or boot your system
system.activationScripts.postActivation.text = ''
${pkgs.nushell}/bin/nu -c '
if (ls /etc/agenix/ | length) > 0 {
sudo chown ${username} /etc/agenix/*
}
'
'';
}