Jump to content

Rudayb

Member
  • Posts

    2
  • Joined

  • Last visited

Rudayb's Achievements

Helping Hand

Helping Hand (3/5)

0

Reputation

  1. Is there a way to map output actions to specific items without having to use action modifiers? I have a script filter that I am using in alfred and I want each item to have its own return output. For example, if I press enter on the first item, I want it to copy to the clipboard and post a notification. I want the second and third item to not return anything. I want the third item to launch terminal when the user hits enter. I want the fourth item to launch a webpage when the user hits enter. IP=$(host google.com | cut -c 30-) CITY=$(curl http://ipinfo.io/$IP/city) STATE=$(curl http://ipinfo.io/$IP/region) PROVIDER=$(curl http://ipinfo.io/$IP/org | cut -c 8-) //Start Display cat<<EOB <?xml version="1.0"?> <items> //Remote Server's IP <item arg="$IP" valid="NO"> <title>Remote Server's IP: $IP</title> <subtitle> Press Cmd + C to copy </subtitle> <subtitle mod="cmd">Cmd + C to Copy</subtitle> <text type="copy">$IP</text> <icon>69288C18-2A0D-4430-837E-4AB331CD2698.png</icon> </item> //Location (City, State, Country) <item arg="$CITY, $STATE" valid="NO"> <title>Location: $CITY, $STATE</title> <subtitle>This is Location of the Server</subtitle> <icon>icon.png</icon> </item> //ISP Provider <item arg="$PROVIDER" valid="NO"> <title>Provider: $PROVIDER</title> <subtitle>This is the ISP Provider</subtitle> <icon>Wired_Network-100.png</icon> </item> //SSH into server <item arg="$IP"> <title>SSH into Server</title> <subtitle>Press Enter to connect</subtitle> <icon>Connected-100.png</icon> </item> //Open Web Page <item arg="$IP"> <title>Connect to Web Server</title> <subtitle>Press Alt + Enter to connect</subtitle> <subtitle mod="alt">Launch Webpage</subtitle> <icon>Open in Browser-100.png</icon> </item> </items> EOB
×
×
  • Create New...