Ubuntu 19.04:如何创建自己的whatsapp,并设置快捷方式通过键盘打开它?
Ubuntu 19.04: How to create own whappapp, and make shortcuts to open it via keyboard?
我想制作自己的桌面应用程序或快捷方式,并使用 SUPER + W 等组合键打开 whatsapp
I found some whatsapp app but it's not offical.
您可以按照以下说明创建自己的 whatsapp 应用程序:
- 类型终端
sudo -H gedit /usr/share/applications/whatsapp-webapp.desktop
- 将以下文本复制到打开的屏幕
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=WhatsApp
GenericName=WhatsApp
Comment=WhatsApp desktop webapp
#Exec=webapp-container --store-session-cookies --webappUrlPatterns=https?://*.whatsapp.com/* --user-agent-string='Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36' https://web.whatsapp.com %u
Exec=/opt/google/chrome/google-chrome --app=https://web.whatsapp.com/
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
# If you want icon, type path of icon
# Icon=
Categories=Network;Application;
Keywords=WhatsApp;webapp;
X-Ubuntu-Gettext-Domain=WhatsApp
StartupWMClass=web.whatsapp.com
- 打开快捷方式window,点击window下方的
+
- 设置名称
Whatsapp Chrome
- 最后,快捷键打开|创建
bash -c "wmctrl -xa web.whatsapp.com || /opt/google/chrome/google-chrome --app=https://web.whatsapp.com/"
wmctrl
command used for focus or create app, to install it type sudo apt install wmctrl
我想制作自己的桌面应用程序或快捷方式,并使用 SUPER + W 等组合键打开 whatsapp
I found some whatsapp app but it's not offical.
您可以按照以下说明创建自己的 whatsapp 应用程序:
- 类型终端
sudo -H gedit /usr/share/applications/whatsapp-webapp.desktop
- 将以下文本复制到打开的屏幕
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=WhatsApp
GenericName=WhatsApp
Comment=WhatsApp desktop webapp
#Exec=webapp-container --store-session-cookies --webappUrlPatterns=https?://*.whatsapp.com/* --user-agent-string='Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36' https://web.whatsapp.com %u
Exec=/opt/google/chrome/google-chrome --app=https://web.whatsapp.com/
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
# If you want icon, type path of icon
# Icon=
Categories=Network;Application;
Keywords=WhatsApp;webapp;
X-Ubuntu-Gettext-Domain=WhatsApp
StartupWMClass=web.whatsapp.com
- 打开快捷方式window,点击window下方的
+
- 设置名称
Whatsapp Chrome
- 最后,快捷键打开|创建
bash -c "wmctrl -xa web.whatsapp.com || /opt/google/chrome/google-chrome --app=https://web.whatsapp.com/"
wmctrl
command used for focus or create app, to install it typesudo apt install wmctrl