fixed .gitignore

This commit is contained in:
opal
2021-12-24 12:34:12 -08:00
parent 2f4f1f4127
commit a3c2b64294
7 changed files with 323 additions and 7 deletions

View File

@@ -0,0 +1,78 @@
(use-modules (gnu)
(nongnu packages linux))
(use-service-modules
cups
desktop
networking
ssh
xorg)
(operating-system
(kernel linux)
(firmware (list linux-firmware))
(locale "en_US.utf8")
(timezone "America/Los_Angeles")
(keyboard-layout (keyboard-layout "us"))
(host-name "borges")
(users (cons* (user-account
(name "opal")
(comment "opal")
(group "users")
(home-directory "/home/opal")
(supplementary-groups
'("wheel"
"netdev"
"audio"
"video")))
%base-user-accounts))
(packages
(append
(list
(specification->package "git")
(specification->package "xclip")
(specification->package "vim")
(specification->package "nss-certs")
(specification->package "stow")
(specification->package "exfat-utils")
(specification->package "emacs")
(specification->package "emacs-exwm")
(specification->package "bluez")
(specification->package "bluez-alsa")
(specification->package "pulseaudio")
(specification->package "nyxt")
(specification->package "keepassxc")
(specification->package "font-fira-mono")
(specification->package "font-fira-sans")
(specification->package "font-fira-code")
(specification->package "gnome-tweaks"))
%base-packages))
(services
(append
(list (service gnome-desktop-service-type)
(set-xorg-configuration
(xorg-configuration
(keyboard-layout keyboard-layout))))
%desktop-services))
(bootloader
(bootloader-configuration
(bootloader grub-efi-bootloader)
(targets (list "/boot/efi"))
(keyboard-layout keyboard-layout)))
(mapped-devices
(list (mapped-device
(source
(uuid "40aa6387-e935-4f70-8e7d-1975678a5a32"))
(target "cryptroot")
(type luks-device-mapping))))
(file-systems
(cons* (file-system
(mount-point "/")
(device "/dev/mapper/cryptroot")
(type "btrfs")
(dependencies mapped-devices))
(file-system
(mount-point "/boot/efi")
(device (uuid "1C3B-10F5" 'fat32))
(type "vfat"))
%base-file-systems)))

View File

@@ -0,0 +1,75 @@
(use-modules (gnu)
(nongnu packages linux))
(use-service-modules
cups
desktop
networking
ssh
xorg)
(operating-system
(kernel linux)
(firmware (list linux-firmware))
(locale "en_US.utf8")
(timezone "America/Los_Angeles")
(keyboard-layout (keyboard-layout "us"))
(host-name "work")
(users (cons* (user-account
(name "opal")
(comment "Opal")
(group "users")
(home-directory "/home/opal")
(supplementary-groups
'("wheel" "netdev" "audio" "video")))
%base-user-accounts))
(packages
(append
(list
(specification->package "git")
(specification->package "xclip")
(specification->package "vim")
(specification->package "nss-certs")
(specification->package "stow")
(specification->package "exfat-utils")
(specification->package "emacs")
(specification->package "emacs-exwm")
(specification->package "bluez")
(specification->package "bluez-alsa")
(specification->package "pulseaudio")
(specification->package "nyxt")
(specification->package "keepassxc")
(specification->package "font-fira-mono")
(specification->package "font-fira-sans")
(specification->package "font-fira-code")
(specification->package "gnome-tweaks"))
%base-packages))
(services
(append
(list (service gnome-desktop-service-type)
(service cups-service-type)
(set-xorg-configuration
(xorg-configuration
(keyboard-layout keyboard-layout))))
%desktop-services))
(bootloader
(bootloader-configuration
(bootloader grub-efi-bootloader)
(targets (list "/boot/efi"))
(keyboard-layout keyboard-layout)))
(mapped-devices
(list (mapped-device
(source
(uuid "abe760e2-4ba5-4f43-81a2-1c3f16eb62a8"))
(target "cryptroot")
(type luks-device-mapping))))
(file-systems
(cons* (file-system
(mount-point "/")
(device "/dev/mapper/cryptroot")
(type "btrfs")
(dependencies mapped-devices))
(file-system
(mount-point "/boot/efi")
(device (uuid "15B3-5DE5" 'fat32))
(type "vfat"))
%base-file-systems)))

View File

144
.config/nyxt/init.lisp Normal file
View File

@@ -0,0 +1,144 @@
(load-after-system :slynk "~/.config/nyxt/my-slynk.lisp")
;; Vim-normal mode by default
(define-configuration buffer
((default-modes (append '(vi-normal-mode) '(blocker-mode) %slot-default%))))
;; Vim-insert for prompt-buffer (minibuffer)
(define-configuration prompt-buffer
((default-modes (append '(vi-insert-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))))
;;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 "#125458")
(".source-content"
:background-color "black")
(".source-content th"
:border "1px solid #125458"
:background-color "black")
;; The currently highlighted option.
("#selection"
:background-color "#125458"
: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 "lightgray")
(a
:color "#125458")
(.button
:color "white"
:background-color "#125458")))))))
;; 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 "#125458"))))))
;; 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 "#125458")
;; 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 "#125458"
: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"))))))
(define-configuration password:keepassxc-interface
((password:password-file "/home/opal/.config/keepassxc/.kdbx-store/opal.kdbx")))
(define-configuration buffer
((password-interface (make-instance 'password:user-keepassxc-interface))))
;; 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.)

View File

@@ -0,0 +1,10 @@
(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))

5
.gitignore vendored
View File

@@ -2,11 +2,16 @@
!Emacs.org
!StumpWM.org
!Guix.org
!Nyxt.org
!Desktop.org
!.zshenv
!.config/
!.config/guix
!.config/stumpwm
!.config/mbsync
!.config/nyxt
!.config/nyxt/init.lisp
!.config/nyxt/my-slink.lisp
!.config/nvim/init.vim
!.config/zsh/.zshrc
!.config/zsh/.zprofile

View File

@@ -3,15 +3,19 @@
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.
* Load Quicklisp
#+begin_src emacs-lisp
(load "~/quicklisp/setup.lisp")
(ql:quickload 'slynk)
;; #-quicklisp
;; (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
;; (user-homedir-pathname))))
;; (when (probe-file quicklisp-init)
;; (load quicklisp-init)))
#+end_src
* Start Slynk server
#+begin_src lisp
(ql:quickload 'slynk)
(define-command-global start-slynk (&optional (slynk-port *swank-port*))
"Start a Slynk server."
(slynk:create-server :port slynk-port :dont-close t)
(echo "Slynk server started at port ~a" slynk-port))
(load-after-system :slynk "~/.config/nyxt/my-slynk.lisp")
#+end_src
* Keybindings