aboutsummaryrefslogtreecommitdiffstats
path: root/oni/home/config
diff options
context:
space:
mode:
Diffstat (limited to 'oni/home/config')
-rw-r--r--oni/home/config/data.scm28
-rw-r--r--oni/home/config/pop-os.scm57
-rw-r--r--oni/home/config/pop-os/emacs.el965
-rw-r--r--oni/home/config/rincewind.scm15
4 files changed, 181 insertions, 884 deletions
diff --git a/oni/home/config/data.scm b/oni/home/config/data.scm
index 2cf41a0..6636ab3 100644
--- a/oni/home/config/data.scm
+++ b/oni/home/config/data.scm
@@ -20,18 +20,7 @@
#:use-module (gnu services)
#:use-module (guix gexp)
#:use-module (oni home config common)
- #:use-module ((oni home services emacs)
- #:select (home-emacs-service-type
- home-emacs-configuration
- home-emacs-helpful-configuration
- home-emacs-yasnippet-capf-configuration
- home-emacs-eros-service-type
- home-emacs-ace-link-service-type
- home-emacs-ace-link-configuration
- home-emacs-golden-ratio-service-type
- home-emacs-pinentry-service-type
- home-emacs-org-caldav-service-type
- home-emacs-envrc-configuration))
+ #:use-module (oni home services emacs)
#:use-module (oni home services environment)
#:use-module (oni home services git)
#:use-module (oni home services kdeconnect)
@@ -56,7 +45,11 @@
"openssh"
"keepassxc"
"font-dosis"
- "swaybg"))
+ "swaybg"
+ "emacs-geiser-hoot"
+ "wayland"
+ "emacs-org-journal"
+ "emacs-nginx-mode"))
(list
pick-random-wallpaper
emacs-org-contacts
@@ -64,7 +57,6 @@
emacs-outli
emacs-guix
- (emacs-oni-org-roam emacs-pgtk)
emacs-oni-vterm
emacs-oni-elisp
emacs-oni-core
@@ -178,4 +170,10 @@
xfuncname = \"^[[:space:]]*?\\\\(def\\\\w+? ((\\\\w|-|'|:|=|<|>)+)\"
")))
- (service home-niri-service-type)))))
+ (service home-niri-service-type)
+
+ (service home-wakatime-service-type
+ (home-wakatime-configuration
+ (api-url "https://waka.ryuslash.org/api")
+ (exclude '("COMMIT_EDITMSG$"
+ "TAG_EDITMSG$"))))))))
diff --git a/oni/home/config/pop-os.scm b/oni/home/config/pop-os.scm
index 31350fa..fe28d66 100644
--- a/oni/home/config/pop-os.scm
+++ b/oni/home/config/pop-os.scm
@@ -4,10 +4,13 @@
#:use-module ((gnu home services gnupg)
#:select (home-gpg-agent-service-type
home-gpg-agent-configuration))
+ #:use-module (gnu home services mail)
+ #:use-module (gnu home services ssh)
#:use-module (gnu packages)
#:use-module (gnu packages emacs)
#:use-module (gnu packages music)
#:use-module (gnu packages pulseaudio)
+ #:use-module (gnu packages rust-apps)
#:use-module ((gnu services)
#:select (service))
#:use-module ((guix gexp)
@@ -25,6 +28,7 @@
#:use-module (oni home services herbstluftwm)
#:use-module ((oni home services mail)
#:select (home-mbsync-service-type))
+ #:use-module (oni home services notmuch)
#:use-module (oni home services polybar)
#:use-module (oni home services rofi)
#:use-module (oni home services xdisorg)
@@ -171,6 +175,7 @@
"wezterm"
"tree-sitter-vue"
"tree-sitter-typescript"
+ "tree-sitter-css"
"emacs-popup"
"emacs-git-messenger"
"emacs-csv-mode"
@@ -194,7 +199,9 @@
"emacs-sops"
"emacs-dockerfile-mode"
"emacs-slack"
- "emacs-combobulate"))
+ "emacs-combobulate"
+ "emacs-prodigy"
+ "emacs-vertico-posframe"))
(list emacs-oni-core
emacs-oni-compilation
emacs-oni-common-lisp
@@ -226,11 +233,21 @@
emacs-oni-js
emacs-oni-elfeed
emacs-oni-eshell
+ emacs-oni-outline
+ emacs-oni-sql
+ emacs-oni-logview
+ emacs-oni-notmuch
+ emacs-oni-dumb-jump
+ ripgrep
emacs-flycheck-phpstan
emacs-vue-ts-mode
+ emacs-stillness-mode
- shutdown-rofi)))
+ shutdown-rofi
+
+ emacs-related-files
+ )))
(services (append
home-zsh-services
(list home-channels-service
@@ -275,10 +292,12 @@
(service home-gpg-agent-service-type
(home-gpg-agent-configuration
- (ssh-support? #t)
+ (ssh-support? #f)
(extra-content
"allow-emacs-pinentry\n")))
+ (service home-ssh-agent-service-type)
+
(service home-git-service-type
(home-git-configuration
(user-name "Tom Willemse")
@@ -295,4 +314,34 @@
")
(ignore-patterns '("GPATH" "GTAGS" "GRTAGS"))))
- (service home-emacs-org-mem-service-type))))))
+ (service home-emacs-org-mem-service-type)
+
+ (service home-msmtp-service-type
+ (home-msmtp-configuration
+ (defaults (msmtp-configuration
+ (auth? #t)
+ (tls? #t)
+ (tls-starttls? #t)
+ (port 587)))
+ (accounts
+ (list (msmtp-account
+ (name "punt")
+ ;; Use `secret-tool store --label=msmtp host smtp.gmail.com
+ ;; service smtp user ryuslash@gmail.com' to store the
+ ;; password.
+ (configuration (msmtp-configuration
+ (host "smtp.gmail.com")
+ (from "tom@punt.com")
+ (user "tom@punt.com"))))))
+ (default-account "punt")))
+
+ (service home-notmuch-service-type
+ (home-notmuch-configuration
+ (database-path "/home/tomwillemsen/documents/mail")
+ (user-primary-email "tom@punt.com")
+ (new-ignore '(".nnmaildir" ".mbsyncstate" ".uidvalidity"
+ ".mbsyncstate.journal" ".mbsyncstate.new"))))
+
+ (service home-emacs-ace-link-notmuch-service-type
+ (home-emacs-ace-link-notmuch-configuration
+ (default-key "C-S-e"))))))))
diff --git a/oni/home/config/pop-os/emacs.el b/oni/home/config/pop-os/emacs.el
index daaaac9..ffd0c79 100644
--- a/oni/home/config/pop-os/emacs.el
+++ b/oni/home/config/pop-os/emacs.el
@@ -40,18 +40,14 @@
(transient-define-prefix artisan-transient ()
"A transient to run artisan commands."
- ["Punt"
- ["Composer"
- ("pci" "Install" artisan-punt-composer-install)]
- ["Artisan"
- ("pac" "Run Command" artisan-punt-run-command)
- ("pam" "Migrate" artisan-punt-migrate)]]
- ["Chanced"
- ["Composer"
- ("cci" "Install" artisan-chanced-composer-install)]
- ["Artisan"
- ("cac" "Run Command" artisan-chanced-run-command)
- ("cam" "Migrate" artisan-chanced-migrate)]]
+ ["Composer"
+ ("ci" "Install" artisan-chanced-composer-install)]
+ ["Artisan"
+ ("ac" "Run Command" artisan-chanced-run-command)
+ ("am" "Migrate" artisan-chanced-migrate)
+ ("asc" "Create Saloon Connector" artisan-create-saloon-connector)
+ ("asr" "Create Saloon Request" artisan-create-saloon-request)
+ ("aMs" "Create Settings Migration" artisan-create-settings-migration)]
["Commands"
;; ("t" "Test" artisan-test-transient)
@@ -59,6 +55,44 @@
("mM" "Make Model" artisan-make-model-transient)
("mf" "Make Factory" artisan-make-factory-transient)])
+(defun artisan-create-saloon-connector (integration name)
+ "Create a new saloon connector.
+INTEGRATION is the related integration. NAME is the name of the saloon
+connector."
+ (interactive "MIntegration: \nMName: ")
+ (let ((default-directory (expand-file-name "chanced" (project-root (project-current)))))
+ (shell-command (format "docker exec chanced-backend php artisan saloon:connector %s %s" (shell-quote-argument integration) (shell-quote-argument name)))
+ (let* ((root (project-root (project-current)))
+ (bad-file-name (expand-file-name (format "chanced/app/Http/Integrations/%s/%s.php" integration name) root))
+ (good-file-name (expand-file-name (format "common/app/Http/Integrations/%s/%s.php" integration name) root)))
+ (mkdir (file-name-directory good-file-name) t)
+ (rename-file bad-file-name good-file-name)
+ (find-file good-file-name))
+ (vc-register)))
+
+(defun artisan-create-saloon-request (integration name)
+ "Create a new saloon connector.
+INTEGRATION is the related integration. NAME is the name of the saloon
+connector."
+ (interactive "MIntegration: \nMName: ")
+ (let ((default-directory (expand-file-name "chanced" (project-root (project-current)))))
+ (shell-command (format "docker exec chanced-backend php artisan saloon:request %s %s" (shell-quote-argument integration) (shell-quote-argument name)))
+ (let* ((root (project-root (project-current)))
+ (bad-file-name (expand-file-name (format "chanced/app/Http/Integrations/%s/Requests/%s.php" integration name) root))
+ (good-file-name (expand-file-name (format "common/app/Http/Integrations/%s/Requests/%s.php" integration name) root)))
+ (mkdir (file-name-directory good-file-name) t)
+ (rename-file bad-file-name good-file-name)
+ (find-file good-file-name))
+ (vc-register)))
+
+(defun artisan-create-settings-migration (name)
+ "Create a new saloon connector.
+INTEGRATION is the related integration. NAME is the name of the saloon
+connector."
+ (interactive "MName: ")
+ (let ((default-directory (expand-file-name "chanced" (project-root (project-current)))))
+ (shell-command (format "docker exec chanced-backend php artisan make:settings-migration %s ../common/database/settings/" (shell-quote-argument name)))))
+
(defun artisan-punt-composer-install ()
(interactive)
(let ((default-directory (expand-file-name "punt" (project-root (project-current)))))
@@ -140,6 +174,11 @@ buffers.")
(?p "punt" "Punt")
(?f "filament" "Filament")))))
+(require 'compile)
+
+(define-compilation-mode artisan-test-mode "Artisan Test"
+ "Major mode for PHP artisan test output.")
+
(cl-defun artisan-run-test (name &key file filter stop-on-failure-p)
(interactive
(let* ((refresh current-prefix-arg)
@@ -154,14 +193,14 @@ buffers.")
(buffer-name (format "*%s Tests*" (capitalize name)))
(buffer (get-buffer-create buffer-name))
(command (with-current-buffer buffer
- (format "../../chanced-scripts/test %s %s %s %s"
+ (format "../../chanced-scripts/test %s --random-order %s %s %s"
name
- (if filter (format "--filter='::%s$'" filter) "")
+ (if filter (format "--filter='::%s( |$)'" filter) "")
(if stop-on-failure-p "--stop-on-defect" "")
(or file "")))))
(cl-letf (((symbol-function 'compilation-buffer-name)
(lambda (&rest _) buffer-name)))
- (compile command))
+ (compilation-start command 'artisan-test-mode))
(with-current-buffer buffer
(setq artisan--test-last-state
(list :file file :filter filter :stop-on-failure-p stop-on-failure-p))
@@ -364,44 +403,9 @@ Optional argument STOPP means stop on any defect."
(find-file good-file-name)
(vc-register)))
-(require 'dashboard)
-(dashboard-setup-startup-hook)
-(run-with-idle-timer 300 t (lambda () (switch-to-buffer dashboard-buffer-name)))
-(run-at-time "02:00" 86400 #'dashboard-open)
-;;;
-(setq dashboard-navigator-buttons `(((,(propertize " " 'display `(image :type svg :file ,(expand-file-name "search.svg" oni-gui-icons-dir) :ascent center :margin (5 . 0))) "Conversations" "Open pull requests"
- (lambda (&rest _)
- (browse-url "https://github.com/pulls?q=commenter%3Atomw-punt+review%3Achanges_requested+is%3Aopen"))
- default "[" "]")
- (,(propertize " " 'display `(image :type svg :file ,(expand-file-name "search.svg" oni-gui-icons-dir) :ascent center :margin (5 . 0))) "PRs" "Open pull requests"
- (lambda (&rest _)
- (browse-url "https://github.com/pulls?q=is%3Aopen+is%3Apr+org%3Ajuked-social+draft%3Afalse+review%3Anone+-author%3Aapp%2Fdependabot+-base%3Adev+-base%3Amain+-base%3Achanced_dev"))
- default "[" "]"))
- ((,(propertize " " 'display `(image :type svg :file ,(expand-file-name "search.svg" oni-gui-icons-dir) :ascent center :margin (5 . 0))) "back-end" "Unmerged into back-end"
- (lambda (&rest _)
- (browse-url "https://github.com/juked-social/social-api/compare/main...staging"))
- default "[" "]")
- (,(propertize " " 'display `(image :type svg :file ,(expand-file-name "search.svg" oni-gui-icons-dir) :ascent center :margin (5 . 0))) "chanced" "Unmerged into chanced front-end"
- (lambda (&rest _)
- (browse-url "https://github.com/juked-social/chanced-frontend/compare/main...staging"))
- default "[" "]")
- (,(propertize " " 'display `(image :type svg :file ,(expand-file-name "search.svg" oni-gui-icons-dir) :ascent center :margin (5 . 0))) "punt" "Unmerged into punt front-end"
- (lambda (&rest _)
- (browse-url "https://github.com/juked-social/punt-frontend/compare/main...staging"))
- default "[" "]"))))
-(setq dashboard-startup-banner "~/code/personal/dotfiles/oni/home/services/emacs/pop-os-logo.svg")
-(setq dashboard-set-navigator t)
-(setq dashboard-set-footer nil)
-(setq dashboard-projects-show-base t)
-(setq dashboard-recentf-show-base t)
-
-(add-hook 'server-after-make-frame-hook #'dashboard-open)
-(add-hook 'dashboard-mode-hook 'olivetti-mode)
-(add-hook 'dashboard-after-initialize-hook (lambda () (setq truncate-lines t)))
-
-(setq browse-url-browser-function #'browse-url-firefox)
-(setq browse-url-generic-args '("run" "--branch=stable" "--arch=x86_64" "--command=launch-script.sh" "--file-forwarding" "app.zen_browser.zen"))
-(setq browse-url-generic-program "/usr/bin/flatpak")
+(setq browse-url-browser-function #'browse-url-generic)
+(setq browse-url-generic-args nil)
+(setq browse-url-generic-program "~/Downloads/glide/glide")
(defun oni-fixup-phpstan-filenames (errors)
"Change the file name from each error in ERRORS to one on local disk."
@@ -410,9 +414,7 @@ Optional argument STOPP means stop on any defect."
(setf (flycheck-error-filename e)
(expand-file-name
(replace-regexp-in-string (rx string-start "/app/")
- (if (string-match (rx "filament") default-directory)
- "filament/"
- "")
+ ""
(flycheck-error-filename e))
(project-root (project-current))))
e)
@@ -457,808 +459,6 @@ Optional argument STOPP means stop on any defect."
(sql-server "localhost")
(sql-port 5432))))
-(with-eval-after-load 'web-mode
- (defun web-mode-scan-blocks (reg-beg reg-end)
- "Identifies blocks (with block-side, block-beg, block-end text properties)."
- (save-excursion
-
- (let ((i 0) open close closing-string sub1 sub2 pos tagopen tmp delim-open delim-close part-beg part-end tagclose)
-
- (goto-char reg-beg)
-
- ;;(message "%S: %Sx%S" (point) reg-beg reg-end)
- ;;(message "regexp=%S" web-mode-block-regexp)
- (while (and (< i 2000)
- (> reg-end (point))
- web-mode-block-regexp
- (re-search-forward web-mode-block-regexp reg-end t)
- (not (eobp)))
-
- (setq i (1+ i)
- closing-string nil
- close nil
- tagopen (match-string 0)
- open (match-beginning 0)
- delim-open nil
- delim-close nil
- pos nil)
-
- (let ((l (length tagopen)))
- (when (member (string-to-char tagopen) '(?\s ?\t))
- (setq tagopen (replace-regexp-in-string "\\`[ \t]*" "" tagopen))
- (setq open (+ open (- l (length tagopen))))
- (setq l (length tagopen))
- )
- (setq sub1 (substring tagopen 0 1)
- sub2 (substring tagopen 0 (if (>= l 2) 2 1)))
- )
- ;;(message " found block #(%S) at pos=(%S), part-type=(%S)" i open (get-text-property open 'part-side))
- (cond
-
- ((string= web-mode-engine "php")
- (unless (member (char-after) '(?x ?X))
- (setq closing-string '("<\\?". "\\?>")))
- (cond
- ((looking-at-p "<?php")
- (setq delim-open "<?php")
- (setq delim-close "?>"))
- ((eq (char-after) ?\=)
- (setq delim-open "<?=")
- (setq delim-close "?>"))
- (t
- (setq delim-open "<?")
- (setq delim-close "?>"))
- ) ;cond
- ) ;php
-
- ((string= web-mode-engine "erb")
- (cond
- ((string= sub2 "<%")
- (setq closing-string '("<%". "%>")
- delim-open "<%\\(==\\|[=-]\\)?"
- delim-close "[-]?%>"))
- (t
- (setq closing-string "EOL"
- delim-open "%"))
- )
- ) ;erb
-
- ((string= web-mode-engine "django")
- (cond
- ((string= sub2 "{{")
- (setq closing-string "EODQ"
- ;;(setq closing-string '("{{" . "}}")
- delim-open "{{"
- delim-close "}}"))
- ((string= sub2 "{%")
- (setq closing-string "%}"
- delim-open "{%[+-]?"
- delim-close "[-]?%}"))
- ((string= sub2 "{#")
- (setq closing-string "#}"))
- (t
- (setq closing-string "EOL"
- delim-open "#[#]?"))
- )
- ) ;django
-
- ((string= web-mode-engine "anki")
- (setq closing-string "}}"
- delim-open "{{[#/^]?"
- delim-close "}}")
- ) ;anki
-
- ((string= web-mode-engine "ejs")
- (setq closing-string "%>"
- delim-open "<%[=-]?"
- delim-close "[-]?%>")
- ) ;ejs
-
- ((string= web-mode-engine "lsp")
- (setq closing-string "%>"
- delim-open "<%[%#]?"
- delim-close "%>")
- ) ;lsp
-
- ((string= web-mode-engine "mako")
- (cond
- ((and (string= tagopen "<%")
- (member (char-after) '(?\s ?\n ?\!)))
- (setq closing-string "%>"
- delim-open "<%[!]?"
- delim-close "%>"))
- ((member sub2 '("<%" "</"))
- (setq closing-string ">"
- delim-open "</?%"
- delim-close "/?>"))
- ((string= sub2 "${")
- (setq closing-string "}"
- delim-open "${"
- delim-close "}"))
- (t
- (setq closing-string "EOL"
- delim-open "%"))
- )
- ) ;mako
-
- ((string= web-mode-engine "cl-emb")
- (cond
- ((string= tagopen "<%#")
- (setq closing-string "#%>"))
- ((string= sub2 "<%")
- (setq closing-string "%>"
- delim-open "<%[=%]?"
- delim-close "%>"))
- )
- ) ;cl-emb
-
- ((string= web-mode-engine "artanis")
- (cond
- ((string= tagopen "<%;")
- (setq closing-string "%>"))
- ((string= tagopen "<%#|")
- (setq closing-string "|#%>"))
- ((string= sub2 "<@")
- (setq closing-string "%>"
- delim-open "<@\\(css\\|icon\\|include\\|js\\)"
- delim-close "%>"))
- ((string= sub2 "<%")
- (setq closing-string "%>"
- delim-open "<%[=]?"
- delim-close "%>"))
- )
- ) ;artanis
-
- ((string= web-mode-engine "elixir")
- (cond
- ((member (char-after) '(?\#))
- (setq closing-string "%>"))
- (t
- (setq closing-string "%>"
- delim-open "<%[=%]?"
- delim-close "%>"))
- )
- ) ;elixir
-
- ((string= web-mode-engine "mojolicious")
- (cond
- ((string= tagopen "<%#")
- (setq closing-string "%>"))
- ((string= sub2 "<%")
- (setq closing-string "%>"
- delim-open "<%\\(==\\|[=%]\\)?"
- delim-close "%>"))
- ((string= sub2 "%#")
- (setq closing-string "EOL"))
- (t
- (setq closing-string "EOL"
- delim-open "%\\(==\\|[=%]\\)?"))
- )
- ) ;mojolicious
-
- ((string= web-mode-engine "ctemplate")
- (cond
- ((member tagopen '("{{{" "{{~"))
- (setq closing-string "}~?}}"
- delim-open "{{~?{"
- delim-close "}~?}}")
- )
- ((string= tagopen "{~{")
- (setq closing-string "}~?}"
- delim-open "{~{"
- delim-close "}~?}")
- )
- ((string= tagopen "{{!")
- (setq closing-string (if (looking-at-p "--") "--}}" "}}"))
- )
- ((string= sub2 "{{")
- (setq closing-string "}~?}"
- delim-open "{{[>#/%^&]?"
- delim-close "}~?}"))
- (t
- (setq closing-string "}}"
- delim-open "${{"
- delim-close "}}"))
- )
- ) ;ctemplate
-
- ((string= web-mode-engine "antlers")
- (cond
- ((string= tagopen "{{$")
- (setq closing-string "$}}"
- delim-open "{{$"
- delim-close "$}}")
- )
- ((string= tagopen "{{?")
- (setq closing-string "?}}"
- delim-open "{{?"
- delim-close "?}}")
- )
- ((string= tagopen "{{$")
- (setq closing-string "$}}"
- delim-open "{{$"
- delim-close "$}}")
- )
- ((string= sub2 "{{")
- (setq closing-string "}}"
- delim-open "{{"
- delim-close "}}"))
- )
- ) ;antlers
-
- ((string= web-mode-engine "astro")
- (cond
- ((string= tagopen "---")
- (setq closing-string "---"
- delim-open "---"
- delim-close "---")
- )
- )
- ) ;astro
-
- ((string= web-mode-engine "aspx")
- (setq closing-string "%>"
- delim-open "<%[:=#@$]?"
- delim-close "%>")
- ) ;aspx
-
- ((string= web-mode-engine "asp")
- (cond
- ((string= sub2 "<%")
- (setq closing-string "%>"
- delim-open "<%[:=#@$]?"
- delim-close "%>"))
- (t
- (setq closing-string ">"
- delim-open "</?"
- delim-close "/?>"))
- )
- ) ;asp
-
- ((string= web-mode-engine "jsp")
- (cond
- ((looking-at-p "--")
- (setq closing-string "--%>"))
- ((string= sub2 "<%")
- (setq closing-string "%>"
- delim-open "<%\\([!=@]\\|#=\\)?"
- delim-close "[-]?%>"))
- ((string= sub2 "${")
- (setq closing-string "}"
- delim-open "${"
- delim-close "}"))
- )
- ) ;jsp
-
- ((string= web-mode-engine "clip")
- (setq closing-string ">"
- delim-open "</?"
- delim-close "/?>")
- ) ;clip
-
- ((string= web-mode-engine "perl")
- (setq closing-string ">"
- delim-open "</?"
- delim-close "/?>")
- ) ;perl
-
- ((string= web-mode-engine "blade")
- (cond
- ((string= tagopen "{{-")
- (setq closing-string "--}}"))
- ((string= tagopen "{!!")
- (setq closing-string "!!}"
- delim-open "{!!"
- delim-close "!!}"))
- ((string= tagopen "@{{")
- (setq closing-string nil))
- ((string= tagopen "{{{")
- (setq closing-string "}}}"
- delim-open "{{{"
- delim-close "}}}"))
- ((string= sub2 "{{")
- (setq closing-string "}}"
- delim-open "{{"
- delim-close "}}"))
- ((looking-at-p "[[:alnum:]]+\\.[[:alpha:]]+")
- )
- ((string= sub1 "@")
- (setq closing-string "EOB"
- delim-open "@"))
- ((looking-at-p "[[:alnum:]]+(")
- (setq closing-string ")"
- delim-open "@"))
- )
- ;;(message "closing-string=%S delim-open=%S delim-close=%S" closing-string delim-open delim-close)
- ) ;blade
-
- ((string= web-mode-engine "smarty")
- (cond
- ((string= tagopen "{*")
- (setq closing-string "*}")
- )
- ((string= tagopen "{#")
- (setq closing-string "#}"
- delim-open "{#"
- delim-close "#}")
- )
- (t
- (setq closing-string (cons "{" "}")
- delim-open "{/?"
- delim-close "}")
- ) ;t
- ) ;cond
- ) ;smarty
-
- ((string= web-mode-engine "hero")
- (setq closing-string "%>"
- delim-open "<%==?\\([biufsv]\\|bs\\)?\\|<%[:~@+!]?"
- delim-close "%>")
- ) ;hero
-
- ((string= web-mode-engine "xoops")
- (cond
- ((string= tagopen "<{*")
- (setq closing-string "*}>")
- )
- ((string= tagopen "<{#")
- (setq closing-string "#}>"
- delim-open "<{#"
- delim-close "#}>")
- )
- (t
- (setq closing-string (cons "<{" "}>")
- delim-open "<{/?"
- delim-close "}>")
- ) ;t
- ) ;cond
- ) ;xoops
-
- ((string= web-mode-engine "web2py")
- (setq closing-string "}}"
- delim-open "{{[=]?"
- delim-close "}}")
- ) ;web2py
-
- ((string= web-mode-engine "expressionengine")
- (cond
- ((string= sub2 "{!--")
- (setq closing-string "--}"))
- (t
- (setq closing-string '("{". "}")
- delim-open "{/?"
- delim-close "}")
- )
- )
- ) ;expressionengine
-
- ((string= web-mode-engine "dust")
- (cond
- ((string= sub2 "{!")
- (setq closing-string "!}"))
- (t
- (setq closing-string '("{". "}")
- delim-open "{[#/:?@><+^]?"
- delim-close "/?}")
- )
- )
- ) ;dust
-
- ((string= web-mode-engine "svelte")
- (cond
- ((string= sub2 "{!")
- (setq closing-string "!}"))
- ((string= sub2 "{}")
- (setq closing-string nil
- delim-open nil
- delim-close nil))
- (t
- (setq closing-string '("{". "}")
- delim-open "{[#/:?@><+^]?"
- delim-close "/?}")
- )
- )
- ) ;svelte
-
- ((string= web-mode-engine "closure")
- (cond
- ((string= sub2 "//")
- (setq closing-string "EOL")
- )
- ((string= sub2 "/*")
- (setq closing-string "*/")
- )
- (t
- (setq closing-string "}"
- delim-open "{/?"
- delim-close "/?}")
- )
- )
- ) ;closure
-
- ((string= web-mode-engine "go")
- (setq closing-string "}}"
- delim-open "{{-?"
- delim-close "-?}}")
- ) ;go
-
- ((string= web-mode-engine "angular")
- (setq closing-string "}}"
- delim-open "{{"
- delim-close "}}")
- ) ;angular
-
- ((string= web-mode-engine "vue")
- (cond
- ((string-match-p "[:@][-[:alpha:].]+=\"" tagopen)
- (setq closing-string "\""
- delim-open tagopen
- delim-close "\""))
- ((string= tagopen "{{")
- (setq closing-string "}}"
- delim-open "{{"
- delim-close "}}")))
- ) ;vue
-
- ((string= web-mode-engine "mason")
- (cond
- ((and (member sub2 '("<%" "</"))
- (looking-at "[[:alpha:]]+"))
- (if (member (match-string-no-properties 0) '("after" "around" "augment" "before" "def" "filter" "method" "override"))
- (setq closing-string ">"
- delim-open "<[/]?%"
- delim-close ">")
- (setq closing-string (concat "</%" (match-string-no-properties 0) ">")
- delim-open "<[^>]+>"
- delim-close "<[^>]+>")
- ) ;if
- )
- ((and (string= sub2 "<%")
- (eq (char-after) ?\s))
- (setq closing-string "%>"
- delim-open "<%"
- delim-close "%>"))
- ((string= tagopen "</&")
- (setq closing-string ">"
- delim-open "</&"
- delim-close ">")
- )
- ((string= sub2 "<&")
- (setq closing-string "&>"
- delim-open "<&[|]?"
- delim-close "&>"))
- (t
- (setq closing-string "EOL"
- delim-open "%"))
- )
- ) ;mason
-
- ((string= web-mode-engine "underscore")
- (setq closing-string "%>"
- delim-open "<%"
- delim-close "%>")
- ) ;underscore
-
- ((string= web-mode-engine "template-toolkit")
- (cond
- ((string= tagopen "%%#")
- (setq closing-string "EOL"))
- ((string= tagopen "[%#")
- (setq closing-string "%]"))
- (t
- (setq closing-string "%]"
- delim-open "\\[%[-+]?"
- delim-close "[-=+]?%\\]"))
- )
- ) ;template-toolkit
-
- ((string= web-mode-engine "freemarker")
- (cond
- ((and (string= sub2 "<#") (eq (char-after) ?\-))
- (setq closing-string "-->"))
- ((string= sub1 "<")
- (setq closing-string ">"
- delim-open "</?[#@]"
- delim-close "/?>"))
- ((string= sub1 "[")
- (setq closing-string "]"
- delim-open "\\[/?[#@]"
- delim-close "/?\\]"))
- (t
- (setq closing-string "}"
- delim-open "${"
- delim-close "}"))
- )
- ) ;freemarker
-
- ((string= web-mode-engine "velocity")
- (cond
- ((string= sub2 "##")
- (setq closing-string "EOL"))
- ((string= sub2 "#*")
- (setq closing-string "*#"))
- (t
- (setq closing-string "EOV"
- delim-open "#"))
- )
- ) ;velocity
-
- ((string= web-mode-engine "razor")
- (cond
- ((string= sub2 "@@")
- (forward-char 2)
- (setq closing-string nil))
- ((string= sub2 "@*")
- (setq closing-string "*@"))
- ((string= sub1 "@")
- (setq closing-string "EOR"
- delim-open "@"))
- ((and (string= sub1 "}")
- (looking-at-p "[ ]*\n"))
- ;;(setq closing-string "EOC")
- (save-excursion
- (let (paren-pos)
- (setq paren-pos (web-mode-part-opening-paren-position (1- (point))))
- (if (and paren-pos (get-text-property paren-pos 'block-side))
- (setq closing-string "EOC")
- (setq closing-string nil)
- ) ;if
- ) ;let
- ) ;save-excursion
- ;;(message "%s %S %S" sub2 (point) (get-text-property (point) 'part-side))
- )
- ((string= sub1 "}")
- ;;(message "%s: %s" (point) sub1)
- (save-excursion
- (let (paren-pos)
- (setq paren-pos (web-mode-part-opening-paren-position (1- (point))))
- (if (and paren-pos (get-text-property paren-pos 'block-side))
- (setq closing-string "EOR")
- (setq closing-string nil)
- ) ;if
- ) ;let
- ) ;save-excursion
- ) ;case }
- ) ;cond
- ) ;razor
-
- ((and (string= web-mode-engine "riot")
- (not (get-text-property open 'part-side)))
- (setq closing-string (if (string= tagopen "{") "}" "/// end script")
- delim-open "{"
- delim-close "}")
- ) ;riot
-
- ((string= web-mode-engine "spip")
- (cond
- ((and (string= sub1 "#")
- (looking-at "[A-Z0-9_]+"))
- (setq closing-string (match-string-no-properties 0)))
- ((string= sub1 "(")
- (setq closing-string '("(" . ")")))
- ((string= sub1 "{")
- (setq closing-string '("{" . "}")))
- ((string= sub2 "<:")
- (setq closing-string ":>"))
- (t
- (setq closing-string "]"))
- ))
-
- ((string= web-mode-engine "marko")
- (setq closing-string "}"
- delim-open "${"
- delim-close "}")
- ) ;marko
-
- ) ;cond
-
- (when closing-string
- (cond
-
- ((listp closing-string)
- (cond
- ((web-mode-rsf-balanced (car closing-string) (cdr closing-string) reg-end t)
- (setq close (match-end 0)
- pos (point))
- )
- ((and (string= web-mode-engine "php")
- (string= "<?" sub2))
-
- (if (or (text-property-not-all (1+ open) (point-max) 'tag-beg nil)
- (text-property-not-all (1+ open) (point-max) 'block-beg nil)
- (looking-at-p "[ \t\n]*<"))
- (setq close nil
- delim-close nil
- pos (point))
- (setq close (point-max)
- delim-close nil
- pos (point-max))
- ) ;if
- ) ;case
- ) ;cond
- ) ;case listp
-
- ((and (string= web-mode-engine "smarty")
- (string= closing-string "}"))
- (goto-char open)
- (setq tmp (web-mode-closing-delimiter-position
- "}"
- (point)
- (line-end-position)))
- (if tmp
- (setq tmp (1+ tmp))
- (setq tmp (line-end-position)))
- (goto-char tmp)
- (setq close (point)
- pos (point))
- )
-
- ((and (member web-mode-engine '("closure"))
- (string= closing-string "}"))
- (when (web-mode-closure-skip reg-beg reg-end)
- (setq close (point)
- pos (point))
- ;;(message "close=%S pos=%S" close pos)
- ) ;when
- )
-
- ((string= closing-string "EOB")
- (web-mode-blade-skip open)
- (setq close (point)
- pos (point)))
-
- ((string= closing-string "EOL")
- (end-of-line)
- (setq close (point)
- pos (point)))
-
- ((string= closing-string "EOC")
- (setq close (point)
- pos (point)))
-
- ((string= closing-string "EODQ")
- (when (web-mode-django-skip reg-beg reg-end)
- (setq close (point)
- pos (point))
- ))
-
- ((string= closing-string "EOR")
- (web-mode-razor-skip open)
- (setq close (if (> (point) reg-end) reg-end (point))
- pos (if (> (point) reg-end) reg-end (point)))
- (goto-char pos))
-
- ((string= closing-string "EOV")
- (web-mode-velocity-skip open)
- (setq close (point)
- pos (point)))
-
- ((and (member web-mode-engine '("ctemplate"))
- (re-search-forward closing-string reg-end t))
- (setq close (match-end 0)
- pos (point)))
-
- ((and (member web-mode-engine '("antlers"))
- (re-search-forward closing-string reg-end t))
- (setq close (match-end 0)
- pos (point)))
-
- ((and (member web-mode-engine '("astro"))
- (re-search-forward closing-string reg-end t))
- (setq close (match-end 0)
- pos (point)))
-
- ((search-forward closing-string reg-end t)
- (setq close (match-end 0)
- pos (point)))
- ) ;cond
-
- (when (and close (>= reg-end pos))
- ;;(message "pos(%S) : open(%S) close(%S)" pos open close)
- (put-text-property open (1+ open) 'block-beg 0)
- (put-text-property open (1+ open) 'block-controls 0)
- (put-text-property open close 'block-side t)
- (put-text-property (1- close) close 'block-end t)
- (when delim-open
- (web-mode-block-delimiters-set open close delim-open delim-close))
- (web-mode-block-scan open close)
- (cond
- ((and (string= web-mode-engine "erb")
- (looking-at-p "<%= javascript_tag do %>"))
- (setq tagopen "<%= javascript_tag do %>"))
- ((and (string= web-mode-engine "mojolicious")
- (looking-at-p "%= javascript begin"))
- (setq tagopen "%= javascript begin"))
- ((and (string= web-mode-engine "mako")
- (looking-at-p "<%block filter=\"collect_js\">"))
- (setq tagopen "<%block filter=\"collect_js\">"))
- ((and (string= web-mode-engine "mako")
- (looking-at-p "<%block filter=\"collect_css\">"))
- (setq tagopen "<%block filter=\"collect_css\">"))
- ((and (string= web-mode-engine "django")
- (looking-at-p "{% javascript %}"))
- (setq tagopen "{% javascript %}"))
- ((and (string= web-mode-engine "django")
- (looking-at-p "{% schema %}"))
- (setq tagopen "{% schema %}"))
- ((and (string= web-mode-engine "django")
- (looking-at-p "{% stylesheet %}"))
- (setq tagopen "{% stylesheet %}"))
- )
- ;;(message "%S %s" (point) tagopen)
- (when (and (member tagopen '("<r:script" "<r:style"
- "<c:js" "<c:css"
- "<%= javascript_tag do %>"
- "<%block filter=\"collect_js\">"
- "<%block filter=\"collect_css\">"
- "{% javascript %}"
- "{% schema %}"
- "{% stylesheet %}"
- "%= javascript begin"
- "---"))
- (setq part-beg close)
- (setq tagclose
- (cond
- ((string= tagopen "<r:script") "</r:script")
- ((string= tagopen "<r:style") "</r:style")
- ((string= tagopen "<c:js") "</c:js")
- ((string= tagopen "<c:css") "</c:css")
- ((string= tagopen "{% javascript %}") "{% endjavascript %}")
- ((string= tagopen "{% schema %}") "{% endschema %}")
- ((string= tagopen "{% stylesheet %}") "{% endstylesheet %}")
- ((string= tagopen "%= javascript begin") "% end")
- ((string= tagopen "---") "---")
- ((string= tagopen "<%= javascript_tag do %>") "<% end %>")
- ((member tagopen '("<%block filter=\"collect_js\">"
- "<%block filter=\"collect_css\">")) "</%block")
- ))
- (web-mode-sf tagclose)
- (setq part-end (match-beginning 0))
- (> part-end part-beg))
- ;;(message "tagopen=%S tagclose=%S end=%S" tagopen tagclose (point))
- (put-text-property part-beg part-end
- 'part-side
- (cond
- ((member tagopen '("<r:style" "<c:css" "<%block filter=\"collect_css\">" "{% stylesheet %}")) 'css)
- (t 'javascript)))
- (setq pos part-beg
- part-beg nil
- part-end nil)
- ) ;when
- ) ;when close
-
- (if pos (goto-char pos))
-
- ) ;when closing-string
-
- ) ;while
-
- (cond
- ((>= i 2000)
- (message "scan-blocks ** warning (%S) **" i))
- ((string= web-mode-engine "razor")
- (web-mode-block-foreach reg-beg reg-end 'web-mode-block-scan))
- ((string= web-mode-engine "django")
- (web-mode-scan-engine-comments reg-beg reg-end
- "{% comment %}" "{% endcomment %}"))
- ((string= web-mode-engine "mako")
- (web-mode-scan-engine-comments reg-beg reg-end
- "<%doc>" "</%doc>"))
- ((string= web-mode-engine "mason")
- (web-mode-scan-engine-comments reg-beg reg-end
- "<%doc>" "</%doc>"))
- ) ;cond
-
- )))
-
- (setf (map-elt web-mode-engine-open-delimiter-regexps "vue")
- "{{\\|[:@][-[:alpha:].]+=\""))
-
-(require 'oni-js)
-
-(with-eval-after-load 'sh-script
- (require 'oni-sh))
-
(eval-when-compile
(require 'magit-section))
@@ -1282,7 +482,10 @@ Optional argument STOPP means stop on any defect."
(with-eval-after-load 'elfeed
(setq elfeed-feeds
'(("https://www.reddit.com/r/PHP/.rss" php)
- ("https://phpreads.com/feed" php))))
+ ("https://phpreads.com/feed" php)
+ ("https://phpstan.org/rss.xml" php)
+ ("https://lobste.rs/t/php.rss" php))
+ elfeed-curl-program-name "curl"))
(setq git-messenger:show-detail t)
(global-set-key (kbd "C-c g .") '("Show commit at point" . git-messenger:popup-message))
@@ -1302,3 +505,47 @@ Optional argument STOPP means stop on any defect."
(org-mem-entries-in file))
collect file)))
(add-hook 'org-mem-post-full-scan-functions #'my-set-agenda-files)
+
+;;; Prodigy services
+
+(with-eval-after-load 'prodigy
+ (prodigy-define-tag
+ :name 'tunnel
+ :command "~/code/diamond-interactive/social-api/toolbox/connect_db.sh"
+ :args (lambda (&rest args)
+ (let ((service (map-elt args :service)))
+ (list "-e"
+ (if (prodigy-service-tagged-with? service 'production)
+ "prd"
+ "stg")
+ "-a"
+ (cond
+ ((prodigy-service-tagged-with? service 'chanced)
+ "chanced")
+ ((prodigy-service-tagged-with? service 'punt)
+ "punt")
+ (t (error "Unknown project")))
+ "-k"
+ (expand-file-name "~/.ssh/id_ed25519.pub"))))
+ :cwd "~/code/diamond-interactive/social-api"
+ :stop-signal 'kill
+ :ready-message "Waiting for connections...")
+
+ (prodigy-define-service
+ :name "Chanced Production Database Connection"
+ :tags '(chanced production tunnel))
+
+ (prodigy-define-service
+ :name "Chanced Staging Database Connection"
+ :tags '(chanced staging tunnel))
+
+ (prodigy-define-service
+ :name "Punt Production Database Connection"
+ :tags '(punt production tunnel))
+
+ (prodigy-define-service
+ :name "Punt Staging Database Connection"
+ :tags '(punt staging tunnel)))
+
+(autoload 'vue-ts-mode "vue-ts-mode" nil t)
+(add-to-list 'auto-mode-alist (cons (rx ".vue" eos) 'vue-ts-mode))
diff --git a/oni/home/config/rincewind.scm b/oni/home/config/rincewind.scm
index d9da737..357bafa 100644
--- a/oni/home/config/rincewind.scm
+++ b/oni/home/config/rincewind.scm
@@ -63,8 +63,6 @@
#:use-module ((nongnu packages emacs)
#:select (emacs-org-roam-ui))
#:use-module (oni home config common)
- #:use-module ((oni home services autokey)
- #:select (home-autokey-service-type))
#:use-module ((oni home services copyq)
#:select (home-copyq-service-type))
#:use-module ((oni home services dunst)
@@ -113,6 +111,7 @@
home-stumpwm-stumptray-configuration))
#:use-module ((oni home services syncthing)
#:select (home-syncthing-service-type))
+ #:use-module (oni home services terminals)
#:use-module ((oni home services utilities)
#:select (home-inkplate-display-service-type))
#:use-module ((oni home services zsh)
@@ -251,8 +250,7 @@
(packages (append
foreign-distro-compatibility-packages
archlinux-compatibility-packages
- (list easytag
- (specification->package+output "font-fantasque-sans")
+ (list (specification->package+output "font-fantasque-sans")
(specification->package+output "font-comic-neue")
(specification->package+output "font-dosis")
(specification->package "zathura")
@@ -473,6 +471,7 @@
(service home-stumpwm-service-type
(home-stumpwm-configuration
(package stumpwm+swank)
+ (locker-program "/usr")
(configurations
(list (local-file "../services/stumpwm/stumpwm.lisp")))))
(service home-stumpwm-gaps-service-type
@@ -495,7 +494,6 @@
(new-ignore '(".nnmaildir" ".mbsyncstate" ".uidvalidity"
".mbsyncstate.journal" ".mbsyncstate.new"))))
- (service home-autokey-service-type)
(service home-copyq-service-type)
(service home-msmtp-service-type
@@ -571,4 +569,9 @@
("sidebar.visibility" "hide-sidebar")
("ui.key.menuAccessKeyFocuses" #f)))))
- (service home-udiskie-service-type)))))
+ (service home-udiskie-service-type)
+
+ (service home-wezterm-service-type
+ (home-wezterm-configuration
+ (configurations
+ (list (local-file "../../../wezterm/.config/wezterm/wezterm.lua")))))))))