HydrogenAudio

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: _johnny7 on 2021-06-13 12:07:05

Title: Replacing UI hacks
Post by: _johnny7 on 2021-06-13 12:07:05
So I have been using the older component foo_ui_hacks forever now and grown fond of some of its features. It doesn't seem to be updated anymore, however, and with newer versions of Foobar there appear problems such as with the system tray icon.
Are there currently other ways to 1) change the foobar main icon permanently and 2) to close Foobar with Esc?
Thanks!
Title: Re: Replacing UI hacks
Post by: regor on 2021-06-13 13:06:32
First: edit the icons attached to the exe (CFF explorer or other similar software)
X

The second at least can be done with Spider Monkey by adding a listener to the keys pressed. It's absolutely a hack, and the key shortcut added is global (i.e. it works even when foobar window is not active). As a workaround when pressing alt+tab the listener is disabled. It's an experimental feature, blablabla..
https://hydrogenaud.io/index.php?topic=120978.0

At .\scripts\SMP\xxx-scripts\main\playlist_tools_menu.js
X

Add this:
Code: [Select]
	close:		{keys: 'Esc',				mod: [], val: VK_ESCAPE, 	menu: '', func: () => {fb.Exit()}},

X

Load 'buttons_playlist_tools_menu.js' or '_buttons_merged.js' or '_buttons_mergedV2.js', and enable global shortcuts at config on the Playlist Tools button (read the warning).

PD: I would add a modifier like pressing shift too, to avoid possible problems, just in case:
Code: [Select]
	close:		{keys: 'Esc',				mod: [VK_SHIFT], val: VK_ESCAPE, 	menu: '', func: () => {fb.Exit()}},
Title: Re: Replacing UI hacks
Post by: regor on 2021-06-13 15:49:40
Just noticed columns UI has an option for the icon:
X
Title: Re: Replacing UI hacks
Post by: _johnny7 on 2021-06-13 22:09:28
Thanks, I really appreciate it! I actually just tried CUI for this feature, but it only affects the system tray icon and I want to minimize Foobar to the taskbar, like other programmes. I've never tried CFF explorer or something similar, so there's no way any more with Foobar itself?
SimplePortal 1.0.0 RC1 © 2008-2021