Compare commits
No commits in common. "cdabfe2db546e3364740de985f963953b581131c" and "5623f85d50d32d4229e525833f74e0ffe833e433" have entirely different histories.
cdabfe2db5
...
5623f85d50
4 changed files with 13 additions and 125 deletions
|
@ -82,10 +82,10 @@
|
|||
<!-- Set default monospace font -->
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer><family>Input Mono Condensed</family></prefer>
|
||||
<prefer><family>Input Mono Narrow</family></prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Input Mono Condensed</family>
|
||||
<family>Input Mono Narrow</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
|
||||
|
|
|
@ -5,11 +5,7 @@ add-highlighter global/ show-matching
|
|||
|
||||
set global scrolloff 5,5
|
||||
|
||||
set global ui_options terminal_assistant=off
|
||||
set -add global ui_options terminal_status_on_top=true
|
||||
|
||||
# case insensitive search
|
||||
map global normal / /(?i)
|
||||
set-option global ui_options terminal_assistant=off
|
||||
|
||||
eval %sh{
|
||||
. ~/.config/river/colors
|
||||
|
@ -20,10 +16,6 @@ eval %sh{
|
|||
fi
|
||||
}
|
||||
|
||||
# ------------
|
||||
# Language Server Protocol
|
||||
# ------------
|
||||
|
||||
eval %sh{kak-lsp --kakoune -s $kak_session}
|
||||
set global lsp_cmd "kak-lsp -s %val{session} -vvv --log /tmp/kak-lsp.log"
|
||||
set global lsp_diagnostic_line_error_sign '║'
|
||||
|
@ -41,10 +33,6 @@ hook global WinSetOption filetype=(zig|go) %{
|
|||
}
|
||||
hook global KakEnd .* lsp-exit
|
||||
|
||||
# ------------
|
||||
# Formateadores
|
||||
# ------------
|
||||
|
||||
hook global WinSetOption filetype=(javascript|typescript|json|css) %{
|
||||
set-option buffer formatcmd %sh{ echo prettier --stdin-filepath $kak_buffile }
|
||||
hook buffer BufWritePre .* format-buffer
|
||||
|
@ -60,20 +48,10 @@ hook global WinSetOption filetype=go %{
|
|||
hook buffer BufWritePre .* format-buffer
|
||||
}
|
||||
|
||||
# ------------
|
||||
# Usar Foot
|
||||
# ------------
|
||||
source "%val{config}/plugins/zig.kak/rc/zig.kak"
|
||||
#hook global WinSetOption filetype=zig %{ zig-auto-run buffer }
|
||||
|
||||
hook global KakBegin .* %{ set-option global termcmd "footclient sh -c" }
|
||||
define-command fzf-terminal -params 1.. -shell-completion %{
|
||||
set-option global termcmd "footclient --app-id=fzf sh -c"
|
||||
wayland-terminal %arg{@}
|
||||
set-option global termcmd "footclient sh -c"
|
||||
}
|
||||
|
||||
# ------------
|
||||
# Keybindings genericas
|
||||
# ------------
|
||||
|
||||
map -docstring "yank the selection into the clipboard" global user y "<a-|> wl-copy<ret>"
|
||||
map -docstring "paste the clipboard" global user p "<a-!> wl-paste --no-newline<ret>"
|
||||
|
@ -85,12 +63,6 @@ map -docstring "hide whitespaces" global user S " :remove-highlighter global/sho
|
|||
|
||||
map global insert '<c-w>' '<esc>b<a-c>'
|
||||
|
||||
# https://github.com/Gigahawk/nixdots/blob/c98340cc56c998ac52f62d0df49c541bafcaaad7/dotfiles/kakrc
|
||||
# - to select inner object
|
||||
# = to select outer object
|
||||
map global normal -- - <a-i>
|
||||
map global normal -- = <a-a>
|
||||
|
||||
# ------------
|
||||
# Indentación
|
||||
# ------------
|
||||
|
@ -100,7 +72,6 @@ hook global ModuleLoaded smarttab %{
|
|||
set-option global softtabstop 4
|
||||
}
|
||||
|
||||
# Sleuth es un "plugin" que detecta la identación del archivo y configura el editor para usarlo por defecto.
|
||||
source "%val{config}/sleuth.kak"
|
||||
hook -group sleuth global BufOpenFile .* %{ sleuth }
|
||||
hook -group sleuth global BufWritePost .* %{ sleuth }
|
||||
|
@ -108,7 +79,6 @@ hook -group sleuth global BufWritePost .* %{ sleuth }
|
|||
# ------------
|
||||
# FZF
|
||||
# ------------
|
||||
|
||||
source "%val{config}/plugins/fzf.kak/rc/fzf.kak"
|
||||
evaluate-commands %sh{
|
||||
find -L "$kak_config/plugins/fzf.kak/rc/modules/" -type f -name '*.kak' -exec printf 'source "%s"\n' {} \;
|
||||
|
@ -127,6 +97,12 @@ map -docstring 'search files' global user f ': fzf-mode<ret>f'
|
|||
map -docstring 'search buffers' global user b ': fzf-mode<ret>b'
|
||||
map -docstring 'grep files' global user g ': fzf-mode<ret>g'
|
||||
|
||||
define-command fzf-terminal -params 1.. -shell-completion %{
|
||||
set-option global termcmd "footclient --app-id=fzf sh -c"
|
||||
wayland-terminal %arg{@}
|
||||
set-option global termcmd "footclient sh -c"
|
||||
}
|
||||
|
||||
# ------------
|
||||
# Buffer switching
|
||||
# ------------
|
||||
|
@ -145,14 +121,3 @@ map global normal b ':pick-buffers<ret>' -docstring 'pick buffers'
|
|||
map global normal B ':enter-user-mode -lock buffers<ret>' -docstring 'buffers (lock)…'
|
||||
|
||||
map global normal '<c-p>' '<tab>' -docstring 'jump forward'
|
||||
|
||||
# ------------
|
||||
# Exportar archivos Markdown a PDF
|
||||
# ------------
|
||||
|
||||
define-command exportmd %{
|
||||
nop %sh{
|
||||
cd "$(dirname "$kak_buffile")"
|
||||
exportmd pdf "$kak_buffile"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,8 +11,8 @@ lines = 10000
|
|||
hide-when-typing=yes
|
||||
|
||||
[main]
|
||||
font=monospace:pixelsize=18
|
||||
line-height=27px
|
||||
font=monospace:pixelsize=17
|
||||
line-height=26px
|
||||
vertical-letter-offset=4px
|
||||
|
||||
pad=0x0
|
||||
|
|
|
@ -1,77 +0,0 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
html() {
|
||||
echo "<meta charset=utf8>"
|
||||
if test -n "$style"; then
|
||||
echo "
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: 'Liberation Sans', sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-left: 3px solid;
|
||||
margin-left: 1em;
|
||||
padding-left: 1em;
|
||||
}
|
||||
</style>
|
||||
"
|
||||
fi
|
||||
cmark --unsafe < "$1"
|
||||
}
|
||||
|
||||
format="$1"
|
||||
input="$2"
|
||||
|
||||
if test ! -f "$input"; then
|
||||
echo "no existe el archivo \`$input\`."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
output="$(dirname "$input")/$(basename "$input" .md).$format"
|
||||
|
||||
if grep "TODO|XXX" "$input" >/dev/null; then
|
||||
echo "Ojo, ¡todavía tenés TODOs o XXXs!"
|
||||
fi
|
||||
|
||||
if test "$format" = epub -o "$format" = rtf -o "$format" = docx; then
|
||||
htmlfile="${input%.md}.html"
|
||||
style=true html "$input" > "$htmlfile"
|
||||
|
||||
#if which pandoc >/dev/null; then
|
||||
# pandoc --reference-doc=$HOME/template.docx -s -o "$output" "$htmlfile"
|
||||
if which libreoffice >/dev/null; then
|
||||
echo libreoffice --headless --writer --convert-to "$format" "$htmlfile"
|
||||
libreoffice --headless --writer --convert-to "$format" "$htmlfile"
|
||||
else
|
||||
echo "No tengo libreoffice para convertir a $format."
|
||||
rm "$htmlfile"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm "$htmlfile"
|
||||
elif test "$format" = html; then
|
||||
style=true html "$input" > "$output"
|
||||
elif test "$format" = standalone.html; then
|
||||
html "$input" > "$output"
|
||||
echo "<style>" >> "$output"
|
||||
cat ~/proy/sitio/drip.css >> "$output"
|
||||
echo "</style>" >> "$output"
|
||||
elif test "$format" = pdf; then
|
||||
style=true html "$input" | weasyprint -u "$(dirname "$input")" - "$output"
|
||||
else
|
||||
echo "no conozco el formato \`$format\`."
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in a new issue