Giter Club home page Giter Club logo

Comments (3)

PurpleMyst avatar PurpleMyst commented on June 24, 2024

Hi. Could you please show the output of myAppNap.py when you focus on the photo app and Trello? As in, does it print the name in your language or in English?

The second issue is already fixed in PRs #4 and/or #7, just a simple case of converting the output of pgrep to ints.

It would also help if you placed the output of your terminal in code blocks 😃. Like this:

~/workspace/MyAppNap> /usr/bin/python myAppNap.py Zdjęcia
Invalid app name, will not suspend/resume anything
Will monitor apps in focus, switch to your desired app to see valid name
Currently focused on Terminal
myAppNap.py:53: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
if last_active_app == desiredApp:

Currently focused on Zdjęcia # its photos app in polish

Currently focused on Terminal

^C
Exiting script
~/workspace/MyAppNap> /usr/bin/python myAppNap.py Trello
Monitoring Trello, with PIDs: ['2018', '2019', '2028', '2030'] # multiple PIDs, not working then
Currently focused on Terminal
Stopping Trello
Traceback (most recent call last):
File "myAppNap.py", line 64, in 
os.kill(pid, signal.SIGSTOP)
TypeError: an integer is required

from forcenap.

KrzysztofKowalski avatar KrzysztofKowalski commented on June 24, 2024

its:


~/workspace/MyAppNap> /usr/bin/python myAppNap.py       
Invalid app name, will not suspend/resume anything
        Will monitor apps in focus, switch to your desired app to see valid name
Currently focused on Terminal
Currently focused on Zdjęcia
Currently focused on Trello
Currently focused on Terminal
^C
Exiting script

from forcenap.

PurpleMyst avatar PurpleMyst commented on June 24, 2024

Ah, I've diagnosed the issue. We need to convert from bytes to UTF-8 strings.

I've tried fixing it in commit ac6a396 on my fork. Could you try what you've tried on this version on my fork?

from forcenap.

Related Issues (14)

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.