Comments (3)
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 int
s.
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.
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.
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)
- Exciting work - a little more in the README might get ppl to contibte PRs :)
- Rumps system menu bar HOT 2
- Rename tech to MacNap HOT 3
- Future Feature Implementations
- python in High sierra HOT 1
- Compatibility List HOT 1
- High CPU Usage when running the script HOT 1
- Improvement: Replace the polling loop with use of the NSWorkspace's notificationCenter
- it's looks like this script not working in El Capitan? HOT 2
- Publish to Homebrew HOT 1
- MAKE file for compiling HOT 2
- New logo/icon HOT 5
- I am planning for restart this project HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forcenap.