nyxt being added
This commit is contained in:
parent
ae2ad7dd9d
commit
f9228ee51d
8 changed files with 103 additions and 10 deletions
83
nyxt/init.lisp
Normal file
83
nyxt/init.lisp
Normal file
|
@ -0,0 +1,83 @@
|
|||
(in-package :nyxt-user) ; While implicit, this allows SLY to know which package we are in.
|
||||
|
||||
(define-configuration (prompt-buffer)
|
||||
((default-modes (append '(vi-insert-mode) %slot-default%))))
|
||||
|
||||
;; Create a function to launch mpv with given url
|
||||
(defun mpv (url)
|
||||
"MPV launches with given url"
|
||||
(uiop:run-program (list "mpv" url)))
|
||||
|
||||
;; Let's create a function to hint videos and play them in MPV
|
||||
(define-command hint-mpv (&key nyxt/web-mode::annotate-visible-only-p)
|
||||
"Show a set of element hints, and copy the URL of the user inputted one."
|
||||
(nyxt/web-mode:query-hints "Copy element URL"
|
||||
(lambda (nyxt/web-mode::result)
|
||||
(mpv (first nyxt/web-mode::result)))
|
||||
:annotate-visible-only-p
|
||||
nyxt/web-mode::annotate-visible-only-p))
|
||||
|
||||
(defvar *chris-keymap* (make-keymap "chris-map"))
|
||||
(define-key *chris-keymap*
|
||||
"K" 'switch-buffer-next
|
||||
"J" 'switch-buffer-previous
|
||||
"b" 'switch-buffer
|
||||
"v" 'hint-mpv)
|
||||
|
||||
(define-mode chris-mode ()
|
||||
"Dummy mode for the custom key bindings in `*chris-keymap*'."
|
||||
((keymap-scheme (keymap:make-scheme
|
||||
scheme:vi-normal *chris-keymap*))))
|
||||
|
||||
(define-configuration buffer
|
||||
((default-modes (append '(vi-normal-mode
|
||||
auto-mode
|
||||
reduce-tracking-mode
|
||||
force-https-mode
|
||||
chris-mode)
|
||||
%slot-default%))))
|
||||
|
||||
(define-configuration status-buffer
|
||||
((style
|
||||
(str:concat
|
||||
%slot-default%
|
||||
(cl-css:css
|
||||
'((body
|
||||
:background "#282a36"
|
||||
:color "#e2e4e5")))))))
|
||||
|
||||
(define-configuration internal-buffer
|
||||
((style
|
||||
(str:concat
|
||||
%slot-default%
|
||||
(cl-css:css
|
||||
'((body
|
||||
:background-color "#282a36"
|
||||
:color "#e2e4e5")
|
||||
(hr
|
||||
:color "#5af78e")
|
||||
(.button
|
||||
:color "#e2e4e5")))))))
|
||||
(define-configuration window
|
||||
((message-buffer-style
|
||||
(str:concat
|
||||
%slot-default%
|
||||
(cl-css:css
|
||||
'((body
|
||||
:background-color "#282a36"
|
||||
:color "#e2e4e5")))))))
|
||||
|
||||
;; (define-configuration prompt-buffer
|
||||
;; ((style
|
||||
;; (str:concat
|
||||
;; %slot-default%
|
||||
;; (cl-css:css
|
||||
;; '((body
|
||||
;; :background-color "#282a36"
|
||||
;; :color "#e2e4e5")
|
||||
;; ('#prompt-area'
|
||||
;; :background-color "#282a36")
|
||||
;; (.button
|
||||
;; :color "#e2e4e5")))))))
|
||||
|
||||
(load-after-system :slynk "~/.config/nyxt/my-slynk.lisp")
|
Loading…
Add table
Add a link
Reference in a new issue