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にPolybarを導入する

Last updated at Posted at 2024-12-06

Polybarの導入についての備忘録です

スクリーンショット_2024-12-06_12-43-30.png

インストール

sudo pacman -S polybar

各種設定(dotfiles)を「.config/polybar」に配置

私はこれを参考にしました。↓
https://github.com/gh0stzk/dotfiles
かっこいいですね

(注:環境によってconfigの System Variables を変更しなければならない、かもしれません。)

フォントを導入

Polybarで表示できるのは基本的に文字だけです。
つまり、アイコンなどを表示するためにはそれ用の特殊なフォントが必要です。

以下は個人的に必要なフォントです↓

yay -S ttf-jetbrains-mono ttf-font-awesome ttf-material-design-icons-desktop-git ttf-meslo-nerd-font-powerlevel10k

i3wmの設定

i3のconfigに以下を追加します

# settings for polybar
gaps top 38
exec_always --no-startup-id $HOME/.config/polybar/launch.sh

gaps topを設定することで、デスクトップの上側にPolybar用のスペースを確保することができます。

Xfce + i3wm環境にしてる場合に必要な設定

Xfce設定の セッションと起動→現在のセッションからxfce4-panelの再起動スタイルを「しない」に変更して、「セッションを保存する」を押します。

この設定を変えると、私の環境ではキーボードの音量キーが動作しなくなったのでi3wmの方で設定します
以下をi3のconfigに追加します

bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
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?