mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-01-30 22:57:54 +00:00
Update scripts, Emacs, and Neovim config
This commit is contained in:
parent
c4d4abc7a6
commit
fb0a118741
@ -12,5 +12,5 @@
|
||||
set -o pipefail
|
||||
|
||||
notify-send "Select a region for the barcode (QR codes, ISBN, bar codes)"
|
||||
maim --select --hidecursor | zbarimg - --quiet | perl -pe 's|(.+?):||'
|
||||
maim --select --hidecursor --quiet | zbarimg - --quiet --oneshot --raw | xclip -selection clipboard
|
||||
|
||||
|
@ -249,9 +249,9 @@ proc main {
|
||||
# We'll also fill up the rest of the chapter-related data into the output data.
|
||||
for index in @(seq $[chapter_len]) {
|
||||
var index = Int(index)
|
||||
var chapter = output_data['chapters'][index - 1]
|
||||
setvar chapter = output_data['chapters'][index - 1]
|
||||
var start = chapter['timestamp']
|
||||
var end = output_data['chapters'][index]['timestamp'] if index != chapter_len else null
|
||||
var end = output_data['chapters'][index]['timestamp'] if index !== chapter_len else null
|
||||
var filename = $(printf "%.2d-%s.%s" $index $(kebab-case ${chapter['title']}) $EXTENSION)
|
||||
setvar output_data['chapters'][index - 1]['file'] = filename
|
||||
|
||||
@ -262,7 +262,7 @@ proc main {
|
||||
setvar has_error = true
|
||||
}
|
||||
|
||||
append :job_queue ">&2 printf '[%d/%d] %s\\n' $[index] $[chapter_len] \"$[output_data['chapters'][index - 1]['title']]\"; ffmpeg -loglevel quiet -nostdin -i '${audio_file}' -ss ${start} $['-to ' + end if index != chapter_len else ''] ${title_slug}/${filename}"
|
||||
append :job_queue ">&2 printf '[%d/%d] %s\\n' $[index] $[chapter_len] \"$[output_data['chapters'][index - 1]['title']]\"; ffmpeg -loglevel quiet -nostdin -i '${audio_file}' -ss ${start} $['-to ' + end if index !== chapter_len else ''] ${title_slug}/${filename}"
|
||||
}
|
||||
|
||||
# Exit the process if an error detected.
|
||||
|
@ -1,6 +1,6 @@
|
||||
#+title: tools/wiki
|
||||
#+date: "2021-05-05 00:27:26 +08:00"
|
||||
#+date_modified: "2021-05-21 11:12:10 +08:00"
|
||||
#+date: 2021-05-05 00:27:26 +08:00
|
||||
#+date_modified: 2021-05-21 11:12:10 +08:00
|
||||
#+language: en
|
||||
|
||||
|
||||
@ -40,4 +40,3 @@ This module has a handful of requirements to work properly.
|
||||
|
||||
- SQLite v3 binary is installed in order for org-roam to work.
|
||||
- The ~+anki~ feature requires Anki and the setup described from the [[https://github.com/louietan/anki-editor][project README]].
|
||||
- ~+graph~ feature needs [[https://github.com/briandowns/simple-httpd][simple-httpd]] for the server to work.
|
||||
|
@ -21,7 +21,7 @@
|
||||
:hook (org-load . org-roam-mode)
|
||||
:commands
|
||||
(org-roam-buffer
|
||||
org-roam-setup
|
||||
org-roam-db-autosync-mode
|
||||
org-roam-capture
|
||||
org-roam-node-find)
|
||||
:preface
|
||||
@ -36,8 +36,6 @@
|
||||
:desc "Go to a random node and split" "R" #'+org-roam-split-to-random-node
|
||||
:desc "Find node" "f" #'org-roam-node-find
|
||||
:desc "Org Roam capture" "c" #'org-roam-capture
|
||||
:desc "Org Roam setup" "s" #'org-roam-setup
|
||||
:desc "Org Roam teardown" "S" #'org-roam-teardown
|
||||
:desc "Open backlinks buffer" "b" #'org-roam-buffer-toggle
|
||||
|
||||
(:prefix ("d" . "dailies")
|
||||
|
@ -107,12 +107,12 @@ require("packer").startup(function()
|
||||
|
||||
mapping = {
|
||||
["<C-Space>"] = cmp.mapping(function(fallback)
|
||||
if fn.pumvisible() == 1 then
|
||||
if cmp.visible() then
|
||||
if fn["UltiSnips#CanExpandSnippet"]() == 1 then
|
||||
return fn.feedkeys(t("<C-R>=UltiSnips#ExpandSnippet()<CR>"))
|
||||
end
|
||||
|
||||
fn.feedkeys(t("<C-n>"), "n")
|
||||
cmp.select_next_item()
|
||||
elseif check_back_space() then
|
||||
fn.feedkeys(t("<cr>"), "n")
|
||||
else
|
||||
@ -128,8 +128,8 @@ require("packer").startup(function()
|
||||
fn.feedkeys(t("<C-R>=UltiSnips#ExpandSnippet()<CR>"))
|
||||
elseif fn["UltiSnips#CanJumpForwards"]() == 1 then
|
||||
fn.feedkeys(t("<ESC>:call UltiSnips#JumpForwards()<CR>"))
|
||||
elseif fn.pumvisible() == 1 then
|
||||
fn.feedkeys(t("<C-n>"), "n")
|
||||
elseif cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif check_back_space() then
|
||||
fn.feedkeys(t("<tab>"), "n")
|
||||
else
|
||||
@ -143,8 +143,8 @@ require("packer").startup(function()
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if fn["UltiSnips#CanJumpBackwards"]() == 1 then
|
||||
return fn.feedkeys(t("<C-R>=UltiSnips#JumpBackwards()<CR>"))
|
||||
elseif fn.pumvisible() == 1 then
|
||||
fn.feedkeys(t("<C-p>"), "n")
|
||||
elseif cmp.visible() then
|
||||
cmp.select_previous_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
@ -152,8 +152,7 @@ require("packer").startup(function()
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
}
|
||||
})
|
||||
}})
|
||||
end
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user