├── auto-config.lisp
├── scripts
├── shutdown.sh
├── weather.sh
└── spotify.sh
├── base
├── keybindings.lisp
├── urlprompt.lisp
├── glyphs.lisp
└── commands.lisp
├── init.lisp
├── update.sh
├── README.md
├── themes
├── standard-dark.lisp
├── standard-light.lisp
├── drgn-dark.lisp
└── drgn-light.lisp
└── ex
└── specificurl.lisp
/auto-config.lisp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/scripts/shutdown.sh:
--------------------------------------------------------------------------------
1 | shutdown -h now
2 |
--------------------------------------------------------------------------------
/scripts/weather.sh:
--------------------------------------------------------------------------------
1 | curl wttr.in/?format=3
2 |
--------------------------------------------------------------------------------
/scripts/spotify.sh:
--------------------------------------------------------------------------------
1 | xdotool search --classname spotify windowkill %@ &
2 |
3 | sleep 2s
4 |
5 | /usr/share/spotify/spotify &
6 | '''
7 | sleep 10s
8 |
9 | xdotool search --classname spotify set_desktop_for_window %@ 0 &
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/base/keybindings.lisp:
--------------------------------------------------------------------------------
1 | (in-package #:nyxt-user)
2 |
3 | ;;keybinding overrides
4 | (define-configuration buffer
5 | ((override-map (let ((map (make-keymap "my-override-map")))
6 | (define-key map
7 | "M-i" 'show-weather
8 | "C-t" 'set-url-new-buffer
9 | "C-2" 'open-external-browser
10 | "C-0" 'no-mercy
11 | "M-x" 'execute-command
12 | "C-s" 'query-selection-in-search-engine
13 | "C-c" 'nyxt/web-mode::copy ;;currently an override because C-c not working without it
14 | "C-q" 'quit-history)
15 | map))))
16 |
--------------------------------------------------------------------------------
/base/urlprompt.lisp:
--------------------------------------------------------------------------------
1 | (in-package #:nyxt-user)
2 |
3 | ;;search engines setup | last one in list becomes default
4 | ;;order: "shortcut" "url for search, ~a determines where query is placed" "fallback url when query fails or an empty search"
5 | (defvar *my-search-engines*
6 | (list
7 | '("az" "https://amazon.com/s?k=~a" "https://amazon.com/") ;;amazon
8 | '("hns" "https://hns.to/~a" "https://hns.to/") ;;handshake addresses
9 | '("git" "https://github.com/search?q=~a" "https://github.com/") ;;git repos
10 | '("wiki" "https://en.wikipedia.org/w/index.php?search=~a" "https://en.wikipedia.org/") ;;wikipedia
11 | '("ddg" "https://duckduckgo.com/?q=~a" "https://duckduckgo.com/") ;;duckduckgo
12 |
13 | (define-configuration buffer
14 | ((search-engines (mapcar (lambda (engine) (apply 'make-search-engine engine))
15 | *my-search-engines*))))
16 |
--------------------------------------------------------------------------------
/base/glyphs.lisp:
--------------------------------------------------------------------------------
1 | (in-package #:nyxt-user)
2 |
3 | ;;allow setting glyphs
4 | (define-configuration status-buffer
5 | ((glyph-mode-presentation-p t)))
6 |
7 | ;;various glyph settings with no additional configs
8 | (define-configuration nyxt/force-https-mode:force-https-mode ((glyph "ϕ")))
9 | (define-configuration nyxt/blocker-mode:blocker-mode ((glyph "β")))
10 | (define-configuration nyxt/proxy-mode:proxy-mode ((glyph "π")))
11 | (define-configuration nyxt/reduce-tracking-mode:reduce-tracking-mode ((glyph "∅")))
12 | (define-configuration nyxt/certificate-exception-mode:certificate-exception-mode ((glyph "ɛ")))
13 | (define-configuration nyxt/style-mode:style-mode ((glyph "s")))
14 | (define-configuration nyxt/help-mode:help-mode ((glyph "?")))
15 |
16 | ;;configure web mode hints to home row fore colemak and set glyph
17 | (define-configuration nyxt/web-mode:web-mode
18 | ((nyxt/web-mode:hints-alphabet "ARSTGMNEIO")
19 | (glyph "ω")))
20 |
21 | ;;auto-mode config and set glyph
22 | (define-configuration nyxt/auto-mode:auto-mode
23 | ((nyxt/auto-mode:prompt-on-mode-toggle t)
24 | (glyph "α")))
25 |
--------------------------------------------------------------------------------
/init.lisp:
--------------------------------------------------------------------------------
1 | (in-package #:nyxt-user)
2 |
3 | ;;loading of config files
4 | ;;add theme here
5 | (nyxt::load-lisp "~/.config/nyxt/themes/standard-dark.lisp")
6 | ;;base
7 | (nyxt::load-lisp "~/.config/nyxt/base/keybindings.lisp")
8 | (nyxt::load-lisp "~/.config/nyxt/base/urlprompt.lisp")
9 | (nyxt::load-lisp "~/.config/nyxt/base/commands.lisp")
10 | (nyxt::load-lisp "~/.config/nyxt/base/glyphs.lisp")
11 | ;;extending
12 | (nyxt::load-lisp "~/.config/nyxt/ex/specificurl.lisp")
13 |
14 | ;;configuration for browser
15 | (define-configuration browser
16 | ((session-restore-prompt :never-restore)))
17 |
18 | ;;configuration for buffer and nosave buffer to have reduce tracking by default
19 | (define-configuration (web-buffer nosave-buffer)
20 | ((default-modes `(reduce-tracking-mode
21 | ,@%slot-default%))))
22 |
23 | ;;setting new buffer url and having nyxt start full screen
24 | (defmethod nyxt::startup ((browser browser) urls)
25 | "Home"
26 | (window-make browser)
27 | (let ((window (current-window)))
28 | (window-set-buffer window (make-buffer :url (quri:uri "https://nyxt.atlas.engineer/")))
29 | (toggle-fullscreen window)))
30 |
31 | ;;when reloading init.lisp file shows in message bar once finished
32 | (echo "Loaded config.")
33 |
--------------------------------------------------------------------------------
/base/commands.lisp:
--------------------------------------------------------------------------------
1 | (in-package #:nyxt-user)
2 |
3 | ;;runs shutdown -h now
4 | (define-command-global no-mercy ()
5 | "shutdown, with no mercy."
6 | (uiop:run-program "~/.config/nyxt/scripts/shutdown.sh"))
7 |
8 | ;;shows current time
9 | (define-command-global current-time ()
10 | "Show the current time."
11 | (echo "~a" (local-time:now)))
12 |
13 | ;;runs curl wttr.in/?format=3
14 | (define-command-global show-weather ()
15 | "Show the weather for current location in message area."
16 | (echo (uiop:run-program "~/.config/nyxt/scripts/weather.sh" :output :string)))
17 |
18 | ;;runs script to open spotify and set the window
19 | (define-command-global open-spotify ()
20 | "Open Spotify."
21 | (uiop:run-program "~/.config/nyxt/scripts/spotify.sh"))
22 |
23 | ;;command to close nyxt and delete history file | investigating below issues
24 | ;;currently cannot be last command in this list and won't show in commands list so setting a keybinding is necessary
25 | (define-command-global quit-history ()
26 | (uiop:delete-file-if-exists (expand-data-path (data-profile (current-buffer)) ;;quit and clear history
27 | (history-path (current-buffer))))
28 | (quit))
29 |
30 | ;;opens current url in different browser replace firefox with your browser/path
31 | (define-command-global open-external-browser ()
32 | "Open the current url in external browser"
33 | (uiop:run-program (list "firefox" (render-url (url (current-buffer))))))
34 |
--------------------------------------------------------------------------------
/update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | set -e
4 |
5 | if [ $# -eq 0 ]; then
6 | latest_release_uri="https://api.github.com/repos/ericdrgn/drgn.nyxt/releases/latest"
7 | echo "DOWNLOADING $latest_release_uri"
8 | version=$( command curl -sSf "$latest_release_uri" |
9 | command grep -Eo "tag_name\": .*" |
10 | command grep -Eo "[0-9.]*" )
11 | if [ ! "$version" ]; then exit 1; fi
12 | else
13 | version="${1}"
14 | fi
15 |
16 | download_uri="https://github.com/ericdrgn/drgn.nyxt/archive/refs/tags/${version}.zip"
17 |
18 | nyxt_install="${NYXT_INSTALL:-$HOME/.config/nyxt}"
19 |
20 | if [ ! -d "$nyxt_install" ]; then
21 | echo "MAKING FOLDER $nyxt_install";
22 | mkdir -p "$nyxt_install"
23 | fi
24 |
25 | tar_file="$nyxt_install/${version}.zip"
26 |
27 | echo "DOWNLOADING v$version $download_uri"
28 | curl --fail --location --progress-bar --output "$tar_file" "$download_uri"
29 | cd "$nyxt_install"
30 |
31 | echo "EXTRACTING $tar_file"
32 | unzip "$tar_file"
33 |
34 | echo "REMOVING $tar_file"
35 | rm "$tar_file"
36 |
37 | echo "COPYING"
38 | cp -rf "$nyxt_install/drgn.nyxt-${version}/base" "$nyxt_install"
39 | cp -rf "$nyxt_install/drgn.nyxt-${version}/ex" "$nyxt_install"
40 | cp -rf "$nyxt_install/drgn.nyxt-${version}/scripts" "$nyxt_install"
41 | cp -rf "$nyxt_install/drgn.nyxt-${version}/themes" "$nyxt_install"
42 | cp -rf "$nyxt_install/drgn.nyxt-${version}/auto-config.lisp" "$nyxt_install"
43 | cp -rf "$nyxt_install/drgn.nyxt-${version}/init.lisp" "$nyxt_install"
44 | cp -rf "$nyxt_install/drgn.nyxt-${version}/update.sh" "$nyxt_install"
45 |
46 | echo "REMOVING $nyxt_install/drgn.nyxt-${version}"
47 | rm -r "$nyxt_install/drgn.nyxt-${version}"
48 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # drgn.nyxt
2 | Base configuration for nyxt browser (https://github.com/atlas-engineer/nyxt) with opinionated theme(s) and organization.
3 |
4 | This is also my attempt at creating a good jumping off point for new users. This will be updated regularly alongside my personal configuration and while this is nearly identical there will always be differences. This will be as close to my personal configs as I will give out publicly.
5 |
6 | ## update.sh
7 | - Linux script to automatically pull the latest release of these configs and automatically place theme where they need to be.
8 | - This script is meant to be ran for initial setup or if you really want to stay in line with the configs here.
9 | - WARNING: This will overwrite any existing configs you may have. If you have added lisp files in ~/.config/nyxt/ it will not touch those but it will overwrite any files from this repo with their latest changes. Use at your own risk.
10 |
11 | ## Configuration: ~/.config/nyxt/ (Linux)
12 | - Contains the base configuration files needed.
13 |
14 | ##### init.lisp
15 | - Contains the initial configurations of Nyxt.
16 | - Loads other config files.
17 |
18 | ##### auto-config.lisp
19 | - Contains configurations made by Nyxt when using the built in "configure" button.
20 | - Currently empty.
21 |
22 | #### /base directory
23 | files
24 |
25 | - **commands.lisp**: Contains all custom commands light enough to be in this file.
26 | - **glyphs.lisp**: Configures glyph symbols for various modes along with small configs for certain modes. Ex. "web-mode" becomes "ω".
27 | - **keybindings.lisp**: Contains overrides (and creation) of keybindings.
28 | - **urlprompt.lisp**: Contains my list search engines and url manipulations.
29 |
30 |
31 | #### /scripts
32 | - Contains script files referenced in commands.lisp
33 |
34 | ## Themes
35 | - Contains different theme options created by myself (and others if applicable). Update init.lisp with chosen theme.
36 | - Themes that require other files will be consolidated or have dependencies removed.
37 | - Default theme set in init.lisp is standard-dark to make it easier to settle in.
38 | - Both light and dark themes are provided for my personal choice of a simpler status buffer and standard. They both have a minimal look to them and attempt to be seamless.
39 | - These are definetly not comprehensive and in the case of the light versions I don't use them so probably miss things. If there is an issue that clashes with or makes something unreadable with the themes please open an issue and I will do my best to fix it.
40 | - If you customize a theme or make your own entirely and want it added open an issue for it.
41 |
42 | ##### Naming Scheme:
43 | - _themename_-_light/dark style_
44 |
45 | #### /themes directory
46 | files
47 |
48 | - **drgn-dark.lisp**: Opinionated minimal styling, white on black with only tabs and modes in status buffer.
49 | - **drgn-light.lisp**: Opinionated minimal styling, black on white with only tabs and modes in status buffer.
50 | - **standard-dark.lisp**: Opinionated minimal styling, white on black.
51 | - **standard-light.lisp**: Opinionated minimal styling, black on white.
52 |
53 |
54 | ## Extending
55 | - Contains files used to add on additional capabilities that are considered standalone (in my mind).
56 |
57 | #### /ex directory
58 | files
59 |
60 | - **specificurl.lisp**: Create commands for each search engine to jump right into them immediately. Assign keybindings if desired.
61 |
62 |
--------------------------------------------------------------------------------
/themes/standard-dark.lisp:
--------------------------------------------------------------------------------
1 | (in-package #:nyxt-user)
2 |
3 | ;;configuration window
4 | (define-configuration window
5 | ((message-buffer-style
6 | (str:concat
7 | %slot-default%
8 | (cl-css:css
9 | '((body
10 | :background-color "black"
11 | :color "white")))))))
12 |
13 | ;;prompt buffer
14 | (define-configuration prompt-buffer
15 | ((style (str:concat
16 | %slot-default%
17 | (cl-css:css
18 | '((body
19 | :background-color "black"
20 | :color "white")
21 | ("#prompt-area"
22 | :background-color "black")
23 | ("#input"
24 | :background-color "black"
25 | :color "white")
26 | (".source-name"
27 | :background-color "black"
28 | :color "white")
29 | (".source-content"
30 | :background-color "black")
31 | (".source-content th"
32 | :border "1px solid white"
33 | :background-color "black")
34 | ("#selection"
35 | :background-color "white"
36 | :color "black")
37 | (.marked :background-color "black"
38 | :font-weight "bold"
39 | :color "white")
40 | (.selected :background-color "black"
41 | :color "white")))))))
42 |
43 | ;;internal buffer
44 | (define-configuration internal-buffer
45 | ((style
46 | (str:concat
47 | %slot-default%
48 | (cl-css:css
49 | '((title
50 | :color "white")
51 | (body
52 | :background-color "black"
53 | :color "white")
54 | (hr
55 | :color "white")
56 | (a
57 | :color "white")
58 | (.button
59 | :color "black"
60 | :background-color "white")))))))
61 |
62 | ;;history tree
63 | (define-configuration nyxt/history-tree-mode:history-tree-mode
64 | ((nyxt/history-tree-mode::style
65 | (str:concat
66 | %slot-default%
67 | (cl-css:css
68 | '((body
69 | :background-color "black"
70 | :color "white")
71 | (hr
72 | :color "darkgray")
73 | (a
74 | :color "white")
75 | ("ul li::before"
76 | :background-color "white")
77 | ("ul li::after"
78 | :background-color "white")
79 | ("ul li:only-child::before"
80 | :background-color "white")))))))
81 |
82 | ;;highlight boxes
83 | (define-configuration nyxt/web-mode:web-mode
84 | ((nyxt/web-mode:highlighted-box-style
85 | (cl-css:css
86 | '((".nyxt-hint.nyxt-highlight-hint"
87 | :background "black")))
88 | :documentation "The style of highlighted boxes, e.g. link hints.")))
89 |
90 | ;;Styling status buffer black and setting size of tabs and modes. Can uncomment url and controls section for theming those.
91 | (define-configuration status-buffer
92 | ((style (str:concat
93 | %slot-default%
94 | (cl-css:css
95 | '(
96 | ("#controls"
97 | :background-color "black"
98 | :border-top "1px solid white")
99 | ("#url"
100 | :background-color "black"
101 | :border-top "1px solid white")
102 | ("#modes"
103 | :background-color "black"
104 | :border-top "1px solid white")
105 | (".button:hover" :color "white")
106 | ("#tabs"
107 | :background-color "black"
108 | :color "white"
109 | :border-top "1px solid white")
110 | (".tab:hover" :color "white")))))))
111 |
--------------------------------------------------------------------------------
/themes/standard-light.lisp:
--------------------------------------------------------------------------------
1 | (in-package #:nyxt-user)
2 |
3 | ;configuration window
4 | (define-configuration window
5 | ((message-buffer-style
6 | (str:concat
7 | %slot-default%
8 | (cl-css:css
9 | '((body
10 | :background-color "white"
11 | :color "black")))))))
12 |
13 | ;prompt buffer
14 | (define-configuration prompt-buffer
15 | ((style (str:concat
16 | %slot-default%
17 | (cl-css:css
18 | '((body
19 | :background-color "white"
20 | :color "black")
21 | ("#prompt-area"
22 | :background-color "white"
23 | :color "black")
24 | ("#input"
25 | :background-color "white"
26 | :color "black")
27 | (".source-name"
28 | :background-color "white"
29 | :color "black")
30 | (".source-content"
31 | :background-color "white"
32 | :color "black")
33 | (".source-content th"
34 | :border "1px solid black"
35 | :background-color "white"
36 | :color "black")
37 | ("#selection"
38 | :background-color "black"
39 | :color "white")
40 | (.marked :background-color "white"
41 | :font-weight "bold"
42 | :color "black")
43 | (.selected :background-color "white"
44 | :color "black")))))))
45 |
46 | ;internal buffer
47 | (define-configuration internal-buffer
48 | ((style
49 | (str:concat
50 | %slot-default%
51 | (cl-css:css
52 | '((title
53 | :color "black")
54 | (body
55 | :background-color "white"
56 | :color "black")
57 | (hr
58 | :color "black")
59 | (a
60 | :color "black")
61 | (.button
62 | :color "white"
63 | :background-color "black")))))))
64 |
65 | ;history tree
66 | (define-configuration nyxt/history-tree-mode:history-tree-mode
67 | ((nyxt/history-tree-mode::style
68 | (str:concat
69 | %slot-default%
70 | (cl-css:css
71 | '((body
72 | :background-color "white"
73 | :color "black")
74 | (hr
75 | :color "darkgray")
76 | (a
77 | :color "black")
78 | ("ul li::before"
79 | :background-color "black")
80 | ("ul li::after"
81 | :background-color "black")
82 | ("ul li:only-child::before"
83 | :background-color "black")))))))
84 |
85 | ;highlight boxes
86 | (define-configuration nyxt/web-mode:web-mode
87 | ((nyxt/web-mode:highlighted-box-style
88 | (cl-css:css
89 | '((".nyxt-hint.nyxt-highlight-hint"
90 | :background "white")))
91 | :documentation "The style of highlighted boxes, e.g. link hints.")))
92 |
93 | ;Styling status buffer
94 | (define-configuration status-buffer
95 | ((style (str:concat
96 | %slot-default%
97 | (cl-css:css
98 | '(
99 | ("#controls"
100 | :background-color "white"
101 | :color "black"
102 | :border-top "1px solid black")
103 | ("#url"
104 | :background-color "white"
105 | :color "black"
106 | :border-top "1px solid black")
107 | ("#modes"
108 | :background-color "white"
109 | :color "black"
110 | :border-top "1px solid black")
111 | (".button" :color "black")
112 | (".button:hover" :color "black")
113 | ("#tabs"
114 | :background-color "white"
115 | :color "black"
116 | :border-top "1px solid black")
117 | (".tab" :color "black")))))))
118 |
--------------------------------------------------------------------------------
/themes/drgn-dark.lisp:
--------------------------------------------------------------------------------
1 | (in-package #:nyxt-user)
2 |
3 | ;;configure status buffer area with only tabs and modes section
4 | (defun my-format-status (window)
5 | (let ((buffer (current-buffer window)))
6 | (markup:markup
7 | (:div :id "container"
8 | (:div :id "tabs"
9 | (markup:raw (format-status-tabs)))
10 | (:div :id "modes"
11 | (markup:raw
12 | (format-status-load-status buffer)
13 | (format-status-modes buffer window)))))))
14 |
15 | (define-configuration window
16 | ((status-formatter #'my-format-status)))
17 |
18 | ;configuration window
19 | (define-configuration window
20 | ((message-buffer-style
21 | (str:concat
22 | %slot-default%
23 | (cl-css:css
24 | '((body
25 | :background-color "black"
26 | :color "white")))))))
27 |
28 | ;prompt buffer
29 | (define-configuration prompt-buffer
30 | ((style (str:concat
31 | %slot-default%
32 | (cl-css:css
33 | '((body
34 | :background-color "black"
35 | :color "white")
36 | ("#prompt-area"
37 | :background-color "black")
38 | ("#input"
39 | :background-color "black"
40 | :color "white")
41 | (".source-name"
42 | :background-color "black"
43 | :color "white")
44 | (".source-content"
45 | :background-color "black")
46 | (".source-content th"
47 | :border "1px solid white"
48 | :background-color "black")
49 | ("#selection"
50 | :background-color "white"
51 | :color "black")
52 | (.marked :background-color "black"
53 | :font-weight "bold"
54 | :color "white")
55 | (.selected :background-color "black"
56 | :color "white")))))))
57 |
58 | ;internal buffer
59 | (define-configuration internal-buffer
60 | ((style
61 | (str:concat
62 | %slot-default%
63 | (cl-css:css
64 | '((title
65 | :color "white")
66 | (body
67 | :background-color "black"
68 | :color "white")
69 | (hr
70 | :color "white")
71 | (a
72 | :color "white")
73 | (.button
74 | :color "black"
75 | :background-color "white")))))))
76 |
77 | ;history tree
78 | (define-configuration nyxt/history-tree-mode:history-tree-mode
79 | ((nyxt/history-tree-mode::style
80 | (str:concat
81 | %slot-default%
82 | (cl-css:css
83 | '((body
84 | :background-color "black"
85 | :color "white")
86 | (hr
87 | :color "darkgray")
88 | (a
89 | :color "white")
90 | ("ul li::before"
91 | :background-color "white")
92 | ("ul li::after"
93 | :background-color "white")
94 | ("ul li:only-child::before"
95 | :background-color "white")))))))
96 |
97 | ;highlight boxes
98 | (define-configuration nyxt/web-mode:web-mode
99 | ((nyxt/web-mode:highlighted-box-style
100 | (cl-css:css
101 | '((".nyxt-hint.nyxt-highlight-hint"
102 | :background "black")))
103 | :documentation "The style of highlighted boxes, e.g. link hints.")))
104 |
105 | ;Styling status buffer
106 | (define-configuration status-buffer
107 | ((style (str:concat
108 | %slot-default%
109 | (cl-css:css
110 | '(("#container"
111 | :grid-template-columns "90% 10%")
112 | ("#modes"
113 | :background-color "black"
114 | :border-top "1px solid white")
115 | (".button:hover" :color "white")
116 | ("#tabs"
117 | :background-color "black"
118 | :color "white"
119 | :border-top "1px solid white")
120 | (".tab:hover" :color "white")))))))
121 |
--------------------------------------------------------------------------------
/themes/drgn-light.lisp:
--------------------------------------------------------------------------------
1 | (in-package #:nyxt-user)
2 |
3 | ;;configure status buffer area with only tabs and modes section
4 | (defun my-format-status (window)
5 | (let ((buffer (current-buffer window)))
6 | (markup:markup
7 | (:div :id "container"
8 | (:div :id "tabs"
9 | (markup:raw (format-status-tabs)))
10 | (:div :id "modes"
11 | (markup:raw
12 | (format-status-load-status buffer)
13 | (format-status-modes buffer window)))))))
14 |
15 | (define-configuration window
16 | ((status-formatter #'my-format-status)))
17 |
18 | ;configuration window
19 | (define-configuration window
20 | ((message-buffer-style
21 | (str:concat
22 | %slot-default%
23 | (cl-css:css
24 | '((body
25 | :background-color "white"
26 | :color "black")))))))
27 |
28 | ;prompt buffer
29 | (define-configuration prompt-buffer
30 | ((style (str:concat
31 | %slot-default%
32 | (cl-css:css
33 | '((body
34 | :background-color "white"
35 | :color "black")
36 | ("#prompt-area"
37 | :background-color "white"
38 | :color "black")
39 | ("#input"
40 | :background-color "white"
41 | :color "black")
42 | (".source-name"
43 | :background-color "white"
44 | :color "black")
45 | (".source-content"
46 | :background-color "white"
47 | :color "black")
48 | (".source-content th"
49 | :border "1px solid black"
50 | :background-color "white"
51 | :color "black")
52 | ("#selection"
53 | :background-color "black"
54 | :color "white")
55 | (.marked :background-color "white"
56 | :font-weight "bold"
57 | :color "black")
58 | (.selected :background-color "white"
59 | :color "black")))))))
60 |
61 | ;internal buffer
62 | (define-configuration internal-buffer
63 | ((style
64 | (str:concat
65 | %slot-default%
66 | (cl-css:css
67 | '((title
68 | :color "black")
69 | (body
70 | :background-color "white"
71 | :color "black")
72 | (hr
73 | :color "black")
74 | (a
75 | :color "black")
76 | (.button
77 | :color "white"
78 | :background-color "black")))))))
79 |
80 | ;history tree
81 | (define-configuration nyxt/history-tree-mode:history-tree-mode
82 | ((nyxt/history-tree-mode::style
83 | (str:concat
84 | %slot-default%
85 | (cl-css:css
86 | '((body
87 | :background-color "white"
88 | :color "black")
89 | (hr
90 | :color "darkgray")
91 | (a
92 | :color "black")
93 | ("ul li::before"
94 | :background-color "black")
95 | ("ul li::after"
96 | :background-color "black")
97 | ("ul li:only-child::before"
98 | :background-color "black")))))))
99 |
100 | ;highlight boxes
101 | (define-configuration nyxt/web-mode:web-mode
102 | ((nyxt/web-mode:highlighted-box-style
103 | (cl-css:css
104 | '((".nyxt-hint.nyxt-highlight-hint"
105 | :background "white")))
106 | :documentation "The style of highlighted boxes, e.g. link hints.")))
107 |
108 | ;Styling status buffer
109 | (define-configuration status-buffer
110 | ((style (str:concat
111 | %slot-default%
112 | (cl-css:css
113 | '(("#container"
114 | :grid-template-columns "90% 10%")
115 | ("#modes"
116 | :background-color "white"
117 | :color "black"
118 | :border-top "1px solid black")
119 | (".button:hover" :color "black")
120 | ("#tabs"
121 | :background-color "white"
122 | :color "black"
123 | :border-top "1px solid black")
124 | (".tab" :color "black")))))))
125 |
--------------------------------------------------------------------------------
/ex/specificurl.lisp:
--------------------------------------------------------------------------------
1 | (in-package #:nyxt-user)
2 |
3 | ;;extra .lisp file for the configs of various search engines/url prompts to get straight to them via command/binding
4 |
5 | ;;command to start running a search from ddg directly
6 | (define-command-global search-ddg (&key (prefill-current-url-p t))
7 | "Set ddg in the url prompt to search straight from duckduckgo."
8 | (let ((actions (list (make-command buffer-load* (suggestion-values)
9 | "Load first selected URL in current buffer and the rest in new buffer(s)."
10 | (mapc (lambda (suggestion) (make-buffer :url (url suggestion))) (rest suggestion-values))
11 | (buffer-load (url (first suggestion-values))))
12 | (make-command new-buffer-load (suggestion-values)
13 | "Load URL(s) in new buffer(s)."
14 | (mapc (lambda (suggestion) (make-buffer :url (url suggestion))) (rest suggestion-values))
15 | (make-buffer-focus :url (url (first suggestion-values)))))))
16 | (prompt
17 | :prompt "DuckDuckGo"
18 | :input "ddg "
19 | :sources (list (make-instance 'user-new-url-or-search-source :actions actions)))))
20 |
21 | ;;command to start running a search from git directly
22 | (define-command-global search-git (&key (prefill-current-url-p t))
23 | "Set git in the url prompt to search straight from github."
24 | (let ((actions (list (make-command buffer-load* (suggestion-values)
25 | "Load first selected URL in current buffer and the rest in new buffer(s)."
26 | (mapc (lambda (suggestion) (make-buffer :url (url suggestion))) (rest suggestion-values))
27 | (buffer-load (url (first suggestion-values))))
28 | (make-command new-buffer-load (suggestion-values)
29 | "Load URL(s) in new buffer(s)."
30 | (mapc (lambda (suggestion) (make-buffer :url (url suggestion))) (rest suggestion-values))
31 | (make-buffer-focus :url (url (first suggestion-values)))))))
32 | (prompt
33 | :prompt "GitHub"
34 | :input "git "
35 | :sources (list (make-instance 'user-new-url-or-search-source :actions actions)))))
36 |
37 | ;;command to start running a search from wiki directly
38 | (define-command-global search-wiki (&key (prefill-current-url-p t))
39 | "Set wiki in the url prompt to search straight from wikipedia."
40 | (let ((actions (list (make-command buffer-load* (suggestion-values)
41 | "Load first selected URL in current buffer and the rest in new buffer(s)."
42 | (mapc (lambda (suggestion) (make-buffer :url (url suggestion))) (rest suggestion-values))
43 | (buffer-load (url (first suggestion-values))))
44 | (make-command new-buffer-load (suggestion-values)
45 | "Load URL(s) in new buffer(s)."
46 | (mapc (lambda (suggestion) (make-buffer :url (url suggestion))) (rest suggestion-values))
47 | (make-buffer-focus :url (url (first suggestion-values)))))))
48 | (prompt
49 | :prompt "Wikipedia"
50 | :input "wiki "
51 | :sources (list (make-instance 'user-new-url-or-search-source :actions actions)))))
52 |
53 | ;;command to start running a search from az directly
54 | (define-command-global search-az (&key (prefill-current-url-p t))
55 | "Set az in the url prompt to search straight from amazon."
56 | (let ((actions (list (make-command buffer-load* (suggestion-values)
57 | "Load first selected URL in current buffer and the rest in new buffer(s)."
58 | (mapc (lambda (suggestion) (make-buffer :url (url suggestion))) (rest suggestion-values))
59 | (buffer-load (url (first suggestion-values))))
60 | (make-command new-buffer-load (suggestion-values)
61 | "Load URL(s) in new buffer(s)."
62 | (mapc (lambda (suggestion) (make-buffer :url (url suggestion))) (rest suggestion-values))
63 | (make-buffer-focus :url (url (first suggestion-values)))))))
64 | (prompt
65 | :prompt "Amazon"
66 | :input "az "
67 | :sources (list (make-instance 'user-new-url-or-search-source :actions actions)))))
68 |
69 | ;;command to navigate to a handshake address quickly
70 | (define-command-global navigate-hns (&key (prefill-current-url-p t))
71 | "Set hns in the url prompt to go straight to a handshake address."
72 | (let ((actions (list (make-command buffer-load* (suggestion-values)
73 | "Load first selected URL in current buffer and the rest in new buffer(s)."
74 | (mapc (lambda (suggestion) (make-buffer :url (url suggestion))) (rest suggestion-values))
75 | (buffer-load (url (first suggestion-values))))
76 | (make-command new-buffer-load (suggestion-values)
77 | "Load URL(s) in new buffer(s)."
78 | (mapc (lambda (suggestion) (make-buffer :url (url suggestion))) (rest suggestion-values))
79 | (make-buffer-focus :url (url (first suggestion-values)))))))
80 | (prompt
81 | :prompt "Handshake Address"
82 | :input "hns "
83 | :sources (list (make-instance 'user-new-url-or-search-source :actions actions)))))
84 |
--------------------------------------------------------------------------------