Tdesktop: [Feature] - Hide from Dock when tray icon is open

Created on 24 Aug 2016  路  8Comments  路  Source: telegramdesktop/tdesktop

It would be a great addition if we could hide the dock icon when tray icon is opened... Because it makes little sense to have both icons showing up to you. Maybe it could only show as a tray icon.

duplicate

Most helpful comment

I don't know what your environment is, but FYI this can be done externally via a good window manager, such as kwin (Plasma Desktop):

tg_skip_tb_0

tg_skip_tb_1

All 8 comments

I don't know what your environment is, but FYI this can be done externally via a good window manager, such as kwin (Plasma Desktop):

tg_skip_tb_0

tg_skip_tb_1

I'm sorry... I forgot to mention. I'm using Mac OS X, so when I open Telegram App the Dock icon show up but the top taskbar icon also shows up, it's kind of redundant...

This should be possible. Here are some rough directions (no OS X handy):

  1. Right-click the installed application, click "show package contents"
  2. Navigate down into Contents and open Info.plist with a genuine text editor (not a word processor)
  3. Add two lines to the top of that big dict section, just above <key>BuildMachineOSBuild</key>:
    <key>LSUIElement</key>
    <true/>

So the first bunch of lines in that file should now look like:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>LSUIElement</key>
    <true/>
    <key>BuildMachineOSBuild</key>
    <string>15G31</string>
. . . 

That's it. Next time you launch, it should not be in the dock at all.

Unfortunately, Apple also uses this value to decide that you won't be able to Command-Tab to the program either.

I've tried to add LSUIElement but not on top of the file... It didn't work, will try again like this.

Thanks!

@AndydeCleyre Does it mean that there is no way to make such an option inside the app settings? Because I assume we can't modify Info.plist on the fly, cause it should be signed as part of the app when the app is digitally signed before deploy.

@john-preston Sorry, I don't know, I haven't made an OS X app in years, and never came across this use case when I did. You're right that changing the plist on the fly will screw with people's security apps/settings if they have them.

@AndydeCleyre Tested here, didn't work, I had the same result when I tried last time... The app doesn't even open when I change plist settings

206

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hosseinab picture hosseinab  路  3Comments

luisalvarado picture luisalvarado  路  3Comments

Yanrishatum picture Yanrishatum  路  3Comments

slowaways picture slowaways  路  3Comments

matteotumiati picture matteotumiati  路  3Comments