0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Arch Linux + niri環境でWaybarが真っ黒になる時の対処法

0
Posted at

はじめに

 Arch Linux で niri (スクロール可能なタイル型 Wayland コンポジター) を使用している環境で、Waybar が起動してもバー全体が真っ黒で、モジュールが一切表示されない現象に遭遇しました。
 Waybar の設定は、ウインドウマネージャーで sway に変更すると正常に表示されるので、正しく設定出来ています。
 この現象を、niri の設定ファイルでディスプレイを明示的に定義することで解決したため、その手順をまとめます。

環境

  • OS: Arch Linux
  • Compositor: niri (v25.11)
  • Bar: Waybar

手順

1. ディスプレイ名を確認する

 まず、niri が認識しているディスプレイの識別名を調べます。wlr-randr を使用するのが確実です。

# 未インストールの場合はインストール
sudo pacman -S wlr-randr

# ディスプレイ情報の確認
wlr-randr

出力例:

eDP-1 "Chimei Innolux 0x14D5 (eDP-1)"
  Physical size: 340x190 mm
  Enabled: yes
  Modes:
    1920x1080 px, 60.003000 Hz (current)
  ...

 この例では、ディスプレイ名が eDP-1 であることがわかります。

2. niri の設定ファイルを編集する

 niri の設定ファイル(通常は ~/.config/niri/config.kdl)を開きます。

vim ~/.config/niri/config.kdl

 ファイル内に output セクションを追記します。手順1で確認したディスプレイ名(eDP-1)を指定し、必ずスケーリングの設定を記述します。

~/.config/niri/config.kdl
output "eDP-1" {
    scale 1
}

3. Waybar の起動確認

 設定を保存すると、niri は自動的に設定をリロードします。
 これで、真っ黒だったバーに各モジュールが正しく表示されるようになります。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?