使用sway来启动idea进行wsl2中的项目开发

sway on wsl2

今天突然发现直接 idea 连接 wsl 中项目进行 debug 时报错,说 idea 的 jlauncher 无法使用,被这个搞头疼了,然后使用了 wslg 来进行开发,每次都好多个窗口,比较麻烦,启动也慢。现在采用了 sway 的方式来运行,发现很不错。

sway 中进行了窗口管理,可以防止多个窗口开出,扰乱本该属于 windows 的窗口,所有的项目都进入到 sway 的窗口管理很方便使用。

image-20240407164021128

非常好看。

也可以支持中文输入法,如上图所示。接下来,将使用 sway 来开发项目了。

启动 sway 的命令

1
2
3
4
5
6
7
I just purchased an Intel Arc A750 and struggling to get the graphics card working within (Void, or any distribution of) Linux for the past month, while the graphics/video card worked with Windows 10 without problems. Happened to find a recent Internet post stating somebody else could not get their Intel A750/A770 working with either Xorg or Gnome Wayland, however using Sway the video/graphics card finally worked. And low and behold, same here, this Intel A750 is coming alive with using Sway, Void Linux kernel 6.0.7_1 version, i915.force_probe Linux cmdline option, and just the older default installed dg2_dmc 2022.10.22 linux-firmware!

I also had a problem with no graphical mouse pointer or invisible mouse pointer:
$ export WLR_NO_HARDWARE_CURSORS=1 && sway --verbose # 使用这个启动全屏话的sway

Already mentioned, if the DISPLAY variable is initialized, for example within $HOME/.bashrc or $HOME/.bash_profile file, ensure $DISPLAY variable is not set!
$ unset DISPLAY
Licensed under CC BY-NC-SA 4.0
最后更新于 Jan 06, 2025 05:52 UTC
comments powered by Disqus
Built with Hugo
主题 StackJimmy 设计
Caret Up