Many updates

This commit is contained in:
Tyler Starr 2023-09-10 11:43:47 -07:00
parent 318bdd5665
commit 3fd46c01f5
17 changed files with 169 additions and 42 deletions

View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀
#⠀⠀⠀⠀⠀⠀⠀⠀⣼⡏⠸⣧⠀⠀⠀⠀⠀⠀⠀⠀
#⠠⢤⣤⣤⣤⣤⣤⣴⡿⠀⠀⢻⣦⣤⣤⣤⣤⣤⡤⠄ Tyler Starr (starr-dusT)
#⠀⠀⠙⠻⣦⣄⠀⠀⠀⠀⠀⠀⠀⠀⣠⣴⠟⠋⠀⠀ https://github.com/starr-dusT/dotfiles
#⠀⠀⠀⠀⠀⠙⣿⡆⠀⠀⠀⠀⠰⣿⠋⠀⠀⠀⠀⠀ https://tstarr.us
#⠀⠀⠀⠀⠀⢰⡟⠀⣀⣴⣦⣀⠀⢻⡆⠀⠀⠀⠀⠀
#⠀⠀⠀⠀⢀⣾⣧⡾⠛⠁⠈⠙⠷⣼⣿⡀⠀⠀⠀⠀
#⠀⠀⠀⠀⡸⠟⠁⠀⠀⠀⠀⠀⠀⠈⠛⢧⠀⠀⠀⠀
# Create html bookmarks from "Bookmarks" note in Joplin
tempdir=$(mktemp -d)
joplin sync
joplin export --note Bookmarks --format=md ${tempdir}
joplin export --note "Watch Later" --format=md ${tempdir}
pandoc --standalone "${tempdir}/Personal/Web/Bookmarks.md" > /tmp/Bookmarks.html
pandoc --standalone "${tempdir}/Personal/Web/Watch Later.md" > /tmp/Watch_Later.html

View File

@ -1,19 +0,0 @@
local wk = require("which-key")
wk.register({
w = {
name = "+vimwiki",
i = { "<cmd>VimwikiDiaryIndex<CR>", "Diary Index" },
s = { "<cmd>VimwikiUISelect<CR>", "Select Index" },
t = { "<cmd>VimwikiTabIndex<CR>", "Index Tab" },
w = { "<cmd>VimwikiIndex<CR>", "Index" },
["<space>"] = {
name = "+diary",
i = { "<cmd>VimwikiDiaryGenerateLinks<CR>", "Generate Links" },
m = { "<cmd>VimwikiMakeTomorrowDiaryNote<CR>", "Make Tomorrow Note" },
t = { "<cmd>VimwikiTabMakeDiaryNote<CR>", "Make Today Note" },
w = { "<cmd>VimwikiDiaryNote<CR>", "Today Note" },
y = { "<cmd>VimwikiMakeYesterdayDiaryNote<CR>", "Make Yesterday Note" }
}
},
}, { prefix = "<leader>" })

View File

@ -1,6 +1,5 @@
require("tstarr.set")
require("tstarr.packer")
require("tstarr.telescope")
require("tstarr.vimwiki")
require("tstarr.which-key")
require("tstarr.iron")

View File

