Git Product home page Git Product logo

rofi-rbw's People

Contributors

abulvenz avatar das-s avatar dstengele avatar falko17 avatar fdw avatar ilya-zlobintsev avatar jacob-horton avatar nim65s avatar nobles5e avatar simson avatar slikie avatar symphorien avatar tinfoilsubmarine avatar tosti007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rofi-rbw's Issues

list index out of range when trying to launch from cli

when i try to start rofi-rbw from the cli i get the following error:


rofi -modi "rofi-rbw:rofi-rbw" -show rofi-rbw 

Traceback (most recent call last):
  File "/usr/bin/rofi-rbw", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3.10/site-packages/rofi_rbw/rofi_rbw.py", line 231, in main
    RofiRbw().main()
  File "/usr/lib/python3.10/site-packages/rofi_rbw/rofi_rbw.py", line 132, in main
    parsed_entries = [Entry.parse_rbw_output(it) for it in entries]
  File "/usr/lib/python3.10/site-packages/rofi_rbw/rofi_rbw.py", line 132, in <listcomp>
    parsed_entries = [Entry.parse_rbw_output(it) for it in entries]
  File "/usr/lib/python3.10/site-packages/rofi_rbw/entry.py", line 33, in parse_rbw_output
    fields[1],
IndexError: list index out of range

Not sure what is wrong. maybe i miss a package or something?

New release with dotool support

Hi, was just wondering if @fdw or anyone else has had a chance to test dotool support out? It's been in for awhile so was wondering if we could get a release.

Alternative way of finding selected entry

Currently all entries are serialized into a single string and passed to rofi for selection.
In Rofi's dmenu specs it is mentioned that it's possible to add a -format i argument, which results into the row number being printed instead of the full line.

This could be used to find the user's selected entry by parsing that number as an int and using it as an index in the entry list. This removes the entire need to splitting the selected entry line to remove the formatting.

I do want to note that I don't know if this is supported by the other selectors.

What do you think?

Can't open rofi-rbw outside terminal

I'm on plasma 6 using wayland (Tuxedo OS 3). Rofi-rbw works perfectly fine when launched from terminal, but it wont open from krunner, shortcut or else.

I've tried using rofi, wofi and the rofi-wayland fork, also using ydotool and dotool and no dice.
FWIW rofi-wayland does run with no problem when called from inside terminal, and rofi-rbw still runs fine on x11 as well.

add action stdout

It would be awesome if we could add an action to just stdout the username and password. This would allow easy integration in qutebrowser and other software.

Change theme

Hello, really like the program so far.
One thing though. Can I change the rofi theme somehow?
In other applications I can f.e. put the command to run to something like "rofi -theme theme.rasi"

dependencies not found

I installed your package using pip and when I run rofi-rbw in terminal I get the following:

Could not find a valid way to type characters. Please check the required dependencies.

I have a minimal install of nixos so I think I have some lacking dependencies, but I'm not sure what they are.

Not working with wofi

I have rofi-rbw 1.0.0 installed from Void and when I try to use it with wofi, it does not type (wtype), print to stdout, or copy (wl-copy). However, when I use rofi, it does work.

I've already confirmed that removing all of my user configuration for wofi does not chance anything.

Keyboard broken after use

I found this project today and was really happy about it, but there is one bug that annoys me a lot and that is something that I think has been mentioned here and here.

When I've used the autotype feature my alt-key is messed up. It's like my alt-key is pressed down. To solve this I have to press alt one time and then everything becomes normal again.

