Git Product home page Git Product logo

Comments (7)

kantord avatar kantord commented on July 17, 2024 1

It isn't an issue with i3 itself. It depends a lot on how your i3 is configured and launched. See: https://www.reddit.com/r/i3wm/comments/72oiwl/how_do_i_set_environment_variables_so_that_they/

from i3-gnome-pomodoro.

lockejan avatar lockejan commented on July 17, 2024

When invoking i3bar --bar_id=bar-0 from CLI the pomodoro timer is displayed.
Maybe it's an i3 related issue???

from i3-gnome-pomodoro.

kantord avatar kantord commented on July 17, 2024

at first glance, I would try to debug the python part there. Does that python command exist? Is it a compatible version? I understand that it exists in the terminal where you tried it, but maybe somehow it's overwritten or not defined in the exec in i3? 🤔 Just guessing there tho

Another possibility is that there's something wrong with (relative) file paths

from i3-gnome-pomodoro.

kantord avatar kantord commented on July 17, 2024

So yeah I'd think this might be about environment variables or something like that

from i3-gnome-pomodoro.

lockejan avatar lockejan commented on July 17, 2024

Hmm, yeah, it has to be. I'm using python 3.8.1 with pyenv, but the #!/usr/bin/env python takes that into account.

So I just made a small test script ~/bin/test.py to verify that:

#!/usr/bin/env python

import os, sys

if len(sys.argv) > 0:
    os.system(f"notify-send {str(sys.argv[1])}")
else:
    os.system("notify-send 'hello'")

and attached it in the same manner to a keybinding in my i3config

bindsym $mod+F9 exec "python ~/bin/test.py i3status"

This works right off the bat.🤔😕
I tested it with python 3.6.9 as well and it doesn't make any difference.😬

from i3-gnome-pomodoro.

lockejan avatar lockejan commented on July 17, 2024

Okay, I figured it out. It has to do with i3 environment handling. It seems to ignore my pyenv env and falls back to the distros python which hasn't the deps installed.
After installing them it works. Gonna open a ticket for i3 then.
Thanks for your input.

from i3-gnome-pomodoro.

lockejan avatar lockejan commented on July 17, 2024

Okay, so I just created .profile in my $HOME and added this line to make my x session aware of pyenv:

export PATH=$($HOME/.pyenv/bin/pyenv root)/shims:/usr/local/bin:/usr/bin:/bin:$PATH

I'm not sure if this is good practice but it solves the issue for me.😀

from i3-gnome-pomodoro.

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.