@ -35,7 +35,6 @@ return require('packer').startup(function(use)
use ('saadparwaiz1/cmp_luasnip')
use ('alker0/chezmoi.vim')
use ('nathangrigg/vim-beancount')
use ('vimwiki/vimwiki')
use ('folke/which-key.nvim')
use ('hkupty/iron.nvim')
use("mickael-menu/zk-nvim")

View File

@ -1,16 +0,0 @@
vim.g.vimwiki_list = {
{
path = '~/documents/vimwiki/main',
syntax = 'markdown',
ext = '.md'
}
}
vim.g.vimwiki_ext2syntax = {
['.md'] = 'markdown',
['.markdown'] = 'markdown',
['.mdown'] = 'markdown',
}
vim.g.vimwiki_global_ext = 0 -- don't treat all md files as vimwiki
vim.g.vimwiki_markdown_link_ext = 1

View File

@ -21,7 +21,7 @@ set $tag3 "3:web"
set $tag4 "4:dev"
set $tag5 "5:web"
set $tag6 "6:web"
set $tag7 "7:web"
set $tag7 "7:note"
set $tag8 "8:comm"
set $e exec swaymsg mode default
@ -104,7 +104,6 @@ for_window [app_id="file"] floating enable, \
#----- BINDING APPLICATIONS TO WORKSPACE
#-------------------------------------------------------------------------------
assign [class="Steam"] "1:game"
for_window [class="Steam"] move container to workspace "1:game"
for_window [class="discord"] move container to workspace $tag8
for_window [title="launcher"] floating enable
@ -198,9 +197,12 @@ mode open {
bindsym b exec brave, $e
bindsym s exec steam || flatpak run com.valvesoftware.Steam, $e
bindsym d exec discord || flatpak run com.discordapp.Discord, $e
bindsym j exec joplin-desktop, $e, exec ~/.config/sway/scripts/joplin.sh
bindsym Escape mode default
}
for_window [con_mark="SCRATCHPAD_jop"] border pixel 1
# Scratchpads commands
bindsym $mod+c mode scratch
mode scratch {

View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
while ! [[ $(swaymsg -t get_tree | grep '"class": "Joplin"') ]]
do
sleep .05
done
swaymsg '[class="Joplin"]' move container to workspace "7:note"

View File

@ -0,0 +1,100 @@
# NOTE SETTINGS
[note]
# Language used when writing notes.
# This is used to generate slugs or with date formats.
language = "en"
# The default title used for new note, if no `--title` flag is provided.
default-title = "Untitled"
# Template used to generate a note's filename, without extension.
filename = "{{id}}-{{slug title}}"
# The file extension used for the notes.
extension = "md"
# Template used to generate a note's content.
# If not an absolute path, it is relative to .zk/templates/
template = "default.md"
# Length of the generated IDs.
id-length = 4
# Letter case for the random IDs, among lower, upper or mixed.
id-case = "lower"
# EXTRA VARIABLES
[extra]
author = "tstarr"
[group.daily]
# Directories listed here will automatically use this group when creating notes.
paths = ["journal/daily"]
[group.daily.note]
# %Y-%m-%d is actually the default format, so you could use {{format-date now}} instead.
filename = "{{format-date now '%Y-%m-%d'}}"
extension = "md"
template = "daily.md"
# MARKDOWN SETTINGS
[format.markdown]
# Format used to generate links between notes.
link-format = "markdown"
# Indicates whether a link's path will be percent-encoded.
link-encode-path = true
# Indicates whether a link's path file extension will be removed.
link-drop-extension = true
# Enable support for #hashtags.
hashtags = false
# Enable support for :colon:separated:tags:.
colon-tags = true
# EXTERNAL TOOLS
[tool]
# Default editor used to open notes. When not set, the EDITOR or VISUAL
editor = "nvim"
# Default shell used by aliases and commands.
shell = "/bin/bash"
# Pager used to scroll through long output.
pager = "less -FIRX"
# Command used to preview a note during interactive fzf mode.
fzf-preview = "bat -p --color always {-1}"
# LSP
[lsp]
[lsp.diagnostics]
# Warn for dead links between notes.
dead-link = "error"
# NAMED FILTERS
[filter]
recents = "--sort created- --created-after 'last two weeks'"
# COMMAND ALIASES
[alias]
# Admin
commit = '~/.config/zk/scripts/commit.sh $ZK_NOTEBOOK_DIR'
push = 'git push origin master'
conf = 'chezmoi edit ~/.config/zk/config.toml"'
# Note Creation/Deletion/Editing
ei = "zk edit --interactive && zk commit"
daily = 'zk new --no-input "journal/daily" && zk commit'
del = 'zk list --interactive --format "{{path}}" | xargs rm && zk commit'
bookmark = '~/.config/zk/scripts/bookmark.sh $ZK_NOTEBOOK_DIR && zk commit'
# Note Searching
recipe = "zk edit --interactive --tag recipe"

View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
cd "$1"
echo "Input bookmark name: "
read name
link=$(wl-paste)
echo "- [${name}](${link})" >> "$(zk list --match-strategy exact --match "title: 'Bookmarks'" --format "{{path}}")"
cd -

View File

@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Usage: zk-commit <directory of zk>
something_changed=`git status --porcelain`
if [ -n "$something_changed" ]; then
git -C "$1" add .
message=$(git -c color.status=false status | sed -n -r -e '1,/Changes to be committed:/ d' \
-e '1,3 d' \
-e '/^Untracked files:/,$ d' \
-e 's/^\s*//' \
-e '/./p')
git -C "$1" commit -m "$message"
exit 0
fi
# If there are no changes exit with failure
exit 1

View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
echo "TODO"

View File

@ -73,3 +73,6 @@ export NNN_FCOLORS='0000E6310000000000000000'
export NNN_PLUG='g:getdrop'
export NNN_FIFO="/tmp/nnn.fifo"
export NNN_TRASH=1
# zk
alias cz="cd ~/documents/zet"

View File

@ -8,6 +8,7 @@
chezmoi
rbw
zk
bat
joplin
joplin-desktop
];

View File

@ -66,7 +66,7 @@
xdg.portal = {
enable = true;
gtkUsePortal = true;
xdgOpenUsePortal = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr ];
};

View File

@ -15,6 +15,7 @@
chezmoi
rbw
zk
bat
joplin
joplin-desktop
];

View File

@ -16,6 +16,8 @@ in {
tmuxp
lazygit
git-annex
pandoc
gollum
];
};
}

View File

@ -21,6 +21,8 @@ in {
pkgs.dolphin-emu
pkgs-unstable.sunshine
pkgs-unstable.moonlight-qt
pkgs-unstable.joplin
pkgs-unstable.joplin-desktop
];
};