firecat53 / keepmenu

Dmenu/Rofi frontend for Keepass databases
GNU General Public License v3.0
204 stars 32 forks source link

can't make it to work with rofi #58

Closed arenaitmx closed 4 years ago

arenaitmx commented 4 years ago

Hi there,

it's really helpful the tool very appreciated. I'm a rofi user but can't make it to work with the example in the .ini you leave. I've tried many different things but I get this error:

`└──╼ $ cat ~/.config/keepmenu/config.ini [dmenu] dmenu_command = rofi -width 30

[dmenu_passphrase] nf = #222222 nb = #222222 rofi_obscure = True

[database] database_1 = /path/to/mydb.kdbx pw_cache_period_min = 180 autotype_default = {USERNAME}{TAB}{PASSWORD}{ENTER} `

I've tried calling as the belo without success: keepmenu rofi -modi "keepass:keepmenu" -show keepass -run-command 'keepmenu'

Would it be please possible on how to properly setup ?

Thanks in advace, Julio

firecat53 commented 4 years ago

You can't use keepmenu with the -modi flag. Just run keepmenu with your configuration above and it will open keepmenu in Rofi. Without a major restructuring, there's no way to make it work with -modi (see #7).

arenaitmx commented 4 years ago

Thanks for the prompt response. I've tried that but I get this: └──╼ $ keepmenu ---- INPUT THE PASSWORD VIA ROFI --- THEN THIS --- : Rofi is unsure what to show. Please specify the mode you want to show.

rofi -show {mode}

The following modi are enabled:

The following can be enabled:

To activate a mode, add it to the list of modi in the modi setting.

firecat53 commented 4 years ago

That's a Rofi error, not keepmenu. There's no Keepmenu settings that deal with opacity. Check your Rofi config.

Edit: you could also post your Rofi config...maybe I can attempt to duplicate.

firecat53 commented 4 years ago

@arenaitmx, were you able to get it working?

arenaitmx commented 4 years ago

Yes, but without the ROFI, it's buggy on my machine the ROFI config.

firecat53 commented 4 years ago

If you'd like to post your Rofi config, I might be able to help figure out what the issue is.

arenaitmx commented 4 years ago

Hi there, thanks a lot for the kind help!

└──╼ $ cat ~/.config/keepmenu/config.ini
[dmenu]
dmenu_command = /usr/bin/dmenu  # **currently using this one**
# dmenu_command = rofi 

[dmenu_passphrase]
nf = #222222
nb = #222222
rofi_obscure = True

[database]
database_1 = ~/Documents/proc.kdbx
pw_cache_period_min = 180
autotype_default = {USERNAME}{TAB}{PASSWORD}{ENTER}
firecat53 commented 4 years ago

Your config works for me exactly as it should. What problem are you having?

arenaitmx commented 4 years ago

Rofi is not working, it opens dmenu even when I change the .ini

firecat53 commented 4 years ago
  1. Make sure you kill the keepmenu daemon after changing the config
  2. Make sure Rofi is in your $PATH. What is the output of which rofi and which dmenu ?
arenaitmx commented 4 years ago

Can't find that daemon you mentioned. Rofi is in $PATH. Thanks for your kind support!

└──╼ $ sudo ps -fea | grep -i keepmenu jguerre+ 196158 195578 0 13:24 pts/4 00:00:00 grep --color=auto -i keepmenu └──╼ $ which rofi /usr/bin/rofi

└──╼ $ which dmenu /usr/bin/dmenu

firecat53 commented 4 years ago

Do you have any other Rofi configurations in .Xresources or ~/.config/rofi? Are there any error messages when you run keepmenu from the command line? Can you run rofi normally (e.g. echo -e 'hello\nhi'|rofi -dmenu) ?

Edit: how did you install keepmenu? Are you running latest version?

arenaitmx commented 4 years ago

No extra config on rofi. I do have some .Xresources config for the rofi ui , will append below. The echo hello command prints the rofi menu in two lines.

Xresource: └──╼ $ cat ~/.Xresources | grep -i rof rofi.color-enabled: true rofi.color-window: #272827, #13bf9d, #13bf9d rofi.color-normal: #272827, #657b83, #272827, #272827, #13bf9d rofi.color-active: #272827, #657b83, #272827, #272827, #13bf9d rofi.color-urgent: #272827, #657b83, #272827, #272827, #13bf9d rofi.separator-style: solid rofi.sidebar-mode: false rofi.lines: 5 rofi.font: Source Code Pro Semibold 10.5 rofi.bw: 1 rofi.columns: 2 rofi.padding: 5 rofi.fixed-num-lines: true rofi.hide-scrollbar: true

pip3 freeze | grep -i keepme keepmenu==0.6.1

Command: image

firecat53 commented 4 years ago

Try removing the Xresources configs for Rofi and see if keepmenu runs. Maybe there's a conflict.

arenaitmx commented 4 years ago

it is working !!! This is good support!

arenaitmx commented 4 years ago

Thanks a lot for your kind support! image

firecat53 commented 4 years ago

Good! What did you change to make it work? If there's a conflict with one of the Xresources values I might be able to correct that in my code.

arenaitmx commented 4 years ago

I commented out the whole rofi part.

firecat53 commented 4 years ago

The best way to configure Rofi is now through theme files. You could tr y adding in one Xresources value at a time until keepmenu stops working, but I'd recommend switching your configuration to use the -theme option.

Riyyi commented 4 years ago

I had the same issue, fixed it by running the command that the warning gave.

(process:247233): Rofi-WARNING **: 15:32:13.071: The old Xresources based configuration format is deprecated.

(process:247233): Rofi-WARNING **: 15:32:13.071: Please upgrade: rofi -upgrade-config.

This converted the ~/.config/rofi/config file (which held Xresources like syntax) to ~/.config/rofi/config.rasi

firecat53 commented 4 years ago

Sounds like it's working for everyone, so I'll close this. Let me know if you have more issues!