これは、システムトレイにアイテムを表示してアクティブ化する簡単なCLIツールです。
このパッケージには、 tray-showとtray-activate 2つのコマンドがあります。
$ tray-show -h
Show items in the system tray
Usage:
tray-show [OPTION...]
-h, --help Print help and exit
-v, --verbose Show full info about each item
$ tray-activate -h
Activate items from the system tray
Usage:
tray-activate [OPTION...]
-h, --help Print help and exit
-i, --id arg Find items by id
-t, --title arg Find items by title
-x arg X coord (default: 0)
-y arg Y coord (default: 0)
tray-showシステムトレイ内のすべてのアイテムを印刷します。例えば:
$ tray-show -v
Category: ApplicationStatus
Title: TelegramDesktop
Id: TelegramDesktop
Status: Active
IconName:
Category: ApplicationStatus
Title: Fleep
Id: Fleep
Status: Active
IconName:
tray-activate指定されたIDまたはタイトルに一致するすべてのアイテムをアクティブにします。 IDまたはタイトルのいずれかを指定する必要があることに注意してください(ただし、両方ではありません)。 -xおよび-y argは、通話をアクティブにするために渡された座標です。システムトレイアイテムは、サブメニューやその他のものを表示するためにそれらを考慮する必要があります(ただし、アプリケーションでは無視されます)。
SystemTrayItemsの詳細については、StatusNotifierItemを参照してください。
このツールは、 systemd-libs 、 sdbus-cpp 、 fmtに依存します。サブモジュールの依存関係もあります: cxxoptsとmagic_enumですが、これらはこのリポジトリにサブモジュールとして含まれているため、一般的に心配する必要はありません。
レポをチェックして、makepkgを使用します。
git checkout https://github.com/andrewerf/tray-control.git
cd tray-control
makepkg -si近い将来、このツールをAURに追加することを願っています。
リポジトリをチェックアウトし、cmake + makeでビルドします。
git checkout https://github.com/andrewerf/tray-control.git
cd tray-control
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j8
cmake --install .これにより、(デフォルトでは) /usr/local/bin/tray-showおよび/usr/local/bin/tray-activateの2つのファイルをインストールします。 CMAKE_INSTALL_PREFIXを使用して、インストールフォルダーを変更します。