config: path adjustments

This commit is contained in:
xeruf 2022-05-10 10:11:30 +02:00
parent 998fabe4f9
commit f987d72b54
5 changed files with 11 additions and 12 deletions

View File

@ -430,8 +430,8 @@ Version 2019-11-04 2021-02-16"
(require 'org-roam-protocol) (require 'org-roam-protocol)
(setq org-roam-db-update-on-save nil (setq org-roam-db-update-on-save nil
org-roam-extract-new-file-path "${slug}.org" org-roam-extract-new-file-path "${slug}.org")
+org-roam-open-buffer-on-find-file nil) ;+org-roam-open-buffer-on-find-file nil)
(add-hook 'org-capture-after-finalize-hook (lambda () (if (org-roam-file-p) (org-roam-db-sync)))) (add-hook 'org-capture-after-finalize-hook (lambda () (if (org-roam-file-p) (org-roam-db-sync))))
(setq my/org-roam-capture-props (concat ":properties:\n:id: ${slug}\n:created: %<" time-stamp-format ">\n:modified: <>\n:end:\n")) (setq my/org-roam-capture-props (concat ":properties:\n:id: ${slug}\n:created: %<" time-stamp-format ">\n:modified: <>\n:end:\n"))

View File

@ -16,7 +16,7 @@
}, },
"main": { "main": {
"lang": "auto", "lang": "auto",
"lastfolder": "/home/janek/data/music", "lastfolder": "/home/janek/data/4-media/music/Ambient/BirdBoy",
"maximized": false "maximized": false
}, },
"playlist": { "playlist": {
@ -43,7 +43,7 @@
"fontsize": 10, "fontsize": 10,
"rowsize": 43, "rowsize": 43,
"sort_fields": [ "sort_fields": [
"genre" "__path"
], ],
"sort_reverse": false "sort_reverse": false
}, },

View File

@ -7,7 +7,7 @@
# #
XDG_DESKTOP_DIR="$HOME/.local/desktop" XDG_DESKTOP_DIR="$HOME/.local/desktop"
XDG_TEMPLATES_DIR="$HOME/.local/templates" XDG_TEMPLATES_DIR="$HOME/.local/templates"
XDG_DOWNLOAD_DIR="$HOME/data/5-incubator/downloads" XDG_DOWNLOAD_DIR="$HOME/data/5-incubator"
XDG_MUSIC_DIR="$HOME/data/4-media/music" XDG_MUSIC_DIR="$HOME/data/4-media/music"
XDG_PICTURES_DIR="$HOME/data/4-media/images" XDG_PICTURES_DIR="$HOME/data/4-media/images"
XDG_VIDEOS_DIR="$HOME/data/4-media/videos" XDG_VIDEOS_DIR="$HOME/data/4-media/videos"

View File

@ -55,14 +55,14 @@ for arg; do
fi fi
continue continue
fi fi
grid=$(expr $(tput cols) / \( 25 - \( $# / 2 \) \& $# \< 30 \| 5 \)) # TODO reduce grid when many PDFs grid=$(expr $(tput cols) / \( 25 - \( $# / 2 \) \& $# \< 30 \| 5 \))
tmpfile="$prefix/$(basename "$arg")" tmpfile="$prefix/$(basename "$arg")"
mkdir -p "$prefix" mkdir -p "$prefix"
case "$mime" in case "$mime" in
(*\ application/pdf\;*) (*\ application/pdf\;*)
echo Converting "$arg" echo Converting "$arg"
test -f "$tmpfile-1.png" || pdftoppm -r 70 "$arg" "$tmpfile" -l $(expr $grid '*' 2) test -f "$tmpfile-1.ppm" || pdftoppm -r 70 "$arg" "$tmpfile" -l $(expr $grid \& \( $grid \> 4 \| $# \> 1 \) \| $grid '*' 2)
timg -W --grid=$grid "$tmpfile"* timg -W --grid=$grid $tmpfile-{01..$grid}.ppm
;; ;;
(*\ application/*document*) (*\ application/*document*)
# https://ask.libreoffice.org/t/convert-to-command-line-parameter/840/4 # https://ask.libreoffice.org/t/convert-to-command-line-parameter/840/4
@ -180,11 +180,10 @@ if test "$ls" -o $# -le $(echo "$flags" | wc -w); then
checkperm . checkperm .
# Alternative: find -exec ls -dl {} + # Alternative: find -exec ls -dl {} +
{ {
# TODO don't use * for ls array as spaces go awry
timeout .6s sh -c " timeout .6s sh -c "
if which exa 2>/dev/null >&2 if which exa 2>/dev/null >&2
then exa --color=always --long --group --classify --group-directories-first --all --all $flags ${ls[*]:-.} then exa --color=always --long --group --classify --group-directories-first --all --all $flags $(printf "'%s' " "${ls[@]:-.}")
else $elevate ls -l $(test $# -gt ${#ls[@]} && echo '-d') --color=always --human-readable --si --group-directories-first --file-type --dereference-command-line-symlink-to-dir --all $flags ${ls[*]:-.} else $elevate ls -l $(test $# -gt ${#ls[@]} && echo '-d') --color=always --human-readable --si --group-directories-first --file-type --dereference-command-line-symlink-to-dir --all $flags $(printf "'%s' " "${ls[@]:-.}")
fi fi
" || $elevate ls $(test $# -gt ${#ls[@]} && echo "-d") --color=always --human-readable --si --dereference-command-line --all --sort=none $flags "${ls[@]:-.}" " || $elevate ls $(test $# -gt ${#ls[@]} && echo "-d") --color=always --human-readable --si --dereference-command-line --all --sort=none $flags "${ls[@]:-.}"
} | $pager --quit-if-one-screen } | $pager --quit-if-one-screen

View File

@ -1,5 +1,5 @@
#!/bin/sh -e #!/bin/sh -e
aurdir="$DATA/2-standards/dev/aur" aurdir="$DATA/1-projects/aur"
test $# -eq 0 && cd "$aurdir" && exec $SHELL test $# -eq 0 && cd "$aurdir" && exec $SHELL
command=$1 command=$1
shift shift