Page 1 of 1

Adding an XKILL button to Jammy tray.(Solved, thanks.)

Posted: Sun Mar 12, 2023 6:00 am
by BJF

Some other Puppy distros have a pre-installed button in the top tray pointing to XKill, and I happen to find this button quite useful in older machinery when the processor becomes overwhelmed by my enthusiasm. I installed the .pet from the Archives and terminal will call it. I'd really prefer a button to the terminal or a hot key though. Can someone point me toward achieving this please?

JammyJellyfish 32Bit Frugal
Compaq Presario C500
(and working well!)

Cheers.


Re: Adding an XKILL button to Jammy tray.

Posted: Sun Mar 12, 2023 12:26 pm
by Trapster

There should be an "Edit Tray" button on the right side of the top tray next to the "Leave Puppy" button.
You should be able to achieve your goals by editing the tray and adding a button with whatever command you desire.


Re: Adding an XKILL button to Jammy tray.

Posted: Mon Mar 13, 2023 8:05 am
by BJF

@Trapster : thank you. I'd looked at that method first up, but being a relatively inexperienced user I had not found a way to create a button from the available applications that gave the ability to replicate the pre-installed Jolly roger button icon in other distro's, and I don't have the skill certainly to modify script from an existing application button to point to the XKill .pet that turns the mouse pointer into the little skull to close displayed windows. Calling /usr/bin/xkill in a terminal does generate the desired functional little skull.

Can you please guide me through creating a button with a suitable label icon of some kind for the tray, and pointing it to /usr/bin/xkill?

Thanks again.


Re: Adding an XKILL button to Jammy tray.

Posted: Mon Mar 13, 2023 11:48 am
by Fossil

@BJF Xkill can be found in /usr/bin. The Tray Manager looks for tray setup under /usr/share/applications - Xkill wasn't visible. The simplest answer was to copy Xkill from /usr/bin to usr/share/applications - where the Tray Manager will find the bin.
The icon Xkill.svg was taken from a previous Puppy (Xenial), it was then converted in mtPaint (how necessary this is I cannot say) to .png and placed in /usr/local/lib/X11/pixmaps/. Tray Manager 'should' find the entry.

Okay, that's the meat and potatoes. Alternatively, having done the previous,
Open Root ~(All). Go to ~.jwm. Search for, jwmrc-tray1. Open with a text editor. Scroll down to (in my case) line 17, where this was typed between the other entries. Placement is up to you:

Code: Select all

<TrayButton popup="xkill" icon="/usr/local/lib/X11/pixmaps/xkill.png">exec:/usr/bin/xkill</TrayButton>

Refresh the desktop, restart JWM. With luck - and a following wind - Xkill should appear in the upper tray!

Should you wish for the lower tray. Open jwmrc-tray2 in a text editor, post this code wherever you want the icon to appear between the various pre-existing items.

Code: Select all


<TrayButton popup="Xkill - kill a window" icon="xkill.svg">exec:xkill</TrayButton>

(Edited for typo!)


Re: Adding an XKILL button to Jammy tray.(Solved, thanks)

Posted: Tue Mar 14, 2023 4:19 pm
by BJF

Dear Fossil: When I grow up I want to know this sort of stuff. "Teach yourself BASH" books don't go into the smarts that come with experience.

Mission accomplished, the luck and following wind did their bit, and I now have a window kill button in my top tray and promise to use it wisely.

John.