adjust papis alias
This commit is contained in:
parent
cbb8459622
commit
d365d1ca4f
1 changed files with 4 additions and 29 deletions
|
|
@ -8,21 +8,20 @@
|
||||||
[settings]
|
[settings]
|
||||||
default-library = main
|
default-library = main
|
||||||
editor = nvim
|
editor = nvim
|
||||||
opentool = ${if pkgs.stdenv.isDarwin then "open" else "xdg-open"}
|
opentool = ${if pkgs.stdenv.isDarwin then "open -a Preview" else "evince"}
|
||||||
file-browser = ${if pkgs.stdenv.isDarwin then "open" else "xdg-open"}
|
|
||||||
|
|
||||||
# Document management
|
# Document management
|
||||||
ref-format = {doc[author]}{doc[year]}
|
ref-format = {doc[author]}{doc[year]}
|
||||||
|
|
||||||
# Search and display
|
# Search and display
|
||||||
sort-field = year
|
sort-field = year
|
||||||
sort-reverse = True
|
sort-reverse = True
|
||||||
match-format = {doc[tags]}{doc[author]}{doc[title]}{doc[year]}
|
match-format = {doc[tags]}{doc[author]}{doc[title]}{doc[year]}
|
||||||
|
|
||||||
# Database and storage
|
# Database and storage
|
||||||
database-backend = papis
|
database-backend = papis
|
||||||
use-git = False
|
use-git = False
|
||||||
|
|
||||||
# Interface
|
# Interface
|
||||||
fzf-binary = fzf
|
fzf-binary = fzf
|
||||||
picktool = fzf
|
picktool = fzf
|
||||||
|
|
@ -95,30 +94,6 @@
|
||||||
|
|
||||||
# Shell functions for papis workflow
|
# Shell functions for papis workflow
|
||||||
programs.zsh.initContent = ''
|
programs.zsh.initContent = ''
|
||||||
# Papis finder function - open document directory with query support
|
|
||||||
${lib.optionalString pkgs.stdenv.isDarwin ''
|
|
||||||
pafinder() {
|
|
||||||
local result=$(papis list "$@" | head -1)
|
|
||||||
if [ -n "$result" ]; then
|
|
||||||
open -R "$result"
|
|
||||||
else
|
|
||||||
echo "No documents found"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
''}
|
|
||||||
${lib.optionalString (!pkgs.stdenv.isDarwin) ''
|
|
||||||
pafinder() {
|
|
||||||
local result=$(papis list "$@" | head -1)
|
|
||||||
if [ -n "$result" ]; then
|
|
||||||
xdg-open "$(dirname "$result")"
|
|
||||||
else
|
|
||||||
echo "No documents found"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
''}
|
|
||||||
|
|
||||||
# Papis add file function - add file to existing document with proper parameter handling
|
# Papis add file function - add file to existing document with proper parameter handling
|
||||||
pafile() {
|
pafile() {
|
||||||
if [ $# -lt 1 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue