- 1. 概要
- 2. 定義
- 3. カスタマイズ
- 4. 表示位置
1. 概要
デスクトップの下部にある、パネル。
「JWM」の定義では「Tray」と記述してあるので、「JWM」では、トレイと呼ぶのが正しい呼称かと思われます。
いじり方を知らなかったのですが、「ArcoLinux 20.07.5 JWM」のメニューをいじろうとしたときに、ふと理解できました。
ファイルは、以下のように用意されています。
プラットフォーム | システムファイル | ユーザファイル | 備考 |
antiX | /etc/skel/.jwm/tray | ~/.jwm/tray | |
FreeBSD | - | ~/.jwmrc | |
2. 定義
「antiX」では
~/.jwmrc
に
<Include>$HOME/.jwm/tray</Include>
の記述があって
~/.jwm/tray
中身は、下記のように記述されています。
<JWM>
<!-- Additional tray attributes: autohide, width, border, layer, layout, valign -->
<Tray x="0" y="-1" height="28" layer="above" valign="bottom">
<!-- Additional TrayButton attributes: label, icon, popup -->
<TrayButton label=" Menu ">root:1</TrayButton>
<TrayButton label="" icon="/usr/share/icons/papirus-antix/48x48/apps/packageinstaller.png" popup="Software Installer">exec: su-to-root -X -c packageinstaller</TrayButton>
<TrayButton label="" icon="/usr/share/icons/papirus-antix/48x48/devices/drive-removable-media-usb.png" popup="リムバーブルデバイスを外す">exec: unplugdrive.sh</TrayButton>
<TrayButton label="" icon="/usr/share/icons/papirus-antix/48x48/apps/file-manager.png" popup="File Manager">exec: desktop-defaults-run -fm</TrayButton>
<TrayButton label="" icon="/usr/share/icons/papirus-antix/48x48/places/folder-red.png" popup="File Manager as root">exec: su-to-root -X -c rox</TrayButton>
<TrayButton label="" icon="/usr/share/icons/papirus-antix/48x48/apps/web-browser.png" popup="Web Browser">exec: desktop-defaults-run -b</TrayButton>
<!-- Additional TaskList attribute: maxwidth -->
<TaskList maxwidth="125"/>
<!-- Additional Pager attributes; width, height -->
<Pager/>
<!-- Additional Dock attribute: none -->
<Dock/>
<!-- Additional Swallow attribute: height, width -->
<!-- <Swallow name="xload" height="28" width="30"> xload -update 2 -jumpscroll 1 -nolabel -bg black -fg green -hl black </Swallow> -->
<!-- Additional Clock attributes: format, height, width, zone -->
<Clock format="%k:%M "></Clock>
</Tray>
</JWM>
「ArcoLinux」では
~/.jwmrc
に
<Include>$HOME/.config/jwm/tray</Include>
の記述があって
~/.config/jwm/tray
中身は、下記のように記述されています。
<?xml version="1.0"?>
<JWM>
<!-- Tray at the bottom. -->
<Tray x="0" y="-1" autohide="off" height="30" layer="above" halign="left" valign="bottom">
<TrayButton label="ArcoLinux" icon="/usr/share/icons/hicolor/20x20/places/start-here-arcolinux.svg">root:3</TrayButton>
<Spacer width="2"/>
<TrayButton label="_">showdesktop</TrayButton>
<Spacer width="2"/>
<Pager labeled="true"/>
<TaskList maxwidth="150"/>
<Dock/>
<Clock format="%H:%M"><Button mask="123">exec:xclock</Button></Clock>
</Tray>
</JWM>
「FreeBSD」では
~/.jwmrc
に直接記述してあって、下記のように記述してあります。
<!-- Tray at the bottom. -->
<Tray x="0" y="-1" autohide="off">
<TrayButton icon="jwm-blue">root:1</TrayButton>
<Spacer width="2"/>
<TrayButton label="_">showdesktop</TrayButton>
<Spacer width="2"/>
<Pager labeled="true"/>
<TaskList maxwidth="256"/>
<Dock/>
<Clock format="%H:%M"><Button mask="123">exec:xclock</Button></Clock>
</Tray>
「MenuMaker」を使用して、日本語化するツールを使う際は、別途外に書いたファイルを取り込むようにしました。
詳細は「Python - MenuMaker 日本語化」をご参照ください。
2023年5月20日、最近は、「MenuMaker」を使用せず、「jgmenu」を使用しています。
設定方法は、「JWM - 共通事項 - メニュー」をご参照ください。
3. カスタマイズ
「FreeBSD」を例にとりますが、トレイにある程度の高さを持たせて、左端にアイコンを表示、逆にラベルを非表示にします。
<Tray x="0" y="-1" autohide="off">
<TrayButton icon="jwm-blue">root:1</TrayButton>
<Spacer width="2"/>
<TrayButton label="_">showdesktop</TrayButton>
<Spacer width="2"/>
の個所を
<Tray x="0" y="-1" autohide="off" height="30" layer="above" halign="left" valign="bottom">
<TrayButton label="" icon="/usr/local/share/jwm/jwm.xbm">root:1</TrayButton>
<Spacer width="1"/>
<TrayButton label="">showdesktop</TrayButton>
<Spacer width="2"/>
と変更することによって

下記のような表示に変わります。
元々の設定が、なんで「_」なんてラベルを表示しているのか、「jwm-blue」なんて、「.svg」ファイルは「FreeBSD」の「JWM」は表示もできないし、理解に苦しみます。
4. 表示位置
プラットフォーム、バージョンにより、行番号は異なりますが
<Tray x="0" y="-1" autohide="off" height="30" layer="above" halign="left" valign="bottom">
この「Tray」というタグの「valign」の値を「bottom」から「top」へ変更することによって、トレイをデスクトップ下部から上部へ位置変更できます。
|