Hi, I’ve recently changed from gnome-shell to swaywm and I cant launch android-studio from the menu. If I open a terminal I can launch android-studio just fine, but not from mod+d menu
Any thoughts ?
Thanks
p.s Love EndeavourOS
Hi, I’ve recently changed from gnome-shell to swaywm and I cant launch android-studio from the menu. If I open a terminal I can launch android-studio just fine, but not from mod+d menu
Any thoughts ?
Thanks
p.s Love EndeavourOS
just installed it but i have no idea how to use it. It does launch from the terminal and from mod+d. I’m just not sure what to do with it? I’ve never used it before.
I’ve used it in the past, but only for creating virtual phones to run apps on; basically an Android VM. It’s basically an Android-only subset of Jetbrain’s IntelliJ IDEA IDE.
What does the menu item contain? From my previous install, all the exec line shows is android-studio %f
.
It just comes up like this.
Edit: I just tried in on vmware to see if it would launch.
Edit: I’m installing the git version to see.
Edit3: Don’t think there’s enough space so it failed to install.
@JCC
I see what you mean. Maybe someone from the community editions can help you. I don’t think it’s launching the terminal along with it when running it from mod+d menu or some other issue. It does seem to work from the terminal. I really wouldn’t know how to use it.
Welcome to forum @JCC !
Java applets may have issues with Sway.
See this section from SwayWM wiki :
Basically, you append this to your ~/.profile
if [ "$XDG_SESSION_DESKTOP" = "sway" ] ; then
export _JAVA_AWT_WM_NONREPARENTING=1
fi
Relevant issue :
@ricklinux if you haven’t deleted that VM, could you try running android studio with this command :
QT_QPA_PLATFORM=xcb _JAVA_AWT_WM_NONREPARENTING=1 android-studio
Thanks for the welcome @flyingcakes
I tried your suggestion and no luck. Not a big drama as i’m using vscode as my main application, just using android-studio to create the emulator.
The other question therefore would be how to configure in the sway config for the emulator to float ?
Something like
for_window [app_id="XYZ"] floating enable
in your config should do the trick. But I don’t know how you would get those id. If you can match on name, then trying for Android Emulator *
should work.
@OdiousImp Roping you in. I don’t know if you can get id that is same everytime application is launched. Android emulator seems to get a numeric id. Name always starts with Android Emulator
though.
Welcome to the forum @JCC
To get only the app_id
's of all open windows use:
$ swaymsg -t get_tree | grep "app_id"
To get the app_id
of the focused window use:
$ swaymsg -t get_tree | jq -r '..|try select(.focused == true)'
The add this into your config. There’s some examples that are done for other applications in ~/.config/sway/config.d/application_defaults
`for_window [app_id="XYZ"] floating enable`
@OdiousImp Thanks for the advice. I gave up on Sway in the end and went back to Gnome-Shell with the Material-Shell extension installed