yad icon indicating copy to clipboard operation
yad copied to clipboard

YAD - Can I Minimize GUI To System Tray?

Open 0pLuS0 opened this issue 6 years ago • 5 comments

Hello,

I'm running yad-0.42.1 in Slackware. I run OpenVPN from the command line, and I created a YAD GUI for this purpose. I use tint2 in Openbox if you are familiar with it, and the only thing I can do with the GUI is minimize it to tint2.

I wanted to know, is there a way to have a YAD GUI minimized to the system tray with an icon of my choice displayed in the system tray?

I know there is a notification option, but that doesn't look like what I want, I just want this as an option, like many apps have the ability to be minimized to the system tray is all, that display a system tray icon...

Below is my bash script I am using... THANKS

#!/bin/bash

function confirm_close () { yad --title="OpenVPN Shutdown" --window-icon="/home/foo/.icons/AwOken/clear/128x128/apps/openvpn.png"
--center --width="360" --height="100" --image="dialog-question"
--text="Click 'OK' To Shutdown OpenVPN\nClick 'Cancel' to Keep OpenVPN Running" [[ $? -eq 0 ]] && kill -USR1 $YAD_PID } export -f confirm_close

sudo -b openvpn --config /etc/openvpn/openvpn.conf |
yad --fontname="Noto Sans 9" --text-info --wrap --fore="#ababab" --back="#264d74" --button="Close:bash -c confirm_close"
--center --width="700" --height="450" --title="OpenVPN"
--window-icon="/home/foo/.icons/AwOken/clear/128x128/apps/openvpn.png"

[[ $? -eq 0 ]] && sudo killall openvpn 2>/dev/null

0pLuS0 avatar Oct 19 '19 03:10 0pLuS0

you can use --skip-taskbar option for vpn log window and separate --notification dialog for tray icon with wmctrl or xdotool for remotely controlling log window from tray menu

v1cont avatar Oct 21 '19 16:10 v1cont

@v1cont Hello,

I'd like to be able to change the system tray icon, and not sure how, and I'd like to know if it's possible to click on the system tray icon and make the application open back up?

Thanks

0pLuS0 avatar Oct 22 '19 00:10 0pLuS0

@0pLuS0 you can see how bashbullet do it

https://github.com/Boteium/bashbullet2/blob/a1861edd00a3582942f0037603947ce7bb0c11db/bashbullet2#L38-L41

Shivelight avatar Dec 14 '19 10:12 Shivelight

Problem is, I don't want a Notification Icon, I simply want a System Tray icon, like how normal applications, most typically have the ability to minimize to a system tray. The Notification Icon is not the same.

I do not see that YAD has the ability to make a System Tray icon for minimized apps...

Hmm

0pLuS0 avatar Dec 30 '19 08:12 0pLuS0

Hello is this possible what I asked before?

THANKS

0pLuS0 avatar May 13 '20 01:05 0pLuS0