mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-02-07 06:18:59 +00:00
Update scripts, Emacs, and Neovim config
This commit is contained in:
parent
c4d4abc7a6
commit
fb0a118741
@ -12,5 +12,5 @@
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
notify-send "Select a region for the barcode (QR codes, ISBN, bar codes)"
|
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.
|
# We'll also fill up the rest of the chapter-related data into the output data.
|
||||||
for index in @(seq $[chapter_len]) {
|
for index in @(seq $[chapter_len]) {
|
||||||
var index = Int(index)
|
var index = Int(index)
|
||||||
var chapter = output_data['chapters'][index - 1]
|
setvar chapter = output_data['chapters'][index - 1]
|
||||||
var start = chapter['timestamp']
|
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)
|
var filename = $(printf "%.2d-%s.%s" $index $(kebab-case ${chapter['title']}) $EXTENSION)
|
||||||
setvar output_data['chapters'][index - 1]['file'] = filename
|
setvar output_data['chapters'][index - 1]['file'] = filename
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ proc main {
|
|||||||
setvar has_error = true
|
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.
|
# Exit the process if an error detected.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#+title: tools/wiki
|
#+title: tools/wiki
|
||||||
#+date: "2021-05-05 00:27:26 +08:00"
|
#+date: 2021-05-05 00:27:26 +08:00
|
||||||
#+date_modified: "2021-05-21 11:12:10 +08:00"
|
#+date_modified: 2021-05-21 11:12:10 +08:00
|
||||||
#+language: en
|
#+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.
|
- 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]].
|
- 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)
|
:hook (org-load . org-roam-mode)
|
||||||
:commands
|
:commands
|
||||||
(org-roam-buffer
|
(org-roam-buffer
|
||||||
org-roam-setup
|
org-roam-db-autosync-mode
|
||||||
org-roam-capture
|
org-roam-capture
|
||||||
org-roam-node-find)
|
org-roam-node-find)
|
||||||
:preface
|
:preface
|
||||||
@ -36,8 +36,6 @@
|
|||||||
:desc "Go to a random node and split" "R" #'+org-roam-split-to-random-node
|
:desc "Go to a random node and split" "R" #'+org-roam-split-to-random-node
|
||||||
:desc "Find node" "f" #'org-roam-node-find
|
:desc "Find node" "f" #'org-roam-node-find
|
||||||
:desc "Org Roam capture" "c" #'org-roam-capture
|
: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
|
:desc "Open backlinks buffer" "b" #'org-roam-buffer-toggle
|
||||||
|
|
||||||
(:prefix ("d" . "dailies")
|
(:prefix ("d" . "dailies")
|
||||||
|
@ -107,12 +107,12 @@ require("packer").startup(function()
|
|||||||
|
|
||||||
mapping = {
|
mapping = {
|
||||||
["<C-Space>"] = cmp.mapping(function(fallback)
|
["<C-Space>"] = cmp.mapping(function(fallback)
|
||||||
if fn.pumvisible() == 1 then
|
if cmp.visible() then
|
||||||
if fn["UltiSnips#CanExpandSnippet"]() == 1 then
|
if fn["UltiSnips#CanExpandSnippet"]() == 1 then
|
||||||
return fn.feedkeys(t("<C-R>=UltiSnips#ExpandSnippet()<CR>"))
|
return fn.feedkeys(t("<C-R>=UltiSnips#ExpandSnippet()<CR>"))
|
||||||
end
|
end
|
||||||
|
|
||||||
fn.feedkeys(t("<C-n>"), "n")
|
cmp.select_next_item()
|
||||||
elseif check_back_space() then
|
elseif check_back_space() then
|
||||||
fn.feedkeys(t("<cr>"), "n")
|
fn.feedkeys(t("<cr>"), "n")
|
||||||
else
|
else
|
||||||
@ -128,8 +128,8 @@ require("packer").startup(function()
|
|||||||
fn.feedkeys(t("<C-R>=UltiSnips#ExpandSnippet()<CR>"))
|
fn.feedkeys(t("<C-R>=UltiSnips#ExpandSnippet()<CR>"))
|
||||||
elseif fn["UltiSnips#CanJumpForwards"]() == 1 then
|
elseif fn["UltiSnips#CanJumpForwards"]() == 1 then
|
||||||
fn.feedkeys(t("<ESC>:call UltiSnips#JumpForwards()<CR>"))
|
fn.feedkeys(t("<ESC>:call UltiSnips#JumpForwards()<CR>"))
|
||||||
elseif fn.pumvisible() == 1 then
|
elseif cmp.visible() then
|
||||||
fn.feedkeys(t("<C-n>"), "n")
|
cmp.select_next_item()
|
||||||
elseif check_back_space() then
|
elseif check_back_space() then
|
||||||
fn.feedkeys(t("<tab>"), "n")
|
fn.feedkeys(t("<tab>"), "n")
|
||||||
else
|
else
|
||||||
@ -143,8 +143,8 @@ require("packer").startup(function()
|
|||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
if fn["UltiSnips#CanJumpBackwards"]() == 1 then
|
if fn["UltiSnips#CanJumpBackwards"]() == 1 then
|
||||||
return fn.feedkeys(t("<C-R>=UltiSnips#JumpBackwards()<CR>"))
|
return fn.feedkeys(t("<C-R>=UltiSnips#JumpBackwards()<CR>"))
|
||||||
elseif fn.pumvisible() == 1 then
|
elseif cmp.visible() then
|
||||||
fn.feedkeys(t("<C-p>"), "n")
|
cmp.select_previous_item()
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
@ -152,8 +152,7 @@ require("packer").startup(function()
|
|||||||
"i",
|
"i",
|
||||||
"s",
|
"s",
|
||||||
}),
|
}),
|
||||||
}
|
}})
|
||||||
})
|
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user