Comments (8)
I just realized that if focus is on the terminal window then < Ctrl >m does not seem to work. If I switch focus on another window then it works fine !?!?!?
from tym.
Can you show me your machine environment (OS, desktop env, window manager etc...) and the minimal config Lua code to reproduce the situation?
The following code seems to work correctly for me on my env.
local tym = require 'tym'
tym.set('shell', 'sh')
tym.set_timeout(function()
tym.send_key('<Ctrl>m')
return true
end, 1000)
My machine info:
- Arch Linux
- MATE
- Marco
from tym.
I am using i3wm in Linux Mint 19.1 Tessa
When focus is on another window the code above works fine and presses enter every second. When focus is on the terminal window then it does not work :-)
It's very weird but probably is an i3wm issue? I will look into it from that angle.
from tym.
local tym = require 'tym'
tym.set('shell', 'sh')
tym.set_timeout(function()
-- tym.send_key('<Ctrl>m')
print('hoge')
return true
end, 1000)
Does above code work correctly (logs will be printed) when the window has focus? Please launch tym from command line like $ tym -u /path/to/config.lua
and confirm it.
If it works, it follows that the problem comes from set_timeout()
not from send_key()
. I have never used i3 so I want you to check it.
from tym.
Ok, let me explain the setup.
i3 windows manager has hotkeys (the most prominent one to start a terminal). So typically the mod key is Alt or Super.
My combination is Super+t to start a terminal.
Now, if I run tym within the default i3 terminal, it works fine (so tym terminal executed within i3 default terminal let's say). The "hoge" is printed etc. Note that it is printed on the i3 default terminal, not in the new window of tym.
But when I press Super+t (ie tym starts on its own window as a standalone application) then "hoge" is not printed, even if focus goes to another window. I assume your desired outcome would be that "hoge" shows within tym window, right?
Naturally, I would like to use tym as my default terminal (and script it and automate it in my favorite Lua). Perhaps that's not the intended way of using it? Should tym run from another terminal???
I will try to make a video and demonstrate.
from tym.
Let me verify first with i3 people because xdotools does not send keys to another window so it may be related.
from tym.
Just for testing I asked to launch from command line. You can use tym same as any other terminals.
When you have a problem using my first code, we can't aware whether set_timeout()
or send_key()
causes the problem. So if you launch tym from another terminal and see logs whether active or inactive, it follows that send_key()
causes it and set_timeout()
is not broken. But when you launch tym by pressing shortcut key or clicking a desktop entry file such as tym.desktop
you can't see logs, so you need to launch tym from command line.
If the problem comes from send_key()
, It is definitely related to the behavior of xdotools. It is good to verify with them.
from tym.
At least either tym.send_key('<Ctrl>m')
or tym.send_key('KP_Enter')
works.
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
- request: allow for using a custom handler/opener, or xdg-open as an alternative to the current way(which opens the wrong browser for me) HOT 8
- 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.