From fdd6143bec695a87b0891d3bd61d36d89f6d8083 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Wed, 24 Jul 2019 07:32:38 +0200 Subject: [PATCH] If nm-applet is present on system, run it --- README.md | 3 ++- rc.lua | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a7d2c53..f173238 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,12 @@ By default, Simple Awesome uses ## Optional dependencies - `playerctl` - enables global media control. If not present on your system, only Spotify will work. +- `network-manager-applet` (`nm-applet`) - network control "widget" **for `NetworkManager` only**. If present on your system, we will automatically run it. + ## To do - Add a media control widget -- Add a network control widget - Manage workspaces - Improve "leave menu"'s design - Modify "start menu" diff --git a/rc.lua b/rc.lua index 4d5ee50..7b0dc1e 100644 --- a/rc.lua +++ b/rc.lua @@ -26,6 +26,13 @@ local config = require("default_config") local tiling = require("tiling") local media_control = require("media_control") +-- Network widget +if os.execute("nm-applet --help") == true then + os.execute("nm-applet &") +else + -- Support for more network managers should be requested via issues +end + -- {{{ Error handling -- Check if awesome encountered an error during startup and fell back to