Skip to content

Commit

Permalink
show wireless info on click
Browse files Browse the repository at this point in the history
  • Loading branch information
niklas committed Jan 19, 2012
1 parent e2b0e46 commit ea030fc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions status/network.yaml
Expand Up @@ -14,6 +14,10 @@ status:
`#{@iwconfig} #{@interface} 2>&1`
end
def wireless?
iwconfig.match(/IEEE 802\.11/s)
end
label: |
ifconfig = self.ifconfig
Expand All @@ -30,7 +34,7 @@ status:
end
iwconfig = self.iwconfig
if iwconfig.match(/IEEE 802\.11/s)
if wireless?
if match = iwconfig.match(/ESSID:"([^"]+)"/)
stats.unshift match[1]
stats.unshift "\u223f"
Expand All @@ -43,7 +47,7 @@ status:
control:
action:
network_details: dialog ifconfig
network_details: 'dialog wireless? ? [iwconfig, ifconfig].join("\n") : ifconfig'

mouse_action:
left_click: network_details

0 comments on commit ea030fc

Please sign in to comment.