28 Commits

Author SHA1 Message Date
5a3d0173ed Add configurable max_history_entries option (default 5) 2026-02-18 10:15:25 +01:00
fc8af3bd24 Add configurable rbw_path option
When launching bw-menu via swaymsg exec, ~/.cargo/bin is not on PATH,
so the hardcoded "rbw" subprocess calls fail. The new rbw_path config
option lets users point to the full path of their rbw binary. Tilde
expansion is supported. The config loader now treats each key
independently so a config with only rbw_path (no keybindings) works.
2026-02-17 22:59:16 +01:00
c1137b30e3 update README 2026-02-17 22:37:43 +01:00
baa3146840 Clean up error handling, naming, and README accuracy
- config.py: warn and fall back to defaults on invalid keybinding
  fields instead of raising an unhandled ValueError
- clipboard.py: replace check=True with manual returncode check for
  a friendly error message instead of a raw traceback
- __main__.py: rename __handle_* to _handle_* (double-underscore
  name mangling is meaningless at module level)
- rofi.py: check that rofi is installed before launching
- history.py: warn on corrupted history file instead of silently
  returning empty
- README: fix install path (cd bw-menu/python), add name to
  available keybinding fields
2026-02-17 22:36:38 +01:00
4d6e64668a Add --field name option to retrieve entry name 2026-02-17 22:30:53 +01:00
6d3e0e4190 Add inspired-by and limitations sections to README 2026-02-17 22:28:44 +01:00
e56d98bed5 Document rbw >= 1.14.0 version requirement
The `rbw list --raw` flag used for entry listing was introduced in
rbw 1.14.0.
2026-02-17 22:18:31 +01:00
846f067b81 Add totp to default keybindings with Shift+Return 2026-02-17 22:17:59 +01:00
23c825a71c Add type-based icons to rofi entries
Parse the `type` field from `rbw list --raw` (Login, SecureNote, Card,
Identity) and display a corresponding icon for each entry in rofi.
History entries keep their `document-open-recent` icon. The type field
uses `compare=False` so it doesn't affect entry identity or history
matching.
2026-02-17 22:16:54 +01:00
9b080f6b07 Accept both .yaml and .yml config file extensions 2026-02-17 22:08:39 +01:00
fab921066a Flip config keybinding format to field → key and clear conflicting rofi defaults 2026-02-17 22:08:00 +01:00
8df2281f60 Fix Ctrl+Return keybinding in rofi script mode
Rofi requires use-hot-keys to be explicitly enabled for kb-custom-N
keybindings to work in script mode.
2026-02-17 21:56:20 +01:00
82159b7e32 Fix --print flag not working with rofi selector
The rofi callback's stdout is captured by rofi, so print() never
reached the terminal. Callback now writes the selection to a cache
file, and the initial process reads it after rofi exits — where
stdout is the terminal and the original args (including --print)
are available.
2026-02-17 21:52:05 +01:00
4468bbfd9d Add py.typed marker, project metadata, and update ruff to v0.15.1 2026-02-17 20:42:00 +01:00
832c61d707 Add MIT license 2026-02-17 20:39:40 +01:00
487f2caf39 Add pre-commit with ruff, ruff-format, and pyright 2026-02-17 20:33:58 +01:00
d621ebb81e Fix bugs, harden config validation, and clean up codebase
- Guard against empty ROFI_INFO before calling decode_info to prevent IndexError
- Use .get() chain for password field access to prevent KeyError
- Raise ValueError for unknown field names instead of silently returning empty string
- Validate config keybinding values against allowed fields (password, username, totp)
- Warn to stderr when config file exists but has invalid structure
- Set history file permissions to 0o600
- Extract shared prepare_entries() helper to deduplicate selector logic
- Add --version flag
- Delete legacy src/bitwarden.py and src/main.py
- Update CLAUDE.md to reflect pyyaml dependency
2026-02-17 20:27:15 +01:00
5eb53d8b06 Move rofi keybindings from CLI flags to config file
Replace --custom-field, --kb-accept, and --kb-custom CLI flags with a
YAML config file at $XDG_CONFIG_HOME/bw-menu/config.yaml. The config
maps rofi key names to vault fields (e.g. Return: password), making
keybinding configuration simpler and more intuitive.
2026-02-17 20:16:12 +01:00
55861a65b1 Update README for rbw-based rewrite 2026-02-17 19:37:18 +01:00
a316e1b233 Rewrite bw-menu using rbw CLI backend and proper Python packaging
Replace bw-serve/Ansible-based implementation with a clean rewrite:
- rbw CLI wrapper for listing entries and fetching credentials
- Rofi script-mode and fzf selectors with history-first sorting
- JSON-backed frecency history at ~/.cache/bw-menu/
- Clipboard support via wl-copy/xclip auto-detection
- uv + hatchling packaging with bw-menu entry point
2026-02-17 19:32:27 +01:00
8cf7c9e24c update README 2024-05-23 13:43:19 +02:00
50edc11fb7 update README 2024-04-22 11:37:02 +02:00
1070450d8a update README 2024-04-21 18:52:08 +02:00
dbeec547cc update README 2024-04-21 18:51:47 +02:00
b93aee3259 update README 2024-04-21 18:50:54 +02:00
fb3979e758 add bitwarden lib here for now 2024-04-21 18:49:19 +02:00
153a98620c converted from rust to python 2024-04-21 18:46:16 +02:00
7a949bde0e add README 2024-04-21 15:46:47 +02:00