Visual Studio Code の Wayland の設定をする

この記事を作った動機 Wayland環境を使っていて、いちいち設定を見に行くのがめんどくさいので、ここにメモ書きとして乗せるだけ。「fcitx5 の日本語入力ができない問題を何とかする」ということに注目している。 ~/.config/code-flags.conf を以下のように編集 --enable-features=UseOzonePlatform --gtk-version=4 --enable-wayland-ime --wayland-text-input-version=3 # これは実験した跡 #--ozone-platform=x11 #--ozone-platform-hint=auto 必要なパッケージ 上記だけでは動かない場合、この記事でも書いている、fcitx5 関連のパッケージをインストールする。以下は、gnomeの設定のメモ ⚙の引用である。 パッケージのインストール 私は普段 fcitx5 を常用しているので、それらをインストール。 # 通常はこれだけ入れればうまく行くかも yay -S fcitx5 fcitx5-mozc fcitx5-input-support fcitx5-configtool # なんかうまく動かないと思ったらここらへんも確認してみるといいかも yay -S fcitx5-qt fcitx5-gtk fcitx5-anthy 関連するページ gnomeの設定のメモ ⚙ 参考にしたサイトとか Visual Studio Code - ArchWiki https://wiki.archlinux.jp/index.php/Visual_Studio_Code (2025年4月12日) Wayland - ArchWiki https://wiki.archlinux.jp/index.php/Wayland#Electron (2025年4月12日) Using Fcitx 5 on Wayland - Fcitx https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland (2025年4月12日)

April 12, 2025

gnomeの設定のメモ ⚙

この記事を書いた動機 ただの自分用のよく使う設定集としてのメモ。基本的にgnome標準で付いてくると思われるgsettingsコマンドを使う。 環境 細かいことは書かないけど一応 gnome wayland Xwayland no X11 4kなどの高解像度ディスプレイ gnome の有効化(一応) gnomeのディスプレイマネージャーを単にsystemdのサービスとして起動時に立ち上がってくれるように有効にするだけ。Windowsで言ったら、logonui.exeかみたいなやつに近い気がする。 systemctl enable gdm トラックパッドの設定 物理ボタンではなく、タップしている領域で右クリックか判定しているトラックパッド用の設定。 gsettings set org.gnome.desktop.peripherals.touchpad click-method 'areas' ウィンドウのボタン 最大化、ウィンドウモードとかのボタンなどのWindowsでは標準の機能がデフォルトで無効になっているので、有効にする。 gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close" スケーリングの設定 スケーリングとか、gnomeの実験的な機能として現在(2024年10月27日)組み込まれている機能を有効化する。よくバグる。 # 125% とかもっと細かいスケーリングを有効にできる。ある程度は実用できる段階に体感では感じるが、Xwaylandのアプリが思いっきりぼけてしまう。 gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']" # Xwayland で動くアプリがぼけないようにする、欲張り設定。中途半端な125%とかの設定と併用すると、変にウィンドウが特定の領域でしか反応しなくなるなど、バグが多い。 gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer','xwayland-native-scaling']" ちなみに、Xwaylandの「xwayland-native-scaling」などは、以下のサイト(githubのmutterのリポジトリ)で設定値の存在を確認できる。 https://github.com/GNOME/mutter/blob/main/data/org.gnome.mutter.gschema.xml.in 例えば、こんな感じで書いてある。何か気になるのがあったら、仮想マシンかなんかで使う前に試してみるといいかもしれない。 <schemalist> <flags id="org.gnome.mutter.MetaExperimentalFeature"> <value nick="scale-monitor-framebuffer" value="1"/> <value nick="kms-modifiers" value="2"/> <value nick="autoclose-xwayland" value="4"/> <value nick="variable-refresh-rate" value="8"/> <value nick="xwayland-native-scaling" value="16"/> </flags> カーソルの大きさ サイズの取得 gsettings get org.gnome.desktop.interface cursor-size サイズの変更 gsettings set org.gnome.desktop.interface cursor-size 12 設定のリセット gsettings list-schemas | xargs -n 1 gsettings reset-recursively fcitx5 日本語環境についても、いちいち調べるのはめんどくさいので、今日(2024/11/14)追記してみることにした。 ...

October 27, 2024