Comments (8)
Talking about the behavior when clicking an URI? If so, one solution is to set clicked
hook to invoke a custom opener.
tym.set_hook('clicked', function(button, uri)
if button == 1 then -- left click
if uri then
-- invoke a custom opener here
return true
end
end
end)
from tym.
my question is mostly how to make it not freeze tym itself(Im assuming here that os.execute("jaro" .. uri )
isnt safe to use , although I have not actually tried it)
from tym.
io.popen
? popen doesn't block
from tym.
The simplest thing would be add an ampersand to make it non blocking:
os.execute("jaro " .. uri .. "&")
from tym.
The simplest thing would be add an ampersand to make it non blocking:
os.execute("jaro " .. uri .. "&")
Thanks
I'm usually extra careful when Lua is called from a different program.
Because I know that the implementations used by booth awesome (windowmanager, C/C++) and xplr (TUI file-explorer, rust) have special ways of doing shell command execution
from tym.
I think tym should provide only minimal APIs. I can provide some API to launch shell command, but if it isn't related to tym, it should not be implemented in tym. We can also use LuaRocks in Lua context and there maybe a good library.
The problem is what is considered safe. To achieve safety, if we need tym application dependent information, the API should be implemented in tym.
from tym.
I think tym should provide only minimal APIs. I can provide some API to launch shell command, but if it isn't related to tym, it should not be implemented in tym. We can also use LuaRocks in Lua context and there maybe a good library.
The problem is what is considered safe. To achieve safety, if we need tym application dependent information, the API should be implemented in tym.
I'm thinking there could be a way to utilize the daemon in some way
(like running a tym-instance ,without the UI), I don't know though
from tym.
To daemonize processes, we should use the propert apps to daemonize.
from tym.
Related Issues (20)
- Background image option not working as expected HOT 2
- Support ligatures HOT 1
- would a universal package or precompiled "universal"(per architecture) binary be possible
- deb/rpm packages
- there are some misspellings in the README HOT 1
- Possible for daemon to start without GUI? HOT 7
- Migrate CI to GitHub actions. HOT 1
- Fonts not working HOT 3
- Accept unquoted or remaining arguments as the shell command HOT 10
- viu support HOT 4
- Api function to reload all tym instances HOT 1
- Add Wayland Support HOT 4
- specific padding for parts of terminal HOT 2
- I can't load my theme file with --theme HOT 2
- It appears that tym.get_config_path() does not work when I state --use explicitly HOT 4
- Border around tym window HOT 3
- setting theme from main config not working right
- Terminal Image Protocol HOT 3
- Doesn't respect CFLAGS HOT 2
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 tym.