initial commit

This commit is contained in:
Joe Bellus 2024-04-23 18:00:39 -04:00
commit a93f02cb4e
30 changed files with 2646 additions and 0 deletions

20
desktop.nix Normal file
View File

@ -0,0 +1,20 @@
{ config, lib, pkgs, ... }:
{
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# Configure keymap in X11
services.xserver = {
xkb.layout = "us";
xkb.variant = "";
};
services.xserver.libinput.enable = true;
programs.hyprland.enable = true;
}

75
dotfiles/alacritty.toml Normal file
View File

@ -0,0 +1,75 @@
[colors.primary]
background = "#303446"
foreground = "#C6D0F5"
dim_foreground = "#C6D0F5"
bright_foreground = "#C6D0F5"
[colors.cursor]
text = "#303446"
cursor = "#F2D5CF"
[colors.vi_mode_cursor]
text = "#303446"
cursor = "#BABBF1"
[colors.search.matches]
foreground = "#303446"
background = "#A5ADCE"
[colors.search.focused_match]
foreground = "#303446"
background = "#A6D189"
[colors.footer_bar]
foreground = "#303446"
background = "#A5ADCE"
[colors.hints.start]
foreground = "#303446"
background = "#E5C890"
[colors.hints.end]
foreground = "#303446"
background = "#A5ADCE"
[colors.selection]
text = "#303446"
background = "#F2D5CF"
[colors.normal]
black = "#51576D"
red = "#E78284"
green = "#A6D189"
yellow = "#E5C890"
blue = "#8CAAEE"
magenta = "#F4B8E4"
cyan = "#81C8BE"
white = "#B5BFE2"
[colors.bright]
black = "#626880"
red = "#E78284"
green = "#A6D189"
yellow = "#E5C890"
blue = "#8CAAEE"
magenta = "#F4B8E4"
cyan = "#81C8BE"
white = "#A5ADCE"
[colors.dim]
black = "#51576D"
red = "#E78284"
green = "#A6D189"
yellow = "#E5C890"
blue = "#8CAAEE"
magenta = "#F4B8E4"
cyan = "#81C8BE"
white = "#B5BFE2"
[[colors.indexed_colors]]
index = 16
color = "#EF9F76"
[[colors.indexed_colors]]
index = 17
color = "#F2D5CF"

305
dotfiles/emacs/config.el Normal file
View File

