Add kanakomenu
and kanakototp
addons, etc.
Signed-off-by: Aoi K <koizumi.aoi@kyoko-project.wer.ee> git-svn-id: file:///srv/svn/repo/kanako/trunk@9 62e5d677-aa6e-8c4a-b8cb-b9416171cb8e
This commit is contained in:
parent
e296b48219
commit
e93ff0ee9e
11
README.md
11
README.md
@ -11,6 +11,17 @@ the adaptable password manager.
|
||||
* `ls(1)` or `tree(1)` for printing a list
|
||||
* `mandoc(1)` for documentation
|
||||
|
||||
## Add-ons
|
||||
|
||||
### kanakomenu
|
||||
quick graphical front-end for kanako, works with either of `dmenu(1)`
|
||||
or `bemenu(1)`, useful for copying passwords to clipboard. it's configured
|
||||
through kanakomenu.conf
|
||||
|
||||
### kanakototp
|
||||
time-based one time password addon for kanako, requires `oathtool(1)`
|
||||
from oath-toolkit.
|
||||
|
||||
## License
|
||||
* [Discordian Public License, version 2.3](https://gt.kalli.st/novaburst/discordian-public-license/src/branch/discordia/DPL-2.3)
|
||||
|
||||
|
2
kanako
2
kanako
@ -16,7 +16,7 @@ if test -f "${conf_dir}/kanako.conf"; then
|
||||
. "${conf_dir}/kanako.conf";
|
||||
else
|
||||
echo "Configuration file has not been found!"
|
||||
echo "Copy kanako.conf.example from the repository,"
|
||||
echo "Copy kanako.conf from the examples directory,"
|
||||
echo "and edit accordingly."
|
||||
exit 1
|
||||
fi
|
||||
|
@ -1,9 +1,9 @@
|
||||
# [General]
|
||||
# Configuration file for kanako(1)
|
||||
|
||||
#clip="xclip -i"
|
||||
#clip="wl-copy --primary"
|
||||
#list_cmd="tree"
|
||||
|
||||
# [Encryption]
|
||||
## age
|
||||
#encrypt_cmd="age"
|
||||
#encrypt_args="-e -R ${key_dir}/pub.age --armor"
|
||||
|
14
kanakomenu
Executable file
14
kanakomenu
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh -e
|
||||
readonly conf_dir="${conf_dir:-$HOME/.config/kanako}"
|
||||
readonly store_dir="${store_dir:-$HOME/.kanako-store}"
|
||||
|
||||
if test -f "${conf_dir}"/kanakomenu.conf; then
|
||||
. "${conf_dir}"/kanakomenu.conf
|
||||
else
|
||||
echo "Configuration file has not been found!"
|
||||
echo "Copy kanakomenu.conf from the examples directory,"
|
||||
echo "and edit accordingly"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
find . -name '*.enc' | sort | sed 's,^\./,,;s,\.enc$,,' | ${menu_prog} | xargs $(which kanako) -c
|
4
kanakomenu.conf.example
Normal file
4
kanakomenu.conf.example
Normal file
@ -0,0 +1,4 @@
|
||||
# Configuration file for kanakomenu(1)
|
||||
|
||||
#menu_prog="bemenu -p kanako"
|
||||
#menu_prog="dmenu -p kanako"
|
12
kanakototp
Executable file
12
kanakototp
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh -e
|
||||
# extracted from https://rgz.ee/bin/pass
|
||||
|
||||
totp_seed="$(kanako -v "$@" | grep 'totp: ' | head -n1 | cut -d' ' -f2)"
|
||||
if ! [ -z "$totp_seed" ]; then
|
||||
if command -v oathtool >/dev/null 2>&1; then
|
||||
oathtool --totp -b "$totp_seed"
|
||||
else
|
||||
echo 'oathtool(1) should be installed'
|
||||
exit 1
|
||||
fi
|
||||
fi
|
27
mkfile
27
mkfile
@ -1,9 +1,22 @@
|
||||
<config.mk
|
||||
|
||||
install:
|
||||
install -Dm0755 kanako $PREFIX/bin/kanako
|
||||
install -Dm0644 kanako.mdoc $PREFIX/share/man/man1/kanako.1
|
||||
install -Dm0644 kanako.conf.mdoc $PREFIX/share/man/man5/kanako.conf.5
|
||||
install -Dm0755 kanako-init $PREFIX/bin/kanako-init
|
||||
uninstall:
|
||||
rm -f $PREFIX/bin/kanako $PREFIX/share/man/man1/kanako.1 $PREFIX/share/man/man5/kanako.conf.5
|
||||
install:V: install-bin install-examples install-man
|
||||
uninstall:V: uninstall-bin uninstall-examples uninstall-man
|
||||
|
||||
install-bin:
|
||||
install -m$EXEC_MODE kanako $PREFIX/bin/kanako
|
||||
install -m$EXEC_MODE kanako-init $PREFIX/bin/kanako-init
|
||||
install -m$EXEC_MODE kanakomenu $PREFIX/bin/kanakomenu
|
||||
install -m$EXEC_MODE kanakototp $PREFIX/bin/kanakototp
|
||||
install-examples:
|
||||
install -m$FILE_MODE kanako.conf.example $PREFIX/share/examples/kanako/kanako.conf
|
||||
install -m$FILE_MODE kanakomenu.conf.example $PREFIX/share/examples/kanako/kanakomenu.conf
|
||||
install-man:
|
||||
install -m$FILE_MODE kanako.mdoc $PREFIX/share/man/man1/kanako.1
|
||||
install -m$FILE_MODE kanako.conf.mdoc $PREFIX/share/man/man5/kanako.conf.5
|
||||
uninstall-bin:
|
||||
rm -f $PREFIX/bin/kanako $PREFIX/bin/kanako-init $PREFIX/bin/kanakomenu $PREFIX/bin/kanakototp
|
||||
uninstall-examples:
|
||||
rm -f $PREFIX/share/examples/kanako/kanako.conf $PREFIX/share/exmaples/kanako/kanakomenu.conf
|
||||
uninstall-man:
|
||||
rm -f $PREFIX/share/man/man1/kanako.1 $PREFIX/share/man/man5/kanako.conf.5
|
||||
|
Loading…
x
Reference in New Issue
Block a user