Skip to content

Commit

Permalink
v0.1.4: Add j/k support (fix #4)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <[email protected]>
  • Loading branch information
Kwpolska committed Sep 19, 2015
1 parent 2cc2ef6 commit 7ac84c6
Show file tree
Hide file tree
Showing 16 changed files with 56 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .pypt/hooks/post-release.hook
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/zsh
. .pypt/config
10 changes: 8 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Appendix C. Changelog
:Author: Chris Warrick <[email protected]>
:Copyright: © 2015, Chris Warrick.
:License: BSD (see /LICENSE or :doc:`Appendix B <LICENSE>`.)
:Date: 2015-09-08
:Version: 0.1.3
:Date: 2015-09-19
:Version: 0.1.4

.. index:: CHANGELOG

Expand All @@ -19,6 +19,9 @@ More information can be found on GitHub in the `releases section
Version History
===============

0.1.4
* Add j/k support for moving in the list (Issue #4)

0.1.3
* Don’t show copied passwords (Issue #3)

Expand All @@ -35,6 +38,9 @@ Version History
0.1.0
Initial release.

0.1.4
* Add j/k support for moving in the list (Issue #4)

0.1.3
* Don’t show copied passwords (Issue #3)

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Appendix A. Contribution rules
:Author: Chris Warrick <[email protected]>
:Copyright: © 2015, Chris Warrick.
:License: BSD (see /LICENSE or :doc:`Appendix B <LICENSE>`.)
:Date: 2015-09-08
:Version: 0.1.3
:Date: 2015-09-19
:Version: 0.1.4

.. index:: contributing

Expand Down
4 changes: 2 additions & 2 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Maintainer: Chris Warrick <[email protected]>
pkgname=upass
_pyname=upass
pkgver=0.1.3
pkgver=0.1.4
pkgrel=1
pkgdesc='Console UI for pass'
arch=('any')
url='https://github.com/Kwpolska/upass'
license=('BSD')
options=(!emptydirs)
source=("https://pypi.python.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
md5sums=('8537c7f07058b697c73d9754f24b49c3')
md5sums=('4bcb9683da51dc7dbf5bbd96c001fabc')
depends=('pass' 'python' 'python-setuptools' 'python-urwid' 'python-pyperclip')

prepare() {
Expand Down
2 changes: 1 addition & 1 deletion PKGBUILD-git
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pkgname=upass-git
_pyname=upass
_gitname=upass
pkgver=0.1.3
pkgver=0.1.4
pkgrel=1
pkgdesc='Console UI for pass (git version)'
arch=('any')
Expand Down
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ upass. Console UI for pass.
:Info: This is the README file for upass.
:Author: Chris Warrick <[email protected]>
:Copyright: © 2015, Chris Warrick.
:Date: 2015-09-08
:Version: 0.1.3
:Date: 2015-09-19
:Version: 0.1.4

.. image:: https://chriswarrick.com/galleries/upass/directory-listing.png

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ upass. Console UI for pass.
:Info: This is the README file for upass.
:Author: Chris Warrick <[email protected]>
:Copyright: © 2015, Chris Warrick.
:Date: 2015-09-08
:Version: 0.1.3
:Date: 2015-09-19
:Version: 0.1.4

.. image:: https://chriswarrick.com/galleries/upass/directory-listing.png

Expand Down
10 changes: 8 additions & 2 deletions docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Appendix C. Changelog
:Author: Chris Warrick <[email protected]>
:Copyright: © 2015, Chris Warrick.
:License: BSD (see /LICENSE or :doc:`Appendix B <LICENSE>`.)
:Date: 2015-09-08
:Version: 0.1.3
:Date: 2015-09-19
:Version: 0.1.4

.. index:: CHANGELOG

Expand All @@ -19,6 +19,9 @@ More information can be found on GitHub in the `releases section
Version History
===============

0.1.4
* Add j/k support for moving in the list (Issue #4)

0.1.3
* Don’t show copied passwords (Issue #3)

Expand All @@ -35,6 +38,9 @@ Version History
0.1.0
Initial release.

0.1.4
* Add j/k support for moving in the list (Issue #4)

0.1.3
* Don’t show copied passwords (Issue #3)

Expand Down
4 changes: 2 additions & 2 deletions docs/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Appendix A. Contribution rules
:Author: Chris Warrick <[email protected]>
:Copyright: © 2015, Chris Warrick.
:License: BSD (see /LICENSE or :doc:`Appendix B <LICENSE>`.)
:Date: 2015-09-08
:Version: 0.1.3
:Date: 2015-09-19
:Version: 0.1.4

.. index:: contributing

Expand Down
4 changes: 2 additions & 2 deletions docs/LICENSE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Appendix B. License for upass
:Author: Chris Warrick <[email protected]>
:Copyright: © 2015, Chris Warrick.
:License: BSD (see /LICENSE or :doc:`Appendix B <LICENSE>`.)
:Date: 2015-09-08
:Version: 0.1.3
:Date: 2015-09-19
:Version: 0.1.4

.. index:: LICENSE

Expand Down
4 changes: 2 additions & 2 deletions docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ upass. Console UI for pass.
:Info: This is the README file for upass.
:Author: Chris Warrick <[email protected]>
:Copyright: © 2015, Chris Warrick.
:Date: 2015-09-08
:Version: 0.1.3
:Date: 2015-09-19
:Version: 0.1.4

.. image:: https://chriswarrick.com/galleries/upass/directory-listing.png

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
# built documents.
#
# The short X.Y version.
version = '0.1.3'
version = '0.1.4'
# The full version, including alpha/beta/rc tags.
release = '0.1.3'
release = '0.1.4'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
1 change: 1 addition & 0 deletions release
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,4 @@ git push --tags
cleanup_cmfn

status "Done!"
. .pypt/hooks/post-release.hook
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def run_tests(self):
sys.exit(errno)

setup(name='upass',
version='0.1.3',
version='0.1.4',
description='Console UI for pass.',
keywords='upass',
author='Chris Warrick',
Expand Down
4 changes: 2 additions & 2 deletions upass/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- encoding: utf-8 -*-
# upass v0.1.3
# upass v0.1.4
# Console UI for pass.
# Copyright © 2015, Chris Warrick.
# All rights reserved.
Expand Down Expand Up @@ -40,7 +40,7 @@
"""

__title__ = 'upass'
__version__ = '0.1.3'
__version__ = '0.1.4'
__author__ = 'Chris Warrick'
__license__ = '3-clause BSD'
__docformat__ = 'restructuredtext en'
Expand Down
21 changes: 17 additions & 4 deletions upass/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- encoding: utf-8 -*-
# upass v0.1.3
# upass v0.1.4
# Console UI for pass.
# Copyright © 2015, Chris Warrick.
# See /LICENSE for licensing information.
Expand All @@ -20,7 +20,7 @@

__all__ = ('main', 'App')
HELP = """upass is an interface for pass, the standard unix password manager.
Use arrows and Enter to navigate the directory tree.
Use up/down arrows or jk (vim-style) and Enter to navigate the directory tree.
Available commands:
d display
s display
Expand Down Expand Up @@ -91,10 +91,23 @@ class FancyListBox(urwid.ListBox):

def keypress(self, size, key):
"""Handle keypresses."""
currentfocus = self.focus_position
maxindex = len(self.body) - 1
newfocus = None
if key == 'home':
self.set_focus(0)
newfocus = 0
elif key == 'end':
self.set_focus(len(self.body) - 1)
newfocus = maxindex
elif key == 'k':
newfocus = currentfocus - 1
elif key == 'j':
newfocus = currentfocus + 1
if newfocus is not None:
if newfocus < 0:
newfocus = 0
elif newfocus > maxindex:
newfocus = maxindex
self.set_focus(newfocus)
return super(FancyListBox, self).keypress(size, key)

def mouse_event(self, size, event, button, col, row, focus):
Expand Down

0 comments on commit 7ac84c6

Please sign in to comment.