0

The Mega desktop application (of mega.nz cloud storage service) has an option to stream its cloud data through a specific window called “Stream from MEGA”. On my Linux Plasma desktop it can be opened by left-clicking the panel icon, then clicking a 3-dot button, then “Stream” option:

enter image description here

enter image description here

I would like to be able to open that window directly with one action/command, thus with a shortcut etc.


Using xprop I see this:

xprop WM_CLASS 
WM_CLASS(STRING) = "megasync", "MEGAsync"

xprop _NET_STARTUP_ID  Al_NET_STARTUP_ID : no such atom on any window.

Also:

xwininfo

xwininfo: Please select the window about which you would like information by clicking the mouse in that window.

xwininfo: Window id: 0x360002a "Stream from MEGA"

Absolute upper-left X: 829 Absolute upper-left Y: 196 Relative upper-left X: 0 Relative upper-left Y: 0 Width: 420 Height: 303 Depth: 24 Visual: 0x2c2 Visual Class: TrueColor Border width: 0 Class: InputOutput Colormap: 0x360001a (not installed) Bit Gravity State: NorthWestGravity Window Gravity State: NorthWestGravity Backing Store State: NotUseful Save Under State: no Map State: IsViewable Override Redirect State: no Corners: +829+196 -191+196 -191-401 +829-401 -geometry 420x303+829+196

xprop -id 0x360002a | grep PID _NET_WM_PID(CARDINAL) = 1924

ps aux | grep 1924 cip 1924 0.4 3.8 1830624 153500 ? Ssl 08:48 0:03 /usr/bin/megasync cip 4274 0.0 0.0 9060 2264 pts/1 S+ 09:03 0:00 grep --color=auto 1924


(I am posting here instead of Unix & Linux in case the solution works for Windows too.)

cipricus
  • 1,479

1 Answers1

0

The most that can be achieved here is that running megasync while the app is already running pops up the first window. Thus, we don't have to click the tray icon (which can stay hidden in this way) and a shortcut can be used for that. But it doesn't seem to be a way to get directly, with one command, what the question specifically asks.


A very limited and Linux-specific workaround, which doesn't involve keyboard shortcuts, but tray icons/buttons and the kdocker tool (able to "dock to tray" any window), is to send to tray the "Stream from MEGA" window (even add a per-app specific icon for the tray entry, different from the main Mega tray icon) and keep it there, open. Then, just click it to hide or show.

The command to "dock" a window to tray in this way is kdocker -f -q.

That command can be used with a shortcut or even with a panel button/launcher, like for example, in Plasma/KDE:

enter image description here

enter image description here

Kdocker can create separate tray buttons for each window, but can use a single icon image per application: different windows of the same application will have separate buttons, but these buttons will look the same:

enter image description here

enter image description here

enter image description here

cipricus
  • 1,479