The other issue said it might be some kind of weird character that is messing things up, but that is not the case for me. I have to autotype the password (it's not breaking if i just autotype username) for it to break, and it is breaking without any weird characters. It breaks with only numbers and/or the alphabet as well.

I don't know if this issue is a bug of rofi-rbw or xdotool, but since the other issues was kind of old and closed without a fix, I figured i should create another one.

Feature request: Ability to output <username> <Enter> <password> with a configurable delay

Hi,

coming from pass I am spoiled with the options you can do in auto type mode. When e.g. using git from the command line I often need to enter username and password to two consecutive prompts. So it would be really nice instead of needing to invoke rofi-rbw twice to first enter username wait for some short time and then enter the password.

Thanks,

Matthias

[Bug] Keyboard layout messed up when autotyping special characters

When I autotype passwords that includes characters that aren't normal letters or numbers, the keyboard layout gets scuffed beyond repair until manual reboot. I don't know of any corralation between the characters typed and the change being changed, but most of the alphabetical keys are rendered non-functional and some are mixed and matched, including the meta key, ESC, etc.

I'm using a bspwm+sxhkd setup on Arch Linux, and some of the passwords were imported from KeePass which uses way more character types than Bitwarden's password generator. That may have something to do with it.

show username/url

Hi there,

Is there a way to show the username/url instead of the title of the bitwarden entry?

image

similar to the output of

rbw list --fields name,user

wofi vs rofi

Using rofi, I can chose via keybinds what to copy (user, pass, otp, type, etc...). Is there an equivalent for wofi?

I think wofi lacks this feature sort of, right? I am currently using a combination of the official bitwarden cli and bash script for this. after selecting an entry, I can select what to copy. Would nice to see something like that in rofi-rbw as well. Or am I missing something?

[Possible Bug] Items with newlines in the user field crash the application

Hi, today I downloaded rofi-rbw, and had some problems getting it to work. The issue is resolved for my case now, but maybe it can lead to a bug fix in the code for the future. Or information for someone that has a similar problem.
I was getting this error:

Traceback (most recent call last):
  File "/usr/bin/rofi-rbw", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3.10/site-packages/rofi_rbw/rofi_rbw.py", line 231, in main
    RofiRbw().main()
  File "/usr/lib/python3.10/site-packages/rofi_rbw/rofi_rbw.py", line 132, in main
    parsed_entries = [Entry.parse_rbw_output(it) for it in entries]
  File "/usr/lib/python3.10/site-packages/rofi_rbw/rofi_rbw.py", line 132, in <listcomp>
    parsed_entries = [Entry.parse_rbw_output(it) for it in entries]
  File "/usr/lib/python3.10/site-packages/rofi_rbw/entry.py", line 33, in parse_rbw_output
    fields[1],
IndexError: list index out of range

I inspected the output of rbw ls --fields 'folder,name,user' as per this issue #38. And found that the output had some empty lines.
I do not know how, but for some reason I had an item in my bitwarden vault that had a newline in the user field. This was not intended, so I fixed this entry.
I could not replicate the entry in bitwarden. It is not possible to insert newlines on the user field.

But I think this might be an edge case to consider.

[Feature request] Use rofi to request vault password

Hi !
I switch from bitwarden-pyro to rofi-rbw as pyro seems not maintained anymore.
Pyro can use rofi to request the vault password, this choice allows for a more integrated design as the window to display the credentials and the window to asks for the password are the same.
I was wondering if rofi-rbw could offer the same possibility ?

I did the modification for pyro here mihalea/bitwarden-pyro#7 (it was never merged unfortunately).

I can make the modifications to rofi-rbw if you are ok

pinentry uses X11

When I call this program, it uses pinentry-gtk2 even when my session is Wayland. This means the pinentry has no DPI scaling (and just general Xwayland issues). Is there a way to tell rofi-rbw to use a different pinentry, such as pinentry-gnome3?

[Bug] `ydotool` breaking changes

I think that changes to ydotool break rofi-rbw, with the error:

ydotool: Unknown command: sleep
Run 'ydotool help' if you want a command list

Edit:

Actually, that error doesn't appear any more after I update my sudoers file with:

your_username ALL=(ALL) NOPASSWD: /usr/bin/ydotool

The bitwarden-rofi docs have:

Wayland Users: For autotyping to work in Wayland, you will need ydotool working with root permissions (it needs access to /dev/uinput) without asking for password. For example, this can be achieved by adding this line in visudo:

However, some other things I've noticed:

  • invoking rofi-rbw with sway doesn't work at all (nothing happens)
  • it would be great to have configurable keybindings, since for many i3 and sway users, Alt is already bound as their modifier key

Custom keybindings

The current keybinding conflicts with my WM config.
It would be nice if you add an option to change the keybindings.

Thanks ;)

Way to clear clipboard after copy

Hi, is there currently a way to clear clipboard content after a certain time? Looking around I haven’t found a proper option, neither in xclip/xsel nor in rofi-rbw itself.

[Bug] Additional args are not being passed to the action menu

I might have stumbled upon another problem: I set my specific rofi theme via the --selector-args '-theme /home/das-s/.config/rofi/appmenu.rasi' . Then, using the new action menu it appears to reset the theme when entering the selector menu. A possible cause might be here.
Is there a reason to pass an empty list to the additional_args parameter or is this just an oversight?

rofi-rbw hangs when action is copy and the output is assigned to a bash variable

I wanted to send the output from rofi-rbw to a window to display a password and keep the copy actions, however rofi-rbw hangs in this case.

PASSWORD=$(rofi-rbw)
echo "$PASSWORD" # this won't execute if you exit rofi with Alt+c

If instead you exit with Enter, the output is properly displayed.
I would have expected to just display an empty string.

Problem handling final \n char from rbw

Looks like rofi-rbw trips on the final \n character at the end of the password text from rbw:

Traceback (most recent call last):
  File "/home/cstrahan/.local/bin/rofi-rbw", line 8, in <module>
    sys.exit(main())
  File "/home/cstrahan/.local/lib/python3.8/site-packages/rofi_rbw/rofi_rbw.py", line 187, in main
    RofiRbw().main()
  File "/home/cstrahan/.local/lib/python3.8/site-packages/rofi_rbw/rofi_rbw.py", line 134, in main
    data = self.get_credentials(selected_entry.strip(), selected_folder.strip())
  File "/home/cstrahan/.local/lib/python3.8/site-packages/rofi_rbw/rofi_rbw.py", line 183, in get_credentials
    return Credentials(result)
  File "/home/cstrahan/.local/lib/python3.8/site-packages/rofi_rbw/credentials.py", line 13, in __init__
    key, value = line.rsplit(": ", 1)
ValueError: not enough values to unpack (expected 2, got 1)

If no `--typing-key-delay` option is provided ` wtype` fails to type

In rofi-rbw version 1.4.1 but I guess also in 1.4.0, when running rofi-rbw -t password -a type --typer wtype --selector-args="--insensitive" , selecting an option, then there is nothing typed but it logs

rofi-rbw
Invalid sleep time
        Invalid sleep time

I think the problem was added with the new --typing-key-delay option in

and is quiet the same as in #57, wtype -d 0 'Hello World' is not allowed.

My current workaroud is to add --typing-key-delay 1 to the command above.

Filter's out number `3` from password if using `Alt+3` to type password directly

Steps to reproduce

rbw add Test # write 123456 as password
rofi-rbw --no-help

Select "Test" entry and press Alt+3. The password is printed as 12456.

If the password is printed using Return through rofi-rbw --no-help -t password then everything works!

System

NixOS (unstable)
rofi-rbw 1.1.0
DE xmonad
Typer xdotool

This was sooo tricky to notice haha -- I hope this report helps in finding the fix!

rofi history

Hi,

With wofi, the first entries shown are the one most used, which is super convenient. But with rofi, this is not possible, as we are using dmenu mode, and this won't be implemented there: davatorium/rofi#747.

Therefore, I suggest to implement this in rofi-rbw, and maintain a simple history file in cache, as what rofi is already using, eg:

$ cat ~/.cache/rofi-3.runcache
18 thunderbird
17 firefox
3 pavucontrol

For my current use cases, I guess {n} {entry.folder}/{entry.name}\n would be enough, and I can provide a PR for this.
But if anybody has better ideas before that, please don't hesitate !

Unable to launch rofi-rbw from i3.

Hello!

Thank you for the awesome tool! I've been having a particular issue launching it from i3, and I'm curious if there's anything on the internals of rofi-rbw that could be causing this.

It's probably unlikely that the initial run of rofi-rbw (which sends to unlock rbw) would work through a keybind, but I'm not sure why it wouldn't work to just exec rofi-rbw from an i3 keybind.

Just hoping to get your insight.

Thanks!

Alternative way of obtaining TOTP code

Currently the TOTP code generation is done through a python library, however I just noticed that it's also possible to obtain through rbw code [entry], do you think it would be better to use that rather than the python dependency? I feel like a dependency less is a good thing and I'm willing to throw a PR if you agree.

Wtype doesn't work with the default typing-key-delay

With the resent pull request, Wtype doesn't work with the default typing-key-delay of 0. Here is the output with the default arguments.

