qtile - 共通事項 - メニュー - jgmenu CachyOS


 クラウディア


1. 概要
2. インストール
3. Bar 設定
4. tint2 設定
5. jgmenu 設定

1. 概要

 「CachyOS 250824 qtile」で、「jgmenu」を使用してみます。

2. インストール

 アイコンテーマとして、「papirus-icon-theme」をインストールできるのですが、オリジナルのアイコンを使うことにします。  「root」ユーザ権限で。

yes | pacman -S jgmenu tint2

3. bar 設定

 デフォルトで、上に表示しているバーを下へ移動します。  ログインユーザで。

vi ~/.config/qtile/config.py

screens = [
    Screen(
        top = bar.Bar(
 235行の「top」を「bottom」へ変更します。

4. tint2 設定

 「tint2」の設定をカスタマイズします。  ログインユーザで。  「tint2」の設定。

mkdir -pv ~/.config/tint2

sed -e 's/panel_position = bottom center horizontal/panel_position = top center horizontal/' \
    -e 's/panel_layer = top/panel_layer = bottom/' \
    -e '/taskbar_name_font_color/i taskbar_name_font = MigMix 1M 10' \
    -e '/launcher_item_app = /d' \
    "/etc/xdg/tint2/tint2rc" > ~/.config/tint2/tint2rc

sed -i '/startup_notifications = 1/a launcher_item_app = jgmenu.desktop' ~/.config/tint2/tint2rc
 上記は、下記の設定を行っています。 ・パネルの位置を下から上へ。 ・アプリケーションウィンドウが、パネルの下へ隠れるので、パネルのレイヤを下へ。 ・フォントを定義。 ・ランチャで起動するのは、「jgmenu」のみ  「tint2」の自動起動を設定します。  (「autostart.sh」に「run」関数を定義済として)

sh
cat << 'EOF' >> ~/.config/qtile/scripts/autostart.sh
run "tint2"
EOF
exit
 ログインしなおせば、設定が反映されているはずです。

5. jgmenu 設定

 ログインユーザで。

mkdir -pv ~/.config/jgmenu

sh
cat << 'EOF' >> ~/.config/jgmenu/jgmenurc
menu_margin_x = 10
menu_margin_y = 30
menu_valign = top
item_height = 22
font = MigMix 1M bold 9
color_sel_bg = #ffffff 40
csv_name_format = %n
EOF

cat << 'EOF' >>  ~/.config/jgmenu/append.csv
^sep()
ログアウト,pkill qtile,system-log-out
再起動,sudo /sbin/reboot,system-reboot
シャットダウン,sudo /sbin/poweroff,system-shutdown
EOF
exit
 再起動とシャットダウンを有効化するには、「root」ユーザ権限で

visudo
 して、下記の行を加えます。

ログインユーザ名  ALL=(ALL) NOPASSWD: /sbin/halt, /sbin/reboot, /sbin/poweroff