瀏覽代碼

Hide nm-applet when NetworkManager is disabled

It isn't done automatically by nm-applet itself since nm-applet 0.9.9.0
(fc19+), this one commit:
https://git.gnome.org/browse/network-manager-applet/commit?id=276a702000ee9e509321891f5ffa9789acfb053c
At the same time they've introduced option to manually hide the icon:
https://git.gnome.org/browse/network-manager-applet/commit?id=e7331a3f33ab422ea6c1bbc015ad44d8d9c83bc3
Marek Marczykowski-Górecki 10 年之前
父節點
當前提交
85f4e494e8
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      vm-systemd/misc-post.sh

+ 5 - 0
vm-systemd/misc-post.sh

@@ -48,6 +48,11 @@ fi
 
 # Start services which haven't own proper systemd unit:
 
+# Hide nm-applet when network-manager is disabled
+nm_enabled=false
+[ -f /var/run/qubes-service/network-manager ] && nm_enabled=true
+su -c "gsettings set org.gnome.nm-applet show-applet $nm_enabled" user 2> /dev/null
+
 # Start AppVM specific services
 if [ ! -f /etc/systemd/system/cups.service ]; then
     if [ -f /var/run/qubes-service/cups ]; then