- 1. 概要
- 2. インストール
- 3. バー設定
- 4. メニュー設定
1. 概要
以下、「CachyOS 250824 sway」での操作です
他と同様、「waybar」はあるのですが、クリックイベントが効きません。
「ChatGPT」くんと悪戦苦闘しましたが、どうにもなりません。
少なくとも、今回(2025年9月18日)は、「waybar」をあきらめて、「tint2」を使います。
2. インストール
「root」ユーザ権限で。
yes | pacman -S -y jgmenu papirus-icon-theme
3. バー設定
デフォルトで「swaybar」が動作しているので、「waybar」が動作するようにします。
ログインユーザで。
vi ~/.config/sway/config
#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
bar {
position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
status_command while date +'%Y-%m-%d %X'; do sleep 1; done
colors {
statusline #ffffff
background #323232
inactive_workspace #32323200 #32323200 #5c5c5c
}
}
を下記へ変更します。
#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
bar {
swaybar_command waybar
# position top
#
# # When the status_command prints a new line to stdout, swaybar updates.
# # The default just shows the current date and time.
# status_command while date +'%Y-%m-%d %X'; do sleep 1; done
#
# colors {
# statusline #ffffff
# background #323232
# inactive_workspace #32323200 #32323200 #5c5c5c
# }
}
4. メニュー設定
ログインユーザで。
「jgmenu」のデザインをカスタマイズして、終了メニューを加えます。
mkdir -pv ~/.config/jgmenu
sh
cat << 'EOF' >> ~/.config/jgmenu/jgmenurc
menu_margin_x = 20
menu_margin_y = 40
menu_valign = top
item_height = 22
font = MigMix 1M bold 9
icon_theme = Papirus
color_sel_bg = #ffffff 40
csv_name_format = %n
EOF
cat << 'EOF' >> ~/.config/jgmenu/append.csv
^sep()
ログアウト,pkill sway,system-log-out
再起動,sudo /sbin/reboot,system-reboot
シャットダウン,sudo /sbin/poweroff,system-shutdown
EOF
exit
「/sbin/reboot」「/sbin/poweroff」は、「visudo」でパスワードなしで、ログインユーザが実行できるようにしておく必要があります。
「jgmenu」を表示した状態で、「あ、やめた」ってなったとき、メニューを消すのに、ESC キーを押さないと消えないのが少し面倒かな。
|
|