summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2024-05-17 17:21:21 -0500
committerMarc Coquand <marc@mccd.space>2024-05-17 17:21:21 -0500
commit6ab72d656c2030dbe685f0a3ab9549edb3634e88 (patch)
treed051c4b7121f7155553bd3f0232d10de971e88f4
parent5933406a6a420baca6e00ab73b258702184b98ca (diff)
downloadrcm-6ab72d656c2030dbe685f0a3ab9549edb3634e88.tar.gz
rcm-6ab72d656c2030dbe685f0a3ab9549edb3634e88.tar.bz2
rcm-6ab72d656c2030dbe685f0a3ab9549edb3634e88.zip
Updates
Diffstat (limited to '')
-rwxr-xr-xconfig/hikari/autostart2
-rw-r--r--config/hikari/hikari.conf3
-rw-r--r--config/kak/kakrc6
-rw-r--r--kshrc36
-rw-r--r--profile5
-rw-r--r--repository.list4
6 files changed, 45 insertions, 11 deletions
diff --git a/config/hikari/autostart b/config/hikari/autostart
index 5ec6524..e60b65b 100755
--- a/config/hikari/autostart
+++ b/config/hikari/autostart
@@ -8,4 +8,4 @@ gsettings set org.gnome.desktop.interface cursor-theme Adwaita
gsettings set org.gnome.desktop.wm.preferences button-layout ""
pulseaudio
-
+waybar
diff --git a/config/hikari/hikari.conf b/config/hikari/hikari.conf
index cee9ffb..411fec6 100644
--- a/config/hikari/hikari.conf
+++ b/config/hikari/hikari.conf
@@ -60,6 +60,7 @@ layouts {
actions {
terminal = "foot"
emacs = "emacsclient -nc"
+ email = "foot aerc"
browser = "firefox"
bemenu = "/bin/bash -c bemenu-toggle"
brightness-down = "light -U 10"
@@ -166,7 +167,7 @@ bindings {
"L+q" = view-quit
"L+Return" = action-terminal
- "L+e" = action-emacs
+ "L+e" = action-email
"L+Space" = action-bemenu
"0+XF86MonBrightnessUp" = action-brightness-up
diff --git a/config/kak/kakrc b/config/kak/kakrc
index 26b0a88..72fd200 100644
--- a/config/kak/kakrc
+++ b/config/kak/kakrc
@@ -15,7 +15,7 @@ hook global WinSetOption filetype=(rust|python|nim|go|javascript|typescript|c|cp
lsp-enable-window
lsp-auto-hover-insert-mode-enable
}
-hook global WinSetOption filetype=(eml|markdown) %{
+hook global WinSetOption filetype=(eml|markdown|org) %{
spell
}
hook global BufSetOption filetype=(javascript|typescript) %{
@@ -51,6 +51,7 @@ complete-command z shell-script-candidates %{ zoxide query -l }
# --- KEYMAPS
+map global user w '|fmt --width 80<ret>' -docstring "Wrap to 80 columns"
map global user l %{:enter-user-mode lsp<ret>} -docstring "LSP mode"
map global insert <tab> '<a-;>:try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks <lt>tab> }<ret>' -docstring 'Select next snippet placeholder'
map global object a '<a-semicolon>lsp-object<ret>' -docstring 'LSP any symbol'
@@ -135,6 +136,9 @@ hook global WinCreate .* %{ expandtab }
# Enable spelling for markdown
hook global WinCreate filetype=(markdown) %{ spell }
+# Wrap for org and markdown
+hook global WinCreate filetype=(markdown|org) %{ autowrap-enable }
+
# Softwrap long lines
add-highlighter global/ wrap -word -indent
diff --git a/kshrc b/kshrc
index 54c49c4..45516c5 100644
--- a/kshrc
+++ b/kshrc
@@ -12,24 +12,44 @@ alias de='eval "$(direnv export bash)"'
alias f-commit="fossil commit && fossil git export"
PS1='$(git branch 2> /dev/null | grep "^\*" | colrm 1 2 | sed -e "s/$/./")${PWD##*/} '
-export STITCH_DIRECTORY=/home/mccd/notes
-export STITCH_GREP_CMD=ugrep
function log {
JRNL="$STITCH_DIRECTORY/$(date +'%y-%m-%d.%H:%M.%S').org"
- echo '* :journal:' >> $JRNL
- kak "$JRNL" +1:3 -e "execute-keys i"
+ echo '* :journal:' > /tmp/capture
+ kak /tmp/capture +1:3 -e "execute-keys i"
+ if grep -q '^\*\s*:journal:' /tmp/capture
+ then
+ echo "Empty capture; ignoring"
+ else
+ echo "Storing capture in $JRNL"
+ cat /tmp/capture > $JRNL
+ fi
}
function capture {
JRNL="$STITCH_DIRECTORY/$(date +'%y-%m-%d.%H:%M.%S').org"
- echo '* ' >> $JRNL
- kak "$JRNL" +1:3 -e "execute-keys i"
+ echo '* ' > /tmp/capture
+ kak /tmp/capture +1:3 -e "execute-keys i"
+ if grep -q '^\*\s*$' /tmp/capture
+ then
+ echo "Empty capture; ignoring"
+ else
+ echo "Storing capture in $JRNL"
+ cat /tmp/capture > $JRNL
+ fi
}
function todo {
+ TODO_BASE='* TODO '
JRNL="$STITCH_DIRECTORY/$(date +'%y-%m-%d.%H:%M.%S').org"
- echo '* TODO ' >> $JRNL
- kak "$JRNL" +1:8 -e "execute-keys i"
+ echo '* TODO ' > /tmp/capture
+ kak /tmp/capture +1:8 -e "execute-keys i"
+ if grep -q '^\* TODO\s*$' /tmp/capture
+ then
+ echo "Empty capture"
+ else
+ echo "Storing capture in $JRNL"
+ cat /tmp/capture > $JRNL
+ fi
}
alias jrnl='stitch -t :journal:'
diff --git a/profile b/profile
index 985a4d0..aadb93e 100644
--- a/profile
+++ b/profile
@@ -18,6 +18,11 @@ export PATH=${PATH}:~/.local/bin
export ENV=$HOME/.kshrc
export HISTFILE=$HOME/.history
export HISTSIZE=65535
+export STITCH_DIRECTORY=/home/mccd/notes
+export STITCH_GREP_CMD=ugrep
+
if [ "$(tty)" == "/dev/tty1" ]; then exec dbus-run-session hikari; fi
+# opam configuration
+test -r /home/mccd/.opam/opam-init/init.sh && . /home/mccd/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
diff --git a/repository.list b/repository.list
index 3c204b4..6ea6875 100644
--- a/repository.list
+++ b/repository.list
@@ -76,3 +76,7 @@ chromium
kak-lsp
Waybar
aerc
+dante
+pandoc
+podman
+asciinema