[<rofi_rbw.models.Target object at 0x7f8ecda4d1d0>, <rofi_rbw.models.TypeTarget object at 0x7f8ecdac9750>, <rofi_rbw.models.Target object at 0x7f8ecda55810>]
Invalid sleep time
Invalid sleep time

I guess somewhere in the new code the sleep time is wrong? Currently I need to manually set this arg to 1 to fix.

TOTP not working if two items have same name

I've come across a situation were grabbing the TOTP is not working. In said situation there are two items with the same name but different usernames.

rofi-rbw

The result with this setup is an empty string in the clipboard. So checking how rofi-rbw is grabbing the TOTP I get this on the commandline:

[lem@host rofi_rbw]$ rbw code sandwich --folder server/hetzner
rbw code: couldn't find entry for 'sandwich': multiple entries found: root@sandwich, luks@sandwich

Would it be possible to add the functionality that rofi-rbw adds the username to the TOTP-command if there are multiple items?

Invalid sleep time for `wtype`

In PR #52, a default type delay of 0ms is added for all typers. As mentioned in that PR wtype already uses a default delay of 0ms.
However I just noticed that using -d 0 with wtype results in an error, i.e.:

% wtype -d 0 'Hello World'
Invalid sleep time

Meaning that using wtype does not allow you to type in the current state. I think the easiest solution is to remove the delay 0 argument, as it's also the default. Alternativly, adding typer arguments as discussed in PR #52 would also solve this issue, what do you think?

[Feature Request] Custom field support

Is there any chance of custom field support at all? When hitting enter on a selected item, it could bring up a menu with all of its fields. Hitting enter again on a selected field could autotype its value.

xdotool typing seems broken

Having trouble with auto typing user/pass -- the current approach isn't working in Chrome, gedit, Gnome Terminal, etc (the applications appear to ignore the sent keys entirely).

Per the "SENDEVENT NOTES" section of the xdotool man page (http://manpages.ubuntu.com/manpages/trusty/man1/xdotool.1.html#sendevent%20notes):

   If you are trying to send key input to a specific window, and it does not appear to be
   working, then it's likely your application is ignoring the events xdotool is generating.
   This is fairly common.

   Sending keystrokes to a specific window uses a different API than simply typing to the
   active window. If you specify 'xdotool type --window 12345 hello' xdotool will generate
   key events and send them directly to window 12345.  However, X11 servers will set a
   special flag on all events generated in this way (see XEvent.xany.send_event in X11's
   manual). Many programs observe this flag and reject these events.

   It is important to note that for key and mouse events, we only use XSendEvent when a
   specific window is targeted. Otherwise, we use XTEST.

   Some programs can be configured to accept events even if they are generated by xdotool.
   Seek the documentation of your application for help.

   Specific application notes (from the author's testing): * Firefox 3 seems to ignore all
   input when it does not have focus.  * xterm can be configured while running with
   ctrl+leftclick, 'Allow SendEvents' * gnome-terminal appears to accept generated input by
   default.

Tried changing the type_characters function to this, and looks like things are now working:

    def type_characters(self, characters: str, active_window: str) -> None:
        run([
            'xdotool',
            'windowactivate',
            '--sync',
            active_window,
            'type',
            '--clearmodifiers',
            characters
        ])

The idea being to explicitly activate the previous window and then send the chars.

cstrahan@pop-os:~/src/xsel$ cat /etc/os-release
NAME="Pop!_OS"
VERSION="20.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 20.04 LTS"
VERSION_ID="20.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
LOGO=distributor-logo-pop-os

item list is empty

rofi-rbw is showing up no items and it is asking for bitwarden password every time.

Keybinds not changing output

None of the keybinds in the readme work for me besides <enter>.

Environment

  • Arch
  • KDE Plasma 2.26.4 (Wayland)
  • wl-copy
  • ydottool
  • wofi-hg (AUR) also tried wofi (AUR)
  • rofi-rbw (1.01, 1.2.0 dev1 master, 1.2.0 dev1 no-folder)

Steps to reproduce

  1. Execute rofi-rbw
  2. Press Alt+2
  3. Press enter

The prompt blanks out when the keybinding is pressed but nothing happens until enter is pressed. No matter which default keybind I press, the username and password are always printed after after pressing enter.

Tried rofi-rbw --keybindings ctrl+n:copy:username with no success with the new ctrl+n keybinding.

Built using python -m build . --wheel and installed with pip.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.