diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..6201c1f
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Tamio Honma
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/Pi-hole.alfredworkflow b/Pi-hole.alfredworkflow
index cc3989f..ad3ff70 100644
Binary files a/Pi-hole.alfredworkflow and b/Pi-hole.alfredworkflow differ
diff --git a/Pi-hole/info.plist b/Pi-hole/info.plist
index 8b76620..071f876 100644
--- a/Pi-hole/info.plist
+++ b/Pi-hole/info.plist
@@ -25,7 +25,7 @@
destinationuid
- 57008E4F-819F-4053-9494-9E5DD702AE1D
+ B4876EF2-9754-4FCE-91A0-8E185AA82F4C
modifiers
0
modifiersubtext
@@ -50,67 +50,71 @@
destinationuid
- D6AB11F9-4A95-4471-B835-4C75F551C071
+ 6538AA20-E9E7-4EB0-B2D4-EE90E3E4F2DE
modifiers
0
modifiersubtext
sourceoutputuid
- 2FB36510-AE17-4D87-AF3C-BD1B67E15506
+ 27E9317F-33CD-4A1F-80ED-AF3D856666FF
vitoclose
destinationuid
- D6AB11F9-4A95-4471-B835-4C75F551C071
+ 1146EC38-DEF0-4E96-8876-483B7B74E3F4
modifiers
0
modifiersubtext
- sourceoutputuid
- D6164110-C468-43A0-A259-1A0B435C1DDD
vitoclose
+
+ 6538AA20-E9E7-4EB0-B2D4-EE90E3E4F2DE
+
destinationuid
- 6538AA20-E9E7-4EB0-B2D4-EE90E3E4F2DE
+ 1DFCB017-D88D-45F0-AC0A-B7C0016F70D6
modifiers
0
modifiersubtext
- sourceoutputuid
- 27E9317F-33CD-4A1F-80ED-AF3D856666FF
vitoclose
+
+ 6D25E8DB-BA3C-4F13-8DCB-0FADD06BC94B
+
destinationuid
- 6538AA20-E9E7-4EB0-B2D4-EE90E3E4F2DE
+ B754437B-4983-47BC-A465-CCFC912D4A77
modifiers
0
modifiersubtext
- sourceoutputuid
- 2FB36510-AE17-4D87-AF3C-BD1B67E15506
vitoclose
+
+ 99114622-1C6C-418A-A21C-53755F3D50AF
+
destinationuid
- 6538AA20-E9E7-4EB0-B2D4-EE90E3E4F2DE
+ A4DF8AB7-7138-42E6-8234-2E4ABE572A84
modifiers
0
modifiersubtext
- sourceoutputuid
- D6164110-C468-43A0-A259-1A0B435C1DDD
vitoclose
+
+ A4DF8AB7-7138-42E6-8234-2E4ABE572A84
+
destinationuid
- 1146EC38-DEF0-4E96-8876-483B7B74E3F4
+ 57008E4F-819F-4053-9494-9E5DD702AE1D
modifiers
0
modifiersubtext
@@ -119,11 +123,11 @@
- 6538AA20-E9E7-4EB0-B2D4-EE90E3E4F2DE
+ B4876EF2-9754-4FCE-91A0-8E185AA82F4C
destinationuid
- 1DFCB017-D88D-45F0-AC0A-B7C0016F70D6
+ 57008E4F-819F-4053-9494-9E5DD702AE1D
modifiers
0
modifiersubtext
@@ -132,7 +136,7 @@
- 6D25E8DB-BA3C-4F13-8DCB-0FADD06BC94B
+ B754437B-4983-47BC-A465-CCFC912D4A77
destinationuid
@@ -197,7 +201,7 @@
text
Please wait…
title
- Pi-Hole {query}
+ Pi-hole {query}
type
alfred.workflow.output.notification
@@ -206,64 +210,6 @@
version
1
-
- config
-
- conditions
-
-
- inputstring
-
- matchcasesensitive
-
- matchmode
- 0
- matchstring
- disable
- outputlabel
- disable
- uid
- 27E9317F-33CD-4A1F-80ED-AF3D856666FF
-
-
- inputstring
-
- matchcasesensitive
-
- matchmode
- 0
- matchstring
- enable
- outputlabel
- enable
- uid
- 2FB36510-AE17-4D87-AF3C-BD1B67E15506
-
-
- inputstring
-
- matchcasesensitive
-
- matchmode
- 0
- matchstring
- status
- outputlabel
- status
- uid
- D6164110-C468-43A0-A259-1A0B435C1DDD
-
-
- elselabel
- else
-
- type
- alfred.workflow.utility.conditional
- uid
- 57008E4F-819F-4053-9494-9E5DD702AE1D
- version
- 1
-
config
@@ -285,6 +231,39 @@
version
1
+
+ config
+
+ action
+ 0
+ argument
+ 3
+ argumenttext
+ disable
+ focusedappvariable
+
+ focusedappvariablename
+
+ hotkey
+ 0
+ hotmod
+ 0
+ hotstring
+
+ leftcursor
+
+ modsmode
+ 0
+ relatedAppsMode
+ 0
+
+ type
+ alfred.workflow.trigger.hotkey
+ uid
+ 6D25E8DB-BA3C-4F13-8DCB-0FADD06BC94B
+ version
+ 2
+
config
@@ -337,6 +316,77 @@ eval $action_ssh_password$action_ssh$action_docker$action_pihole
version
2
+
+ config
+
+ argument
+ disable
+ passthroughargument
+
+ variables
+
+
+ inboundconfig
+
+ externalid
+ disable
+
+ type
+ alfred.workflow.utility.argument
+ uid
+ B754437B-4983-47BC-A465-CCFC912D4A77
+ version
+ 1
+
+
+ config
+
+ conditions
+
+
+ inputstring
+
+ matchcasesensitive
+
+ matchmode
+ 1
+ matchstring
+ admin
+ outputlabel
+ command
+ uid
+ 27E9317F-33CD-4A1F-80ED-AF3D856666FF
+
+
+ elselabel
+ admin
+
+ type
+ alfred.workflow.utility.conditional
+ uid
+ 57008E4F-819F-4053-9494-9E5DD702AE1D
+ version
+ 1
+
+
+ config
+
+ browser
+
+ spaces
+
+ url
+ {var:url}
+ utf8
+
+
+ type
+ alfred.workflow.action.openurl
+ uid
+ 1146EC38-DEF0-4E96-8876-483B7B74E3F4
+ version
+ 1
+
config
@@ -345,7 +395,7 @@ eval $action_ssh_password$action_ssh$action_docker$action_pihole
argument
3
argumenttext
- disable
+ enable
focusedappvariable
focusedappvariablename
@@ -366,26 +416,29 @@ eval $action_ssh_password$action_ssh$action_docker$action_pihole
type
alfred.workflow.trigger.hotkey
uid
- 6D25E8DB-BA3C-4F13-8DCB-0FADD06BC94B
+ 537603EA-062B-4993-8FAD-3F715EEF6696
version
2
config
- browser
-
- spaces
-
- url
- {var:url}
- utf8
-
+ argument
+ enable
+ passthroughargument
+
+ variables
+
+
+ inboundconfig
+
+ externalid
+ enable
type
- alfred.workflow.action.openurl
+ alfred.workflow.utility.argument
uid
- 1146EC38-DEF0-4E96-8876-483B7B74E3F4
+ B4876EF2-9754-4FCE-91A0-8E185AA82F4C
version
1
@@ -397,7 +450,7 @@ eval $action_ssh_password$action_ssh$action_docker$action_pihole
argument
3
argumenttext
- enable
+ status
focusedappvariable
focusedappvariablename
@@ -418,10 +471,32 @@ eval $action_ssh_password$action_ssh$action_docker$action_pihole
type
alfred.workflow.trigger.hotkey
uid
- 537603EA-062B-4993-8FAD-3F715EEF6696
+ 99114622-1C6C-418A-A21C-53755F3D50AF
version
2
+
+ config
+
+ argument
+ status
+ passthroughargument
+
+ variables
+
+
+ inboundconfig
+
+ externalid
+ status
+
+ type
+ alfred.workflow.utility.argument
+ uid
+ A4DF8AB7-7138-42E6-8234-2E4ABE572A84
+ version
+ 1
+
readme
Control Pi-hole quicky
@@ -466,6 +541,11 @@ disable_duration (optional)
Leave empty for infinite duration.
+## External trigger
+
+With Alfred 4.1 upwards you can use the external triggers of this workflow to use its actions from other workflows or Apple Scripts. (see: https://www.alfredapp.com/help/workflows/triggers/external/)
+
+
# MIT License
Copyright 2022 Tamio Honma <tamio@honma.de>
@@ -484,23 +564,23 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
note
Setup the URL of the Pi-hole admin interface in the environment variables of this workflow.
xpos
- 390
+ 565
ypos
- 320
+ 315
1DFCB017-D88D-45F0-AC0A-B7C0016F70D6
xpos
- 570
+ 745
ypos
- 160
+ 155
350F801B-1331-4423-B40B-1D75E2F4A5D0
xpos
- 35
+ 225
ypos
- 35
+ 30
537603EA-062B-4993-8FAD-3F715EEF6696
@@ -509,16 +589,16 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
note
Optionally setup hotkey to enable Pi-hole
xpos
- 35
+ 45
ypos
- 320
+ 315
57008E4F-819F-4053-9494-9E5DD702AE1D
xpos
- 235
+ 415
ypos
- 150
+ 265
6538AA20-E9E7-4EB0-B2D4-EE90E3E4F2DE
@@ -527,9 +607,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
note
Setup workflow environment variables.
xpos
- 390
+ 565
ypos
- 160
+ 155
6D25E8DB-BA3C-4F13-8DCB-0FADD06BC94B
@@ -538,16 +618,54 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
note
Optionally setup hotkey to disable Pi-hole
xpos
- 35
+ 45
+ ypos
+ 155
+
+ 99114622-1C6C-418A-A21C-53755F3D50AF
+
+ colorindex
+ 3
+ note
+ Optionally setup hotkey to get status of Pi-hole
+ xpos
+ 45
+ ypos
+ 475
+
+ A4DF8AB7-7138-42E6-8234-2E4ABE572A84
+
+ note
+ status
+ xpos
+ 265
+ ypos
+ 505
+
+ B4876EF2-9754-4FCE-91A0-8E185AA82F4C
+
+ note
+ enable
+ xpos
+ 265
+ ypos
+ 345
+
+ B754437B-4983-47BC-A465-CCFC912D4A77
+
+ note
+ disable
+ xpos
+ 265
ypos
- 160
+ 185
D6AB11F9-4A95-4471-B835-4C75F551C071
xpos
- 390
+ 565
ypos
- 35
+ 30
variables
@@ -581,7 +699,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
host_user
version
- 1.0.0
+ 1.1.0
webaddress
https://github.com/IOIO72/alfred-pi-hole
diff --git a/README.md b/README.md
index 55fe59e..9e75b11 100644
--- a/README.md
+++ b/README.md
@@ -49,6 +49,10 @@ Before you use this workflow you need to set it up. To do so, open the workflow
*For example: 5m*
Leave empty for infinite duration.
+## External trigger
+
+With Alfred 4.1 upwards you can use the external triggers of this workflow to use its actions from other workflows or Apple Scripts. (see: https://www.alfredapp.com/help/workflows/triggers/external/)
+
## Background of the idea
As I search for products to purchase, I sometimes like to click on advertised links intentionally, which is not possible, if Pi-hole is enabled. It's a bit annoying and slow to call the web admin interface, login and hit the disable button. To quickly control Pi-hole in this scenario, an Alfred workflow is a perfect solution and I created it.
diff --git a/metadata.json b/metadata.json
index 17fa939..6c99aeb 100644
--- a/metadata.json
+++ b/metadata.json
@@ -1,10 +1,10 @@
{
"alfredworkflow" : {
"category" : "Internet",
- "readme" : "Control Pi-hole quicky\nhttps:\/\/github.com\/IOIO72\/alfred-pi-hole\n\n\n# Setup workflow\n\nBefore you use this workflow you need to set it up.\n\n\n## Mandatory variables\n\nurl\n\tSet the URL to the admin web-interface.\n\tFor example: http:\/\/192.168.1.1:8089\/admin\/\n\nhost_address\n\tSet IP address or name of the host.\n\tFor example: 192.168.1.1\n\nhost_user\n\tSet name of the host user.\n\tFor example: pi\n\n\n## Optional variables\n\nhost_password (optional)\n\tSet password of the host user,\n\tif you don't use [ssh key](https:\/\/en.wikipedia.org\/wiki\/Ssh-keygen).\n\ncontainer (optional)\n\tSet [docker](https:\/\/www.docker.com\/) container name.\n\tFor example: pihole\n\ndisable_duration (optional)\n\tSet duration for disable command\n\tuntil Pi-hole gets enabled automatically.\n\tFor example: 5m\n\n\tLeave empty for infinite duration.\n\n\n# MIT License\n\nCopyright 2022 Tamio Honma \n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and\/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
+ "readme" : "Control Pi-hole quicky\nhttps:\/\/github.com\/IOIO72\/alfred-pi-hole\n\n\n# Setup workflow\n\nBefore you use this workflow you need to set it up.\n\n\n## Mandatory variables\n\nurl\n\tSet the URL to the admin web-interface.\n\tFor example: http:\/\/192.168.1.1:8089\/admin\/\n\nhost_address\n\tSet IP address or name of the host.\n\tFor example: 192.168.1.1\n\nhost_user\n\tSet name of the host user.\n\tFor example: pi\n\n\n## Optional variables\n\nhost_password (optional)\n\tSet password of the host user,\n\tif you don't use [ssh key](https:\/\/en.wikipedia.org\/wiki\/Ssh-keygen).\n\ncontainer (optional)\n\tSet [docker](https:\/\/www.docker.com\/) container name.\n\tFor example: pihole\n\ndisable_duration (optional)\n\tSet duration for disable command\n\tuntil Pi-hole gets enabled automatically.\n\tFor example: 5m\n\n\tLeave empty for infinite duration.\n\n\n## External trigger\n\nWith Alfred 4.1 upwards you can use the external triggers of this workflow to use its actions from other workflows or Apple Scripts. (see: https:\/\/www.alfredapp.com\/help\/workflows\/triggers\/external\/)\n\n\n# MIT License\n\nCopyright 2022 Tamio Honma \n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and\/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"createdby" : "Tamio Honma",
"downloadurl" : "",
- "version" : "1.0.0",
+ "version" : "1.1.0",
"bundleid" : "de.honma.alfred.pi-hole",
"description" : "Quickly control Pi-hole",
"name" : "Pi-hole",