Skip to content

Commit

Permalink
include support for theme option
Browse files Browse the repository at this point in the history
  • Loading branch information
neoveil committed Oct 27, 2024
1 parent 9adac9c commit 2cad260
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ Run `M-x customize-group RET grip RET` or set the variables.
;; Sleep seconds to ensure the server starts
(setq grip-sleep-time 2)
;; Choose theme
(setq grip-theme 'dark)
```

If you don't set them you may have limitation to access Github APIs. Please
Expand Down
7 changes: 6 additions & 1 deletion grip-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ When nil, only update the preview on file save."
:type 'integer
:group 'grip)


(defcustom grip-theme 'light
"Display theme, `light' or `dark', default is light."
:type '(choice (const :tag "light" light)
(const :tag "dark" dark))
:group 'grip)

;; Externals
(declare-function xwidget-buffer "xwidget")
Expand Down Expand Up @@ -192,6 +196,7 @@ Use default browser unless `xwidget' is available."
(format "--user=%s" grip-github-user)
(format "--pass=%s" grip-github-password)
(format "--title=%s - Grip" (buffer-name))
(format "--theme=%s" grip-theme)
grip--preview-file
(number-to-string grip--port)))
(message "Preview `%s' on %s" buffer-file-name (grip--preview-url))
Expand Down

0 comments on commit 2cad260

Please sign in to comment.