Separated nyxt into file, added themes, etc
This commit is contained in:
@@ -19,6 +19,10 @@
|
|||||||
;; Use straight.el for use-package expressions
|
;; Use straight.el for use-package expressions
|
||||||
(straight-use-package 'use-package)
|
(straight-use-package 'use-package)
|
||||||
|
|
||||||
|
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
|
||||||
|
("org" . "https://orgmode.org/elpa/")
|
||||||
|
("elpa" . "https://elpa.gnu.org/packages/")))
|
||||||
|
|
||||||
(scroll-bar-mode -1) ;; Disable scroll bar
|
(scroll-bar-mode -1) ;; Disable scroll bar
|
||||||
(tool-bar-mode -1) ;; Disable tool bar menu
|
(tool-bar-mode -1) ;; Disable tool bar menu
|
||||||
(tooltip-mode -1) ;; Disable tooltips
|
(tooltip-mode -1) ;; Disable tooltips
|
||||||
@@ -95,6 +99,12 @@
|
|||||||
:bind
|
:bind
|
||||||
("<f5>" . modus-themes-toggle))
|
("<f5>" . modus-themes-toggle))
|
||||||
|
|
||||||
|
;; ;; Doing some doom themes for a while.
|
||||||
|
;; (use-package doom-themes
|
||||||
|
;; :straight t
|
||||||
|
;; :init
|
||||||
|
;; (load-theme 'doom-gruvbox))
|
||||||
|
|
||||||
(set-face-attribute 'default nil :font "Fira Code" :height 125 :weight 'medium)
|
(set-face-attribute 'default nil :font "Fira Code" :height 125 :weight 'medium)
|
||||||
(set-face-attribute 'variable-pitch nil :font "Fira Sans" :height 1.0 :weight 'regular)
|
(set-face-attribute 'variable-pitch nil :font "Fira Sans" :height 1.0 :weight 'regular)
|
||||||
(set-face-attribute 'fixed-pitch nil :font "Fira Code" :height 1.0 :weight 'medium)
|
(set-face-attribute 'fixed-pitch nil :font "Fira Code" :height 1.0 :weight 'medium)
|
||||||
@@ -130,6 +140,10 @@
|
|||||||
;; Buffers
|
;; Buffers
|
||||||
"bd" #'kill-buffer
|
"bd" #'kill-buffer
|
||||||
|
|
||||||
|
;; Terminal/Shell
|
||||||
|
"tt" #'term
|
||||||
|
"te" #'eshell
|
||||||
|
|
||||||
;; Org
|
;; Org
|
||||||
; Babel
|
; Babel
|
||||||
"obt" #'org-babel-tangle
|
"obt" #'org-babel-tangle
|
||||||
@@ -394,6 +408,8 @@
|
|||||||
evil))
|
evil))
|
||||||
(add-hook 'prog-mode-hook #'parinfer-mode)))
|
(add-hook 'prog-mode-hook #'parinfer-mode)))
|
||||||
|
|
||||||
|
(use-package sly :straight t)
|
||||||
|
|
||||||
(use-package magit
|
(use-package magit
|
||||||
:straight t)
|
:straight t)
|
||||||
|
|
||||||
|
|||||||
@@ -4,3 +4,4 @@ LICENSE
|
|||||||
README:
|
README:
|
||||||
.gitignore
|
.gitignore
|
||||||
.gitmodules
|
.gitmodules
|
||||||
|
archive/
|
||||||
|
|||||||
+1
-35
@@ -1,43 +1,9 @@
|
|||||||
#+TITLE: Desktop Configuration
|
#+TITLE: Desktop Configuration
|
||||||
|
|
||||||
This =.org= document is where I store all of my user-level application configuration including shells, terminal emulators, browsers etc.
|
This =.org= document is where I store all of my small time user-level configuration.
|
||||||
|
|
||||||
I prefer to use programs that I can extend the functionality of via configuration files and source code.
|
I prefer to use programs that I can extend the functionality of via configuration files and source code.
|
||||||
|
|
||||||
* Nyxt
|
|
||||||
Nyxt is a browser written in Common Lisp that follows the same philosophy of extensibility as Emacs. This makes it a perfect companion to an Emacs centered eco-system when you need a browser with more features than Eww.
|
|
||||||
|
|
||||||
#+begin_src lisp :tangle ~/Dotfiles/.config/nyxt/init.lisp :mkdirp yes
|
|
||||||
;; Set default modes when opening Nyxt.
|
|
||||||
(define-configuration buffer
|
|
||||||
((default-modes (append '(dark-mode
|
|
||||||
vi-normal-mode) %slot-default%))))
|
|
||||||
|
|
||||||
;; Keybindings
|
|
||||||
;; (Note: Override Map will override any other custom keybindings so use a prefix key.)
|
|
||||||
(define-configuration buffer
|
|
||||||
((override-map (define-key %slot-default%
|
|
||||||
"C-x s" 'nyxt/web-mode:search-buffers
|
|
||||||
"C-x d" 'delete-current-buffer))))
|
|
||||||
|
|
||||||
;; todo: Redirect reddit to teddit
|
|
||||||
;; (defun old-reddit-handler (request-data)
|
|
||||||
;; (let ((url (url request-data)))
|
|
||||||
;; (setf (url request-data)
|
|
||||||
;; (if (search "reddit.com" (quri:uri-host url))
|
|
||||||
;; (progn
|
|
||||||
;; (setf (quri:uri-host url) "old.reddit.com")
|
|
||||||
;; (log:info "Switching to old Reddit: ~s" (render-url url))
|
|
||||||
;; url)
|
|
||||||
;; url)))
|
|
||||||
;; request-data)
|
|
||||||
|
|
||||||
;; (define-configuration web-buffer
|
|
||||||
;; ((request-resource-hook
|
|
||||||
;; (hooks:add-hook %slot-default% (make-handler-resource #'old-reddit-handler)))))
|
|
||||||
;; (See url-dispatching-handler for a simpler way to achieve the same result.)
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* Shell
|
* Shell
|
||||||
Aside from using e-shell for quick command line usage, I mainly use vterm with Zsh. It's a bit of a complicated setup but allows for the maximum number of files possible to live in .config instead of littering my home directory.
|
Aside from using e-shell for quick command line usage, I mainly use vterm with Zsh. It's a bit of a complicated setup but allows for the maximum number of files possible to live in .config instead of littering my home directory.
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ I use [[https://github.com/raxod502/straight.el][straight.el]] for managing pack
|
|||||||
|
|
||||||
;; Use straight.el for use-package expressions
|
;; Use straight.el for use-package expressions
|
||||||
(straight-use-package 'use-package)
|
(straight-use-package 'use-package)
|
||||||
|
|
||||||
|
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
|
||||||
|
("org" . "https://orgmode.org/elpa/")
|
||||||
|
("elpa" . "https://elpa.gnu.org/packages/")))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** General
|
** General
|
||||||
@@ -121,7 +125,6 @@ Helpful.el is a package that reformats the describe-X functions to be much more
|
|||||||
#+end_src
|
#+end_src
|
||||||
** Theme
|
** Theme
|
||||||
I really enjoy [[https://protesilaos.com/emacs/modus-themes][Modus Themes]] by Protesilaos Stavrou. They are minimal, high contrast, and easy on the eyes.
|
I really enjoy [[https://protesilaos.com/emacs/modus-themes][Modus Themes]] by Protesilaos Stavrou. They are minimal, high contrast, and easy on the eyes.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package modus-themes
|
(use-package modus-themes
|
||||||
:straight t
|
:straight t
|
||||||
@@ -137,6 +140,12 @@ I really enjoy [[https://protesilaos.com/emacs/modus-themes][Modus Themes]] by P
|
|||||||
(modus-themes-load-vivendi)
|
(modus-themes-load-vivendi)
|
||||||
:bind
|
:bind
|
||||||
("<f5>" . modus-themes-toggle))
|
("<f5>" . modus-themes-toggle))
|
||||||
|
|
||||||
|
;; ;; Doing some doom themes for a while.
|
||||||
|
;; (use-package doom-themes
|
||||||
|
;; :straight t
|
||||||
|
;; :init
|
||||||
|
;; (load-theme 'doom-gruvbox))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Fonts
|
** Fonts
|
||||||
@@ -186,6 +195,10 @@ I really enjoy having a leader key and eschewing the Control and Alt keys entire
|
|||||||
;; Buffers
|
;; Buffers
|
||||||
"bd" #'kill-buffer
|
"bd" #'kill-buffer
|
||||||
|
|
||||||
|
;; Terminal/Shell
|
||||||
|
"tt" #'term
|
||||||
|
"te" #'eshell
|
||||||
|
|
||||||
;; Org
|
;; Org
|
||||||
; Babel
|
; Babel
|
||||||
"obt" #'org-babel-tangle
|
"obt" #'org-babel-tangle
|
||||||
|
|||||||
@@ -0,0 +1,159 @@
|
|||||||
|
#+TITLE: Nyxt Configuration
|
||||||
|
#+PROPERTY: header-args:lisp :tangle ~/Dotfiles/.config/nyxt/init.lisp :mkdirp yes
|
||||||
|
|
||||||
|
Nyxt is a browser written in Common Lisp that follows the same philosophy of extensibility as Emacs. This makes it a perfect companion to an Emacs centered eco-system when you need a browser with more features than Eww or w3m.
|
||||||
|
|
||||||
|
* Keybindings
|
||||||
|
#+begin_src lisp
|
||||||
|
;; Vim keybindings, of course..
|
||||||
|
(define-configuration buffer
|
||||||
|
((default-modes (append '(vi-normal-mode) %slot-default%))))
|
||||||
|
|
||||||
|
;; Keybindings
|
||||||
|
;; (Note: Override Map will override any other custom keybindings so use a prefix key.)
|
||||||
|
(define-configuration buffer
|
||||||
|
((override-map (define-key %slot-default%
|
||||||
|
"C-x s" 'nyxt/web-mode:search-buffers
|
||||||
|
"C-x u" 'copy-username
|
||||||
|
"c-x p" 'copy-password))))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* Theme
|
||||||
|
#+begin_src lisp
|
||||||
|
;;Message buffer color configuration
|
||||||
|
(define-configuration window
|
||||||
|
((message-buffer-style
|
||||||
|
(str:concat
|
||||||
|
%slot-default%
|
||||||
|
(cl-css:css
|
||||||
|
'((body
|
||||||
|
:background-color "black"
|
||||||
|
:color "white")))))))
|
||||||
|
|
||||||
|
;; Mini-buffer style
|
||||||
|
(define-configuration prompt-buffer
|
||||||
|
((style (str:concat
|
||||||
|
%slot-default%
|
||||||
|
(cl-css:css
|
||||||
|
'((body
|
||||||
|
:background-color "black"
|
||||||
|
:color "white")
|
||||||
|
("#prompt-area"
|
||||||
|
:background-color "black")
|
||||||
|
;; The area you input text in.
|
||||||
|
("#input"
|
||||||
|
:background-color "#EDDDAA")
|
||||||
|
(".source-name"
|
||||||
|
:color "black"
|
||||||
|
:background-color "#556B2F")
|
||||||
|
(".source-content"
|
||||||
|
:background-color "black")
|
||||||
|
(".source-content th"
|
||||||
|
:border "1px solid #556B2F"
|
||||||
|
:background-color "black")
|
||||||
|
;; The currently highlighted option.
|
||||||
|
("#selection"
|
||||||
|
:background-color "#CD5C5C"
|
||||||
|
:color "black")
|
||||||
|
(.marked :background-color "#8B3A3A"
|
||||||
|
:font-weight "bold"
|
||||||
|
:color "white")
|
||||||
|
(.selected :background-color "black"
|
||||||
|
:color "white")))))))
|
||||||
|
|
||||||
|
;; Internal buffer (help, bookmarks, buffers panel)
|
||||||
|
(define-configuration (internal-buffer panel-buffer)
|
||||||
|
((style
|
||||||
|
(str:concat
|
||||||
|
%slot-default%
|
||||||
|
(cl-css:css
|
||||||
|
'((title
|
||||||
|
:color "#CD5C5C")
|
||||||
|
(body
|
||||||
|
:background-color "black"
|
||||||
|
:color "lightgray")
|
||||||
|
(hr
|
||||||
|
:color "darkgray")
|
||||||
|
(a
|
||||||
|
:color "#556B2F")
|
||||||
|
(.button
|
||||||
|
:color "lightgray"
|
||||||
|
:background-color "#556B2F")))))))
|
||||||
|
|
||||||
|
;; Link hints in web mode
|
||||||
|
(define-configuration nyxt/web-mode:web-mode
|
||||||
|
((nyxt/web-mode:highlighted-box-style
|
||||||
|
(cl-css:css
|
||||||
|
'((".nyxt-hint.nyxt-highlight-hint"
|
||||||
|
:background "#CD5C5C"))))))
|
||||||
|
|
||||||
|
;; Modeline
|
||||||
|
(define-configuration status-buffer
|
||||||
|
((style (str:concat
|
||||||
|
%slot-default%
|
||||||
|
(cl-css:css
|
||||||
|
;; Arrows on the left.
|
||||||
|
'(("#controls"
|
||||||
|
:border-top "1px solid white"
|
||||||
|
:background-color "#CD5C5C")
|
||||||
|
;; To the right of the arrows.
|
||||||
|
("#url"
|
||||||
|
:background-color "black"
|
||||||
|
:color "white"
|
||||||
|
:border-top "1px solid white")
|
||||||
|
;; Far to the right.
|
||||||
|
("#modes"
|
||||||
|
:background-color "black"
|
||||||
|
:border-top "1px solid white")
|
||||||
|
;; The center segment.
|
||||||
|
("#tabs"
|
||||||
|
:background-color "#CD5C5C"
|
||||||
|
:color "black"
|
||||||
|
:border-top "1px solid white")))))))
|
||||||
|
|
||||||
|
;; Overriding dark theme colors
|
||||||
|
(define-configuration nyxt/style-mode:dark-mode
|
||||||
|
((style #.(cl-css:css
|
||||||
|
'((*
|
||||||
|
:background-color "black !important"
|
||||||
|
:background-image "none !important"
|
||||||
|
:color "white")
|
||||||
|
(a
|
||||||
|
:background-color "black !important"
|
||||||
|
:background-image "none !important"
|
||||||
|
:color "#556B2F !important"))))))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* Password Management
|
||||||
|
Password managers are an essential feature and thankfully Nyxt allows me to integrate KeepassXC which I use regularly.
|
||||||
|
#+begin_src lisp
|
||||||
|
(define-configuration password:keepassxc-interface
|
||||||
|
((password:password-file "/home/opal/Documents/opal.kdbx")))
|
||||||
|
|
||||||
|
(define-configuration buffer
|
||||||
|
((password-interface (make-instance 'password:user-keepassxc-interface))))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* Misc
|
||||||
|
** Redirection
|
||||||
|
I would like to keep expanding on these redirection functions so I can have native redirection away from sites that don't respect user privacy.
|
||||||
|
#+begin_src lisp
|
||||||
|
|
||||||
|
;; I would like to implement redirection, or some extension to handle it for me.
|
||||||
|
;; todo: Redirect reddit to teddit
|
||||||
|
;; (defun old-reddit-handler (request-data)
|
||||||
|
;; (let ((url (url request-data)))
|
||||||
|
;; (setf (url request-data)
|
||||||
|
;; (if (search "reddit.com" (quri:uri-host url))
|
||||||
|
;; (progn
|
||||||
|
;; (setf (quri:uri-host url) "old.reddit.com")
|
||||||
|
;; (log:info "Switching to old Reddit: ~s" (render-url url))
|
||||||
|
;; url)
|
||||||
|
;; url)))
|
||||||
|
;; request-data)
|
||||||
|
|
||||||
|
;; (define-configuration web-buffer
|
||||||
|
;; ((request-resource-hook
|
||||||
|
;; (hooks:add-hook %slot-default% (make-handler-resource #'old-reddit-handler)))))
|
||||||
|
;; (See url-dispatching-handler for a simpler way to achieve the same result.)
|
||||||
|
#+end_src
|
||||||
Reference in New Issue
Block a user