@ -0,0 +1,305 @@
(setq user-full-name "Joe Bellus"
user-mail-address "joe@5sigma.io")
(setq doom-font (font-spec :family "JetBrains Mono" :size 16 :weight 'semi-bold)
doom-variable-pitch-font (font-spec :family "Iosevka" :size 16 :weight 'light)
doom-big-font (font-spec :family "Iosevka" :size 22. :weight 'semi-bold)
doom-themes-enable-bold t
doom-themes-enable-italic t)
(setq doom-theme 'doom-palenight)
;; (after! doom-themes
;; (load-theme 'doom-nano-light t))
;; (use-package! doom-nano-modeline
;; :config
;; (doom-nano-modeline-mode 1)
;; (global-hide-mode-line-mode nil))
(set-frame-parameter (selected-frame) 'alpha '(95 95))
(add-to-list 'default-frame-alist '(alpha 95 95))
(add-to-list 'load-path "~/.config/doom/el")
(setq +doom-dashboard-menu-sections '
(
("Recently opened files" :icon
(nerd-icons-faicon "nf-fa-file_text" :face 'doom-dashboard-menu-title)
:action recentf-open-files)
("Open org-agenda"
:icon (nerd-icons-octicon "nf-oct-calendar" :face 'doom-dashboard-menu-title)
:when (fboundp 'org-agenda)
:action org-agenda)
("Open Notes"
:icon (nerd-icons-faicon "nf-fa-file_text" :face 'doom-dashboard-menu-title)
:action +default/browse-notes)
))
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-shortmenu)
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-banner)
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-footer)
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-loaded)
(setq +doom-dashboard-banner-padding '(1 . 1))
(add-hook! '+doom-dashboard-functions :append 'doom-dashboard-widget-shortmenu)
(add-hook! '+doom-dashboard-functions :append 'doom-dashboard-widget-loaded)
(setq display-line-numbers-type t)
(setq confirm-kill-emacs nil)
(require 'org)
(setq org-ellipsis ""
org-hide-emphasis-markers t
org-src-fontify-natively t
org-fontify-quote-and-verse-blocks t
org-src-tab-acts-natively t
org-hide-block-startup nil
org-startup-folded 'content
org-cycle-separator-lines 2
org-directory "~/org/"
org-agenda-files '("~/org/" "~/org/agenda/" "~/org/agenda/projects/")
)
(setq-default prettify-symbols-alist '(("#+BEGIN_SRC" . "")
("#+END_SRC" . "")
("#+begin_src" . "")
("#+end_src" . "")))
(setq prettify-symbols-unprettify-at-point 'right-edge)
(defun org-setup ()
(setq-local display-line-numbers nil))
(add-hook 'org-mode-hook 'org-setup)
(setq visual-fill-column-width 110
visual-fill-column-center-text t)
(defun my/org-present-start ()
(visual-fill-column-mode 1)
(setq header-line-format " ")
(visual-line-mode 1)
(hide-mode-line-mode)
(setq-local
hl-line-mode nil)
(setq-local face-remapping-alist
'((default (:height 1.5) variable-pitch)
(header-line (:height 4.0) variable-pitch)
(org-document-title (:height 1.75) org-document-title)
(org-code (:height 1.55) org-code)
(org-verbatim (:height 1.55) org-verbatim)
(org-block (:height 1.25) org-block)
(org-block-begin-line (:height 0.7) org-block)))
)
(defun my/org-present-end ()
(visual-fill-column-mode 0)
(hide-mode-line-mode)
(visual-line-mode 0)
(setq header-line-format nil)
(setq-local face-remapping-alist nil
hl-line-mode t))
(add-hook 'org-present-mode-hook 'my/org-present-start)
(add-hook 'org-present-mode-quit-hook 'my/org-present-end)
(dolist
(face '((org-level-1 . 1.2)
(org-level-2 . 1.1)
(org-level-3 . 1.05)
(org-level-4 . 1.0)
(org-level-5 . 1.0)
(org-level-6 . 1.0)
(org-level-7 . 1.0)
(org-level-8 . 1.0)))
(set-face-attribute (car face) nil
:font "Iosevka"
:weight 'medium
:height (cdr face)))
(set-face-attribute 'org-document-title nil :font "Iosevka" :weight 'bold :height 1.3)
(set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch)
(set-face-attribute 'org-table nil :inherit 'fixed-pitch)
(set-face-attribute 'org-formula nil :inherit 'fixed-pitch)
(set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch)
(set-face-attribute 'bold nil :foreground "#c678dd" :weight 'extrabold)
(use-package org-bullets
:after org
:hook (org-mode . org-bullets-mode)
:custom
(org-bullets-bullet-list '("" "" "" "" "" "" "" "")))
(setq +org-capture-todo-file "agenda/tasks.org")
(setq +org-capture-notes-file "notes/personal/index.org")
(setq org-capture-templates
'(
("n" "Notes")
("nq" "Quikerve notes" entry
(file+headline "notes/quikserve/index.org" "Inbox")
"* %u %?\n%i\n%a" :prepend t)
("np" "Personal notes" entry
(file+headline +org-capture-notes-file "Inbox")
"* %u %?\n%i\n%a" :prepend t)
("t" "Tasks")
("tp" "Personal todo" entry
(file+headline +org-capture-todo-file "Inbox")
"* TODO %?\n%i\n%a" :prepend t)
("tq" "Quikserve todo" entry
(file+headline "agenda/quikserve.org" "Inbox")
"* TODO %?\n%i\n%a" :prepend t)
("j" "Journal")
("jp" "Personal journal" entry
(file+olp+datetree "journal/personal.org")
"* %U %?\n%i\n%a" :prepend t)
("jq" "Quikserve journal" entry
(file+olp+datetree "journal/quikserve.org")
"* %U %?\n%i\n%a" :prepend t)
("p" "Templates for projects")
("pt" "Project TODO" entry (file+headline project-agenda-file "Inbox")
"* TODO %?\n%i\n%a" :prepend t)
("pn" "Project notes" entry (file+headline project-notes-file "Quicknotes")
"* %U %?\n%i\n%a" :prepend t)
("pc" "Project-local changelog" entry
(file+headline +org-capture-project-changelog-file "Unreleased")
"* %U %?\n%i" :prepend t)))
(defun project-agenda-file ()
(expand-file-name (concat "agenda/projects/" (project-name (project-current)) ".org") org-directory))
(defun project-notes-file ()
(expand-file-name (concat "notes/projects/" (project-name (project-current)) ".org") org-directory))
(setq org-agenda-todo-ignore-scheduled 'future)
(setq org-agenda-todo-ignore-with-date t)
(setq org-agenda-tags-todo-honor-ignore-options t)
(setq org-agenda-skip-deadline-prewarning-if-scheduled 'pre-scheduled)
(setq org-export-with-author t)
(setq org-export-with-date t)
(setq org-export-with-toc t)
(setq org-export-with-section-numbers nil)
(setq org-latex-toc-command "\\tableofcontents \\clearpage")
(setq org-latex-tables-centered nil)
(setq org-latex-tables-booktabs nil)
(setq org-latex-default-class "document")
(add-to-list 'org-latex-packages-alist '("" "listings"))
(add-to-list 'org-latex-packages-alist '("" "color"))
(with-eval-after-load 'ox-latex
(add-to-list 'org-latex-classes
'("quikserve"
"
\\documentclass{article}
[DEFAULT-PACKAGES]
\\include{/home/joe/org/assets/quikserve.tex}
[EXTRA]
"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
)
)
(set-email-account! "fivesigma"
'((mu4e-sent-folder . "/fivesigma/Sent")
(mu4e-drafts-folder . "/fivesigma/Drafts")
(mu4e-trash-folder . "/fivesigma/Trash")
(mu4e-refile-folder . "/fivesigm e/Archive")
(smtpmail-smtp-user . "joe@5sigma.io")
(mu4e-compose-signature . "\n\n\nThanks,\nJoe Bellus\n\n"))
)
(after! mu4e
(setq mu4e-update-interval 120)
(setq sendmail-program (executable-find "msmtp")
send-mail-function #'smtpmail-send-it
smtpmail-stream-type 'starttls
message-sendmail-f-is-evil t
message-sendmail-extra-arguments '("--read-envelope-from")
message-send-mail-function #'message-send-mail-with-sendmail))
(setq mu4e-bookmarks
'(
(:name "Inbox" :query "maildir:/fivesigma/Inbox" :key ?i)
(:name "Today's messages" :query "date:today..now" :key ?t)
(:name "Last 7 days" :query "date:7d..now" :hide-unread t :key ?r)
("flag:flagged" "Flagged messages" ?f)))
(setq mu4e-hide-index-messages t)
(setq mu4e-html2text-command 'mu4e-shr2text)
(setq shr-color-visible-luminance-min 60)
(setq shr-color-visible-distance-min 5)
(setq shr-use-colors nil)
(setq mu4e-get-mail-command "true")
(setq lsp-auto-execute-action nil)
(defun kb/show-clocktable ()
(interactive)
(get-buffer-create "clocktable")
(with-current-buffer "clocktable"
(org-mode)
(erase-buffer)
(setq-local org-link-descriptive (not org-link-descriptive))
(insert (org-clock-get-clocktable :scope 'agenda :fileskip0 t :stepskip0 t :link t))
)
(switch-to-buffer "clocktable")
)
(map! :leader
:desc "Show clocktable"
"o C" #'kb/show-clocktable)
(setq tramp-default-method "ssh")
(load "conduct.el" t t)
(map! :leader
:desc "Conduct"
"o c")
(map! :leader
:desc "Conduct run"
"o c r" #'conduct-run)
(map! :leader
:desc "Conduct kill"
"o c k" #'conduct-kill)
(map! :leader
:desc "Conduct show"
"o c b" #'conduct-show)
(map! :leader
:desc "Project terminal"
"p v" #'projectile-run-vterm-other-window)
(map! :leader "p F" nil)
(map! :leader "p g" nil)
(map! :leader "p t" nil)
(map! :leader "p C" nil)
(map! :leader "p c" nil)
(map! :leader "p s" nil)
(map! :leader "f c" (lambda () (interactive) (doom-project-browse "~/.config/nix/")))
(map! :leader "c X" #'flymake-show-project-diagnostics)
(direnv-mode)
(setq direnv-always-show-summary nil)
;;(use-package lsp-mode
;; :commands lsp
;; :ensure t
;; :diminish lsp-mode
;; :hook
;; (elixir-mode . lsp)
;; :init
;; (setq lsp-elixir-suggest-specs nil)
;; (add-to-list 'auto-mode-alist '("\\.heex\\'" . elixir-mode))
;; (add-to-list 'exec-path "~/.local/share/elixir-ls"))

403
dotfiles/emacs/config.org Normal file
View File

@ -0,0 +1,403 @@
#+PROPERTY: header-args :tangle config.el
* My Info
Basic info for some templates
#+begin_src elisp
(setq user-full-name "Joe Bellus"
user-mail-address "joe@5sigma.io")
#+end_src
* Appearance
** Fonts
Setup default fonts and faces.
#+begin_src elisp
(setq doom-font (font-spec :family "JetBrains Mono" :size 16 :weight 'semi-bold)
doom-variable-pitch-font (font-spec :family "Iosevka" :size 16 :weight 'light)
doom-big-font (font-spec :family "Iosevka" :size 22. :weight 'semi-bold)
doom-themes-enable-bold t
doom-themes-enable-italic t
)
#+end_src
** Theme
#+begin_src elisp
(setq doom-theme 'doom-palenight)
;; (after! doom-themes
;; (load-theme 'doom-nano-light t))
;; (use-package! doom-nano-modeline
;; :config
;; (doom-nano-modeline-mode 1)
;; (global-hide-mode-line-mode nil))
#+end_src
** Translucency
Setup some translucency to make things look nice.
#+begin_src emacs-lisp
(set-frame-parameter (selected-frame) 'alpha '(95 95))
(add-to-list 'default-frame-alist '(alpha 95 95))
#+end_src
* Startup
** Load custom scripts
#+begin_src elisp
(add-to-list 'load-path "~/.config/doom/el")
#+end_src
** Startup buffer
#+begin_src elisp
(setq +doom-dashboard-menu-sections '
(
("Recently opened files" :icon
(nerd-icons-faicon "nf-fa-file_text" :face 'doom-dashboard-menu-title)
:action recentf-open-files)
("Open org-agenda"
:icon (nerd-icons-octicon "nf-oct-calendar" :face 'doom-dashboard-menu-title)
:when (fboundp 'org-agenda)
:action org-agenda)
("Open Notes"
:icon (nerd-icons-faicon "nf-fa-file_text" :face 'doom-dashboard-menu-title)
:action +default/browse-notes)
))
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-shortmenu)
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-banner)
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-footer)
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-loaded)
(setq +doom-dashboard-banner-padding '(1 . 1))
(add-hook! '+doom-dashboard-functions :append 'doom-dashboard-widget-shortmenu)
(add-hook! '+doom-dashboard-functions :append 'doom-dashboard-widget-loaded)
#+end_src
* Editor
** Line numbering
Enable basic line numbering
#+begin_src elisp
(setq display-line-numbers-type t)
#+end_src
** Quit Confirmation
Don't prompt to quit
#+begin_src elisp
(setq confirm-kill-emacs nil)
#+end_src
* Org Mode
** General settings
#+begin_src elisp
(require 'org)
(setq org-ellipsis " ⋯"
org-hide-emphasis-markers t
org-src-fontify-natively t
org-fontify-quote-and-verse-blocks t
org-src-tab-acts-natively t
org-hide-block-startup nil
org-startup-folded 'content
org-cycle-separator-lines 2
org-directory "~/org/"
org-agenda-files '("~/org/" "~/org/agenda/" "~/org/agenda/projects/")
)
(setq-default prettify-symbols-alist '(("#+BEGIN_SRC" . "⇨")
("#+END_SRC" . "")
("#+begin_src" . "⇨")
("#+end_src" . "")))
(setq prettify-symbols-unprettify-at-point 'right-edge)
(defun org-setup ()
(setq-local display-line-numbers nil))
(add-hook 'org-mode-hook 'org-setup)
#+end_src
** Visual fill column
#+begin_src elisp
(setq visual-fill-column-width 110
visual-fill-column-center-text t)
#+end_src
** Org presentation
#+begin_src elisp
(defun my/org-present-start ()
(visual-fill-column-mode 1)
(setq header-line-format " ")
(visual-line-mode 1)
(hide-mode-line-mode)
(setq-local
hl-line-mode nil)
(setq-local face-remapping-alist
'((default (:height 1.5) variable-pitch)
(header-line (:height 4.0) variable-pitch)
(org-document-title (:height 1.75) org-document-title)
(org-code (:height 1.55) org-code)
(org-verbatim (:height 1.55) org-verbatim)
(org-block (:height 1.25) org-block)
(org-block-begin-line (:height 0.7) org-block)))
)
(defun my/org-present-end ()
(visual-fill-column-mode 0)
(hide-mode-line-mode)
(visual-line-mode 0)
(setq header-line-format nil)
(setq-local face-remapping-alist nil
hl-line-mode t))
(add-hook 'org-present-mode-hook 'my/org-present-start)
(add-hook 'org-present-mode-quit-hook 'my/org-present-end)
#+end_src
** Setup org header faces
#+begin_src elisp
(dolist
(face '((org-level-1 . 1.2)
(org-level-2 . 1.1)
(org-level-3 . 1.05)
(org-level-4 . 1.0)
(org-level-5 . 1.0)
(org-level-6 . 1.0)
(org-level-7 . 1.0)
(org-level-8 . 1.0)))
(set-face-attribute (car face) nil
:font "Iosevka"
:weight 'medium
:height (cdr face)))
(set-face-attribute 'org-document-title nil :font "Iosevka" :weight 'bold :height 1.3)
(set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch)
(set-face-attribute 'org-table nil :inherit 'fixed-pitch)
(set-face-attribute 'org-formula nil :inherit 'fixed-pitch)
(set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch)
(set-face-attribute 'bold nil :foreground "#c678dd" :weight 'extrabold)
#+end_src
** Bullets
#+begin_src elisp
(use-package org-bullets
:after org
:hook (org-mode . org-bullets-mode)
:custom
(org-bullets-bullet-list '("⁖" "◉" "○" "●" "○" "●" "○" "●")))
#+end_src
** Capture templates
#+begin_src elisp
(setq +org-capture-todo-file "agenda/tasks.org")
(setq +org-capture-notes-file "notes/personal/index.org")
(setq org-capture-templates
'(
("n" "Notes")
("nq" "Quikerve notes" entry
(file+headline "notes/quikserve/index.org" "Inbox")
"* %u %?\n%i\n%a" :prepend t)
("np" "Personal notes" entry
(file+headline +org-capture-notes-file "Inbox")
"* %u %?\n%i\n%a" :prepend t)
("t" "Tasks")
("tp" "Personal todo" entry
(file+headline +org-capture-todo-file "Inbox")
"* TODO %?\n%i\n%a" :prepend t)
("tq" "Quikserve todo" entry
(file+headline "agenda/quikserve.org" "Inbox")
"* TODO %?\n%i\n%a" :prepend t)
("j" "Journal")
("jp" "Personal journal" entry
(file+olp+datetree "journal/personal.org")
"* %U %?\n%i\n%a" :prepend t)
("jq" "Quikserve journal" entry
(file+olp+datetree "journal/quikserve.org")
"* %U %?\n%i\n%a" :prepend t)
("p" "Templates for projects")
("pt" "Project TODO" entry (file+headline project-agenda-file "Inbox")
"* TODO %?\n%i\n%a" :prepend t)
("pn" "Project notes" entry (file+headline project-notes-file "Quicknotes")
"* %U %?\n%i\n%a" :prepend t)
("pc" "Project-local changelog" entry
(file+headline +org-capture-project-changelog-file "Unreleased")
"* %U %?\n%i" :prepend t)))
(defun project-agenda-file ()
(expand-file-name (concat "agenda/projects/" (project-name (project-current)) ".org") org-directory))
(defun project-notes-file ()
(expand-file-name (concat "notes/projects/" (project-name (project-current)) ".org") org-directory))
#+end_src
** Don't show before schedule time
Hide items in the TODO list and agenda if they have a scheduled time that has not passed
#+begin_src elisp
(setq org-agenda-todo-ignore-scheduled 'future)
(setq org-agenda-todo-ignore-with-date t)
(setq org-agenda-tags-todo-honor-ignore-options t)
(setq org-agenda-skip-deadline-prewarning-if-scheduled 'pre-scheduled)
#+end_src
** Latex
#+begin_src elisp
(setq org-export-with-author t)
(setq org-export-with-date t)
(setq org-export-with-toc t)
(setq org-export-with-section-numbers nil)
(setq org-latex-toc-command "\\tableofcontents \\clearpage")
(setq org-latex-tables-centered nil)
(setq org-latex-tables-booktabs nil)
(setq org-latex-default-class "document")
(add-to-list 'org-latex-packages-alist '("" "listings"))
(add-to-list 'org-latex-packages-alist '("" "color"))
(with-eval-after-load 'ox-latex
(add-to-list 'org-latex-classes
'("quikserve"
"
\\documentclass{article}
[DEFAULT-PACKAGES]
\\include{/home/joe/org/assets/quikserve.tex}
[EXTRA]
"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
)
)
#+end_src
* Email
#+begin_src elisp
(set-email-account! "fivesigma"
'((mu4e-sent-folder . "/fivesigma/Sent")
(mu4e-drafts-folder . "/fivesigma/Drafts")
(mu4e-trash-folder . "/fivesigma/Trash")
(mu4e-refile-folder . "/fivesigm e/Archive")
(smtpmail-smtp-user . "joe@5sigma.io")
(mu4e-compose-signature . "\n\n\nThanks,\nJoe Bellus\n\n"))
)
(after! mu4e
(setq mu4e-update-interval 120)
(setq sendmail-program (executable-find "msmtp")
send-mail-function #'smtpmail-send-it
smtpmail-stream-type 'starttls
message-sendmail-f-is-evil t
message-sendmail-extra-arguments '("--read-envelope-from")
message-send-mail-function #'message-send-mail-with-sendmail))
(setq mu4e-bookmarks
'(
(:name "Inbox" :query "maildir:/fivesigma/Inbox" :key ?i)
(:name "Today's messages" :query "date:today..now" :key ?t)
(:name "Last 7 days" :query "date:7d..now" :hide-unread t :key ?r)
("flag:flagged" "Flagged messages" ?f)))
(setq mu4e-hide-index-messages t)
(setq mu4e-html2text-command 'mu4e-shr2text)
(setq shr-color-visible-luminance-min 60)
(setq shr-color-visible-distance-min 5)
(setq shr-use-colors nil)
(setq mu4e-get-mail-command "true")
#+end_src
* Language Server
#+begin_src elisp
(setq lsp-auto-execute-action nil)
#+end_src
#+end_src
* Clock table
Add a key bind to show a 'clocktable' report in a new buffer
#+begin_src elisp
(defun kb/show-clocktable ()
(interactive)
(get-buffer-create "clocktable")
(with-current-buffer "clocktable"
(org-mode)
(erase-buffer)
(setq-local org-link-descriptive (not org-link-descriptive))
(insert (org-clock-get-clocktable :scope 'agenda :fileskip0 t :stepskip0 t :link t))
)
(switch-to-buffer "clocktable")
)
(map! :leader
:desc "Show clocktable"
"o C" #'kb/show-clocktable)
#+end_src
* Tramp
Set tramp to default to ssh
#+begin_src elisp
(setq tramp-default-method "ssh")
#+end_src
* Conduct
#+begin_src elisp
(load "conduct.el" t t)
(map! :leader
:desc "Conduct"
"o c")
(map! :leader
:desc "Conduct run"
"o c r" #'conduct-run)
(map! :leader
:desc "Conduct kill"
"o c k" #'conduct-kill)
(map! :leader
:desc "Conduct show"
"o c b" #'conduct-show)
#+end_src
* Misc Key binds
** Project management
#+begin_src elisp
(map! :leader
:desc "Project terminal"
"p v" #'projectile-run-vterm-other-window)
(map! :leader "p F" nil)
(map! :leader "p g" nil)
(map! :leader "p t" nil)
(map! :leader "p C" nil)
(map! :leader "p c" nil)
(map! :leader "p s" nil)
#+end_src
** Utilities
#+begin_src elisp
(map! :leader "f c" (lambda () (interactive) (doom-project-browse "~/.config/nix/")))
#+end_src
** Code
#+begin_src elisp
(map! :leader "c X" #'flymake-show-project-diagnostics)
#+end_src
* Direnv
#+begin_src elisp
(direnv-mode)
(setq direnv-always-show-summary nil)
#+end_src
* Elixir
** LSP
#+begin_src elisp
;;(use-package lsp-mode
;; :commands lsp
;; :ensure t
;; :diminish lsp-mode
;; :hook
;; (elixir-mode . lsp)
;; :init
;; (setq lsp-elixir-suggest-specs nil)
;; (add-to-list 'auto-mode-alist '("\\.heex\\'" . elixir-mode))
;; (add-to-list 'exec-path "~/.local/share/elixir-ls"))
#+end_src

View File

@ -0,0 +1,156 @@
;;; el/conduct.el -*- lexical-binding: t; -*-
(defun conduct-run ()
"Run a task or task group defined in the current project"
(interactive)
(let* (
(config-data (conduct/load-config))
(tasks (alist-get 'tasks config-data))
(groups (alist-get 'groups config-data))
(select-tasks (append (mapcar 'conduct/format-task-name tasks) nil))
(select-groups (append (mapcar 'conduct/format-group-name groups) nil))
(items (seq-remove #'conduct/is-running (append select-tasks select-groups)))
(selected-name (conduct/extract-name-from-selection (completing-read "Task: " items)))
(task-names (conduct/get-task-name selected-name config-data))
(group-names (conduct/get-group-name selected-name config-data))
(names (append task-names group-names)))
(dolist (name names)
(unless (conduct/get-task-buffer (conduct/get-named-task name config-data))
(conduct/run-task (conduct/get-named-task name config-data))))))
(defun conduct-kill ()
"Kill a defined project task"
(interactive)
(let* (
(config-data (conduct/load-config))
(tasks (alist-get 'tasks config-data))
(groups (alist-get 'groups config-data))
(select-tasks (seq-filter #'conduct/is-running (append (mapcar 'conduct/format-task-name tasks) nil)))
(select-groups (append (mapcar 'conduct/format-group-name groups) nil))
(items (append select-tasks select-groups))
(selected-name (conduct/extract-name-from-selection (completing-read "Task: " items)))
(task-names (conduct/get-task-name selected-name config-data))
(group-names (conduct/get-group-name selected-name config-data))
(names (append task-names group-names)))
(dolist (name names)
(conduct/kill-task (conduct/get-named-task name config-data)))))
(defun conduct-show ()
"Kill a defined project task"
(interactive)
(let* (
(config-data (conduct/load-config))
(tasks (alist-get 'tasks config-data))
(select-tasks (seq-filter #'conduct/is-running (append (mapcar 'conduct/format-task-name tasks) nil)))
(selected-name (conduct/extract-name-from-selection (completing-read "Task: " select-tasks))))
(switch-to-buffer (format "task-%s" selected-name))))
(defun conduct/create-task-path (task)
"Generate a new path based on the project root and the path for TASK"
(concat
(file-name-as-directory (project-root (project-current)))
(or (alist-get 'path task) ".")))
(defun conduct/load-config ()
"Load the conduct.json config file from the current project root"
(let* (
(config-file (concat
(file-name-as-directory (project-root (project-current)))
"conduct.json")))
(json-read-file config-file)))
(defun conduct/get-named-task (name data)
"Return the task for NAME. NAME is assumed to be a string"
(assoc (intern name) (alist-get 'tasks data)))
(defun conduct/get-task-name (name data)
"Returns the name of the task as a single item list. If it exists in DATA"
(when-let (name (assoc (intern name) (alist-get 'tasks data)))
(list (symbol-name (car name)))))
(defun conduct/get-group-name (name data)
"Returns a list of all tasks for the group named NAME in DATA"
(append (cdr (assoc (intern name) (alist-get 'groups data))) nil))
(defun conduct/run-task (task)
"Run the given task definition"
(let* (
(name (concat "task-" (symbol-name (car task))))
(buffer (concat "task-" (symbol-name (car task))))
(raw-cmd (alist-get 'command (cdr task)))
(task-cmd (concat "cd " (conduct/create-task-path (cdr task)) " && " raw-cmd))
(command (list "/bin/sh" "-c" task-cmd))
(process (make-process :name name :buffer buffer :command command :sentinel 'task-sentinel)))
(message "Running task: %s" name)
(with-current-buffer buffer
(require 'shell)
(shell-mode)
(setq-local conduct-task-name name)
(set-process-query-on-exit-flag process nil)
(set-process-filter process 'comint-output-filter))
buffer))
(defun conduct/get-task-buffer (task)
"Get the buffer related to a TASK defintiion"
(get-buffer (concat "task-" (symbol-name (car task)))))
(defun conduct/kill-task (task)
"Kill the process and buffer for a TASK"
(if-let* ((buffer (conduct/get-task-buffer task))
(process (get-buffer-process buffer)))
(progn
(kill-process (get-buffer-process buffer)))
(message "Task buffer not found for %s" (alist-get 'name task))))
(defun conduct/format-group-name (group)
"Format the name for GROUP that can be used in the popup selection"
(concat
(propertize (symbol-name (car group)) 'face 'outline-1)
(propertize "|" 'invisible t)
" "
(propertize (mapconcat #'identity (cdr group) ", ") 'face 'org-archived)))
(defun conduct/extract-name-from-selection (selection)
(car (split-string selection "|")))
(defun conduct/is-running (task-name)
(let* (
(process-name (concat "task-" (conduct/extract-name-from-selection task-name))))
(member process-name (mapcar #'process-name (process-list)))))
(defun conduct/format-task-name (task)
"Format the name for TASK to be used in the popup selection"
(let* (
(task-name (symbol-name (car task))))
(concat
(propertize task-name 'face 'bold)
(propertize "|" 'invisible t)
(propertize " ")
(propertize (alist-get 'command (cdr task)) 'face 'org-archived))))
(defun check-signal (sig s)
"Check the process signal against a value"
(and (> (length s) (length sig)) (equal sig (substring s 0 (length sig)))))
(defun task-sentinel (process event)
"Monitor the task process and close the buffer if it ends"
(cond
((check-signal "finished" event)
(message "Task ended: %s" (buffer-name (process-buffer process)))
(kill-buffer (process-buffer process)))
((check-signal "exited" event) (kill-buffer (process-buffer process)))
((check-signal "deleted" event) (kill-buffer (process-buffer process)))
((check-signal "failed" event)
(message "Task failed: %s" (buffer-name (process-buffer process)))
(kill-buffer (process-buffer process)))
((check-signal "killed" event)
(kill-buffer (process-buffer process)))
(t (message (format "Process: %s had the event '%s'" process event)))))

193
dotfiles/emacs/init.el Normal file
View File

@ -0,0 +1,193 @@
;;; init.el -*- lexical-binding: t; -*- This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a link to Doom's Module Index where all
;; of our modules are listed, including what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(doom! :input
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
;;chinese
;;japanese
;;layout ; auie,ctsrnm is the superior home row
:completion
(company +childframe) ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
;;ivy ; a search engine for love and life
vertico ; the search engine of the future
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
;;(emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
;;indent-guides ; highlighted indent columns
ligatures ; ligatures and symbols to make your code pretty again
;;minimap ; show a map of the code on the side
(modeline +light) ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
;;tabs ; a tab bar for Emacs
;;treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages
(vc-gutter +pretty) ; vcs diff in the fringe
;;vi-tilde-fringe ; fringe tildes to mark beyond EOB
;;window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
;;zen ; distraction-free coding or writing
:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent
:emacs
(dired +icons) ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
;;ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
;;eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
(spell +flyspell) ; tasing you for misspelling mispelling
grammar ; tasing grammar mistake every you make
:tools
;;ansible
;;biblio ; Writes a PhD for you (citation needed)
;;collab ; buffers with friends
;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv
docker
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
lookup ; navigate your code and its documentation
(lsp +eglot) ; M-x vscode
(magit +forge) ; a git porcelain for Emacs
;;make ; run make tasks from Emacs
;;pass ; password manager for nerds
pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
;;rgb ; creating color strings
;;taskrunner ; taskrunner for all your projects
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp
:os
(:if IS-MAC macos) ; improve compatibility with macOS
;;tty ; improve the terminal Emacs experience
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
;;(cc +lsp) ; C > C++ == 1
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
;;data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
;;dhall
(elixir +lsp +tree-sitter) ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;factor
;;faust ; dsp, but you get to keep your soul
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect
;;(graphql +lsp) ; Give queries a REST
;;(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
(json +lsp +tree-sitter) ; At least it ain't XML
;;(java +lsp) ; the poster child for carpal tunnel syndrome
javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
latex ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
ledger ; be audit you can be
lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
(nix +lsp) ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
(org +present +pandoc) ; organize your plain life in plain text
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
(python +lsp) ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
(rust +lsp +tree-sitter) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
(web +lsp +tree-sitter) ; the tubes
yaml ; JSON, but readable
;;zig ; C, but simpler
:email
(mu4e +org)
;;notmuch
;;(wanderlust +gmail)
:app
;;calendar
;;emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought
:config
literate
(default +bindings +smartparens))

View File

@ -0,0 +1,64 @@
;; -*- no-byte-compile: t; -*-
;;; $DOOMDIR/packages.el
;; To install a package with Doom you must declare them here and run 'doom sync'
;; on the command line, then restart Emacs for the changes to take effect -- or
;; use 'M-x doom/reload'.
(package! org-ql)
(package! org-bullets)
(package! org-present)
(package! visual-fill-column)
(package! direnv)
;(package! doom-nano-modeline
; :recipe (:repo "ronisbr/doom-nano-modeline" :host github))
(package! yuck-mode)
(package! org-ql)
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
;; (package! some-package)
;; To install a package directly from a remote git repo, you must specify a
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
;; https://github.com/radian-software/straight.el#the-recipe-format
;; (package! another-package
;; :recipe (:host github :repo "username/repo"))
;; If the package you are trying to install does not contain a PACKAGENAME.el
;; file, or is located in a subdirectory of the repo, you'll need to s)kpecify
;; `:files' in the `:recipe':
;; (package! this-package
;; :recipe (:host github :repo "username/repo"
;; :files ("some-file.el" "src/lisp/*.el")))
;; If you'd like to disable a package included with Doom, you can do so here
;; with the `:disable' property:
;; (package! builtin-package :disable t)
;; You can override the recipe of a built in package without having to specify
;; all the properties for `:recipe'. These will inherit the rest of its recipe
;; from Doom or MELPA/ELPA/Emacsmirror:
;; (package! builtin-package :recipe (:nonrecursive t))
;; (package! builtin-package-2 :recipe (:repo "myfork/package"))
;; Specify a `:branch' to install a package from a particular branch or tag.
;; This is required for some packages whose default branch isn't 'master' (which
;; our package manager can't deal with; see radian-software/straight.el#279)
;; (package! builtin-package :recipe (:branch "develop"))
;; Use `:pin' to specify a particular commit to install.
;; (package! builtin-package :pin "1a2b3c4d5e")
;; Doom's packages are pinned to a specific commit and updated from release to
;; release. The `unpin!' macro allows you to unpin single packages...
;; (unpin! pinned-package)
;; ...or multiple packages
;; (unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;; (unpin! t)

102
dotfiles/eww.css Normal file
View File

@ -0,0 +1,102 @@
.side-panel {
background-color: transparent;
border-radius: 8px;
}
.time-container {
font-weight: 900;
}
.task-container {
font: 14px Sans;
}
.task-item.complete {
color: #888888;
}
.task-item.deadline {
font-weight: bold;
}
.section {
border-radius: 4px;
background-color: rgba(0,0,0,0.50);
color: #fff;
}
.task-time {
font-weight: bold;
}
.progress {
background-color: #000;
}
.progress-bar {
background-color: #232323;
}
.icon-stat .icon {
font: 14px FontAwesome;
color: #ccc;
}
.icon-stat .text {
font: 13px Sans;
}
.stat-box {
}
.icon {
font: 12px FontAwesome;
}
.artist {
font: 16px Sans;
font-weight: bold;
}
.stat-box label {
font: 12px Sans;
font-weight: bold;
color: #eee;
}
.stat-box .text {
font: 32px Sans;
}
.separator {
border-bottom: 1px solid #cc44dd;
}
.music-art {
background-size: cover;
border-radius: 8px;
}
trough {
background-color: #444;
border: 0;
}
.bat-discharging {
color: #ff0000;
}
.bat-discharging trough progress {
background-color: #ff0000;
border-color: #ff0000;
border: 0;
}
.bat-charging {
color: #008800;
border-color: #008800;
}
.bat-charging trough progress {
background-color: #00cc00;
border: 0;
}

182
dotfiles/eww.yuck Normal file
View File

@ -0,0 +1,182 @@
(defpoll time_str
:interval "1m"
:initial ""
`date '+%r'`)
(defpoll date_str
:interval "1h"
:initial ""
`date '+%a %b %d'`)
(defpoll tasks-data
:interval "30m"
:initial "{tasks: []}"
`agenda-json`)
(defpoll mail-data
:interval "2m"
:initial "{\"new\": 0, \"read\": 0}"
`mail-count`)
(defpoll active-network
:interval "5m"
:initial "{}"
`nmcli conn show --active | head -n 2 | tail -n 1 | awk -F '[[:space:]][[:space:]]+' '{print "{ \\"name\\": \\""$1"\\", \\"type\\": \\""$3"\\"}"}'`
)
(defpoll net-interface
:interval "5m"
:initial ""
`nmcli conn show --active | head -n 2 | tail -n 1 | awk -F '[[:space:]][[:space:]]+' '{print $4}' | tr -d "[:blank:]"`
)
(deflisten player-status "playerctl --follow status || false")
(deflisten player-length "playerctl --follow metadata mpris:length || 0")
(deflisten player-art "playerctl --follow metadata mpris:artUrl || 0")
(deflisten artist `playerctl --follow metadata artist`)
(defpoll player-position
:interval "5s"
:initial "0"
:run-while {player-status == "Playing"}
`playerctl position`)
(deflisten track `playerctl --follow metadata title`)
(defpoll volume
:interval "5s"
:initial "0"
`amixer sget Master | awk -F"[][]" '/Left:/ { print $2 }' | tr -d '%'`)
(defwidget time[]
(box :class "time-container" :width 300 :height 30
(label :text date_str)
(label :text time_str)
))
(defwidget icon_stat[icon text ?visible]
(box :class "icon-stat" :orientation "h" :space-evenly false :visible visible
(label :width 30 :class "icon" :text icon)
(label :class "text" :text text))
)
(defwidget stat_box[label text]
(box :class "stat-box" :orientation "h" :spacing 0 :space-evenly false
(box :width 4)
(box :orientation "v" :spacing 0 :space-evenly false
(box :height 4)
(label :class "text" :text text)
(label :class "label" :text label)
(box :height 4))
(box :width 4)
))
(defwidget section[]
(box :class "section" :orientation "v" :space-evenly false
(box :height 10)
(children)
(box :height 10)
))
(defwidget pbar[text progress tooltip ?class ?visible]
(box :class "pbar ${class}"
:orientation "h"
:visible visible
:space-evenly false
:tooltip tooltip
(label :text text :width 40 :halign "center")
(progress :value progress :valign "center" :width 240)))
(defwidget tasks[]
(box :class "task-container" :orientation "v" :halign "start" :spacing 5 :width 300 :space-evenly false
(for task in {tasks-data.tasks}
(box
:class {task.state == "DONE" ? "task-item complete" : task.trigger == "Deadline:" ? "task-item deadline" : "task-item"}
:orientation "h"
:spacing 3
:halign "start" :space-evenly false :height 30 :valign "start"
(box :width 10)
(label :text {task.state != "" ? task.state == "TODO" ? " " : " " : " ${task.time}"}
:class {task.state != "" ? "task-state" : "task-time"}
:halign "start")
(label :text {task.title} :wrap true :justify "left" :xalign 0)))
))
(defwidget separator[]
(box :orientation "v" :space-evenly false
(box :height 10)
(box :class "separator" :height 1)
(box :height 9)
))
(defwidget disk[mount]
(pbar
:text ""
:progress {EWW_DISK[mount].used_perc}
:visible {EWW_DISK[mount] != "null"}
:tooltip "${mount}: ${round(EWW_DISK[mount].used_perc, 2)}%"))
(defwindow side-panel
:monitor 0
:geometry (geometry :x "10px"
:y "0%"
:width "300px"
:height "99%"
:anchor "center left")
:stacking "fg"
:windowtype "dock"
:exclusive true
:wm-ignore false
(box :orientation "v" :halign "center" :valign "start" :spacing 4 :space-evenly false
(section
(time)
(separator)
(tasks))
(section
(box :orientation "v" :spacing 2 :space-evenly: false
(pbar :text "" :progress {EWW_RAM.used_mem_perc} :tooltip "${round(EWW_RAM.used_mem / 1024 / 1024 / 1024, 2)}GB used")
(pbar :text "" :progress {EWW_CPU.avg} :tooltip "${round(EWW_CPU.avg, 2)}% average usage")
(literal :visible {EWW_BATTERY != ""} :content {EWW_BATTERY != "" ? '
(pbar :text {EWW_BATTERY.BAT0?.status == "Discharging" ? "" : ""}
:class {EWW_BATTERY.BAT0?.status == "Discharging" ? "bat-discharging" : "bat-charging"}
:progress {EWW_BATTERY.BAT0?.capacity}
:visible {EWW_BATTERY.BAT0 != ""}
:tooltip "${EWW_BATTERY?.BAT0?.status}: ${round(EWW_BATTERY?.BAT0?.capacity, 2)}%")
' : ""})
(disk :mount "/")
(disk :mount "/home/joe/Projects")
(disk :mount "/mnt/glacier"))
(separator)
(box :orientation "h" :halign "center" :spacing 5
(icon_stat :icon "" :text "Ethernet" :visible {active-network.type == "ethernet"})
(icon_stat :icon " " :text "${active-network.name}" :visible {active-network.type == "wifi"})
(icon_stat :icon "" :text "${round(EWW_NET[net-interface].NET_DOWN / 1024 / 1024 / 2, 2)}mb")
(icon_stat :icon "" :text "${round(EWW_NET[net-interface].NET_UP / 1024 / 1024 / 2, 2)}mb"))
)
(section
(box :orientation "h" :spacing 15
(box :width 15)
(stat_box :label "New" :text {mail-data.new})
(stat_box :label "Read" :text {mail-data.read})
(box :width 15)
))
(section
(label :visible {player-status == ""} :text "No player active")
(box :orientation "h" :space-evenly false :spacing 10 :visible {player-status != ""}
(eventbox :onclick "playerctl play-pause"
(label :width 50 :text {player-status == "Playing" ? "" : "" }))
(box :class "music-art" :style 'background-image: url("${player-art}");' :width 60 :height 60)
(box :orientation "v"
(progress :value {player-position / (player-length / 1000000) * 100} :valign "center")
(label :class "artist" :text artist :limit-width 15 :show-truncated true :halign "start")
(label :text track :halign "start" :limit-width 20 :show-truncated true)
)
)
(separator)
(box :orientation "h" :space-evenly false :halign "center" :spacing 20
(label :text "" :width 20)
(progress :width 200 :value {volume} :valign "center"))
)
))

24
dotfiles/fuzzel.ini Normal file
View File

@ -0,0 +1,24 @@
dpi-aware=no
#icon-theme=Papirus-Dark
width=75
font=Iosevka:weight=light:size=16
line-height=18
fields=name,generic,comment,categories,filename,keywords
terminal=foot -e
prompt=" "
layer=overlay
[colors]
background=1e1e2edd
text=cdd6f4ff
match=f38ba8ff
selection=585b70ff
selection-match=f38ba8ff
selection-text=cdd6f4ff
border=b4befeff
[border]
radius=5
[dmenu]
exit-immediately-if-empty=yes

182
dotfiles/hyprland.conf Normal file
View File

@ -0,0 +1,182 @@
monitor=eDP-1, 1920x1200, 0x0, 1
#monitor=DP-3, 1920x1080, -1920x0, 1
monitor=DP-4, 1920x1080, 1920x0, 1
exec-once = emacs --daemon & hyprpaper & eww open side-panel
# env = XCURSOR_SIZE,24
env = WLR_NO_HARDWARE_CURSORS,1
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = us
follow_mouse = 1
touchpad {
natural_scroll = no
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5
gaps_out = 20
border_size = 3
col.active_border = rgba(7d32a899) rgba(da16f099) 45deg
col.inactive_border = rgba(cccccc88)
layout = dwindle
}
# group {
# col.border_active = rgba(00000099) rgba(66666699) 45deg
# col.border_inactive = rgba(cccccc88)
# }
decoration {
active_opacity = 0.99
inactive_opacity = 0.90
rounding = 2
blur {
enabled = true
size = 3
passes = 1
}
drop_shadow = yes
shadow_range = 8
shadow_render_power = 3
col.shadow = rgba(1a1a1a33)
}
animations {
enabled = yes
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = on
}
misc {
disable_hyprland_logo=true
}
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
$mainMod = SUPER
bindle = ,XF86MonBrightnessUp, exec, brightnessctl set +10%
bindle = ,XF86MonBrightnessDown, exec, brightnessctl set 10%-
bindle=, XF86AudioRaiseVolume, exec, amixer sset Master 5%+
bindle=, XF86AudioRaiseVolume, exec, eww update volume=$(amixer sget Master | awk -F"[][]" '/Left:/ { print $2 }' | tr -d '%')
bindle=, XF86AudioLowerVolume, exec, amixer sset Master 5%-
bindle=, XF86AudioLowerVolume, exec, eww update volume=$(amixer sget Master | awk -F"[][]" '/Left:/ { print $2 }' | tr -d '%')
bindle=, XF86AudioMute, exec, amixer sset Master 1+ toggle
bindle=, XF86AudioMute, exec, eww update volume=$(amixer sget Master | awk -F"[][]" '/Left:/ { print $2 }' | tr -d '%')
bindle=, XF86AudioPlay, exec, playerctl play-pause
bindle=, XF86AudioNext, exec, playerctl next
bindle=, XF86AudioPrev, exec, playerctl previous
bind = $mainMod, RETURN, exec, kitty
bind = $mainMod, W, killactive,
bind = $mainMod, E, exec, emacsclient -c
bind = $mainMod SHIFT, F, togglefloating,
bind = $mainMod, SPACE, exec, fuzzel
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, V, togglesplit, # dwindle
bind = $mainMod, X, pin,
bind = $mainMod, X, toggleopaque,
bind = $mainMod, F, fullscreen
bind = $mainMod, b, exec, eww open --toggle side-panel
bind = , Print, exec, grim -g "$(slurp -d)" - | wl-copy
# Move focus with mainMod + arrow keys
bind = $mainMod, h, movefocus, l
bind = $mainMod, l, movefocus, r
bind = $mainMod, k, movefocus, u
bind = $mainMod, j, movefocus, d
bind = $mainMod SHIFT, h, movewindow, l
bind = $mainMod SHIFT, l, movewindow, r
bind = $mainMod SHIFT, k, movewindow, u
bind = $mainMod SHIFT, j, movewindow, d
# Switch workspaces with mainMod + [0-9]
bind=SUPER,1,moveworkspacetomonitor,1 current
bind=SUPER,1,workspace,1
bind=SUPER,2,moveworkspacetomonitor,2 current
bind=SUPER,2,workspace,2
bind=SUPER,3,moveworkspacetomonitor,3 current
bind=SUPER,3,workspace,3
bind=SUPER,4,moveworkspacetomonitor,4 current
bind=SUPER,4,workspace,4
bind=SUPER,5,moveworkspacetomonitor,5 current
bind=SUPER,5,workspace,5
bind=SUPER,6,moveworkspacetomonitor,6 current
bind=SUPER,6,workspace,6
bind=SUPER,7,moveworkspacetomonitor,7 current
bind=SUPER,7,workspace,7
bind=SUPER,8,moveworkspacetomonitor,8 current
bind=SUPER,8,workspace,8
bind=SUPER,9,moveworkspacetomonitor,9 current
bind=SUPER,9,workspace,9
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

11
dotfiles/hyprpaper.conf Normal file
View File

@ -0,0 +1,11 @@
preload = ~/Pictures/nicole.jpg
wallpaper = eDP-1,~/Pictures/nicole.jpg
wallpaper = DP-3,~/Pictures/nicole.jpg
wallpaper = HDMI-A-1,~/Pictures/nicole.jpg
wallpaper = DP-1,~/Pictures/nicole.jpg
splash = true
#fully disable ipc
# ipc = off

105
dotfiles/kitty.conf Normal file
View File

@ -0,0 +1,105 @@
font_size 14.0
font_family Iosevka
bold_font Iosevka
italic_font Iosevka
bold_italic_font Iosevka
tab_bar_style powerline
enable_audio_bell no
cursor_shape beam
confirm_os_window_close 0
update_check_interval 0
background #292D3E
background_opacity 0.85
# vim:ft=kitty
## name: Catppuccin Kitty Mocha
## author: Catppuccin Org
## license: MIT
## upstream: https://github.com/catppuccin/kitty/blob/main/themes/mocha.conf
## blurb: Soothing pastel theme for the high-spirited!
# The basic colors
foreground #CDD6F4
background #1E1E2E
selection_foreground #1E1E2E
selection_background #F5E0DC
# Cursor colors
cursor #F5E0DC
cursor_text_color #1E1E2E
# URL underline color when hovering with mouse
url_color #F5E0DC
# Kitty window border colors
active_border_color #B4BEFE
inactive_border_color #6C7086
bell_border_color #F9E2AF
# OS Window titlebar colors
wayland_titlebar_color #1E1E2E
macos_titlebar_color #1E1E2E
# Tab bar colors
active_tab_foreground #11111B
active_tab_background #CBA6F7
inactive_tab_foreground #CDD6F4
inactive_tab_background #181825
tab_bar_background #11111B
# Colors for marks (marked text in the terminal)
mark1_foreground #1E1E2E
mark1_background #B4BEFE
mark2_foreground #1E1E2E
mark2_background #CBA6F7
mark3_foreground #1E1E2E
mark3_background #74C7EC
# The 16 terminal colors
# black
color0 #292D3E
color8 #585B70
# red
color1 #F38BA8
color9 #F38BA8
# green
color2 #A6E3A1
color10 #A6E3A1
# yellow
color3 #F9E2AF
color11 #F9E2AF
# blue
color4 #89B4FA
color12 #89B4FA
# magenta
color5 #F5C2E7
color13 #F5C2E7
# cyan
color6 #94E2D5
color14 #94E2D5
# white
color7 #BAC2DE
color15 #A6ADC8
# map ctrl+j kitten pass_keys.py neighboring_window bottom ctrl+j
# map ctrl+k kitten pass_keys.py neighboring_window top ctrl+k
# map ctrl+h kitten pass_keys.py neighboring_window left ctrl+h
# map ctrl+l kitten pass_keys.py neighboring_window right ctrl+l
allow_remote_control yes
listen_on unix:@mykitty
enabled_layouts tall:bias=50;full_size=1;mirrored=false
remember_window_size no

7
dotfiles/mako.conf Normal file
View File

@ -0,0 +1,7 @@
border-radius=5
border-size=0
default-timeout=60000
background-color=#000000cc
height=200
width=500
padding=25

32
dotfiles/mbsync.conf Normal file
View File

@ -0,0 +1,32 @@
IMAPAccount fivesigma
# Address to connect to
Host 127.0.0.1
Port 1143
User joe@5sigma.io
PassCmd "cat /home/joe/.mail/creds-imap"
SSLType NONE
AuthMechs LOGIN
IMAPStore fivesigma-remote
Account fivesigma
MaildirStore fivesigma-local
# Copy folder hierarchy
Subfolders Verbatim
# The trailing "/" is important
Path ~/.mail/fivesigma/
Inbox ~/.mail/fivesigma/Inbox
Channel fivesigma
Far :fivesigma-remote:
Near :fivesigma-local:
Expunge Both
# Include everything
Patterns *
Patterns !All*
Patterns !Spam
# Automatically create missing mailboxes, both locally and on the server
Create Both
# Save the synchronization state files in the relevant directory
SyncState *

24
dotfiles/msmtp.conf Normal file
View File

@ -0,0 +1,24 @@
# FiveSigma
account fivesigma
host localhost
port 1025
tls on
tls_starttls on
auth on
user joe@5sigma.io
passwordeval "cat /home/joe/.mail/creds-smtp"
from Joe Bellus <joe@5sigma.io>
tls_certcheck off
# FiveSigma
account default
host localhost
port 1025
tls on
tls_starttls on
auth on
user joe@5sigma.io
passwordeval "cat /home/joe/.mail/creds-smtp"
from Joe Bellus <joe@5sigma.io>
tls_certcheck off

170
dotfiles/waybar-config.json Normal file
View File

@ -0,0 +1,170 @@
// =============================================================================
//
// Waybar configuration
//
// Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration
//
// =============================================================================
[
{
"layer": "top",
"output": ["HDMI-A-1"],
"position": "top",
// If height property would be not present, it'd be calculated dynamically
"height": 30,
"modules-left": [
"hyprland/workspaces",
],
"modules-center": [
],
"modules-right": [
],
"hyprland/workspaces": {
"all-outputs": false,
"disable-scroll": true,
"format": "{name}"
},
},
{
"layer": "top",
"output": ["DP-1"],
"position": "top",
// If height property would be not present, it'd be calculated dynamically
"height": 30,
"modules-left": [
"hyprland/workspaces",
],
"modules-center": [
],
"modules-right": [
"custom/mail",
"pulseaudio",
"network",
"memory",
"cpu",
"battery",
"tray",
"clock#date",
"clock#time"
],
// -------------------------------------------------------------------------
// Modules
// -------------------------------------------------------------------------
"battery": {
"interval": 10,
"states": {
"warning": 30,
"critical": 15
},
// Connected to AC
"format": "{icon} {capacity}%", // Icon: bolt
// Not connected to AC
"format-discharging": "{icon} {capacity}%",
"format-icons": [
" ", // Icon: battery-full
" ", // Icon: battery-three-quarters
" ", // Icon: battery-half
" ", // Icon: battery-quarter
" " // Icon: battery-empty
],
"tooltip": true
},
"clock#time": {
"interval": 1,
"format": "{:%H:%M}",
"tooltip": false
},
"clock#date": {
"interval": 10,
"format": " {:%e %b %Y}", // Icon: calendar-alt
"tooltip-format": "{:%e %B %Y}"
},
"cpu": {
"interval": 5,
"format": " {usage}% ({load})", // Icon: microchip
"states": {
"warning": 70,
"critical": 90
}
},
"memory": {
"interval": 5,
"format": " {}%", // Icon: memory
"states": {
"warning": 70,
"critical": 90
}
},
"network": {
"interval": 5,
"format-wifi": " {essid} ({signalStrength}%)", // Icon: wifi
"format-ethernet": " {ifname}: {ipaddr}/{cidr}", // Icon: ethernet
"format-disconnected": "⚠ Disconnected",
"tooltip-format": "{ifname}: {ipaddr}"
},
"hyprland/workspaces": {
"all-outputs": false,
"disable-scroll": true,
"format": "{name}"
},
"pulseaudio": {
//"scroll-step": 1,
"format": "{icon} {volume}%",
"format-bluetooth": "{icon} {volume}%",
"format-muted": "",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", ""]
},
"on-click": "pavucontrol"
},
"temperature": {
"critical-threshold": 80,
"interval": 5,
"format": "{icon} {temperatureC}°C",
"format-icons": [
"", // Icon: temperature-empty
"", // Icon: temperature-quarter
"", // Icon: temperature-half
"", // Icon: temperature-three-quarters
"" // Icon: temperature-full
],
"tooltip": true
},
"tray": {
"icon-size": 21,
"spacing": 10
},
"custom/mail": {
"format": "󰺻 {}",
"interval": 30,
"exec": "ls -l /home/joe/.mail/fivesigma/Inbox/new | wc -l",
}
}
]

197
dotfiles/waybar-style.css Normal file
View File

@ -0,0 +1,197 @@
/* =============================================================================
*
* Waybar configuration
*
* Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration
*
* =========================================================================== */
/* -----------------------------------------------------------------------------
* Keyframes
* -------------------------------------------------------------------------- */
@keyframes blink-warning {
70% {
color: white;
}
to {
color: white;
background-color: orange;
}
}
@keyframes blink-critical {
70% {
color: white;
}
to {
color: white;
background-color: red;
}
}
/* -----------------------------------------------------------------------------
* Base styles
* -------------------------------------------------------------------------- */
/* Reset all styles */
* {
border: none;
border-radius: 0;
min-height: 0;
margin: 0;
padding: 0;
}
/* The whole bar */
#waybar {
background: transparent;
color: black;
font-family: Cantarell, Noto Sans, sans-serif;
font-size: 13px;
background: rgba(255,255,255,0.80);
}
/* Each module */
#battery,
#clock,
#cpu,
#memory,
#mode,
#network,
#pulseaudio,
#temperature,
#window,
#tray {
margin-right: 5px;
margin-left: 5px;
padding-left: 10px;
padding-right: 10px;
border-radius: 5px;
}
/* -----------------------------------------------------------------------------
* Module styles
* -------------------------------------------------------------------------- */
#battery {
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#battery.warning {
color: orange;
}
#battery.critical {
color: red;
}
#battery.warning.discharging {
animation-name: blink-warning;
animation-duration: 3s;
}
#battery.critical.discharging {
animation-name: blink-critical;
animation-duration: 2s;
}
#clock {
font-weight: bold;
}
#cpu {
/* No styles */
}
#cpu.warning {
color: orange;
}
#cpu.critical {
color: red;
}
#memory {
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#memory.warning {
color: orange;
}
#memory.critical {
color: red;
animation-name: blink-critical;
animation-duration: 2s;
}
#network {
/* No styles */
}
#network.disconnected {
color: orange;
}
#pulseaudio {
/* No styles */
}
#pulseaudio.muted {
/* No styles */
}
#custom-spotify {
color: rgb(102, 220, 105);
}
#temperature {
/* No styles */
}
#temperature.critical {
color: red;
}
#tray {
/* No styles */
}
#window {
font-weight: bold;
}
#workspaces {
margin-right: 15px;
}
#workspaces button {
border-bottom: 2px solid transparent;
padding-bottom: 2px;
padding-left: 10px;
padding-right: 10px;
color: #888;
font-weight: bold;
}
#workspaces button.active {
border-color: #232323;
background: rgb(255,255,255) ;
color: black;
}
#workspaces button.urgent {
border-color: #c9545d;
color: #c9545d;
}

13
flakes/rust.nix Normal file
View File

@ -0,0 +1,13 @@
{
description = "A simple rust environment";
inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; };
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in {
devShells.${system}.default = pkgs.mkShell {
packages = [ pkgs.rustc pkgs.cargo pkgs.rust-analyzer ];
};
};
}

43
home.nix Normal file
View File

@ -0,0 +1,43 @@
{ config, pkgs, ... }: {
imports = [ <home-manager/nixos> ];
programs.git = {
package = pkgs.gitAndTools.gitFull;
enable = true;
config = {
user = {
name = "Joe Bellus";
email = "joe@5sigma.io";
};
credential.helper = "libsecret";
};
};
home-manager.users.joe = {
home.stateVersion = "18.09";
xdg.configFile."kitty/kitty.conf".source = ./dotfiles/kitty.conf;
xdg.configFile."alactritty/alacritty.conf".source =
./dotfiles/alacritty.toml;
xdg.configFile."hypr/hyprland.conf".source = ./dotfiles/hyprland.conf;
xdg.configFile."hypr/hyprpaper.conf".source = ./dotfiles/hyprpaper.conf;
xdg.configFile."waybar/config".source = ./dotfiles/waybar-config.json;
xdg.configFile."waybar/style.css".source = ./dotfiles/waybar-style.css;
xdg.configFile."mako/config".source = ./dotfiles/mako.conf;
home.file.".mbsyncrc".source = ./dotfiles/mbsync.conf;
xdg.configFile."msmtp/config".source = ./dotfiles/msmtp.conf;
xdg.configFile."fuzzel/fuzzel.ini".source = ./dotfiles/fuzzel.ini;
#emacs
xdg.configFile."doom/init.el".source = ./dotfiles/emacs/init.el;
xdg.configFile."doom/config.org".source = ./dotfiles/emacs/config.org;
xdg.configFile."doom/packages.el".source = ./dotfiles/emacs/packages.el;
xdg.configFile."doom/el/conduct.el".source = ./dotfiles/emacs/el/conduct.el;
xdg.configFile."eww/eww.yuck".source = ./dotfiles/eww.yuck;
xdg.configFile."eww/eww.css".source = ./dotfiles/eww.css;
xdg.configFile."eww/agenda-csv.doomscript".source =
./scripts/agenda-csv.doomscript;
};
}

14
index.nix Normal file
View File

@ -0,0 +1,14 @@
{ config, lib, pkgs, ... }:
{
imports = [
./locale.nix
./system.nix
./desktop.nix
./user.nix
./networking.nix
./home.nix
./services.nix
./logi.nix
];
}

17
locale.nix Normal file
View File

@ -0,0 +1,17 @@
{ config, lib, pkgs, ... }:
{
time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
}

79
logi.nix Normal file
View File

@ -0,0 +1,79 @@
{ pkgs, ... }:
{
# Install logiops package
environment.systemPackages = [ pkgs.logiops ];
# Create systemd service
systemd.services.logiops = {
description = "An unofficial userspace driver for HID++ Logitech devices";
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.logiops}/bin/logid";
};
};
# Configuration for logiops
environment.etc."logid.cfg".text = ''
devices: ({
name: "Wireless Mouse MX Master 3";
smartshift: {
on: true;
threshold: 12;
};
hiresscroll: {
hires: true;
target: false;
};
dpi: 1200;
buttons: ({
cid: 0xc3;
action = {
type: "Gestures";
gestures: ({
direction: "Left";
mode: "OnRelease";
action = {
type = "Keypress";
keys: ["KEY_F15"];
};
}, {
direction: "Right";
mode: "OnRelease";
action = {
type = "Keypress";
keys: ["KEY_F16"];
};
}, {
direction: "Down";
mode: "OnRelease";
action = {
type: "Keypress";
keys: ["KEY_F17"];
};
}, {
direction: "Up";
mode: "OnRelease";
action = {
type: "Keypress";
keys: ["KEY_F18"];
};
}, {
direction: "None";
mode: "OnRelease";
action = {
type = "Keypress";
keys: ["KEY_PLAYPAUSE"];
};
});
};
}, {
cid: 0xc4;
action = {
type: "Keypress";
keys: ["KEY_F19"];
};
});
});
'';
}

5
networking.nix Normal file
View File

@ -0,0 +1,5 @@
{ config, lib, pkgs, ... }:
{
networking.networkmanager.enable = true;
}

7
scripts/agenda-csv.doomscript Executable file
View File

@ -0,0 +1,7 @@
(require 'doom-start)
(let ((inhibit-message t)))
(setq org-agenda-start-with-log-mode nil)
(setq org-agenda-start-day "0d")
(setq org-agenda-span 1)
(setq org-agenda-start-on-weekday nil)
(org-batch-agenda-csv "a")

16
scripts/agenda-json.nix Normal file
View File

@ -0,0 +1,16 @@
{ pkgs }:
pkgs.writeShellScriptBin "agenda-json" ''
~/.config/emacs/bin/doomscript ~/.config/eww/agenda-csv.doomscript | jq -Rsnc '
{"tasks":
[inputs
| . / "\n"
| (.[] | select(length > 0) | . / ",") as $input
| select($input | length > 0 and $input[2] != "" and $input[2] != null)
| {"tags": $input[0], "title": $input[1], "state": $input[3], "time": $input[6], "date": $input[5], "trigger": $input[7]}] }
| {
"tasks": (.tasks[:15]),
"num-total": ( [ .tasks[] | select( .state != "PROJECT" and .state != "" and .state != null)] | length),
"num-tasks": ( [ .tasks[:15][] | select( .state != "PROJECT" and .state != "" and .state != null)] | length)
}' | tr -d '.'
''

7
scripts/mail-count.nix Normal file
View File

@ -0,0 +1,7 @@
{ pkgs }:
pkgs.writeShellScriptBin "mail-count" ''
NEW=$(find /home/joe/.mail/fivesigma/Inbox/new -type f | wc -l)
READ=$(find /home/joe/.mail/fivesigma/Inbox/cur -type f | wc -l)
echo "{\"new\": $NEW, \"read\": $READ}"
''

65
services.nix Normal file
View File

@ -0,0 +1,65 @@
{ config, lib, pkgs, ... }:
{
virtualisation.docker.enable = true;
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
services = {
fprintd = {
enable = true;
tod.enable = true;
tod.driver = pkgs.libfprint-2-tod1-goodix;
};
syncthing = {
enable = true;
user = "joe";
dataDir = "/home/joe/sync"; # Default folder for new synced folders
configDir =
"/home/joe/sync/.config/syncthing"; # Folder for Syncthing's settings and keys
};
};
services.gnome.gnome-keyring.enable = true;
systemd.user.services.mbdirnotify = {
description = "Maildir Notifications";
enable = true;
script =
"/etc/profiles/per-user/joe/bin/mbdirnotify /home/joe/.mail/fivesigma/Inbox/new";
wantedBy = [ "multi-user.target" ];
};
systemd.user.services.protonmail-bridge = {
description = "Protonmail Bridge";
enable = true;
script =
"${pkgs.protonmail-bridge}/bin/protonmail-bridge --noninteractive --log-level info";
path = [ pkgs.gnome3.gnome-keyring ];
wantedBy = [ "multi-user.target" ];
};
# EMAIL CHECKING
systemd.timers."mail-check" = {
enable = true;
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "5m";
OnUnitActiveSec = "5m";
Unit = "mail-check.service";
};
};
systemd.services."mail-check" = {
script = ''
${pkgs.isync}/bin/mbsync -a
'';
serviceConfig = {
Type = "oneshot";
User = "joe";
};
wantedBy = [ "multi-user.target" ];
};
}

67
system.nix Normal file
View File

@ -0,0 +1,67 @@
{ config, lib, pkgs, ... }:
{
system.stateVersion = "23.11"; # Did you read the comment?
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;
programs.fish.enable = true;
services.pcscd.enable = true;
programs.gnupg.agent = {
enable = true;
pinentryFlavor = "gnome3";
enableSSHSupport = true;
};
environment.systemPackages = with pkgs; [
neovim
nixfmt
hyprpaper
kitty
htop
waybar
lshw
emacs29-pgtk
gnupg
pinentry
emacsPackages.mu4e
git
font-awesome
home-manager
mako
libinput
notify-desktop
fishPlugins.done
fishPlugins.fzf-fish
fishPlugins.forgit
fzf
ispell
fishPlugins.grc
grc
direnv
fd
fprintd
ripgrep
usbutils
silver-searcher
bat
eza
isync
msmtp
screen
libsecret
wl-clipboard
killall
cmake
gnumake
gcc
libtool
];
fonts.packages = with pkgs; [
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
fira-code
jetbrains-mono
iosevka
];
}

61
user.nix Normal file
View File

@ -0,0 +1,61 @@
{ config, lib, pkgs, ... }:
{
services.emacs.defaultEditor = true;
users.users.joe = {
isNormalUser = true;
description = "Joe bellus";
extraGroups = [ "networkmanager" "wheel" "audio" "docker" "libvirtd" ];
packages = with pkgs; [
alacritty
firefox
firefox-devedition-bin
(builtins.getFlake
"github:5Sigma/codex?rev=fe20caf8816f8f29aa49e273ba4905496f31c2b1").packages.x86_64-linux.default
(builtins.getFlake
"git+https://git.5sigma.io/joe/mbdirnotify.git?rev=dc95988ad4dd6cd019e016be17c1aefbbba96674").packages.x86_64-linux.default
telegram-desktop
freecad
spotify
mongodb-compass
pavucontrol
tectonic
pandoc
teams-for-linux
fuzzel
protonmail-bridge
grim
gnucash
slurp
eww-wayland
mpv
playerctl
nil
stc-cli
jq
ledger
font-awesome
(import ./scripts/agenda-json.nix { inherit pkgs; })
(import ./scripts/mail-count.nix { inherit pkgs; })
];
};
programs.fish.shellAliases = {
ls = "eza";
cat = "bat --theme ansi";
};
programs.starship.enable = true;
programs.bash = {
interactiveShellInit = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
}