Changeset 18 in code
- Timestamp:
- Aug 24, 2023, 2:36:05 AM (22 months ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile
r17 r18 1 include config.mk 1 PREFIX=/usr/local 2 2 3 3 install: install-bin install-examples install-man … … 5 5 6 6 install-bin: 7 install -Dm ${EXEC_MODE} kanako${PREFIX}/bin/kanako7 install -Dm0755 kanako ${DESTDIR}${PREFIX}/bin/kanako 8 8 install-examples: 9 install -Dm ${FILE_MODE} kanako.conf.example${PREFIX}/share/examples/kanako/kanako.conf9 install -Dm0600 kanako.conf.example ${DESTDIR}${PREFIX}/share/examples/kanako/kanako.conf 10 10 install-man: 11 install -Dm ${FILE_MODE} kanako.mdoc${PREFIX}/share/man/man1/kanako.112 install -Dm ${FILE_MODE} kanako.conf.mdoc${PREFIX}/share/man/man5/kanako.conf.511 install -Dm0600 kanako.mdoc ${DESTDIR}${PREFIX}/share/man/man1/kanako.1 12 install -Dm0600 kanako.conf.mdoc ${DESTDIR}${PREFIX}/share/man/man5/kanako.conf.5 13 13 uninstall-bin: 14 14 rm -f ${PREFIX}/bin/kanako -
trunk/README.md
r17 r18 10 10 ## Dependencies 11 11 * Any of the above, depending how you configured it 12 * ` ls(1)` or `tree(1)` for printing a list12 * `tree(1)` for printing a list 13 13 * `mandoc(1)` for documentation 14 14 … … 32 32 33 33 ## Related software 34 * [akoizumi/ayu](https://git.shelltalk.net/akoizumi/ayu) [predecessor]35 34 * [beastie/aps](https://codeberg.org/beastie/aps) 36 35 * [biox/pa](https://github.com/biox/pa) -
trunk/kanako
r17 r18 1 1 #!/bin/sh 2 # $TheSupernovaDuo: kanako,v 1.9 2023/5/18 21:9:33yakumo_izuru Exp $2 # $TheSupernovaDuo: kanako,v 2.0 2023/08/23 23:33:45 yakumo_izuru Exp $ 3 3 4 4 readonly kanako_conf_dir="${kanako_conf_dir:-$HOME/.config/kanako}" … … 23 23 fi 24 24 25 fn_copy() {26 fn_view $1 | "${kanako_clip_cmd}"25 copy() { 26 view $1 | "${kanako_clip_cmd}" 27 27 } 28 fn_edit() {28 edit() { 29 29 ${kanako_encrypt_cmd} ${kanako_decrypt_args} ${1%%.enc}.enc > ${1%%.enc} 30 30 "${EDITOR}" "${1%%.enc}" … … 32 32 rm "${1%%.enc}" 33 33 } 34 fn_list() {35 "${kanako_list_cmd}""${kanako_store_dir}/"34 list() { 35 $(which tree) "${kanako_store_dir}/" 36 36 } 37 fn_new() {38 test -d $1 && fn_usage && exit 137 new() { 38 test -d $1 && usage && exit 1 39 39 40 40 tmpfile="$(mktemp)" … … 45 45 rm ${tmpfile} 46 46 } 47 fn_trash_directory() {48 rm -r f"$1"47 trash_directory() { 48 rm -r -I "$1" 49 49 } 50 fn_trash_file() {51 rm - f"${1}${2}".enc50 trash_file() { 51 rm -i "${1}${2}".enc 52 52 } 53 fn_usage() {53 usage() { 54 54 printf "Usage: %s [-c|-e|-h|-l|-n|-R|-r|-v [file or directory]]\n" "$0" 55 55 printf "The arguments for all switches except for '-h' are relative to\n" 56 56 printf "\t\$kanako_store_dir which is set to %s\n\n" "{$kanako_store_dir}" 57 57 } 58 fn_view() {58 view() { 59 59 if [ -f "${1%%.enc}".enc ]; then 60 60 ${kanako_encrypt_cmd} ${kanako_decrypt_args} "${1%%.enc}".enc 61 61 elif [ -d "${1:-.}" ]; then 62 $ {kanako_list_cmd}"${1:-.}"62 $(which tree) "${1:-.}" 63 63 else 64 fn_usage64 usage 65 65 fi 66 66 } 67 67 68 68 case $1 in 69 -c) fn_copy $2 ;;70 -e) fn_edit $2 ;;71 -l) fn_list ;;72 -n) fn_new $2 ;;73 -R) fn_trash_directory $2 ;;74 -r) fn_trash_file $2 ;;75 -v) fn_view $2 ;;76 *) fn_usage ;;69 -c) copy $2 ;; 70 -e) edit $2 ;; 71 -l) list ;; 72 -n) new $2 ;; 73 -R) trash_directory $2 ;; 74 -r) trash_file $2 ;; 75 -v) view $2 ;; 76 *) usage ;; 77 77 esac -
trunk/kanako.conf.example
r15 r18 3 3 #kanako_clip_cmd="xclip -i" 4 4 #kanako_clip_cmd="wl-copy --primary" 5 #kanako_list_cmd="tree"6 5 #kanako_menu_cmd="dmenu" 7 6 -
trunk/kanako.conf.mdoc
r15 r18 1 .Dd Aftermath 41, 31881 .Dd $Mdocdate$ 2 2 .Dt KANAKO.CONF 5 3 3 .Os … … 20 20 Encryption executable to 21 21 be used with the program 22 .It kanako_list_cmd23 Listing executable to24 be used with the -l switch25 22 .It kanako_menu_cmd 26 23 Menu executable to … … 30 27 .Xr kanako 1 31 28 .Sh AUTHORS 32 .An Aoi Koizumi Aq Mt koizumi.aoi@kyoko-project.wer.ee29 .An Izuru Yakumo Aq Mt yakumo.izuru@chaotic.ninja 33 30 -
trunk/kanako.mdoc
r15 r18 1 .Dd Bureaucracy 73, 31881 .Dd $Mdocdate$ 2 2 .Dt KANAKO 1 3 3 .Os … … 34 34 List all entries 35 35 .It -r 36 Remove single entries 36 Remove single entries, 37 will prompt for confirmation 37 38 .It -R 38 Remove recursively a directory w/ entries 39 Remove recursively a directory w/ entries, 40 will prompt for confirmation 39 41 .It -v 40 42 View an entry … … 55 57 .Re 56 58 .Sh AUTHORS 57 .An Aoi Koizumi Aq Mt koizumi.aoi@kyoko-project.wer.ee59 .An Izuru Yakumo Aq Mt yakumo.izuru@chaotic.ninja 58 60 .Sh BUGS 59 61 Under the Wayland display protocol, -
trunk/mkfile
r14 r18 1 <config.mk 1 PREFIX=/usr/local 2 2 3 3 install:V: install-bin install-examples install-man … … 5 5 6 6 install-bin: 7 install -Dm $EXEC_MODE kanako$PREFIX/bin/kanako7 install -Dm0755 kanako $DESTDIR$PREFIX/bin/kanako 8 8 install-examples: 9 install -Dm $FILE_MODE kanako.conf.example$PREFIX/share/examples/kanako/kanako.conf9 install -Dm0600 kanako.conf.example $DESTDIR$PREFIX/share/examples/kanako/kanako.conf 10 10 install-man: 11 install -Dm $FILE_MODE kanako.mdoc$PREFIX/share/man/man1/kanako.112 install -Dm $FILE_MODE kanako.conf.mdoc$PREFIX/share/man/man5/kanako.conf.511 install -Dm0600 kanako.mdoc $DESTDIR$PREFIX/share/man/man1/kanako.1 12 install -Dm0600 kanako.conf.mdoc $DESTDIR$PREFIX/share/man/man5/kanako.conf.5 13 13 uninstall-bin: 14 14 rm -f $PREFIX/bin/kanako
Note:
See TracChangeset
for help on using the changeset viewer.