Skip to content

Commit

Permalink
feat: overhaul theme (#416)
Browse files Browse the repository at this point in the history
* feat: overhaul theme

* chore: update screenshots
  • Loading branch information
terlar authored Oct 26, 2024
1 parent 3911b69 commit 771c2dd
Show file tree
Hide file tree
Showing 13 changed files with 349 additions and 409 deletions.
4 changes: 2 additions & 2 deletions dev/flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
help = "generate new screenshots";
category = "emacs";
command = ''
exec nix run $PRJ_ROOT/dev#updateScreenshots
exec nix run $PRJ_ROOT#updateScreenshots
'';
}
];
Expand Down Expand Up @@ -88,7 +88,7 @@
text = ''
EMACS_DIR="$(mktemp -td emacs.XXXXXXXXXX)"
lndir -silent ${config.packages.emacs-config} "$EMACS_DIR"
emacs -fs --init-directory "$EMACS_DIR" --load ${./screenshots.el} --eval '(kill-emacs)'
emacs --fullscreen --init-directory "$EMACS_DIR" --load ${./screenshots.el} --eval '(kill-emacs)'
'';
};
};
Expand Down
33 changes: 18 additions & 15 deletions dev/screenshots.el
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,29 @@
(captures
`((org-mode
. ((find-file (expand-file-name "samples/sample.org" ,media-dir))
(no-fringes)
(goto-char 49)
(follow-mode 1)
(split-window-right)
(goto-char 49)))
(follow-redraw)))
(markdown-mode
. ((find-file (expand-file-name "samples/sample.md" ,media-dir))
(no-fringes)
(goto-char 51)
(follow-mode 1)
(split-window-right)
(goto-char 51)))
(follow-redraw)))
(rst-mode
. ((find-file (expand-file-name "samples/sample.rst" ,media-dir))
(no-fringes)
(goto-char 239)
(follow-mode 1)
(split-window-right)
(goto-char 239)))
(follow-redraw)))
(emacs-lisp-mode
. ((find-file (expand-file-name "../lisp/readable-mono-theme.el" ,media-dir))
(no-fringes)
(goto-char 1223)
(follow-mode 1)
(split-window-right)
(goto-char 1443))))))
(follow-redraw))))))
(global-hide-fringes-mode 1)
(blink-cursor-mode 0)

(dolist (capture captures)
Expand All @@ -55,17 +56,19 @@

(dolist (action actions) (eval action))

(font-lock-update)

(dolist (background-mode '(light dark))
(customize-set-variable 'frame-background-mode background-mode)
(customize-set-variable 'custom-enabled-themes custom-enabled-themes)
(message nil)
(unwind-protect (with-temp-file (expand-file-name
(concat name
"-"
(symbol-name background-mode)
".png")
media-dir)
(insert (x-export-frames nil 'png))))))))
(with-temp-file (expand-file-name
(concat name
"-"
(symbol-name background-mode)
".png")
media-dir)
(insert (x-export-frames nil 'png)))))))

(provide 'screenshots)
;;; screenshots.el ends here
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
partitionedAttrs = {
checks = "dev";
devShells = "dev";
packages = "dev";
};

partitions.dev = {
Expand Down
Loading

0 comments on commit 771c2dd

Please sign in to comment.