Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] No output outside a terminal #13

Open
Locorock opened this issue Jul 29, 2022 · 5 comments
Open

[BUG] No output outside a terminal #13

Locorock opened this issue Jul 29, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@Locorock
Copy link

Describe the bug
No output is produced when any command is executed outside a terminal

To Reproduce
wtwitch c | rofi -dmenu, executed with an i3 keybind

Expected behavior
I expected rofi to show me all the rows of wtwitch c as options, but i got nothing

Logs/system info (please complete the following information):

  • OS: Manjaro
  • wtwitch version: 2.5.1

Additional context
Having the command be executed within a terminal solves the issue (but doing so opens a new window)

@Locorock Locorock added the bug Something isn't working label Jul 29, 2022
@Locorock
Copy link
Author

Locorock commented Jul 31, 2022

ok yeah apparently the script checks terminal width to cut titles and such, so when a terminal isn't actually there nothing works because there is no terminal width. Managed to fix it by just removing title-cutting from the code but there should be a way to have it only affect instances not run in a terminal.

@falsified
Copy link

falsified commented Oct 14, 2022

had the same issue when I was calling from dmenu, workaround was to make a script call a terminal, execute, spit output , run another script,

Otherwise, excellent light weight script!

@Locorock
Copy link
Author

that's one way of solving it i guess, really convoluted tho

@falsified
Copy link

yeah, not too bad, tweaked it to get it working right, so it'll exit out of the terminal called

dmenu -> script1
script:1 call term executing script2
script2: wtwitch c >tmpfile, grep, sed, into dmenu dialog -> select streamer and hit enter -> launches streamlnk with mpv via nohup, so parent terminal doesnt close out new spawn, bonus, set tray icon sleep and script1 exits spawned term

Lemme know if you'd want the code, it would only take a tiny bit of modifications

@Locorock
Copy link
Author

yeah, not too bad, tweaked it to get it working right, so it'll exit out of the terminal called

dmenu -> script1 script:1 call term executing script2 script2: wtwitch c >tmpfile, grep, sed, into dmenu dialog -> select streamer and hit enter -> launches streamlnk with mpv via nohup, so parent terminal doesnt close out new spawn, bonus, set tray icon sleep and script1 exits spawned term

Lemme know if you'd want the code, it would only take a tiny bit of modifications

Yeah i already edited the code of wtwitch by simply removing the line that cuts text short. Should probably add a config for that and fork this repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants