这个主要是为了解决命令行中使用 vscode 时,没法使用这些传入的参数的问题的。desktop 文件中的自然是可以在使用 rofi 启动的时候生效。
# /usr/local/bin/code
#!/bin/sh
exec /usr/bin/code --enable-features=UseOzonePlatform \\
--ozone-platform=wayland \\
--enable-wayland-ime \\
--wayland-text-input-version=1 "$@"
然后,
chmod +x /usr/local/bin/code
因为 /usr/local/bin 默认优先于 /usr/bin,这样终端里输入 code 就会自动带上参数。