diff --git a/Makefile b/Makefile index 0566bb8..918f2f3 100644 --- a/Makefile +++ b/Makefile @@ -110,6 +110,9 @@ install-vm: install -m 0644 -D network/tinyproxy-qubes-yum.conf $(DESTDIR)/etc/tinyproxy/tinyproxy-qubes-yum.conf install -m 0644 -D network/filter-qubes-yum $(DESTDIR)/etc/tinyproxy/filter-qubes-yum install -m 0755 -D network/iptables-yum-proxy $(DESTDIR)/usr/lib/qubes/iptables-yum-proxy + install -d $(DESTDIR)/etc/xdg/autostart + install -m 0755 network/show-hide-nm-applet.sh $(DESTDIR)/usr/lib/qubes/show-hide-nm-applet.sh + install -m 0644 network/show-hide-nm-applet.desktop $(DESTDIR)/etc/xdg/autostart/qubes-show-hide-nm-applet.desktop install -d $(DESTDIR)/etc/yum.conf.d touch $(DESTDIR)/etc/yum.conf.d/qubes-proxy.conf diff --git a/network/show-hide-nm-applet.desktop b/network/show-hide-nm-applet.desktop new file mode 100644 index 0000000..181ca5f --- /dev/null +++ b/network/show-hide-nm-applet.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Encoding=UTF-8 +Name=Hide/Show nm-applet depending on NetworkManager state +Exec=/usr/lib/qubes/show-hide-nm-applet.sh +Terminal=false +Type=Application +OnlyShowIn=QUBES; diff --git a/network/show-hide-nm-applet.sh b/network/show-hide-nm-applet.sh new file mode 100644 index 0000000..80257b0 --- /dev/null +++ b/network/show-hide-nm-applet.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# Hide nm-applet when network-manager is disabled +nm_enabled=false +[ -f /var/run/qubes-service/network-manager ] && nm_enabled=true +gsettings set org.gnome.nm-applet show-applet $nm_enabled diff --git a/rpm_spec/core-vm.spec b/rpm_spec/core-vm.spec index 0534e66..4c38103 100644 --- a/rpm_spec/core-vm.spec +++ b/rpm_spec/core-vm.spec @@ -308,6 +308,7 @@ rm -f %{name}-%{version} %config(noreplace) /etc/tinyproxy/tinyproxy-qubes-yum.conf /etc/udev/rules.d/50-qubes-misc.rules /etc/udev/rules.d/99-qubes-network.rules +/etc/xdg/autostart/qubes-show-hide-nm-applet.desktop /etc/xdg/nautilus-actions/nautilus-actions.conf /etc/xen/scripts/vif-route-qubes %config(noreplace) /etc/yum.conf.d/qubes-proxy.conf @@ -328,6 +329,7 @@ rm -f %{name}-%{version} /usr/lib/qubes/sync-ntp-clock /usr/lib/qubes/prepare-suspend /usr/lib/qubes/network-manager-prepare-conf-dir +/usr/lib/qubes/show-hide-nm-applet.sh /usr/lib/qubes/qrexec-agent /usr/lib/qubes/qrexec-client-vm /usr/lib/qubes/qrexec_client_vm