From ee9f7a5c231041caf4569d5faa0ef9c3e356c261 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Mon, 14 Feb 2022 02:21:35 -0800 Subject: [PATCH 01/14] pandoc-md: add pandoc-md (simple markdown to html converter) --- .config/shell/bin/pandoc-md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 .config/shell/bin/pandoc-md diff --git a/.config/shell/bin/pandoc-md b/.config/shell/bin/pandoc-md new file mode 100755 index 0000000..e10e733 --- /dev/null +++ b/.config/shell/bin/pandoc-md @@ -0,0 +1,6 @@ +#!/bin/bash +if [ -f "$1.md" ]; then + pandoc -s "$1.md" -o "$1.html" +else + echo "Please specify a file name (without the .md extension)" +fi From 462eb3aab68e0508d48d94bd8076c73c92aee404 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Tue, 15 Feb 2022 01:05:08 -0800 Subject: [PATCH 02/14] nvim: remap: Q is now z= --- .config/nvim/lua/blake/settings.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/nvim/lua/blake/settings.lua b/.config/nvim/lua/blake/settings.lua index b840258..b1edb73 100644 --- a/.config/nvim/lua/blake/settings.lua +++ b/.config/nvim/lua/blake/settings.lua @@ -98,8 +98,8 @@ vim.cmd 'nnoremap l' vim.cmd "vnoremap J :m '>+1gv=gv" vim.cmd "vnoremap K :m '<-2gv=gv" --- Format text with Q, rather than gw -vim.cmd 'nnoremap Q gw' +-- Spell correct with Q +vim.cmd 'nnoremap Q z=' ---------------------------------------------- --- Things that can't be translated to lua --- From 13336b7ec4a2cc327cea29e72668a28d6e2f36ed Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Thu, 17 Feb 2022 10:59:09 -0800 Subject: [PATCH 03/14] termux: better vim macros (press escape twice) --- .config/termux/termux.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/termux/termux.properties b/.config/termux/termux.properties index f3ec189..fd0f5b4 100755 --- a/.config/termux/termux.properties +++ b/.config/termux/termux.properties @@ -3,8 +3,8 @@ ### wiki: https://wiki.termux.com/wiki/Touch_Keyboard extra-keys = [ \ - [{key: 'ESC', popup: {macro: "ESC S", display: ""}},{key: '-', popup: '_'},{key: '/', popup: '\\\\'},{key: '|', popup: '_'},{key: 'HOME', popup: '['},{key: 'UP', popup: 'KEYBOARD'},{key: 'END', popup: ']'},'BKSP',{key: 'DEL', popup: 'ESC'}], \ - ['TAB',{key: ':', popup: {macro: "ESC : w q ENTER", display: "vim exit"}},{key: 'CTRL', popup: {macro: 'CTRL c', display: ''}},{key: '=', popup: {key: '~'}},{key: 'LEFT', popup: '{'},{key: 'DOWN', popup: 'TAB'},{key: 'RIGHT', popup: '}'},{key: "'", popup: '"'},{key: 'ENTER', popup: {macro: 'ESC S todo ENTER', popup: 'todo'}}] \ + [{key: 'ESC', popup: {macro: "ESC ESC S", display: ""}},{key: '-', popup: '_'},{key: '/', popup: '\\\\'},{key: '|', popup: '_'},{key: 'HOME', popup: '['},{key: 'UP', popup: 'KEYBOARD'},{key: 'END', popup: ']'},'BKSP',{key: 'DEL', popup: 'ESC'}], \ + ['TAB',{key: ':', popup: {macro: "ESC ESC : w q ENTER", display: "vim exit"}},{key: 'CTRL', popup: {macro: 'CTRL c', display: ''}},{key: '=', popup: {key: '~'}},{key: 'LEFT', popup: '{'},{key: 'DOWN', popup: 'TAB'},{key: 'RIGHT', popup: '}'},{key: "'", popup: '"'},{key: 'ENTER', popup: {macro: 'ESC ESC S todo ENTER', popup: 'todo'}}] \ ] # remove home and end, move control and alt to the left From 4c74877166b090035206a9b3b21575981bfe891a Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Thu, 17 Feb 2022 11:00:24 -0800 Subject: [PATCH 04/14] termux: allow external apps --- .config/termux/colors.properties | 0 .config/termux/termux.properties | 1 + 2 files changed, 1 insertion(+) mode change 100755 => 100644 .config/termux/colors.properties mode change 100755 => 100644 .config/termux/termux.properties diff --git a/.config/termux/colors.properties b/.config/termux/colors.properties old mode 100755 new mode 100644 diff --git a/.config/termux/termux.properties b/.config/termux/termux.properties old mode 100755 new mode 100644 index f3ec189..1308931 --- a/.config/termux/termux.properties +++ b/.config/termux/termux.properties @@ -9,6 +9,7 @@ extra-keys = [ \ # remove home and end, move control and alt to the left +allow-external-apps = true ############### # Extra keys From 3a3b36505b0890d8e2408d22fc84af79ad239f67 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Thu, 17 Feb 2022 18:29:54 -0800 Subject: [PATCH 05/14] alacritty: add fallback font name --- .config/alacritty/alacritty.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml index 43e59d8..aefdfb4 100644 --- a/.config/alacritty/alacritty.yml +++ b/.config/alacritty/alacritty.yml @@ -32,13 +32,16 @@ colors: font: # The normal (roman) font face to use. normal: - family: Sauce Code Pro NF + - family: Sauce Code Pro NF + - family: SauceCodePro Nerd Font Regular # The bold font face bold: - family: Sauce Code Pro NF + - family: Sauce Code Pro NF + - family: SauceCodePro Nerd Font Regular # The italic font face italic: - family: Sauce Code Pro NF + - family: Sauce Code Pro NF + - family: SauceCodePro Nerd Font Regular # sizes that work well for 1920 by 1080: 14 (large), 12 (wide), 11.5 (narrow) size: 12 From 5fc52beae8289c1e6c0c8a7893596256d081e392 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Thu, 17 Feb 2022 18:32:36 -0800 Subject: [PATCH 06/14] Revert "alacritty: add fallback font name" This reverts commit 3a3b36505b0890d8e2408d22fc84af79ad239f67. --- .config/alacritty/alacritty.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml index aefdfb4..43e59d8 100644 --- a/.config/alacritty/alacritty.yml +++ b/.config/alacritty/alacritty.yml @@ -32,16 +32,13 @@ colors: font: # The normal (roman) font face to use. normal: - - family: Sauce Code Pro NF - - family: SauceCodePro Nerd Font Regular + family: Sauce Code Pro NF # The bold font face bold: - - family: Sauce Code Pro NF - - family: SauceCodePro Nerd Font Regular + family: Sauce Code Pro NF # The italic font face italic: - - family: Sauce Code Pro NF - - family: SauceCodePro Nerd Font Regular + family: Sauce Code Pro NF # sizes that work well for 1920 by 1080: 14 (large), 12 (wide), 11.5 (narrow) size: 12 From b206d16b0ad21a8921b7834874e856f50dfb6327 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Thu, 17 Feb 2022 18:32:51 -0800 Subject: [PATCH 07/14] Revert "termux: better vim macros (press escape twice)" This reverts commit 13336b7ec4a2cc327cea29e72668a28d6e2f36ed. --- .config/termux/termux.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/termux/termux.properties b/.config/termux/termux.properties index 0b91a10..1308931 100644 --- a/.config/termux/termux.properties +++ b/.config/termux/termux.properties @@ -3,8 +3,8 @@ ### wiki: https://wiki.termux.com/wiki/Touch_Keyboard extra-keys = [ \ - [{key: 'ESC', popup: {macro: "ESC ESC S", display: ""}},{key: '-', popup: '_'},{key: '/', popup: '\\\\'},{key: '|', popup: '_'},{key: 'HOME', popup: '['},{key: 'UP', popup: 'KEYBOARD'},{key: 'END', popup: ']'},'BKSP',{key: 'DEL', popup: 'ESC'}], \ - ['TAB',{key: ':', popup: {macro: "ESC ESC : w q ENTER", display: "vim exit"}},{key: 'CTRL', popup: {macro: 'CTRL c', display: ''}},{key: '=', popup: {key: '~'}},{key: 'LEFT', popup: '{'},{key: 'DOWN', popup: 'TAB'},{key: 'RIGHT', popup: '}'},{key: "'", popup: '"'},{key: 'ENTER', popup: {macro: 'ESC ESC S todo ENTER', popup: 'todo'}}] \ + [{key: 'ESC', popup: {macro: "ESC S", display: ""}},{key: '-', popup: '_'},{key: '/', popup: '\\\\'},{key: '|', popup: '_'},{key: 'HOME', popup: '['},{key: 'UP', popup: 'KEYBOARD'},{key: 'END', popup: ']'},'BKSP',{key: 'DEL', popup: 'ESC'}], \ + ['TAB',{key: ':', popup: {macro: "ESC : w q ENTER", display: "vim exit"}},{key: 'CTRL', popup: {macro: 'CTRL c', display: ''}},{key: '=', popup: {key: '~'}},{key: 'LEFT', popup: '{'},{key: 'DOWN', popup: 'TAB'},{key: 'RIGHT', popup: '}'},{key: "'", popup: '"'},{key: 'ENTER', popup: {macro: 'ESC S todo ENTER', popup: 'todo'}}] \ ] # remove home and end, move control and alt to the left From a14ce500f5198a2ab6330fa3c656399bcd1ac2c3 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Wed, 2 Mar 2022 05:21:05 -0800 Subject: [PATCH 08/14] add log: something to edit the system-log with --- .config/shell/functions/log | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .config/shell/functions/log diff --git a/.config/shell/functions/log b/.config/shell/functions/log new file mode 100644 index 0000000..e5d990f --- /dev/null +++ b/.config/shell/functions/log @@ -0,0 +1,6 @@ +#!/bin/bash + +# edit the system log located in the docs repo, but also find the docs repo based on what ~/todo points to +log() { + $EDITOR "$(git -C "$(dirname "$(realpath ~/todo)")" rev-parse --show-toplevel)/system-log" +} From 3c8a916dafaef39c645ec3238f8b35a06db00f83 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Wed, 2 Mar 2022 05:21:45 -0800 Subject: [PATCH 09/14] ned: \n --- .config/shell/bin/ned | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/shell/bin/ned b/.config/shell/bin/ned index 03d1c4a..6b9ca6c 100755 --- a/.config/shell/bin/ned +++ b/.config/shell/bin/ned @@ -103,6 +103,7 @@ new() { } subshell() { + echo echo 'entering subshell' $SHELL } From 02ee3bd399de82ef6099f318aac1972824b7aa4b Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Thu, 3 Mar 2022 13:34:04 -0800 Subject: [PATCH 10/14] ned: ned is now much better at choosing the documents repository --- .config/shell/bin/ned | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/shell/bin/ned b/.config/shell/bin/ned index 6b9ca6c..8b3b620 100755 --- a/.config/shell/bin/ned +++ b/.config/shell/bin/ned @@ -9,7 +9,7 @@ # shellcheck disable=SC2068,SC2178,SC2128 # set default values if things are unset -NOTES_DIR="${NOTES_DIR:-"$HOME/Documents/college/current"}" +NOTES_DIR="${NOTES_DIR:-"$(git -C "$(dirname "$(realpath ~/todo)")" rev-parse --show-toplevel)"}" EDITOR="nvim" EDITOR_CMD="nvim -c :ZenMode" From 62ba85a8124e66de30f5a65eed549efa8caaf4ba Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Thu, 3 Mar 2022 13:41:12 -0800 Subject: [PATCH 11/14] zsh: update termux fix --- .zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index d4bdfa2..4cfcf1b 100644 --- a/.zshrc +++ b/.zshrc @@ -563,7 +563,7 @@ add-zsh-hook chpwd save_working_dir load_working_dir && cd - > /dev/null # Case insensitive globbing (fix for termux) -[ -n "$TERMUX_VERSION" ] && setopt nocaseglob +[ -n "$TERMUX_VERSION" ] && (setopt nocaseglob; zstyle ':completion:*' path-completion true) # <<< # <<< From b8ff98d79bc777087c64a710fc002b26857f2ede Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Sat, 5 Mar 2022 01:58:32 -0800 Subject: [PATCH 12/14] git: add `git caps` alias for git commit all and push --- .gitconfig | 1 + .zshrc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitconfig b/.gitconfig index f7b1d7a..34be9d3 100644 --- a/.gitconfig +++ b/.gitconfig @@ -17,6 +17,7 @@ ca = commit -a caam = commit -a --amend cam = commit --amend + caps = !git commit -a && git push ch = checkout d = diff lg = log diff --git a/.zshrc b/.zshrc index d4bdfa2..572b48e 100644 --- a/.zshrc +++ b/.zshrc @@ -144,7 +144,7 @@ dupd='docker-compose up -d' \ ddwn='docker-compose down' \ dc='docker-compose' \ - occ='docker exec -it nextcloud occ' \ + occ='docker exec -u www-data nextcloud php occ' \ # file copying with a progress bar alias cpv="rsync -ah --info=progress2" From 238269f163c8cfb3e4e940dce13d41f6f6fd8ee6 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Sat, 5 Mar 2022 02:00:41 -0800 Subject: [PATCH 13/14] ned: bug fix (it's a silly one :P) --- .config/shell/bin/ned | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/shell/bin/ned b/.config/shell/bin/ned index 8b3b620..ccc1ec5 100755 --- a/.config/shell/bin/ned +++ b/.config/shell/bin/ned @@ -64,7 +64,7 @@ new() { if [ -z "$NOTE_PATH" ]; then echo "No directories found for '$2'." echo "All possible directories:" - (cd "$NOTES_DIR" && fd -d 1 -t d "$NOTES_DIR") + (cd "$NOTES_DIR" && fd -d 1 -t d) exit # if there was more than one result From 86107ff601949eb334137f4693da23a13bd35fc9 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Sat, 5 Mar 2022 22:31:32 -0800 Subject: [PATCH 14/14] ned: revert change to repository detection. It'll have to stay this way --- .config/shell/bin/ned | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/shell/bin/ned b/.config/shell/bin/ned index ccc1ec5..ce0477e 100755 --- a/.config/shell/bin/ned +++ b/.config/shell/bin/ned @@ -9,7 +9,7 @@ # shellcheck disable=SC2068,SC2178,SC2128 # set default values if things are unset -NOTES_DIR="${NOTES_DIR:-"$(git -C "$(dirname "$(realpath ~/todo)")" rev-parse --show-toplevel)"}" +NOTES_DIR="${NOTES_DIR:-"$HOME/Documents/college/current"}" EDITOR="nvim" EDITOR_CMD="nvim -c :ZenMode"