Jump to content

Recommended Posts

Posted

Hi,

I did a small workflow to display information about the currently used wifi network. Is there a way to arrange the result items in a defined order and disable the hotkeys? Depending on the apps on my Mac the result items tend to rearrange unpredictably. I simply want my workflow to provide certain information and the items should not be interactive.

Thanks!

 

require_once('workflows.php');
$w = new Workflows();

// GET SSID
$info = exec("/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I|grep SSID");
$infoex = explode(":",$info);
$ssid = ($info != ""?trim($infoex[1]):"not connected");

$w->result( '', '', $ssid, 'Connected Wifi Network', '', 'yes', 'autocomplete' );


// GET ENCRYPTION
$info = exec("/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I|grep 'link auth'");
$infoex = explode(":",$info);
$auth = ($info != ""?trim($infoex[1]):"not connected");

$w->result( '', '', $auth, 'Link Authentication', '', 'yes', 'autocomplete' );


// GET CHANNEL
$info = exec("/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I|grep channel");
$infoex = explode(":",$info);
$channel = ($info != ""?trim($infoex[1]):"not connected");

$w->result( '', '', $channel, 'Used Channel', '', 'yes', 'autocomplete' );

echo $w->toxml();

 

Posted

Hi,

I did a small workflow to display information about the currently used wifi network. Is there a way to arrange the result items in a defined order and disable the hotkeys? Depending on the apps on my Mac the result items tend to rearrange unpredictably. I simply want my workflow to provide certain information and the items should not be interactive.

Thanks!

 

require_once('workflows.php');
$w = new Workflows();

// GET SSID
$info = exec("/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I|grep SSID");
$infoex = explode(":",$info);
$ssid = ($info != ""?trim($infoex[1]):"not connected");

$w->result( '', '', $ssid, 'Connected Wifi Network', '', 'yes', 'autocomplete' );


// GET ENCRYPTION
$info = exec("/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I|grep 'link auth'");
$infoex = explode(":",$info);
$auth = ($info != ""?trim($infoex[1]):"not connected");

$w->result( '', '', $auth, 'Link Authentication', '', 'yes', 'autocomplete' );


// GET CHANNEL
$info = exec("/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I|grep channel");
$infoex = explode(":",$info);
$channel = ($info != ""?trim($infoex[1]):"not connected");

$w->result( '', '', $channel, 'Used Channel', '', 'yes', 'autocomplete' );

echo $w->toxml();

 

If I had to guess, this is because the uid value is still there, even though its blank, and alfred is learning or based on what's been actioned. I need to update the workflows.php class. Maybe I can get that done today or this weekend. To disable the items from being actioned, the 'yes' in the result function is telling it that it is actionable. Change it to 'no'. Then they can't be actioned.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...