Skip to content

Commit

Permalink
fix doc on the private funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
nicferrier committed Feb 4, 2013
1 parent ce7adac commit 657fd1f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gnomenm.el
Expand Up @@ -29,11 +29,13 @@
"Whether gnomenm is enabled or not.")

(defun gnomenm/enable ()
"Turn on WIFI."
(shell-command-to-string "nmcli -t -f net-enabled nm wifi on")
(message "gnomenm wifi enabled")
(setq gnomenm/enabled t))

(defun gnomenm/disable ()
"Turn off WIFI."
(shell-command-to-string "nmcli -t -f net-enabled nm wifi off")
(message "gnomenm wifi disabled")
(setq gnomenm/enabled nil))
Expand All @@ -45,7 +47,7 @@
(if gnomenm/enabled "on" "off")))

(defun gnomenm-toggle-enabled (&optional status)
"Toggle whether networking is enabled or not."
"Toggle whether WIFI is enabled or not."
(interactive "P")
(cond
((null status)
Expand All @@ -56,24 +58,28 @@
(gnomenm/disable))))

(defun gnomenm/connected ()
"What AP are we currently connected to?"
(car
(split-string
(shell-command-to-string "nmcli -t -f name con status")
"\n")))

(defun gnomenm/list-aps ()
"Make a list of all APs."
(split-string
(shell-command-to-string "nmcli -t -f name con list")
"\n"))

(defun gnomenm/disconnect (ap)
"Disconnect from the specified AP."
(car
(split-string
(shell-command-to-string
(format "nmcli -t -f name con down id \"%s\"" ap))
"\n")))

(defun gnomenm/connect (ap)
"Connect to the specified AP."
(car
(split-string
(shell-command-to-string
Expand Down

0 comments on commit 657fd1f

Please sign in to comment.