It's that time of year again!
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
๐ https://adventofcode.com/ ๐
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
Display hotkeys for the currently focused application
License: MIT License
It's that time of year again!
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
๐ https://adventofcode.com/ ๐
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
Came back to this after unlocking my screen:
Traceback (most recent call last):
File "/Users/donaldchea/Projects/d/hotkeys/hotkeys.py", line 111, in <module>
main_loop()
File "/Users/donaldchea/Projects/d/hotkeys/hotkeys.py", line 100, in main_loop
context = get_context(active_app)
File "/Users/donaldchea/Projects/d/hotkeys/hotkeys.py", line 55, in get_context
out = subprocess.run(cmd, capture_output=True, universal_newlines=True, check=True).stdout
File "/Users/donaldchea/.asdf/installs/python/3.9.1/lib/python3.9/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ps', '-t', 'ttys007', '-opid=,stat=,command=']' returned non-zero exit status 1.
Sometimes commands fail, who knew?
In any case, this doesn't give us any information other than the exit code.
What python tooling is available?
Minimum would be:
flake8
to enforce styleWhen iTerm2
is the current app, we use ps
to figure out the foreground process.
Is there a good way to figure this out?
If it's a list of pipeline processes, it's possible we won't know which process to use.
It returns a process with status S+
when the app is "sleeping" or R+
if it's running (not sure the difference atm).
In some cases it can have S+
and R+
. We are preferring S+
as the "foreground" process here.
In other cases, there may be multiple S+
processes as is the case here.
When the script is started, the cursor is hidden.
Is there a good way to ensure the terminal is restored to the proper state when the script exits?
We handle ctrl+c
.
But the script can raise
or receive SIGTERM
, etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.