Git Product home page Git Product logo

Comments (57)

maximbaz avatar maximbaz commented on May 12, 2024 1

What's your $OPENER? I recently discovered that xdg-open is quite weird sometimes, after I forced it to be an alias to gio open my life became so much better and random bugs just went away. Could it be this case too? 🤔

My solution was to simply create an executable script called ~/.local/bin/xdg-open with the contents below (assuming ~/.local/bin is first in $PATH):

#!/bin/sh

gio open "$@"

Maybe worth a try for you too? Do this, open new terminal, double check that which xdg-open now points to it, and then retry.

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024 1

I have tried stock i3 and it appears to be broken.

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024 1

I use arch btw

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

You can use ctrl-r to reset the screen. Or terminal resize should also work.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

@aflyingpumpkin let me know if ^ this works.

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

@aflyingpumpkin let me know if ^ this works.
This does resolve the buggy visuals open closing a gui. Though I still can't use xplr while a GUI application is open.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

Should solve. I can't can test it now because my window manager will autoresize the screen which causes the refresh automatically.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

CTRL+R doesn't solve it? Can you pls provide more info like which OS, window manager, terminal are you using?
A gif would be awesome.

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

My window manager (dwm) also resizes the window upon closing the GUI. But I believe the GUI the process is not completely terminated when the window resizes which causes the buggy visuals. Also, I am locked out of xplr when the gui is open.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

Have you tried other terminals?

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

Just tried in Alacritty and the issue still persists.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

Which application are you trying to open?

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

If I run xdg-open x.doc, it opens in Kate and works fine.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

Just FYI this command is being executed.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024
${OPENER:-open} "${XPLR_FOCUS_PATH:?}" &> /dev/null &

This might solve the issue but need to test it. @aflyingpumpkin can you try overwriting the command?

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

${OPENER:-open} "${XPLR_FOCUS_PATH:?}" &> /dev/null & disown -h
Fixes my issue though it does cause some text to be displayed on xplr when opening prior to window resize

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

image
is the text that appears

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

And ctrl+r doesn't fix it?

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

ctrl+r fixes it, and it usually goes away when the application is opened unless I am in fullscreen mode.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

Hmm... not sure how to workaround this without a proper testing environment. @aflyingpumpkin if possible, can you pls create a PR?

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

What is a PR?

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

A pull request with the fix. No problem, I can do this.

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

Just found out that the random text was due to me accidentally putting:
OPENER="$(which xdg-open $)"
instead of
OPENER="$(which xdg-open)"

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

Ah ok.. Unfortunately the disown hack is causing other side effects. After I exit the session, the terminal session is messed up if there are disowned jobs. I think we need to investigate more into this.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

Nope, that was my fault. I used disown incorrectly and didn't exit the terminal.

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

I found an issue with the disown hack. If xplr is still open and the terminal is terminated the gui will also be terminated.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

Weird... Not in my WM...

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

I'll setup a test VM with dwm when I get some time. Meanwhile, @aflyingpumpkin you can experiment with different command combinations and let me know if you find anything that works.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

Although if it's too hacky, we'll probably need to report the issue to DWM maintainers.

from xplr.

maximbaz avatar maximbaz commented on May 12, 2024

I got a ping on the (now closed) PR, to be honest I can't reproduce the issue on latest main (kitty, sway, arch) - i can open multiple files using gx, I can then close xplr, close terminal, and all gui app will remain and will function properly 🤷‍♂️

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

What I have been doing. I noticed that disown -h appears to not be needed ${OPENER:-open} "${XPLR_FOCUS_PATH:?}" &> /dev/null & does the same thing.

Also, I just booted up i3 and the issue is still persisting.

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

I am using xdg-open, after doing a force alias the bug still persists.

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

I think it may be a problem with disown. Currently only having the & symbol is needed, and disown -h should block the termination signal from doing anything.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

@aflyingpumpkin I was using plain disown, not disown -h.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

Try this: https://github.com/sayanarijit/xplr/pull/109/files

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

I saw, even when I use what was put in the pull request the issue still exists.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

Maybe it's WM specific bug? Need to test it on different window managers. So far as we know,

KDE + KWin -> Working
SWAY (I3) -> Working
DWM -> Broken
GNOME -> Not tested
XFCE -> Not tested
I3 (stock) -> Broken
I3-status -> Not tested
BSPWM -> Not tested
AwesomeWM -> Not tested
qtile -> Not tested
xmonad -> Not tested

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

I wish I had more users in our discord channel, then I could just ping users to test report this 😄

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

Just tried kwin with alacritty and kitty and I am still running into the issue. I also tried switching to zsh and I am still running into the issue.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

Wow, then it seems more like a platform issue? Which OS are you using?

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

And maybe shell?

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

I tried on both zsh and bash.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

Very strange. I'm out of ideas. Can you record a video? I think GitHub allows posting video files.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

image

GitHub broke 😄

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

No, I deleted the message because the aspect ratio was messed up.
https://user-images.githubusercontent.com/49350251/116135449-28d52400-a69f-11eb-9664-f58095b81292.mp4

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

@aflyingpumpkin you can maybe also capture a GIF using https://github.com/phw/peek. Preferably the KDE-Kwin one.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

No, I deleted the message because the aspect ratio was messed up.
https://user-images.githubusercontent.com/49350251/116135449-28d52400-a69f-11eb-9664-f58095b81292.mp4

Runs on VLC

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

It the video xplr seems to work fine? You opened the file, then closed xplr?

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

The first example where they both closed at the same time was when I left xplr open and closed the terminal. The second example when the document stayed open was due to the fact that I fist closed xplr then closed the terminal.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

Ah okay, so that's what you meant.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

Yes I can reproduce this. I don't think you're supposed to close the terminal before quitting xplr gracefully.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

The document will stay open. You close it separately. It's the expected behavior I guess.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

Or, if you want to open multiple documents, you can do so, but you need to close them manually and quit xplr gracefully.

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

You can probably achieve what you want to, using nohup or screen or tmux. But I don't think it should be the default in xplr.

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

Alright, thanks

from xplr.

sayanarijit avatar sayanarijit commented on May 12, 2024

@aflyingpumpkin v0.9.1 probably fixed the issue in a way you wanted. You can close the terminal after opening apps in GUI, without closing them.

from xplr.

aflyingpumpkin avatar aflyingpumpkin commented on May 12, 2024

Great!

from xplr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.