re-factored doom config and minor changes to qtile

This commit is contained in:
Tyler Starr 2021-01-26 16:09:03 -08:00
parent 2cddce50eb
commit 2b19323c67
12 changed files with 648 additions and 622 deletions

View File

@ -1,7 +0,0 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhistcnt =5
let g:netrw_dirhist_5='/home/tstarr/.doom.d'
let g:netrw_dirhist_4='/home/tstarr/devel/python/.git'
let g:netrw_dirhist_3='/home/tstarr/.ncmpcpp'
let g:netrw_dirhist_2='/home/tstarr/.config'
let g:netrw_dirhist_1='/home/tstarr/.config/ncmpcpp'

View File

@ -1,10 +1,10 @@
from libqtile.config import Key, Group from libqtile.config import Key, Group, ScratchPad, DropDown, Match, hook
from libqtile.command import lazy from libqtile.command import lazy
from settings.keys import mod, keys from settings.keys import mod, keys
# Define groups I have # Define groups I have
groups = [Group(i) for i in [ groups = [Group(i) for i in [
"1", "2", "3", "4", "5", "6", "7", "8", "9", "1", "2", "3", "4", "5"
]] ]]
# Define keybinds for groups # Define keybinds for groups
@ -16,3 +16,12 @@ for i, group in enumerate(groups):
# Send window to workspace N # Send window to workspace N
Key([mod, "shift"], actual_key, lazy.window.togroup(group.name)) Key([mod, "shift"], actual_key, lazy.window.togroup(group.name))
]) ])
groups.append(
Group("Comm", spawn="discord", persist=True)
)
keys.extend([
Key([mod], "d", lazy.group["Comm"].toscreen())
])

View File

@ -1,9 +1,28 @@
from libqtile.config import EzKey from libqtile.config import EzKey
from libqtile.command import lazy from libqtile.command import lazy
from libqtile import qtile
# Set mod key to the "windows" key # Set mod key to the "windows" key
mod = "mod4" mod = "mod4"
def window_to_previous_screen(qtile):
i = qtile.screens.index(qtile.current_screen)
if i != 0:
group = qtile.screens[i - 1].group.name
qtile.current_window.togroup(group)
def window_to_next_screen(qtile):
i = qtile.screens.index(qtile.current_screen)
if i + 1 != len(qtile.screens):
group = qtile.screens[i + 1].group.name
qtile.current_window.togroup(group)
def switch_screens(qtile):
i = qtile.screens.index(qtile.current_screen)
group = qtile.screens[i - 1].group
qtile.current_screen.set_group(group)
# Define keybinds # Define keybinds
keys = [EzKey(k[0], *k[1:]) for k in [ keys = [EzKey(k[0], *k[1:]) for k in [
@ -13,9 +32,13 @@ keys = [EzKey(k[0], *k[1:]) for k in [
("M-j", lazy.layout.down()), ("M-j", lazy.layout.down()),
("M-k", lazy.layout.up()), ("M-k", lazy.layout.up()),
("M-l", lazy.layout.right()), ("M-l", lazy.layout.right()),
# Switch windows
("M-S-<space>", lazy.function(switch_screens)),
# Switch focus between two screens # Switch focus between two screens
("M-<comma>", lazy.to_screen(0)), ("M-<period>", lazy.next_screen()),
("M-<period>", lazy.to_screen(1)), ("M-<comma>", lazy.prev_screen()),
("M-S-<period>", lazy.function(window_to_next_screen)),
("M-S-<comma>", lazy.function(window_to_previous_screen)),
# Move windows around # Move windows around
("M-S-h", lazy.layout.shuffle_left(), ("M-S-h", lazy.layout.shuffle_left(),
lazy.layout.swap_left()), lazy.layout.swap_left()),
@ -52,7 +75,6 @@ keys = [EzKey(k[0], *k[1:]) for k in [
("M-d", lazy.spawn("discord")), ("M-d", lazy.spawn("discord")),
("M-e", lazy.spawn("emacs")), ("M-e", lazy.spawn("emacs")),
("M-g", lazy.spawn("lutris")), ("M-g", lazy.spawn("lutris")),
# Scratchpad toggles
# ------ System + Utils ------- # # ------ System + Utils ------- #
# Resart qtile # Resart qtile

View File

@ -25,6 +25,7 @@ floating_layout = layout.Floating(
float_rules=[ float_rules=[
{'wmclass': 'Steam'}, {'wmclass': 'Steam'},
{'wmclass': 'Wine'}, {'wmclass': 'Wine'},
{'wmclass': 'discord'},
], ],
border_focus=wal['colors']['color2'], border_focus=wal['colors']['color2'],
border_width=1, border_width=1,

View File

@ -2,56 +2,90 @@ from libqtile import widget
from settings.wal import wal from settings.wal import wal
spacer_len = 3 spacer_len = 3
wal_color = wal["colors"]
widget_defaults = dict( widget_defaults = dict(
font='JetBrains Mono Nerd Font', font='JetBrains Mono Nerd Font',
fontsize=10, fontsize=10,
padding=3, padding=3,
background = wal['colors']['color0'] background=wal_color['color0']
) )
extension_defaults = widget_defaults.copy() extension_defaults = widget_defaults.copy()
primary_widgets = [ primary_widgets = [
# Group Box widget.GroupBox(urgent_border=wal_color["color0"],
widget.GroupBox(active = wal['colors']['color0'], disable_drag=True,
inactive = wal['colors']['color0'], highlight_method="block",
urgent_text = wal['colors']['color0'], this_screen_border=wal_color["color2"],
background = wal['colors']['color1'], other_screen_border=wal_color["color6"],
this_current_screen_border = wal['colors']['color2'], this_current_screen_border=wal_color["color2"],
other_screen_border = wal['colors']['color2'], other_current_screen_border=wal_color["color6"],
urgent_border = wal['colors']['color6'], background=wal_color['color1'],
highlight_method='block', hide_unused=True,
rounded = False, visible_groups=["1", "2", "3", "4", "5"]),
hide_unused=True),
widget.TextBox(text='\uE0B0', widget.TextBox(text='\uE0B0',
fontsize=17, fontsize=17,
padding=0, padding=0,
foreground=wal['colors']['color1']), background=wal_color['color2'],
foreground=wal_color['color1']),
# Layout Name
widget.CurrentLayout(scale=0.6,
foreground=wal_color['color0'],
background=wal_color['color2']),
widget.TextBox(text='\uE0B0',
fontsize=17,
padding=0,
background=wal_color['color1'],
foreground=wal_color['color2']),
# Window count
widget.WindowCount(scale=0.6,
foreground=wal_color['color0'],
background=wal_color['color1']),
widget.TextBox(text='\uE0B0',
fontsize=17,
padding=0,
foreground=wal_color['color1']),
# Window Name # Window Name
widget.Spacer(length = spacer_len, widget.Spacer(length=spacer_len),
background = wal['colors']['color0']), widget.WindowName(foreground=wal_color['color2']),
widget.WindowName(), # System Tray
# Prompt widget.Systray(background=wal_color['color0'], padding=0),
widget.Prompt(), widget.Spacer(length=spacer_len,
background=wal_color['color0']),
# Cpu
widget.TextBox(text='\uE0B2', fontsize=17,
padding=0, foreground=wal_color['color2'],
background=wal_color['color0']),
widget.CPU(format='CPU {freq_current}GHz {load_percent}%',
update_interval=1.0,
foreground=wal_color['color0'],
background=wal_color['color2'],
padding=5),
# Network
widget.TextBox(text='\uE0B2', fontsize=17,
padding=0, foreground=wal_color['color1'],
background=wal_color['color2']),
widget.Net(interface='enp4s0', format='{down} ↓↑ {up}',
foreground=wal_color['color0'], background=wal_color['color1'],
padding=5),
# Volume # Volume
widget.TextBox(text = '\uE0B2', fontsize = 17, widget.TextBox(text='\uE0B2', fontsize=17,
padding = 0, foreground = wal['colors']['color2'], padding=0, foreground=wal_color['color2'],
background = wal['colors']['color0']), background=wal_color['color1']),
widget.TextBox(text = '', fontsize = 14, widget.TextBox(text='', fontsize=14,
foreground = wal['colors']['color0'], foreground=wal_color['color0'],
background = wal['colors']['color2']), background=wal_color['color2']),
widget.PulseVolume(foreground = wal['colors']['color0'], widget.PulseVolume(foreground=wal_color['color0'],
background = wal['colors']['color2']), background=wal_color['color2']),
widget.Spacer(length = spacer_len, widget.Spacer(length=spacer_len,
background = wal['colors']['color2']), background=wal_color['color2']),
# Clock # Clock
widget.TextBox(text = '\uE0B2', fontsize = 17, widget.TextBox(text='\uE0B2', fontsize=17,
padding = 0, foreground = wal['colors']['color1'], padding=0, foreground=wal_color['color1'],
background = wal['colors']['color2']), background=wal_color['color2']),
widget.Clock(format='%Y-%m-%d %a %I:%M %p', widget.Clock(format='%Y-%m-%d %a %I:%M %p',
background = wal['colors']['color1'], background=wal_color['color1'],
foreground = wal['colors']['color0']), foreground=wal_color['color0']),
widget.Spacer(length = spacer_len, widget.Spacer(length=spacer_len,
background = wal['colors']['color1']), background=wal_color['color1']),
widget.CurrentLayout(scale=0.6),
] ]

View File

@ -1,182 +0,0 @@
;;; +gtd.el -*- lexical-binding: t; -*-
(after! org
(setq org-capture (directory-files-recursively
(concat org-directory "gtd/capture/") "\.org$"))
(setq org-agenda (directory-files-recursively
(concat org-directory "gtd/agenda/") "\.org$"))
(setq org-todo (directory-files-recursively
(concat org-directory "gtd/todo/") "\.org$"))
(setq org-note (directory-files-recursively
(concat org-directory "gtd/note/") "\.org$"))
(setq org-agenda-files (append org-capture org-agenda org-todo))
(setq org-default-notes-file org-note)
(setq org-todo-keywords
(quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d)")
(sequence "WAITING(w@/!)" "HOLD(h@/!)" "|"
"CANCELLED(c@/!)"))))
; TODO add (1)...(10) numbers for task ordering (replacing "next")
(setq org-todo-keyword-faces
(quote (("TODO" :foreground "red" :weight bold)
("CHASE" :foreground "red" :weight bold)
("WIP" :foreground "blue" :weight bold)
("GAVE" :foreground "orange" :weight bold)
("KILL" :foreground "forest green" :weight bold)
("DONE" :foreground "forest green" :weight bold))))
(setq org-use-tag-inheritance t)
(setq org-tag-alist
'((:startgroup)
; Put mutually exclusive tags here
(:endgroup)
("@home" . ?H)
("@work" . ?W)
("note" . ?n)
("question" . ?q)
("habit" . ?h)
("recurring" . ?r)))
(setq org-capture-todo (concat org-directory "gtd/capture/inbox.org"))
(setq org-capture-note (concat org-directory "gtd/capture/note.org"))
(setq org-capture-templates
(doct '(("personal" :keys "p"
:children (("todo" :keys "t"
:file org-capture-todo
:template ("* TODO %? :@home:" "%a" "%U"))
("question" :keys "q"
:file org-capture-todo
:template ("* TODO Find out %? :question:@home:"
"%a"
"%U"))
("habit" :keys "h"
:file org-capture-todo
:template ("* NEXT %? :habit:@home:" "%U"
"SCHEDULED: %(format-time-string
\"%<<%Y-%m-%d %a .+1d/3d>>\")"
":PROPERTIES:" ":STYLE: habit"
":REPEAT_TO_STATE: NEXT" ":END:"))
("meeting" :keys "m"
:children (("reoccuring" :keys "r"
:file org-capture-todo
:template ("* NEXT %? :meeting:@home:"
"%U" "SCHEDULED:
%(format-time-string
\"%<<%Y-%m-%d %a +7d>>\")"
":PROPERTIES:"
":REPEAT_TO_STATE: NEXT"
":END:"))))
("note" :keys "n"
:file org-capture-note
:template ("* %? :note:@home:" "%U"))))
("work" :keys "w"
:children (("todo" :keys "t"
:file org-capture-todo
:template ("* TODO %? :@work:" "%U"))
("question" :keys "q"
:file org-capture-todo
:template ("* TODO Find out %? :question:@work:"
"%U"))
("habit" :keys "h"
:file org-capture-todo
:template ("* NEXT %? :habit:@work:" "%U"
"SCHEDULED: %(format-time-string
\"%<<%Y-%m-%d %a .+1d/3d>>\")"
":PROPERTIES:" ":STYLE: habit"
":REPEAT_TO_STATE: NEXT" ":END:"))
("meeting" :keys "m"
:children (("reoccuring" :keys "r"
:file org-capture-todo
:template ("* NEXT %? :meeting:@work:"
"%U" "SCHEDULED:
%(format-time-string
\"%<<%Y-%m-%d %a +7d>>\")"
":PROPERTIES:"
":REPEAT_TO_STATE: NEXT"
":END:"))))
("note" :keys "n"
:file org-capture-note
:template ("* %? :note:@work:" "%U")))))))
(setq org-refile-targets (quote ((nil :maxlevel . 3)
(org-agenda-files :maxlevel . 3))))
(advice-add 'org-refile :after 'org-save-all-org-buffers)
; Open a view with need buffers for planning!
(defun ts/replace-with-agenda-collection ()
(interactive)
(org-agenda nil "t")
(delete-other-windows)
(get-buffer "*Org Agenda*")
(org-ql-view "Week Overview")
(org-ql-view-sidebar))
(setq org-agenda-start-day "0d")
(setq org-agenda-custom-commands
'(("t" "Agenda for today" agenda ""
((org-agenda-overriding-header "Today's agenda")
(org-agenda-span 'day)))))
(setq org-ql-weekly-agenda
(cons "Weekly Agenda"
(lambda ()
"Open agenda for week."
(interactive)
(org-agenda nil "t"))))
(setq org-ql-refile-tasks
(cons "Tasks to Refile"
(lambda ()
"Find tasks to refile."
(interactive)
(org-ql-search (list org-capture-todo org-capture-note)
'(or (not (done))
(done))
:title "Tasks to Refile"
:sort '(date priority todo)
:super-groups '((:name "Todos"
:not (:tag "note"))
(:name "Notes"
:tag "note"))))))
(setq org-ql-weeks-progress
(cons "This Weeks Progress"
(lambda ()
"launch an agenda-like view at the specified date."
(interactive)
(let* ((ts (ts-now))
(beg-of-week (->> ts
(ts-adjust 'day (- (ts-dow (ts-now))))
(ts-apply :hour 0 :minute 0 :second 0)))
(end-of-week (->> ts
(ts-adjust 'day (- 6 (ts-dow (ts-now))))
(ts-apply :hour 23 :minute 59 :second 59))))
(org-ql-search (org-agenda-files)
'(ts-active :from beg-of-week :to end-of-week)
:title "Week Overview"
:sort '(date priority todo)
:super-groups '((:name "Late"
:scheduled past
:deadline past)
(:name "Today"
:time-grid t
:scheduled today
:deadline today)
(:name "Coming Up"
:scheduled future
:deadline future)))))))
(setq org-super-agenda-header-map (make-sparse-keymap))
(setq org-ql-views
(list org-ql-weekly-agenda
org-ql-refile-tasks
org-ql-weeks-progress))
(after! org-agenda
(org-super-agenda-mode))) ; Close the after! org expression from
; Org File Paths

View File

@ -1,3 +0,0 @@
;;; +org.el -*- lexical-binding: t; -*-
(after! org
(setq org-directory "~/documents/org/"))

View File

@ -1,24 +0,0 @@
;;; +ui.el -*- lexical-binding: t; -*-
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
;; are the three important ones:
;;
;; + `doom-font'
;; + `doom-variable-pitch-font'
;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;;
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
;; font string. You generally only need these two:
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
(setq doom-theme 'doom-dracula)
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type t)
(which-key-mode)

View File

@ -1,14 +1,44 @@
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- ;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
; Define This-System ;; DO NOT EDIT THIS FILE DIRECTLY
(setq this-system "kestrel") ;; This is a file generated from a literate programing source file located at
(setq system-category-1 '("kestrel" "basilisk" "adjudicator")) ;; https://github.com/starr-dusT/dotfiles/blob/master/.doom.d/doomed.org
(setq system-category-2 '("kestrel")) ;; You should make any changes there and regenerate it from Emacs org-mode
;; using org-babel-tangle (C-c C-v t)
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
;; Some functionality uses this to identify you, e.g. GPG configuration, email ;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets. ;; clients, file templates and snippets.
(setq user-full-name "Tyler Starr" ;; (setq user-full-name "John Doe"
user-mail-address "starrtyler88@gmail.com") ;; user-mail-address "john@doe.com")
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
;; are the three important ones:
;;
;; + `doom-font'
;; + `doom-variable-pitch-font'
;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;;
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
;; font string. You generally only need these two:
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
;; (setq doom-theme 'doom-one)
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
;; (setq org-directory "~/org/")
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
;; (setq display-line-numbers-type t)
;; Here are some additional functions/macros that could help you configure Doom: ;; Here are some additional functions/macros that could help you configure Doom:
;; ;;
@ -27,7 +57,189 @@
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how ;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented. ;; they are implemented.
;; Modules (setq this-system "kestrel")
(load! "+ui") (setq system-category-1 '("kestrel" "basilisk" "adjudicator"))
(load! "+org") (setq system-category-2 '("kestrel"))
(load! "+gtd")
(setq user-full-name "Tyler Starr"
user-mail-address "starrtyler88@gmail.com")
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
;; are the three important ones:
;;
;; + `doom-font'
;; + `doom-variable-pitch-font'
;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;;
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
;; font string. You generally only need these two:
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
(setq doom-theme 'doom-dracula)
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type 'relative)
(after! org
(setq org-directory "~/documents/org/")
(setq org-capture (directory-files-recursively
(concat org-directory "gtd/capture/") "\.org$"))
(setq org-agenda (directory-files-recursively
(concat org-directory "gtd/agenda/") "\.org$"))
(setq org-todo (directory-files-recursively
(concat org-directory "gtd/todo/") "\.org$"))
(setq org-agenda-files (append org-capture org-agenda org-todo))
(setq org-todo-keywords
(quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d)")
(sequence "WAITING(w@/!)" "HOLD(h@/!)" "|"
"CANCELLED(c@/!)"))))
; TODO add (1)...(10) numbers for task ordering (replacing "next")
(setq org-todo-keyword-faces
(quote (("TODO" :foreground "red" :weight bold)
("CHASE" :foreground "red" :weight bold)
("WIP" :foreground "blue" :weight bold)
("GAVE" :foreground "orange" :weight bold)
("KILL" :foreground "forest green" :weight bold)
("DONE" :foreground "forest green" :weight bold))))
(setq org-use-tag-inheritance t)
(setq org-tag-alist
'((:startgroup)
; Put mutually exclusive tags here
(:endgroup)
("@home" . ?H)
("@work" . ?W)
("note" . ?n)
("question" . ?q)
("habit" . ?h)
("recurring" . ?r)))
(setq org-capture-todo (concat org-directory "gtd/capture/inbox.org"))
(setq org-capture-templates
(doct '(("personal" :keys "p"
:children (("todo" :keys "t"
:file org-capture-todo
:template ("* TODO %? :@home:" "%a" "%U"))
("question" :keys "q"
:file org-capture-todo
:template ("* TODO Find out %? :question:@home:"
"%a"
"%U"))
("habit" :keys "h"
:file org-capture-todo
:template ("* NEXT %? :habit:@home:" "%U"
"SCHEDULED: %(format-time-string
\"%<<%Y-%m-%d %a .+1d/3d>>\")"
":PROPERTIES:" ":STYLE: habit"
":REPEAT_TO_STATE: NEXT" ":END:"))
("meeting" :keys "m"
:children (("reoccuring" :keys "r"
:file org-capture-todo
:template ("* NEXT %? :meeting:@home:"
"%U" "SCHEDULED:
%(format-time-string
\"%<<%Y-%m-%d %a +7d>>\")"
":PROPERTIES:"
":REPEAT_TO_STATE: NEXT"
":END:"))))))
("work" :keys "w"
:children (("todo" :keys "t"
:file org-capture-todo
:template ("* TODO %? :@work:" "%U"))
("question" :keys "q"
:file org-capture-todo
:template ("* TODO Find out %? :question:@work:"
"%U"))
("habit" :keys "h"
:file org-capture-todo
:template ("* NEXT %? :habit:@work:" "%U"
"SCHEDULED: %(format-time-string
\"%<<%Y-%m-%d %a .+1d/3d>>\")"
":PROPERTIES:" ":STYLE: habit"
":REPEAT_TO_STATE: NEXT" ":END:"))
("meeting" :keys "m"
:children (("reoccuring" :keys "r"
:file org-capture-todo
:template ("* NEXT %? :meeting:@work:"
"%U" "SCHEDULED:
%(format-time-string
\"%<<%Y-%m-%d %a +7d>>\")"
":PROPERTIES:"
":REPEAT_TO_STATE: NEXT"
":END:")))))))))
(setq org-refile-targets (quote ((nil :maxlevel . 3)
(org-agenda-files :maxlevel . 3))))
(advice-add 'org-refile :after 'org-save-all-org-buffers)
(setq org-agenda-start-day "0d")
(setq org-agenda-custom-commands
'(("t" "Agenda for today" agenda ""
((org-agenda-overriding-header "Today's agenda")
(org-agenda-span 'day)))))
(setq org-ql-weekly-agenda
(cons "Weekly Agenda"
(lambda ()
"Open agenda for week."
(interactive)
(org-agenda nil "t"))))
(setq org-ql-refile-tasks
(cons "Tasks to Refile"
(lambda ()
"Find tasks to refile."
(interactive)
(org-ql-search (list org-capture-todo)
'(or (not (done))
(done))
:title "Tasks to Refile"
:sort '(date priority todo)
:super-groups '((:name "Todos"
:not (:tag "note")))))))
(setq org-ql-weeks-progress
(cons "This Weeks Progress"
(lambda ()
"launch an agenda-like view at the specified date."
(interactive)
(let* ((ts (ts-now))
(beg-of-week (->> ts
(ts-adjust 'day (- (ts-dow (ts-now))))
(ts-apply :hour 0 :minute 0 :second 0)))
(end-of-week (->> ts
(ts-adjust 'day (- 6 (ts-dow (ts-now))))
(ts-apply :hour 23 :minute 59 :second 59))))
(org-ql-search (org-agenda-files)
'(ts-active :from beg-of-week :to end-of-week)
:title "Week Overview"
:sort '(date priority todo)
:super-groups '((:name "Late"
:scheduled past
:deadline past)
(:name "Today"
:time-grid t
:scheduled today
:deadline today)
(:name "Coming Up"
:scheduled future
:deadline future)))))))
(setq org-super-agenda-header-map (make-sparse-keymap))
(setq org-ql-views
(list org-ql-weekly-agenda
org-ql-refile-tasks
org-ql-weeks-progress))
(after! org-agenda
(org-super-agenda-mode))
(setq org-startup-folded t)
(setq org-src-preserve-indentation t)) ; Close the after! org expression from
; Org File Paths

View File

@ -1,59 +1,161 @@
#+TITLE: Doomed Config #+PROPERTY: header-args:emacs-lisp #+title: Doomed - Personal Doom Emacs Config
* Table of Contents #+author: Tyler Starr
:PROPERTIES: #+email: tyler@tstarr.us
:TOC: :include all :depth 3 #+keywords: org-mode Emacs Doom config
:END: * References
* [config.el] Configuring Emacs can be an obsession. I have bounced back and forth between my from [[https://github.com/starr-dusT/scratch][scratch]] config and doom. In the end I find it hard to give up all the amazing work [[https://github.com/hlissner][hlissner]] has put into doom. Doom really simpifies the process of configuring Emacs with lots of pre-made bits and a nice framework for configuration. As much as it annoys me to not completelty control the config of the whole system I must comprimise to maintain my sanity. Find some useful references below:
** Lexical Binding
Add lexical binding tag to top of config file. - [[https://github.com/hlissner/doom-emacs][Doom Emacs Github]]
- [[https://github.com/zzamboni/dot-doom][zzamboni's nice config]]
#+begin_src emacs-lisp :tangle "config.el" * Doom config file overview
Doom Emacs uses three config files:
- =init.el= defines which of the existing Doom [[https://github.com/hlissner/doom-emacs/blob/develop/docs/getting_started.org#modules][modules]] are loaded. A Doom module is a bundle of packages, configuration and commands, organized into a unit that can be toggled easily from this file.
- =packages.el= defines which [[https://github.com/hlissner/doom-emacs/blob/develop/docs/getting_started.org#package-management][packages]] should be installed, beyond those that are installed and loaded as part of the enabled modules.
- =config.el= contains all [[https://github.com/hlissner/doom-emacs/blob/develop/docs/getting_started.org#configuring-doom][custom configuration]] and code.
There are other files that can be loaded, but theses are the main ones. The load order of different files is [[https://github.com/hlissner/doom-emacs/blob/develop/docs/getting_started.org#load-order][defined depending on the type of session]] being started.
All the config files are generated from this Org file, to try and make its meaning as clear as possible. All =package!= declarations are written to =packages.el=, all other LISP code is written to =config.el=.
** Config file headers
We start by simply defining the standard headers used by the three files. These headers come from the initial files generated by =doom install=, and contain either some Emacs-LISP relevant indicators like =lexical-binding=, or instructions about the contents of the file.
#+html: <details><summary>init.el</summary>
#+begin_src emacs-lisp :tangle init.el
;;; init.el -*- lexical-binding: t; -*-
;; DO NOT EDIT THIS FILE DIRECTLY
;; This is a file generated from a literate programing source file located at
;; https://github.com/starr-dusT/dotfiles/blob/master/.doom.d/doomed.org
;; You should make any changes there and regenerate it from Emacs org-mode
;; using org-babel-tangle (C-c C-v 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 "Module Index" link where you'll find
;; a comprehensive list of Doom's modules and 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).
#+end_src
#+RESULTS:
#+html: </details>
#+html: <details><summary>packages.el</summary>
#+begin_src emacs-lisp :tangle packages.el
;; -*- no-byte-compile: t; -*-
;;; $DOOMDIR/packages.el
;; DO NOT EDIT THIS FILE DIRECTLY
;; This is a file generated from a literate programing source file located at
;; https://github.com/starr-dusT/dotfiles/blob/master/.doom.d/doomed.org
;; You should make any changes there and regenerate it from Emacs org-mode
;; using org-babel-tangle (C-c C-v t)
;; 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'.
;; 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/raxod502/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 specify
;; `: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 raxod502/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)
#+end_src
#+html: </details>
#+html: <details><summary>config.el</summary>
#+begin_src emacs-lisp :tangle config.el
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- ;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
#+end_src ;; DO NOT EDIT THIS FILE DIRECTLY
;; This is a file generated from a literate programing source file located at
;; https://github.com/starr-dusT/dotfiles/blob/master/.doom.d/doomed.org
;; You should make any changes there and regenerate it from Emacs org-mode
;; using org-babel-tangle (C-c C-v t)
** This-System ;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
This section aims to allow users to select which portions of the configuration are used on different systems by defining this-system and the possible categories for systems. This system is simply a name identifying the current system the config is being used on. Then the categories (system-category-1, system-category-2, ...) define the possible different combinations of different systems that use that portion of the config. An example of a tangle tag follows:
#+begin_src emacs-lisp
:tangle (if (member this-system system-category-1) "file.extension" "no")
#+end_src
The above statement indicates that for following portion of the config, if the current system is a member of category-1 then it will be tangled and thus effectively added to the final config. As such, we can define different categories for the different permutations of systems that may need different portions of the config. Hopefully that all makes sense :)
#+begin_src emacs-lisp :tangle "config.el"
; Define This-System
(setq this-system "kestrel")
(setq system-category-1 '("kestrel" "basilisk" "adjudicator"))
(setq system-category-2 '("kestrel"))
#+end_src
** Identity
Stolen from default [[https://github.com/hlissner/doom-emacs][doom]] config.
#+begin_src emacs-lisp :tangle "config.el"
;; Some functionality uses this to identify you, e.g. GPG configuration, email ;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets. ;; clients, file templates and snippets.
(setq user-full-name "Tyler Starr" ;; (setq user-full-name "John Doe"
user-mail-address "starrtyler88@gmail.com") ;; user-mail-address "john@doe.com")
#+end_src ;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
;; are the three important ones:
;;
;; + `doom-font'
;; + `doom-variable-pitch-font'
;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;;
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
;; font string. You generally only need these two:
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
** Modules ;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
;; (setq doom-theme 'doom-one)
Load modules with external configs. ;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
;; (setq org-directory "~/org/")
#+begin_src emacs-lisp :tangle "config.el" ;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
;; (setq display-line-numbers-type t)
;; Here are some additional functions/macros that could help you configure Doom: ;; Here are some additional functions/macros that could help you configure Doom:
;; ;;
@ -71,108 +173,10 @@ Load modules with external configs.
;; ;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how ;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented. ;; they are implemented.
;; Modules
(load! "+ui")
(load! "+org")
(load! "+gtd")
#+end_src #+end_src
* [packages.el] #+html: </details>
* Doom modules
#+begin_src emacs-lisp :tangle "packages.el" #+begin_src emacs-lisp :tangle init.el
;; -*- 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'.
;; 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/raxod502/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 specify
;; `: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 raxod502/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)
(package! doct)
(package! org-ql)
(package! org-super-agenda)
(package! org-super-agenda :recipe
(:host github
:repo "starr-dusT/org-super-agenda"
:branch "master"))
(package! org-ql :recipe
(:host github
:repo "starr-dusT/org-ql"
:branch "master"))
(package! burly.el :recipe
(:host github
:repo "starr-dusT/burly.el"
:branch "master"))
#+end_src
* [init.el]
#+begin_src emacs-lisp :tangle "init.el"
;;; 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 "Module Index" link where you'll find
;; a comprehensive list of Doom's modules and 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 (doom! :input
;;chinese ;;chinese
;;japanese ;;japanese
@ -219,7 +223,7 @@ Load modules with external configs.
;;lispy ; vim for lisp, for people who don't like vim ;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once ;;multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent ;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates ;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent ;;word-wrap ; soft wrapping with language-aware indent
@ -253,7 +257,7 @@ Load modules with external configs.
;;gist ; interacting with github gists ;;gist ; interacting with github gists
lookup ; navigate your code and its documentation lookup ; navigate your code and its documentation
;;lsp ;;lsp
magit ; a git porcelain for Emacs magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs ;;make ; run make tasks from Emacs
;;pass ; password manager for nerds ;;pass ; password manager for nerds
;;pdf ; pdf enhancements ;;pdf ; pdf enhancements
@ -309,7 +313,7 @@ Load modules with external configs.
;;php ; perl's insecure younger brother ;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more ;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional ;;purescript ; javascript, but functional
;;python ; beautiful is better than ugly python ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever ;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs ;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6 ;;raku ; the artist formerly known as perl6
@ -333,7 +337,7 @@ Load modules with external configs.
;;(wanderlust +gmail) ;;(wanderlust +gmail)
:app :app
;;calendar calendar
;;irc ; how neckbeards socialize ;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader ;;(rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought ;;twitter ; twitter client https://twitter.com/vnought
@ -341,14 +345,39 @@ Load modules with external configs.
:config :config
;;literate ;;literate
(default +bindings +smartparens)) (default +bindings +smartparens))
#+end_src #+end_src
* [+ui.el] #+begin_src emacs-lisp :tangle packages.el
(package! doct)
#+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "+ui.el" "no") (package! org-super-agenda :recipe
(:host github
:repo "starr-dusT/org-super-agenda"
:branch "master"))
;;; +ui.el -*- lexical-binding: t; -*- (package! org-ql :recipe
(:host github
:repo "starr-dusT/org-ql"
:branch "master"))
(package! burly.el :recipe
(:host github
:repo "starr-dusT/burly.el"
:branch "master"))
#+end_src
* General Configuration
** This System
#+begin_src emacs-lisp :tangle "config.el"
(setq this-system "kestrel")
(setq system-category-1 '("kestrel" "basilisk" "adjudicator"))
(setq system-category-2 '("kestrel"))
#+end_src
** Identity
#+begin_src emacs-lisp :tangle "config.el"
(setq user-full-name "Tyler Starr"
user-mail-address "starrtyler88@gmail.com")
#+end_src
** User Interface
#+begin_src emacs-lisp :tangle "config.el"
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here ;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
;; are the three important ones: ;; are the three important ones:
;; ;;
@ -368,63 +397,35 @@ Load modules with external configs.
;; This determines the style of line numbers in effect. If set to `nil', line ;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'. ;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type t) (setq display-line-numbers-type 'relative)
(which-key-mode)
#+end_src #+end_src
* [+org.el] ** Keybindings
* Org mode
#+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "+org.el" "no") ** Org directories
;;; +org.el -*- lexical-binding: t; -*-
(after! org
(setq org-directory "~/documents/org/"))
#+end_src
* [+gtd.el]
** Lexical Binding
Add lexical binding tag to top of the file.
#+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "+gtd.el" "no")
;;; +gtd.el -*- lexical-binding: t; -*-
#+end_src
** Org File Paths
Define the folder structure for my gtd-esque setup. I don't declaritvely define every file within this folder stucture, but search for .org files within four primary folders: capture, agenda, todo, and note. Define the folder structure for my gtd-esque setup. I don't declaritvely define every file within this folder stucture, but search for .org files within four primary folders: capture, agenda, todo, and note.
#+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "+gtd.el" "no") #+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "config.el" "no")
(after! org (after! org
(setq org-directory "~/documents/org/")
(setq org-capture (directory-files-recursively (setq org-capture (directory-files-recursively
(concat org-directory "gtd/capture/") "\.org$")) (concat org-directory "gtd/capture/") "\.org$"))
(setq org-agenda (directory-files-recursively (setq org-agenda (directory-files-recursively
(concat org-directory "gtd/agenda/") "\.org$")) (concat org-directory "gtd/agenda/") "\.org$"))
(setq org-todo (directory-files-recursively (setq org-todo (directory-files-recursively
(concat org-directory "gtd/todo/") "\.org$")) (concat org-directory "gtd/todo/") "\.org$"))
(setq org-note (directory-files-recursively
(concat org-directory "gtd/note/") "\.org$"))
(setq org-agenda-files (append org-capture org-agenda org-todo)) (setq org-agenda-files (append org-capture org-agenda org-todo))
(setq org-default-notes-file org-note)
#+end_src #+end_src
** Get Things Done (GTD)
** Tasks *** Tasks
Define the org todo keywords we'll use. Define the org todo keywords we'll use.
#+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "+gtd.el" "no") #+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "config.el" "no")
(setq org-todo-keywords (setq org-todo-keywords
(quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d)") (quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d)")
(sequence "WAITING(w@/!)" "HOLD(h@/!)" "|" (sequence "WAITING(w@/!)" "HOLD(h@/!)" "|"
"CANCELLED(c@/!)")))) "CANCELLED(c@/!)"))))
; TODO add (1)...(10) numbers for task ordering (replacing "next") ; TODO add (1)...(10) numbers for task ordering (replacing "next")
(setq org-todo-keyword-faces (setq org-todo-keyword-faces
(quote (("TODO" :foreground "red" :weight bold) (quote (("TODO" :foreground "red" :weight bold)
@ -433,50 +434,41 @@ Define the org todo keywords we'll use.
("GAVE" :foreground "orange" :weight bold) ("GAVE" :foreground "orange" :weight bold)
("KILL" :foreground "forest green" :weight bold) ("KILL" :foreground "forest green" :weight bold)
("DONE" :foreground "forest green" :weight bold)))) ("DONE" :foreground "forest green" :weight bold))))
#+end_src #+end_src
** Tags *** Tags
Define the A tier tags. Define the A tier tags.
#+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "+gtd.el" "no") #+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "config.el" "no")
(setq org-use-tag-inheritance t)
(setq org-use-tag-inheritance t) (setq org-tag-alist
'((:startgroup)
(setq org-tag-alist ; Put mutually exclusive tags here
'((:startgroup) (:endgroup)
; Put mutually exclusive tags here ("@home" . ?H)
(:endgroup) ("@work" . ?W)
("@home" . ?H) ("note" . ?n)
("@work" . ?W) ("question" . ?q)
("note" . ?n) ("habit" . ?h)
("question" . ?q) ("recurring" . ?r)))
("habit" . ?h)
("recurring" . ?r)))
#+end_src #+end_src
** Capture *** Capture
*** Capture File Paths **** Capture File Paths
Define the different files that are used for capture. Currently, I use inbox.org for TODO esque items and note.org for notes. Define the different files that are used for capture. Currently, I use inbox.org for TODO esque items and note.org for notes.
#+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "+gtd.el" "no") #+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "config.el" "no")
(setq org-capture-todo (concat org-directory "gtd/capture/inbox.org")) (setq org-capture-todo (concat org-directory "gtd/capture/inbox.org"))
(setq org-capture-note (concat org-directory "gtd/capture/note.org"))
#+end_src #+end_src
*** Capture Templates **** Capture Templates
Setup org-capture templates for nice capturing. Setup org-capture templates for nice capturing.
Allowable tags: @work, @home, note, question, habit Allowable tags: @work, @home, note, question, habit
#+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "+gtd.el" "no") #+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "config.el" "no")
(setq org-capture-templates (setq org-capture-templates
(doct '(("personal" :keys "p" (doct '(("personal" :keys "p"
:children (("todo" :keys "t" :children (("todo" :keys "t"
@ -503,10 +495,7 @@ Allowable tags: @work, @home, note, question, habit
\"%<<%Y-%m-%d %a +7d>>\")" \"%<<%Y-%m-%d %a +7d>>\")"
":PROPERTIES:" ":PROPERTIES:"
":REPEAT_TO_STATE: NEXT" ":REPEAT_TO_STATE: NEXT"
":END:")))) ":END:"))))))
("note" :keys "n"
:file org-capture-note
:template ("* %? :note:@home:" "%U"))))
("work" :keys "w" ("work" :keys "w"
:children (("todo" :keys "t" :children (("todo" :keys "t"
:file org-capture-todo :file org-capture-todo
@ -531,133 +520,100 @@ Allowable tags: @work, @home, note, question, habit
\"%<<%Y-%m-%d %a +7d>>\")" \"%<<%Y-%m-%d %a +7d>>\")"
":PROPERTIES:" ":PROPERTIES:"
":REPEAT_TO_STATE: NEXT" ":REPEAT_TO_STATE: NEXT"
":END:")))) ":END:")))))))))
("note" :keys "n"
:file org-capture-note
:template ("* %? :note:@work:" "%U")))))))
#+end_src #+end_src
*** Refile
** Refile
Set various refile settings. Mostly stolen from the great http://doc.norang.ca/org-mode.html. Set various refile settings. Mostly stolen from the great http://doc.norang.ca/org-mode.html.
#+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "+gtd.el" "no") #+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "config.el" "no")
(setq org-refile-targets (quote ((nil :maxlevel . 3)
(setq org-refile-targets (quote ((nil :maxlevel . 3) (org-agenda-files :maxlevel . 3))))
(org-agenda-files :maxlevel . 3)))) (advice-add 'org-refile :after 'org-save-all-org-buffers)
(advice-add 'org-refile :after 'org-save-all-org-buffers)
#+end_src #+end_src
** Views *** Views
*** Agenda **** Agenda
Currenlty I prefer to used vanilla Org-Agenda to view currently scheduled agenda items without any fancy sorting or anything like that. Currenlty I prefer to used vanilla Org-Agenda to view currently scheduled agenda items without any fancy sorting or anything like that.
#+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "+gtd.el" "no") #+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "config.el" "no")
(setq org-agenda-start-day "0d")
; Open a view with need buffers for planning! (setq org-agenda-custom-commands
(defun ts/replace-with-agenda-collection () '(("t" "Agenda for today" agenda ""
(interactive) ((org-agenda-overriding-header "Today's agenda")
(org-agenda nil "t") (org-agenda-span 'day)))))
(delete-other-windows)
(get-buffer "*Org Agenda*")
(org-ql-view "Week Overview")
(org-ql-view-sidebar))
(setq org-agenda-start-day "0d")
(setq org-agenda-custom-commands
'(("t" "Agenda for today" agenda ""
((org-agenda-overriding-header "Today's agenda")
(org-agenda-span 'day)))))
#+end_src #+end_src
*** Org-ql **** Org-ql
Following config items will utilizes the awesome [[https://github.com/alphapapa/org-ql#function-org-ql-block][org-ql]] and [[https://github.com/alphapapa/org-super-agenda][super-org-agenda]] to setup custom views with fancy sorting and insights. More details to follow! Following config items will utilizes the awesome [[https://github.com/alphapapa/org-ql#function-org-ql-block][org-ql]] and [[https://github.com/alphapapa/org-super-agenda][super-org-agenda]] to setup custom views with fancy sorting and insights. More details to follow!
**** Weekly Agenda ***** Weekly Agenda
#+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "config.el" "no")
#+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "+gtd.el" "no") (setq org-ql-weekly-agenda
(cons "Weekly Agenda"
(setq org-ql-weekly-agenda (lambda ()
(cons "Weekly Agenda" "Open agenda for week."
(lambda () (interactive)
"Open agenda for week." (org-agenda nil "t"))))
(interactive)
(org-agenda nil "t"))))
#+end_src #+end_src
***** Tasks to Refile
**** Tasks to Refile #+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "config.el" "no")
(setq org-ql-refile-tasks
#+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "+gtd.el" "no") (cons "Tasks to Refile"
(lambda ()
(setq org-ql-refile-tasks "Find tasks to refile."
(cons "Tasks to Refile" (interactive)
(lambda () (org-ql-search (list org-capture-todo)
"Find tasks to refile." '(or (not (done))
(interactive) (done))
(org-ql-search (list org-capture-todo org-capture-note) :title "Tasks to Refile"
'(or (not (done)) :sort '(date priority todo)
(done)) :super-groups '((:name "Todos"
:title "Tasks to Refile" :not (:tag "note")))))))
:sort '(date priority todo)
:super-groups '((:name "Todos"
:not (:tag "note"))
(:name "Notes"
:tag "note"))))))
#+end_src #+end_src
***** This Weeks Progress
**** This Weeks Progress #+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "config.el" "no")
(setq org-ql-weeks-progress
#+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "+gtd.el" "no") (cons "This Weeks Progress"
(lambda ()
(setq org-ql-weeks-progress "launch an agenda-like view at the specified date."
(cons "This Weeks Progress" (interactive)
(lambda () (let* ((ts (ts-now))
"launch an agenda-like view at the specified date." (beg-of-week (->> ts
(interactive) (ts-adjust 'day (- (ts-dow (ts-now))))
(let* ((ts (ts-now)) (ts-apply :hour 0 :minute 0 :second 0)))
(beg-of-week (->> ts (end-of-week (->> ts
(ts-adjust 'day (- (ts-dow (ts-now)))) (ts-adjust 'day (- 6 (ts-dow (ts-now))))
(ts-apply :hour 0 :minute 0 :second 0))) (ts-apply :hour 23 :minute 59 :second 59))))
(end-of-week (->> ts (org-ql-search (org-agenda-files)
(ts-adjust 'day (- 6 (ts-dow (ts-now)))) '(ts-active :from beg-of-week :to end-of-week)
(ts-apply :hour 23 :minute 59 :second 59)))) :title "Week Overview"
(org-ql-search (org-agenda-files) :sort '(date priority todo)
'(ts-active :from beg-of-week :to end-of-week) :super-groups '((:name "Late"
:title "Week Overview" :scheduled past
:sort '(date priority todo) :deadline past)
:super-groups '((:name "Late" (:name "Today"
:scheduled past :time-grid t
:deadline past) :scheduled today
(:name "Today" :deadline today)
:time-grid t (:name "Coming Up"
:scheduled today :scheduled future
:deadline today) :deadline future)))))))
(:name "Coming Up"
:scheduled future
:deadline future)))))))
#+end_src #+end_src
***** Final
**** Final #+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "config.el" "no")
(setq org-super-agenda-header-map (make-sparse-keymap))
#+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "+gtd.el" "no") (setq org-ql-views
(list org-ql-weekly-agenda
(setq org-super-agenda-header-map (make-sparse-keymap)) org-ql-refile-tasks
org-ql-weeks-progress))
(setq org-ql-views (after! org-agenda
(list org-ql-weekly-agenda (org-super-agenda-mode))
org-ql-refile-tasks #+end_src
org-ql-weeks-progress)) ** Misc small settings
(after! org-agenda #+begin_src emacs-lisp :tangle (if (member this-system system-category-1) "config.el" "no")
(org-super-agenda-mode))) ; Close the after! org expression from (setq org-startup-folded t)
; Org File Paths (setq org-src-preserve-indentation t)) ; Close the after! org expression from
; Org File Paths
#+end_src #+end_src

View File

@ -1,5 +1,11 @@
;;; init.el -*- lexical-binding: t; -*- ;;; init.el -*- lexical-binding: t; -*-
;; DO NOT EDIT THIS FILE DIRECTLY
;; This is a file generated from a literate programing source file located at
;; https://github.com/starr-dusT/dotfiles/blob/master/.doom.d/doomed.org
;; You should make any changes there and regenerate it from Emacs org-mode
;; using org-babel-tangle (C-c C-v t)
;; This file controls what Doom modules are enabled and what order they load ;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it! ;; in. Remember to run 'doom sync' after modifying it!
@ -29,7 +35,7 @@
;;deft ; notational velocity for Emacs ;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs doom-dashboard ; a nifty splash screen for Emacs
doom-quit ; DOOM quit-message prompts when you quit Emacs ;;doom-quit ; DOOM quit-message prompts when you quit Emacs
;;(emoji +unicode) ; 🙂 ;;(emoji +unicode) ; 🙂
;;fill-column ; a `fill-column' indicator ;;fill-column ; a `fill-column' indicator
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
@ -60,7 +66,7 @@
;;lispy ; vim for lisp, for people who don't like vim ;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once ;;multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent ;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates ;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent ;;word-wrap ; soft wrapping with language-aware indent
@ -94,7 +100,7 @@
;;gist ; interacting with github gists ;;gist ; interacting with github gists
lookup ; navigate your code and its documentation lookup ; navigate your code and its documentation
;;lsp ;;lsp
magit ; a git porcelain for Emacs magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs ;;make ; run make tasks from Emacs
;;pass ; password manager for nerds ;;pass ; password manager for nerds
;;pdf ; pdf enhancements ;;pdf ; pdf enhancements
@ -150,7 +156,7 @@
;;php ; perl's insecure younger brother ;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more ;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional ;;purescript ; javascript, but functional
;;python ; beautiful is better than ugly python ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever ;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs ;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6 ;;raku ; the artist formerly known as perl6
@ -174,7 +180,7 @@
;;(wanderlust +gmail) ;;(wanderlust +gmail)
:app :app
;;calendar calendar
;;irc ; how neckbeards socialize ;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader ;;(rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought ;;twitter ; twitter client https://twitter.com/vnought

View File

@ -1,57 +1,59 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; $DOOMDIR/packages.el ;;; $DOOMDIR/packages.el
;; DO NOT EDIT THIS FILE DIRECTLY
;; This is a file generated from a literate programing source file located at
;; https://github.com/starr-dusT/dotfiles/blob/master/.doom.d/doomed.org
;; You should make any changes there and regenerate it from Emacs org-mode
;; using org-babel-tangle (C-c C-v t)
;; To install a package with Doom you must declare them here and run 'doom sync' ;; 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 ;; on the command line, then restart Emacs for the changes to take effect -- or
;; use 'M-x doom/reload'. ;; use 'M-x doom/reload'.
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: ;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
;(package! some-package) ;;(package! some-package)
;; To install a package directly from a remote git repo, you must specify a ;; To install a package directly from a remote git repo, you must specify a
;; `:recipe'. You'll find documentation on what `:recipe' accepts here: ;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
;; https://github.com/raxod502/straight.el#the-recipe-format ;; https://github.com/raxod502/straight.el#the-recipe-format
;(package! another-package ;;(package! another-package
; :recipe (:host github :repo "username/repo")) ;; :recipe (:host github :repo "username/repo"))
;; If the package you are trying to install does not contain a PACKAGENAME.el ;; 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 specify ;; file, or is located in a subdirectory of the repo, you'll need to specify
;; `:files' in the `:recipe': ;; `:files' in the `:recipe':
;(package! this-package ;;(package! this-package
; :recipe (:host github :repo "username/repo" ;; :recipe (:host github :repo "username/repo"
; :files ("some-file.el" "src/lisp/*.el"))) ;; :files ("some-file.el" "src/lisp/*.el")))
;; If you'd like to disable a package included with Doom, you can do so here ;; If you'd like to disable a package included with Doom, you can do so here
;; with the `:disable' property: ;; with the `:disable' property:
;(package! builtin-package :disable t) ;;(package! builtin-package :disable t)
;; You can override the recipe of a built in package without having to specify ;; 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 ;; all the properties for `:recipe'. These will inherit the rest of its recipe
;; from Doom or MELPA/ELPA/Emacsmirror: ;; from Doom or MELPA/ELPA/Emacsmirror:
;(package! builtin-package :recipe (:nonrecursive t)) ;;(package! builtin-package :recipe (:nonrecursive t))
;(package! builtin-package-2 :recipe (:repo "myfork/package")) ;;(package! builtin-package-2 :recipe (:repo "myfork/package"))
;; Specify a `:branch' to install a package from a particular branch or tag. ;; 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 ;; This is required for some packages whose default branch isn't 'master' (which
;; our package manager can't deal with; see raxod502/straight.el#279) ;; our package manager can't deal with; see raxod502/straight.el#279)
;(package! builtin-package :recipe (:branch "develop")) ;;(package! builtin-package :recipe (:branch "develop"))
;; Use `:pin' to specify a particular commit to install. ;; Use `:pin' to specify a particular commit to install.
;(package! builtin-package :pin "1a2b3c4d5e") ;;(package! builtin-package :pin "1a2b3c4d5e")
;; Doom's packages are pinned to a specific commit and updated from release to ;; Doom's packages are pinned to a specific commit and updated from release to
;; release. The `unpin!' macro allows you to unpin single packages... ;; release. The `unpin!' macro allows you to unpin single packages...
;(unpin! pinned-package) ;;(unpin! pinned-package)
;; ...or multiple packages ;; ...or multiple packages
;(unpin! pinned-package another-pinned-package) ;;(unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t) ;;(unpin! t)
(package! doct) (package! doct)
(package! org-ql)
(package! org-super-agenda)
(package! org-super-agenda :recipe (package! org-super-agenda :recipe
(:host github (:host github