Idk I got crazy but mostly nyxt
This commit is contained in:
parent
263d10c080
commit
1b2ce4207d
12 changed files with 198 additions and 137 deletions
226
nyxt/init.lisp
226
nyxt/init.lisp
|
@ -23,9 +23,12 @@
|
|||
((default-modes (append '(vi-insert-mode
|
||||
) %slot-default%))))
|
||||
|
||||
(define-configuration browser
|
||||
((external-editor-program '("/usr/bin/emacsclient"))))
|
||||
|
||||
;; Create a function to launch mpv with given url
|
||||
(defun mpv (url)
|
||||
"MPV launches with given url using the fast profile."
|
||||
"MPV launches with given url using the fast profile."
|
||||
(uiop:run-program (list "mpv" "--profile=fast" url)))
|
||||
|
||||
;; Create a function to download videos with youtube-dl in alacritty
|
||||
|
@ -90,70 +93,70 @@
|
|||
(define-configuration buffer
|
||||
((search-engines
|
||||
(list
|
||||
(make-instance 'search-engine
|
||||
(make-instance 'search-engine
|
||||
:shortcut "s"
|
||||
:search-url "https://search.tfcconnection.org/?q=~a"
|
||||
:fallback-url "https://search.tfcconnection.org")))))
|
||||
|
||||
(define-configuration status-buffer
|
||||
((style
|
||||
(str:concat
|
||||
%slot-default%
|
||||
(cl-css:css
|
||||
'((body
|
||||
:background "#282a36"
|
||||
:color "#e2e4e5"
|
||||
:line-height "1fr")
|
||||
("#container"
|
||||
:grid-template-columns "0px 4fr 0px 2fr 0px 0px")
|
||||
("#controls"
|
||||
:background-color "#282a36"
|
||||
:color "#f3f99d"
|
||||
:width "0px"
|
||||
:padding-left "0px"
|
||||
:hidden)
|
||||
("#url"
|
||||
:background-color "#282a36"
|
||||
:color "#5af78e")
|
||||
("#modes"
|
||||
:background-color "#282a36"
|
||||
:color "#f3f99d")
|
||||
("#tabs"
|
||||
:background-color "#282a36"
|
||||
:color "#5af78e")
|
||||
(".tab"
|
||||
:background-color "#282a36"
|
||||
:color "#9aedfe")
|
||||
(".tab:hover"
|
||||
:background-color "#282a36"
|
||||
:color "#f1f1f0")
|
||||
(".button"
|
||||
:background-color "#282a36"
|
||||
:color "#5af78e")
|
||||
(".button:hover"
|
||||
:background-color "#282a36"
|
||||
:color "#f1f1f0")
|
||||
(".arrow"
|
||||
:width "0px"
|
||||
:height "0px")
|
||||
(".arrow-right"
|
||||
:background-color "#282a36"
|
||||
:color "#5af78e")
|
||||
(".arrow-left"
|
||||
:background-color "#282a36"
|
||||
:color "#5af78e")
|
||||
))))))
|
||||
((style
|
||||
(str:concat
|
||||
%slot-default%
|
||||
(cl-css:css
|
||||
'((body
|
||||
:background "#282a36"
|
||||
:color "#e2e4e5"
|
||||
:line-height "1fr")
|
||||
("#container"
|
||||
:grid-template-columns "0px 4fr 0px 2fr 0px 0px")
|
||||
("#controls"
|
||||
:background-color "#282a36"
|
||||
:color "#f3f99d"
|
||||
:width "0px"
|
||||
:padding-left "0px"
|
||||
:hidden)
|
||||
("#url"
|
||||
:background-color "#282a36"
|
||||
:color "#5af78e")
|
||||
("#modes"
|
||||
:background-color "#282a36"
|
||||
:color "#f3f99d")
|
||||
("#tabs"
|
||||
:background-color "#282a36"
|
||||
:color "#5af78e")
|
||||
(".tab"
|
||||
:background-color "#282a36"
|
||||
:color "#9aedfe")
|
||||
(".tab:hover"
|
||||
:background-color "#282a36"
|
||||
:color "#f1f1f0")
|
||||
(".button"
|
||||
:background-color "#282a36"
|
||||
:color "#5af78e")
|
||||
(".button:hover"
|
||||
:background-color "#282a36"
|
||||
:color "#f1f1f0")
|
||||
(".arrow"
|
||||
:width "0px"
|
||||
:height "0px")
|
||||
(".arrow-right"
|
||||
:background-color "#282a36"
|
||||
:color "#5af78e")
|
||||
(".arrow-left"
|
||||
:background-color "#282a36"
|
||||
:color "#5af78e")
|
||||
))))))
|
||||
|
||||
(define-configuration internal-buffer
|
||||
((style
|
||||
(str:concat
|
||||
%slot-default%
|
||||
(cl-css:css
|
||||
'((body
|
||||
:background "#282a36"
|
||||
:color "#e2e4e5")
|
||||
(.button
|
||||
:color "#e2e4e5")))))))
|
||||
((style
|
||||
(str:concat
|
||||
%slot-default%
|
||||
(cl-css:css
|
||||
'((body
|
||||
:background "#282a36"
|
||||
:color "#e2e4e5")
|
||||
(.button
|
||||
:color "#e2e4e5")))))))
|
||||
|
||||
(define-configuration window
|
||||
((message-buffer-style
|
||||
|
@ -165,48 +168,67 @@
|
|||
: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"
|
||||
:color "#57c7ff")
|
||||
("#prompt"
|
||||
:background-color "#282a36"
|
||||
:color "#e2e4e5")
|
||||
("#input"
|
||||
:background-color "#282a36"
|
||||
:color "#e2e4e5")
|
||||
("#suggestions"
|
||||
:background-color "#282a36"
|
||||
:color "#e2e4e5")
|
||||
(.source
|
||||
:margin-left "5px")
|
||||
(.source-name
|
||||
:background-color "#282a36"
|
||||
:color "#e2e4e5")
|
||||
(.source-content
|
||||
:background-color "#282a36"
|
||||
:color "#e2e4e5")
|
||||
;; (".source-content td"
|
||||
;; :background-color "#282a36"
|
||||
;; :color "#e2e4e5")
|
||||
(".source-content th"
|
||||
:background-color "#43454f"
|
||||
:color "#e2e4e5")
|
||||
("#selection"
|
||||
:background-color "#57c7ff"
|
||||
:color "#34353e")
|
||||
(.marked
|
||||
:background-color "#5af78e"
|
||||
:color "#34353e")
|
||||
(.selected
|
||||
:background-color "#57c7ff"
|
||||
:color "#34353e")
|
||||
(.button
|
||||
:color "#e2e4e5")))))))
|
||||
((style
|
||||
(str:concat
|
||||
%slot-default%
|
||||
(cl-css:css
|
||||
'((body
|
||||
:background-color "#282a36"
|
||||
:color "#e2e4e5")
|
||||
("#prompt-area"
|
||||
:background-color "#282a36"
|
||||
:color "#57c7ff")
|
||||
("#prompt"
|
||||
:background-color "#282a36"
|
||||
:color "#e2e4e5")
|
||||
("#input"
|
||||
:background-color "#282a36"
|
||||
:color "#e2e4e5")
|
||||
("#suggestions"
|
||||
:background-color "#282a36"
|
||||
:color "#e2e4e5")
|
||||
(.source
|
||||
:margin-left "5px")
|
||||
(.source-name
|
||||
:background-color "#282a36"
|
||||
:color "#e2e4e5")
|
||||
(.source-content
|
||||
:background-color "#282a36"
|
||||
:color "#e2e4e5")
|
||||
;; (".source-content td"
|
||||
;; :background-color "#282a36"
|
||||
;; :color "#e2e4e5")
|
||||
(".source-content th"
|
||||
:background-color "#43454f"
|
||||
:color "#e2e4e5")
|
||||
("#selection"
|
||||
:background-color "#57c7ff"
|
||||
:color "#34353e")
|
||||
(.marked
|
||||
:background-color "#5af78e"
|
||||
:color "#34353e")
|
||||
(.selected
|
||||
:background-color "#57c7ff"
|
||||
:color "#34353e")
|
||||
(.button
|
||||
:color "#e2e4e5")))))))
|
||||
|
||||
|
||||
|
||||
(in-package #:nyxt-user) ; While implicit, this allows SLY to know which package we are in.
|
||||
|
||||
(load "~/quicklisp/setup.lisp")
|
||||
(ql:quickload :slynk)
|
||||
|
||||
(define-command-global start-slynk (&optional (slynk-port *swank-port*))
|
||||
"Start a Slynk server that can be connected to, for instance, in
|
||||
Emacs via SLY.
|
||||
|
||||
Warning: This allows Nyxt to be controlled remotely, that is, to execute
|
||||
arbitrary code with the privileges of the user running Nyxt. Make sure
|
||||
you understand the security risks associated with this before running
|
||||
this command."
|
||||
(slynk:create-server :port slynk-port :dont-close t)
|
||||
(echo "Slynk server started at port ~a" slynk-port))
|
||||
|
||||
(start-slynk)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue