Migrate from stow to dm theme manager
Move all config files from .config/ into themes/dracula/.config/ so the dm tool can manage them as file-level symlinks. Removes .bak file. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
53a43e4683
commit
b043d2807d
100 changed files with 0 additions and 10 deletions
54
themes/dracula/.config/xdg-desktop-portal-termfilechooser/nnn-wrapper.sh
Executable file
54
themes/dracula/.config/xdg-desktop-portal-termfilechooser/nnn-wrapper.sh
Executable file
|
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/env sh
|
||||
# This wrapper script is invoked by xdg-desktop-portal-termfilechooser.
|
||||
#
|
||||
# For more information about input/output arguments read `xdg-desktop-portal-termfilechooser(5)`
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$6" -ge 4 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
multiple="$1"
|
||||
directory="$2"
|
||||
save="$3"
|
||||
path="$4"
|
||||
out="$5"
|
||||
|
||||
cmd="nnn"
|
||||
termcmd="${TERMCMD:-kitty --title 'termfilechooser'}"
|
||||
|
||||
if [ "$save" = "1" ]; then
|
||||
# save a file
|
||||
set -- -p "$out" "$path"
|
||||
elif [ "$directory" = "1" ]; then
|
||||
# upload files from a directory
|
||||
set -- -p "$out" "$path"
|
||||
elif [ "$multiple" = "1" ]; then
|
||||
# upload multiple files
|
||||
set -- -p "$out" "$path"
|
||||
else
|
||||
# upload only 1 file
|
||||
set -- -p "$out" "$path"
|
||||
fi
|
||||
|
||||
command="$termcmd $cmd"
|
||||
for arg in "$@"; do
|
||||
# escape double quotes
|
||||
escaped=$(printf "%s" "$arg" | sed 's/"/\\"/g')
|
||||
# escape special
|
||||
command="$command \"$escaped\""
|
||||
done
|
||||
|
||||
if [ "$directory" = "1" ]; then
|
||||
sh -c "env NNN_TMPFILE=\"$out\" $command"
|
||||
else
|
||||
sh -c "$command"
|
||||
fi
|
||||
|
||||
if [ "$directory" = "1" ] && [ -s "$out" ]; then
|
||||
# select on quit; file data will be `cd '/dir/path'`
|
||||
if [ "$(cut -c -2 "$out")" = "cd" ]; then
|
||||
sed -i "s/^cd '\(.*\)'/\1/" "$out"
|
||||
fi
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue