Giter Site home page Giter Site logo

Comments (9)

lonkaars avatar lonkaars commented on June 14, 2024 1

This is incredibly embarassing, I had a wrapper around rofi in my home directoy that set some environment variables which did not properly forward the arguments. Thanks for helping out though!

from rofi.

DaveDavenport avatar DaveDavenport commented on June 14, 2024

I cannot reproduce:

rofi -no-config -kb-mode-previous '' -kb-mode-next '' -show keys

works.

rofi-2024-02-27-2334-00000

from rofi.

DaveDavenport avatar DaveDavenport commented on June 14, 2024

Tested, works with latest and 1.7.5.

I can reproduce your error:

rofi -no-config -kb-mode-previous  -kb-mode-next -show keys

are you sure you shell/launcher passes empty arguments?

from rofi.

lonkaars avatar lonkaars commented on June 14, 2024

If I substitute rofi for printf -- '"%s"\n':

$ printf -- '"%s"\n' -no-config -kb-mode-previous '' -kb-mode-next '' -show keys
"-no-config"
"-kb-mode-previous"
""
"-kb-mode-next"
""
"-show"
"keys"

So I guess it works as intended?

Edit: tested with ZSH 5.9, Bash 5.2.26 and Dash 0.5.12. All show the above output

from rofi.

DaveDavenport avatar DaveDavenport commented on June 14, 2024

What shell do you use, because from your error message, those empty ones are not there.
It tries to interper '-show' as the value of '-kb-mode-next'.

For me with bash, your example works fine (see screenshot).

also tested zsh 5.9, works fine.

This does not feel like a rofi issue because rofi code does not skip 'empty' arguments (it gets an array passed), but I am unsure why for you the shell does not pass those .

from rofi.

lonkaars avatar lonkaars commented on June 14, 2024

Calling rofi from python does seem to work on my system (os.exec does not run in a shell):

#!/bin/python3
import os
os.execv('/bin/rofi', [ 'rofi', # argv[0] needs to be passed again
  '-no-config',
  '-kb-mode-previous', '',
  '-kb-mode-next', '',
  '-show', 'keys'
])

I am unsure why this works, while the shell does not

from rofi.

DaveDavenport avatar DaveDavenport commented on June 14, 2024

Ok, that confirms it aint rofi's fault, but I wonder why your shell is behaving differently for you then me.

from rofi.

DaveDavenport avatar DaveDavenport commented on June 14, 2024

Happy the problem is resolved .

from rofi.

github-actions avatar github-actions commented on June 14, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from rofi.

Related Issues (20)

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.