Skip to content

Commit 8df38dd

Browse files
authored
Merge pull request #3 from codewhitesec/develop
v1.1.0 Release
2 parents 5c385d1 + 2bec46c commit 8df38dd

File tree

3 files changed

+46
-9
lines changed

3 files changed

+46
-9
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
9+
## v1.1.0 - May 31, 2023
10+
11+
### Added
12+
13+
* Add support for using [multiple databases](https://github.com/codewhitesec/qubes-keepass/pull/2) at once
14+
* Add [icon support](https://github.com/codewhitesec/qubes-keepass#configuration)
15+
16+
17+
## v1.0.0 - Jan 07, 2023
18+
19+
**Initial Release** :tada:

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ which integrates nicely with the isolation and security features of [Qubes OS](h
77
to easily copy credentials to the currently focused Qube, to define allow lists for credentials based on Qube names and to
88
automatically clear the Qubes clipboard after a configurable amount of time.
99

10-
![qubes-keepass](https://user-images.githubusercontent.com/49147108/206440037-cf2108f8-8033-4574-bdbe-88f7943c1457.png)
10+
![qubes-keepass-example](https://github.com/codewhitesec/qubes-keepass/assets/49147108/9512901f-93f7-4bc4-bd20-951a45000171)
11+
1112

1213
*qubes-keepass* is inspired by [rofi-pass](https://github.com/carnager/rofi-pass) which provides a rofi based frontend
1314
for the password manager [pass](https://www.passwordstore.org/).
@@ -159,6 +160,8 @@ trust = 4
159160
* `qubes` - specifies an allow list of qubes for the credential. The credential can only be copied into the specified qubes
160161
* `trust` - specifies the minimum trust level that a qube needs to be able to receive this credential
161162
* `meta` - specifies a list of qubes that are only allowed to obtain meta information of the credential (username, url)
163+
* `icon` - specifies the icon for the credential. Can be a default icon name (e.g. `firefox`) or a file system path. To display
164+
icons within *rofi*, you also need to add the `-show-icons` *rofi-option* in your `qubes-keepass.ini` file
162165

163166

164167
#### Global Options

qubes-keepass.py

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,9 @@ def __init__(self, item: Secret.Item, service: Secret.Service) -> None:
495495

496496
self.meta = parse_qube_list(settings.get('meta'))
497497
self.qubes = parse_qube_list(settings.get('qubes'))
498-
self.trust = settings.get('trust', None)
498+
self.trust = settings.get('trust')
499499
self.timeout = int(settings.get('timeout', Config.get('timeout')))
500+
self.icon = settings.get('icon')
500501

501502
if self.trust is not None:
502503
self.trust = int(self.trust)
@@ -753,13 +754,22 @@ def __str__(self) -> str:
753754

754755
for credential in self.credentials:
755756

757+
line = ''
756758
folder = credential.path.parent.name or 'Root'
757759

758-
formatted += lcut(credential.title, Config.getint('title_length'))
759-
formatted += lcut(folder, Config.getint('folder_length'))
760-
formatted += lcut(credential.username, Config.getint('username_length'))
761-
formatted += lcut(credential.url, Config.getint('url_length'))
762-
formatted += '\n'
760+
line += lcut(credential.title, Config.getint('title_length'))
761+
line += lcut(folder, Config.getint('folder_length'))
762+
line += lcut(credential.username, Config.getint('username_length'))
763+
line += lcut(credential.url, Config.getint('url_length'))
764+
765+
if '-show-icons' in Config.get_rofi_options():
766+
767+
if credential.icon is not None:
768+
line += f'\x00icon\x1f{credential.icon}'
769+
770+
line = ' ' + line
771+
772+
formatted += line + '\n'
763773

764774
return formatted
765775

@@ -775,8 +785,13 @@ def display_rofi(self, qube: str = 'Qube') -> (int, Credential):
775785
Returns:
776786
Credential item selected by the user and exit code
777787
'''
788+
title_length = Config.getint('title_length')
789+
790+
if '-show-icons' in Config.get_rofi_options():
791+
title_length += 3
792+
778793
rofi_mesg = f'Selected credential is copied to <b>{qube}</b>\n\n'
779-
rofi_mesg += lcut('Title', Config.getint('title_length'))
794+
rofi_mesg += lcut('Title', title_length)
780795
rofi_mesg += lcut('Folder', Config.getint('folder_length'))
781796
rofi_mesg += lcut('Username', Config.getint('username_length'))
782797
rofi_mesg += lcut('URL', Config.getint('url_length'))
@@ -823,7 +838,7 @@ def load(service: Secret.Service) -> CredentialCollection:
823838
return CredentialCollection(credentials)
824839

825840

826-
parser = argparse.ArgumentParser(description='''qubes-keepass v1.0.0 - A rofi based KeePassXC frontend for Qubes''')
841+
parser = argparse.ArgumentParser(description='''qubes-keepass v1.1.0 - A rofi based KeePassXC frontend for Qubes''')
827842
parser.add_argument('qube', help='qube to copy the credential to')
828843
parser.add_argument('--trust-level', type=int, help='numerical trust level of the qube')
829844
parser.add_argument('--config', help='path to the configuration file')

0 commit comments

Comments
 (0)