├── test.sh ├── traffic.sh ├── icon.png ├── README.md └── info.plist /test.sh: -------------------------------------------------------------------------------- 1 | networksetup -getwebproxy Wi-Fi -------------------------------------------------------------------------------- /traffic.sh: -------------------------------------------------------------------------------- 1 | curl http://127.0.0.1:9090/traffic -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikelxc/clashx-alfred/HEAD/icon.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # clashx-alfred 2 | The Alfred workflow for [ClashX](https://github.com/yichengchen/clashX) 3 | 4 | ## Important notes: 5 | This script uses System Events to call ClashX. Please grant accessibility permissions to ClashX before using this workflow. 6 | 7 | Download the [release](https://github.com/mikelxc/clashx-alfred/releases/download/1.1.0/ClashX.alfredworkflow) 8 | 9 | ### Keyword "clash" 10 | - clash (status) to open clash dashboard, 11 | - on to enable proxy, 12 | - off to disable proxy, 13 | - toggle to turn on/off the proxy, 14 | - restart to restart the app, 15 | - global/rule/direct to switch the mode. 16 | 17 | ### Keyword "pon/poff" 18 | - to quickly enable and disable proxy 19 | - pon + mode to turn on the proxy in certain mode 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | bundleid 6 | com.mikelxc.clashx 7 | category 8 | Internet 9 | connections 10 | 11 | 05DED948-04F0-4ED0-8487-7405AF98EAF8 12 | 13 | 14 | destinationuid 15 | E0A79904-F577-4248-BAD9-CE7BFFFA94A7 16 | modifiers 17 | 0 18 | modifiersubtext 19 | 20 | sourceoutputuid 21 | 77E8CA16-1834-440F-A164-A5F600070A6D 22 | vitoclose 23 | 24 | 25 | 26 | destinationuid 27 | 05ED12A4-B7EF-47E9-98F4-BF6B55705C51 28 | modifiers 29 | 0 30 | modifiersubtext 31 | 32 | sourceoutputuid 33 | ECAC4F60-DF16-417C-9073-163E00BFBBD9 34 | vitoclose 35 | 36 | 37 | 38 | destinationuid 39 | E804755E-727D-4CE5-ABB3-119858071F9C 40 | modifiers 41 | 0 42 | modifiersubtext 43 | 44 | sourceoutputuid 45 | 9049C5F8-8255-4FA1-9A64-C72E9FE66C73 46 | vitoclose 47 | 48 | 49 | 50 | destinationuid 51 | EE9825C3-229E-43C9-880E-AF921D64BF12 52 | modifiers 53 | 0 54 | modifiersubtext 55 | 56 | sourceoutputuid 57 | 4B42DDF3-92EB-4A4C-90F1-4018DA669D8B 58 | vitoclose 59 | 60 | 61 | 62 | destinationuid 63 | 5B591AAE-36F9-4ACD-8BCC-898D52B1E6F2 64 | modifiers 65 | 0 66 | modifiersubtext 67 | 68 | sourceoutputuid 69 | 6042D2E8-5B22-4BBD-9388-05692E56D195 70 | vitoclose 71 | 72 | 73 | 74 | destinationuid 75 | CB3F931E-7D33-43D3-99BC-7A6ED3C7C9ED 76 | modifiers 77 | 0 78 | modifiersubtext 79 | 80 | sourceoutputuid 81 | 7B3460E6-993C-4FD7-8850-8D43F3EF8E46 82 | vitoclose 83 | 84 | 85 | 86 | destinationuid 87 | A0FBAC45-A508-4B1A-886F-93ACD95858AA 88 | modifiers 89 | 0 90 | modifiersubtext 91 | 92 | sourceoutputuid 93 | D488BD6F-B309-48F4-A46B-755D919B008B 94 | vitoclose 95 | 96 | 97 | 98 | destinationuid 99 | A0FBAC45-A508-4B1A-886F-93ACD95858AA 100 | modifiers 101 | 0 102 | modifiersubtext 103 | 104 | vitoclose 105 | 106 | 107 | 108 | destinationuid 109 | 99FF4987-D63E-4E5D-B4F7-C31A91977B12 110 | modifiers 111 | 0 112 | modifiersubtext 113 | 114 | sourceoutputuid 115 | 44F57A30-FCCD-43DD-9463-85E59E0C4E29 116 | vitoclose 117 | 118 | 119 | 120 | destinationuid 121 | 99FF4987-D63E-4E5D-B4F7-C31A91977B12 122 | modifiers 123 | 0 124 | modifiersubtext 125 | 126 | sourceoutputuid 127 | 199C6D13-8350-4F9E-A4BA-646A3A9F438E 128 | vitoclose 129 | 130 | 131 | 132 | destinationuid 133 | 79077B04-6C3A-4369-A688-3430CD78742E 134 | modifiers 135 | 0 136 | modifiersubtext 137 | 138 | sourceoutputuid 139 | 5471762F-A737-4CB8-BFCF-A849BE2630B1 140 | vitoclose 141 | 142 | 143 | 144 | destinationuid 145 | 7DD6D7E3-96F1-489D-8964-34B7CA51E88C 146 | modifiers 147 | 0 148 | modifiersubtext 149 | 150 | sourceoutputuid 151 | 895D5D53-857A-4294-8DD5-F8634F1DCF82 152 | vitoclose 153 | 154 | 155 | 156 | destinationuid 157 | F7168A84-1201-4BBD-B642-69E9004B5F22 158 | modifiers 159 | 0 160 | modifiersubtext 161 | 162 | sourceoutputuid 163 | 1F4B49AC-7092-46C6-8DB7-A3840DDD336C 164 | vitoclose 165 | 166 | 167 | 168 | 0D89C787-CE7A-4363-940F-AFF99023FC85 169 | 170 | 171 | destinationuid 172 | C923DD5D-72F9-4E82-889D-41C99F15B511 173 | modifiers 174 | 0 175 | modifiersubtext 176 | 177 | vitoclose 178 | 179 | 180 | 181 | 0FEA4DCA-D31E-4050-8B42-60F3B78AFBC7 182 | 183 | 184 | destinationuid 185 | BB6490D2-A5DD-4B60-AE08-5DA6337FB33E 186 | modifiers 187 | 0 188 | modifiersubtext 189 | 190 | vitoclose 191 | 192 | 193 | 194 | 1EE7FD00-55DB-4C99-A5FB-8F0F77BD2D1C 195 | 196 | 197 | destinationuid 198 | 05DED948-04F0-4ED0-8487-7405AF98EAF8 199 | modifiers 200 | 0 201 | modifiersubtext 202 | 203 | vitoclose 204 | 205 | 206 | 207 | 45BE6B2E-BABE-4E88-BB17-A843CDDA4C6E 208 | 209 | 210 | destinationuid 211 | 0D89C787-CE7A-4363-940F-AFF99023FC85 212 | modifiers 213 | 0 214 | modifiersubtext 215 | 216 | vitoclose 217 | 218 | 219 | 220 | 5B591AAE-36F9-4ACD-8BCC-898D52B1E6F2 221 | 222 | 223 | destinationuid 224 | 9EB91321-8965-4647-8117-1F0AEF4716D8 225 | modifiers 226 | 0 227 | modifiersubtext 228 | 229 | vitoclose 230 | 231 | 232 | 233 | 7E9D0470-C68B-47F6-87A2-C24F07C97090 234 | 235 | 236 | destinationuid 237 | 0FEA4DCA-D31E-4050-8B42-60F3B78AFBC7 238 | modifiers 239 | 0 240 | modifiersubtext 241 | 242 | vitoclose 243 | 244 | 245 | 246 | 80DA11E5-D01E-4202-9C5E-0D9B3324AC6C 247 | 248 | 249 | destinationuid 250 | EE9825C3-229E-43C9-880E-AF921D64BF12 251 | modifiers 252 | 0 253 | modifiersubtext 254 | 255 | sourceoutputuid 256 | 4B42DDF3-92EB-4A4C-90F1-4018DA669D8B 257 | vitoclose 258 | 259 | 260 | 261 | destinationuid 262 | 7E9D0470-C68B-47F6-87A2-C24F07C97090 263 | modifiers 264 | 0 265 | modifiersubtext 266 | 267 | sourceoutputuid 268 | 5471762F-A737-4CB8-BFCF-A849BE2630B1 269 | vitoclose 270 | 271 | 272 | 273 | destinationuid 274 | DFDFFA40-B9AA-4EBE-BE32-71F71A374136 275 | modifiers 276 | 0 277 | modifiersubtext 278 | 279 | sourceoutputuid 280 | 895D5D53-857A-4294-8DD5-F8634F1DCF82 281 | vitoclose 282 | 283 | 284 | 285 | destinationuid 286 | 92C0C789-DCAC-4D64-89C9-13EBC5B30825 287 | modifiers 288 | 0 289 | modifiersubtext 290 | 291 | sourceoutputuid 292 | 1F4B49AC-7092-46C6-8DB7-A3840DDD336C 293 | vitoclose 294 | 295 | 296 | 297 | destinationuid 298 | 0FEA4DCA-D31E-4050-8B42-60F3B78AFBC7 299 | modifiers 300 | 0 301 | modifiersubtext 302 | 303 | vitoclose 304 | 305 | 306 | 307 | 86D3F625-4B51-47FB-ABED-3426A568C5FA 308 | 309 | 310 | destinationuid 311 | 0D89C787-CE7A-4363-940F-AFF99023FC85 312 | modifiers 313 | 0 314 | modifiersubtext 315 | 316 | sourceoutputuid 317 | 0BDC6CE9-57EB-4AA4-BA79-EC01E392A673 318 | vitoclose 319 | 320 | 321 | 322 | destinationuid 323 | 45BE6B2E-BABE-4E88-BB17-A843CDDA4C6E 324 | modifiers 325 | 0 326 | modifiersubtext 327 | 328 | vitoclose 329 | 330 | 331 | 332 | 8FFB7263-3FEA-4D93-8548-0BD80C4EF6F7 333 | 334 | 335 | destinationuid 336 | A7C811D8-A39B-42F0-892B-3C414D36C694 337 | modifiers 338 | 0 339 | modifiersubtext 340 | 341 | vitoclose 342 | 343 | 344 | 345 | destinationuid 346 | 05ED12A4-B7EF-47E9-98F4-BF6B55705C51 347 | modifiers 348 | 0 349 | modifiersubtext 350 | 351 | sourceoutputuid 352 | 0BDC6CE9-57EB-4AA4-BA79-EC01E392A673 353 | vitoclose 354 | 355 | 356 | 357 | 92C0C789-DCAC-4D64-89C9-13EBC5B30825 358 | 359 | 360 | destinationuid 361 | 0FEA4DCA-D31E-4050-8B42-60F3B78AFBC7 362 | modifiers 363 | 0 364 | modifiersubtext 365 | 366 | vitoclose 367 | 368 | 369 | 370 | 99FF4987-D63E-4E5D-B4F7-C31A91977B12 371 | 372 | 373 | destinationuid 374 | CB3F931E-7D33-43D3-99BC-7A6ED3C7C9ED 375 | modifiers 376 | 0 377 | modifiersubtext 378 | 379 | vitoclose 380 | 381 | 382 | 383 | AB5491C2-EAD3-4BFE-B5A5-212EA8E08BC3 384 | 385 | 386 | destinationuid 387 | E0A79904-F577-4248-BAD9-CE7BFFFA94A7 388 | modifiers 389 | 0 390 | modifiersubtext 391 | 392 | vitoclose 393 | 394 | 395 | 396 | BB6490D2-A5DD-4B60-AE08-5DA6337FB33E 397 | 398 | 399 | destinationuid 400 | D16821EF-C0FF-4482-956F-5143CA59DC20 401 | modifiers 402 | 0 403 | modifiersubtext 404 | 405 | sourceoutputuid 406 | 0BDC6CE9-57EB-4AA4-BA79-EC01E392A673 407 | vitoclose 408 | 409 | 410 | 411 | destinationuid 412 | 96A0B9F4-7FE5-47CB-B9C7-A5F4B8D6CBF6 413 | modifiers 414 | 0 415 | modifiersubtext 416 | 417 | vitoclose 418 | 419 | 420 | 421 | C923DD5D-72F9-4E82-889D-41C99F15B511 422 | 423 | 424 | destinationuid 425 | 09172A3C-472F-4347-81E4-805CFD0DA206 426 | modifiers 427 | 0 428 | modifiersubtext 429 | 430 | vitoclose 431 | 432 | 433 | 434 | D21D8E0D-183D-4DE2-9CF7-FD2D64CAEE89 435 | 436 | 437 | destinationuid 438 | 80DA11E5-D01E-4202-9C5E-0D9B3324AC6C 439 | modifiers 440 | 0 441 | modifiersubtext 442 | 443 | vitoclose 444 | 445 | 446 | 447 | DA1AA9D5-C1C4-4239-A1F1-82DC14F99632 448 | 449 | 450 | destinationuid 451 | 05ED12A4-B7EF-47E9-98F4-BF6B55705C51 452 | modifiers 453 | 0 454 | modifiersubtext 455 | 456 | vitoclose 457 | 458 | 459 | 460 | destinationuid 461 | BFA42EFD-EDC2-4B72-A0A5-ECFE1EFAC00C 462 | modifiers 463 | 0 464 | modifiersubtext 465 | 466 | sourceoutputuid 467 | 0BDC6CE9-57EB-4AA4-BA79-EC01E392A673 468 | vitoclose 469 | 470 | 471 | 472 | DFDFFA40-B9AA-4EBE-BE32-71F71A374136 473 | 474 | 475 | destinationuid 476 | 0FEA4DCA-D31E-4050-8B42-60F3B78AFBC7 477 | modifiers 478 | 0 479 | modifiersubtext 480 | 481 | vitoclose 482 | 483 | 484 | 485 | E0A79904-F577-4248-BAD9-CE7BFFFA94A7 486 | 487 | 488 | destinationuid 489 | 8FFB7263-3FEA-4D93-8548-0BD80C4EF6F7 490 | modifiers 491 | 0 492 | modifiersubtext 493 | 494 | vitoclose 495 | 496 | 497 | 498 | E804755E-727D-4CE5-ABB3-119858071F9C 499 | 500 | 501 | destinationuid 502 | DA1AA9D5-C1C4-4239-A1F1-82DC14F99632 503 | modifiers 504 | 0 505 | modifiersubtext 506 | 507 | vitoclose 508 | 509 | 510 | 511 | EE9825C3-229E-43C9-880E-AF921D64BF12 512 | 513 | 514 | destinationuid 515 | 86D3F625-4B51-47FB-ABED-3426A568C5FA 516 | modifiers 517 | 0 518 | modifiersubtext 519 | 520 | vitoclose 521 | 522 | 523 | 524 | 525 | createdby 526 | Mike Liu 527 | description 528 | workflows for clashx 529 | disabled 530 | 531 | name 532 | ClashX 533 | objects 534 | 535 | 536 | config 537 | 538 | concurrently 539 | 540 | escaping 541 | 68 542 | script 543 | ignoring application responses try tell application "System Events" to tell process "ClashX" click menu bar item 1 of menu bar 2 end tell on error display dialog "Cannot find ClashX on your menu bar" end try end ignoring 544 | delay 0.1 do shell script "killall System\\ Events" 545 | delay 0.1 tell application "System Events" to keystroke "c" using command down 546 | scriptargtype 547 | 0 548 | scriptfile 549 | 550 | type 551 | 6 552 | 553 | type 554 | alfred.workflow.action.script 555 | uid 556 | 0D89C787-CE7A-4363-940F-AFF99023FC85 557 | version 558 | 2 559 | 560 | 561 | config 562 | 563 | lastpathcomponent 564 | 565 | onlyshowifquerypopulated 566 | 567 | removeextension 568 | 569 | text 570 | Clash is already disabled 571 | title 572 | ClashX 573 | 574 | type 575 | alfred.workflow.output.notification 576 | uid 577 | A7C811D8-A39B-42F0-892B-3C414D36C694 578 | version 579 | 1 580 | 581 | 582 | config 583 | 584 | concurrently 585 | 586 | escaping 587 | 102 588 | script 589 | bash test.sh 590 | scriptargtype 591 | 1 592 | scriptfile 593 | 594 | type 595 | 0 596 | 597 | type 598 | alfred.workflow.action.script 599 | uid 600 | E0A79904-F577-4248-BAD9-CE7BFFFA94A7 601 | version 602 | 2 603 | 604 | 605 | config 606 | 607 | conditions 608 | 609 | 610 | inputstring 611 | {query} 612 | matchcasesensitive 613 | 614 | matchmode 615 | 4 616 | matchstring 617 | Yes 618 | outputlabel 619 | 620 | uid 621 | 0BDC6CE9-57EB-4AA4-BA79-EC01E392A673 622 | 623 | 624 | elselabel 625 | else 626 | 627 | type 628 | alfred.workflow.utility.conditional 629 | uid 630 | 8FFB7263-3FEA-4D93-8548-0BD80C4EF6F7 631 | version 632 | 1 633 | 634 | 635 | config 636 | 637 | conditions 638 | 639 | 640 | inputstring 641 | 642 | matchcasesensitive 643 | 644 | matchmode 645 | 0 646 | matchstring 647 | off 648 | outputlabel 649 | Turn off 650 | uid 651 | 77E8CA16-1834-440F-A164-A5F600070A6D 652 | 653 | 654 | inputstring 655 | 656 | matchcasesensitive 657 | 658 | matchmode 659 | 0 660 | matchstring 661 | toggle 662 | outputlabel 663 | Turn on/off 664 | uid 665 | ECAC4F60-DF16-417C-9073-163E00BFBBD9 666 | 667 | 668 | inputstring 669 | 670 | matchcasesensitive 671 | 672 | matchmode 673 | 0 674 | matchstring 675 | on 676 | outputlabel 677 | Turn on 678 | uid 679 | 9049C5F8-8255-4FA1-9A64-C72E9FE66C73 680 | 681 | 682 | inputstring 683 | 684 | matchcasesensitive 685 | 686 | matchmode 687 | 0 688 | matchstring 689 | global 690 | outputlabel 691 | Use global 692 | uid 693 | 895D5D53-857A-4294-8DD5-F8634F1DCF82 694 | 695 | 696 | inputstring 697 | 698 | matchcasesensitive 699 | 700 | matchmode 701 | 0 702 | matchstring 703 | rule 704 | outputlabel 705 | Use rule 706 | uid 707 | 5471762F-A737-4CB8-BFCF-A849BE2630B1 708 | 709 | 710 | inputstring 711 | 712 | matchcasesensitive 713 | 714 | matchmode 715 | 0 716 | matchstring 717 | direct 718 | outputlabel 719 | Use direct 720 | uid 721 | 1F4B49AC-7092-46C6-8DB7-A3840DDD336C 722 | 723 | 724 | inputstring 725 | 726 | matchcasesensitive 727 | 728 | matchmode 729 | 0 730 | matchstring 731 | status 732 | outputlabel 733 | Show proxy status 734 | uid 735 | D488BD6F-B309-48F4-A46B-755D919B008B 736 | 737 | 738 | inputstring 739 | 740 | matchcasesensitive 741 | 742 | matchmode 743 | 0 744 | matchstring 745 | terminal 746 | outputlabel 747 | Open a terminal window with proxy 748 | uid 749 | 4B42DDF3-92EB-4A4C-90F1-4018DA669D8B 750 | 751 | 752 | inputstring 753 | 754 | matchcasesensitive 755 | 756 | matchmode 757 | 0 758 | matchstring 759 | traffic 760 | outputlabel 761 | Check traffic 762 | uid 763 | 6042D2E8-5B22-4BBD-9388-05692E56D195 764 | 765 | 766 | inputstring 767 | 768 | matchcasesensitive 769 | 770 | matchmode 771 | 0 772 | matchstring 773 | open 774 | outputlabel 775 | Open the clashx app 776 | uid 777 | 7B3460E6-993C-4FD7-8850-8D43F3EF8E46 778 | 779 | 780 | inputstring 781 | 782 | matchcasesensitive 783 | 784 | matchmode 785 | 0 786 | matchstring 787 | quit 788 | outputlabel 789 | Quit the clashx app 790 | uid 791 | 44F57A30-FCCD-43DD-9463-85E59E0C4E29 792 | 793 | 794 | inputstring 795 | 796 | matchcasesensitive 797 | 798 | matchmode 799 | 0 800 | matchstring 801 | restart 802 | outputlabel 803 | Restart the app 804 | uid 805 | 199C6D13-8350-4F9E-A4BA-646A3A9F438E 806 | 807 | 808 | elselabel 809 | else 810 | 811 | type 812 | alfred.workflow.utility.conditional 813 | uid 814 | 05DED948-04F0-4ED0-8487-7405AF98EAF8 815 | version 816 | 1 817 | 818 | 819 | config 820 | 821 | concurrently 822 | 823 | escaping 824 | 68 825 | script 826 | ignoring application responses 827 | try tell application "System Events" to tell process "ClashX" click menu bar item 1 of menu bar 2 end tell on error display dialog "Cannot find ClashX on your menu bar" end try 828 | end ignoring 829 | delay 0.1 do shell script "killall System\\ Events" 830 | delay 0.1 tell application "System Events" to keystroke "s" using command down 831 | delay 1 832 | scriptargtype 833 | 1 834 | scriptfile 835 | 836 | type 837 | 6 838 | 839 | type 840 | alfred.workflow.action.script 841 | uid 842 | 05ED12A4-B7EF-47E9-98F4-BF6B55705C51 843 | version 844 | 2 845 | 846 | 847 | config 848 | 849 | argumenttype 850 | 1 851 | keyword 852 | clash 853 | subtext 854 | clashx proxies commands 855 | text 856 | Proxy 857 | withspace 858 | 859 | 860 | type 861 | alfred.workflow.input.keyword 862 | uid 863 | 1EE7FD00-55DB-4C99-A5FB-8F0F77BD2D1C 864 | version 865 | 1 866 | 867 | 868 | config 869 | 870 | concurrently 871 | 872 | escaping 873 | 102 874 | script 875 | pbpaste 876 | scriptargtype 877 | 1 878 | scriptfile 879 | 880 | type 881 | 0 882 | 883 | type 884 | alfred.workflow.action.script 885 | uid 886 | C923DD5D-72F9-4E82-889D-41C99F15B511 887 | version 888 | 2 889 | 890 | 891 | config 892 | 893 | lastpathcomponent 894 | 895 | onlyshowifquerypopulated 896 | 897 | removeextension 898 | 899 | text 900 | Proxy is already enabled 901 | title 902 | ClashX 903 | 904 | type 905 | alfred.workflow.output.notification 906 | uid 907 | BFA42EFD-EDC2-4B72-A0A5-ECFE1EFAC00C 908 | version 909 | 1 910 | 911 | 912 | config 913 | 914 | concurrently 915 | 916 | escaping 917 | 102 918 | script 919 | bash test.sh 920 | scriptargtype 921 | 1 922 | scriptfile 923 | 924 | type 925 | 0 926 | 927 | type 928 | alfred.workflow.action.script 929 | uid 930 | E804755E-727D-4CE5-ABB3-119858071F9C 931 | version 932 | 2 933 | 934 | 935 | config 936 | 937 | conditions 938 | 939 | 940 | inputstring 941 | {query} 942 | matchcasesensitive 943 | 944 | matchmode 945 | 4 946 | matchstring 947 | Yes 948 | outputlabel 949 | 950 | uid 951 | 0BDC6CE9-57EB-4AA4-BA79-EC01E392A673 952 | 953 | 954 | elselabel 955 | else 956 | 957 | type 958 | alfred.workflow.utility.conditional 959 | uid 960 | DA1AA9D5-C1C4-4239-A1F1-82DC14F99632 961 | version 962 | 1 963 | 964 | 965 | config 966 | 967 | escaping 968 | 0 969 | script 970 | {query} 971 | echo "Proxy enabled" 972 | 973 | type 974 | alfred.workflow.action.terminalcommand 975 | uid 976 | 09172A3C-472F-4347-81E4-805CFD0DA206 977 | version 978 | 1 979 | 980 | 981 | config 982 | 983 | concurrently 984 | 985 | escaping 986 | 102 987 | script 988 | bash test.sh 989 | scriptargtype 990 | 1 991 | scriptfile 992 | 993 | type 994 | 0 995 | 996 | type 997 | alfred.workflow.action.script 998 | uid 999 | EE9825C3-229E-43C9-880E-AF921D64BF12 1000 | version 1001 | 2 1002 | 1003 | 1004 | config 1005 | 1006 | conditions 1007 | 1008 | 1009 | inputstring 1010 | {query} 1011 | matchcasesensitive 1012 | 1013 | matchmode 1014 | 4 1015 | matchstring 1016 | Yes 1017 | outputlabel 1018 | 1019 | uid 1020 | 0BDC6CE9-57EB-4AA4-BA79-EC01E392A673 1021 | 1022 | 1023 | elselabel 1024 | else 1025 | 1026 | type 1027 | alfred.workflow.utility.conditional 1028 | uid 1029 | 86D3F625-4B51-47FB-ABED-3426A568C5FA 1030 | version 1031 | 1 1032 | 1033 | 1034 | config 1035 | 1036 | concurrently 1037 | 1038 | escaping 1039 | 102 1040 | script 1041 | bash traffic.sh 1042 | scriptargtype 1043 | 1 1044 | scriptfile 1045 | 1046 | type 1047 | 0 1048 | 1049 | type 1050 | alfred.workflow.action.script 1051 | uid 1052 | 5B591AAE-36F9-4ACD-8BCC-898D52B1E6F2 1053 | version 1054 | 2 1055 | 1056 | 1057 | config 1058 | 1059 | alignment 1060 | 0 1061 | backgroundcolor 1062 | 1063 | fadespeed 1064 | 0 1065 | fillmode 1066 | 0 1067 | font 1068 | 1069 | ignoredynamicplaceholders 1070 | 1071 | largetypetext 1072 | {query} 1073 | textcolor 1074 | 1075 | 1076 | type 1077 | alfred.workflow.output.largetype 1078 | uid 1079 | 9EB91321-8965-4647-8117-1F0AEF4716D8 1080 | version 1081 | 3 1082 | 1083 | 1084 | config 1085 | 1086 | applescript 1087 | on alfred_script(q) 1088 | ignoring application responses 1089 | try tell application "System Events" to tell process "ClashX" click menu bar item 1 of menu bar 2 end tell on error display dialog "Cannot find ClashX on your menu bar" end try 1090 | end ignoring 1091 | delay 0.1 do shell script "killall System\\ Events" 1092 | tell application "System Events" to keystroke "s" using command down 1093 | 1094 | delay 1 1095 | end alfred_script 1096 | cachescript 1097 | 1098 | 1099 | type 1100 | alfred.workflow.action.applescript 1101 | uid 1102 | 45BE6B2E-BABE-4E88-BB17-A843CDDA4C6E 1103 | version 1104 | 1 1105 | 1106 | 1107 | config 1108 | 1109 | argumenttype 1110 | 1 1111 | keyword 1112 | poff 1113 | subtext 1114 | 1115 | text 1116 | Turn off the proxy 1117 | withspace 1118 | 1119 | 1120 | type 1121 | alfred.workflow.input.keyword 1122 | uid 1123 | AB5491C2-EAD3-4BFE-B5A5-212EA8E08BC3 1124 | version 1125 | 1 1126 | 1127 | 1128 | config 1129 | 1130 | paths 1131 | 1132 | /Applications/ClashX.app 1133 | 1134 | toggle 1135 | 1136 | 1137 | type 1138 | alfred.workflow.action.launchfiles 1139 | uid 1140 | CB3F931E-7D33-43D3-99BC-7A6ED3C7C9ED 1141 | version 1142 | 1 1143 | 1144 | 1145 | config 1146 | 1147 | concurrently 1148 | 1149 | escaping 1150 | 68 1151 | script 1152 | ignoring application responses try tell application "System Events" to tell process "ClashX" click menu bar item 1 of menu bar 2 end tell on error display dialog "Cannot find ClashX on your menu bar" end try end ignoring 1153 | delay 0.1 do shell script "killall System\\ Events" 1154 | delay 0.1 tell application "System Events" to keystroke "d" using command down 1155 | scriptargtype 1156 | 0 1157 | scriptfile 1158 | 1159 | type 1160 | 6 1161 | 1162 | type 1163 | alfred.workflow.action.script 1164 | uid 1165 | A0FBAC45-A508-4B1A-886F-93ACD95858AA 1166 | version 1167 | 2 1168 | 1169 | 1170 | config 1171 | 1172 | concurrently 1173 | 1174 | escaping 1175 | 68 1176 | script 1177 | ignoring application responses 1178 | try tell application "System Events" to tell process "ClashX" click menu bar item 1 of menu bar 2 end tell on error display dialog "Cannot find ClashX on your menu bar" end try 1179 | end ignoring 1180 | delay 0.1 do shell script "killall System\\ Events" 1181 | tell application "System Events" to keystroke "q" using command down 1182 | 1183 | delay 1 1184 | scriptargtype 1185 | 0 1186 | scriptfile 1187 | 1188 | type 1189 | 6 1190 | 1191 | type 1192 | alfred.workflow.action.script 1193 | uid 1194 | 99FF4987-D63E-4E5D-B4F7-C31A91977B12 1195 | version 1196 | 2 1197 | 1198 | 1199 | config 1200 | 1201 | concurrently 1202 | 1203 | escaping 1204 | 68 1205 | script 1206 | ignoring application responses try tell application "System Events" to tell process "ClashX" click menu bar item 1 of menu bar 2 end tell on error display dialog "Cannot find ClashX on your menu bar" end try end ignoring 1207 | delay 0.1 do shell script "killall System\\ Events" 1208 | delay 0.1 tell application "System Events" to keystroke "r" using option down 1209 | scriptargtype 1210 | 0 1211 | scriptfile 1212 | 1213 | type 1214 | 6 1215 | 1216 | type 1217 | alfred.workflow.action.script 1218 | uid 1219 | 79077B04-6C3A-4369-A688-3430CD78742E 1220 | version 1221 | 2 1222 | 1223 | 1224 | config 1225 | 1226 | concurrently 1227 | 1228 | escaping 1229 | 68 1230 | script 1231 | ignoring application responses try tell application "System Events" to tell process "ClashX" click menu bar item 1 of menu bar 2 end tell on error display dialog "Cannot find ClashX on your menu bar" end try end ignoring 1232 | delay 0.1 do shell script "killall System\\ Events" 1233 | delay 0.1 tell application "System Events" to keystroke "g" using option down 1234 | scriptargtype 1235 | 0 1236 | scriptfile 1237 | 1238 | type 1239 | 6 1240 | 1241 | type 1242 | alfred.workflow.action.script 1243 | uid 1244 | 7DD6D7E3-96F1-489D-8964-34B7CA51E88C 1245 | version 1246 | 2 1247 | 1248 | 1249 | config 1250 | 1251 | concurrently 1252 | 1253 | escaping 1254 | 68 1255 | script 1256 | ignoring application responses try tell application "System Events" to tell process "ClashX" click menu bar item 1 of menu bar 2 end tell on error display dialog "Cannot find ClashX on your menu bar" end try end ignoring 1257 | delay 0.1 do shell script "killall System\\ Events" 1258 | delay 0.1 tell application "System Events" to keystroke "d" using option down 1259 | scriptargtype 1260 | 0 1261 | scriptfile 1262 | 1263 | type 1264 | 6 1265 | 1266 | type 1267 | alfred.workflow.action.script 1268 | uid 1269 | F7168A84-1201-4BBD-B642-69E9004B5F22 1270 | version 1271 | 2 1272 | 1273 | 1274 | config 1275 | 1276 | concurrently 1277 | 1278 | escaping 1279 | 68 1280 | script 1281 | ignoring application responses try tell application "System Events" to tell process "ClashX" click menu bar item 1 of menu bar 2 end tell on error display dialog "Cannot find ClashX on your menu bar" end try end ignoring 1282 | delay 0.1 do shell script "killall System\\ Events" 1283 | delay 0.1 tell application "System Events" to keystroke "r" using option down 1284 | scriptargtype 1285 | 0 1286 | scriptfile 1287 | 1288 | type 1289 | 6 1290 | 1291 | type 1292 | alfred.workflow.action.script 1293 | uid 1294 | 7E9D0470-C68B-47F6-87A2-C24F07C97090 1295 | version 1296 | 2 1297 | 1298 | 1299 | config 1300 | 1301 | concurrently 1302 | 1303 | escaping 1304 | 68 1305 | script 1306 | ignoring application responses try tell application "System Events" to tell process "ClashX" click menu bar item 1 of menu bar 2 end tell on error display dialog "Cannot find ClashX on your menu bar" end try end ignoring 1307 | delay 0.1 do shell script "killall System\\ Events" 1308 | delay 0.1 tell application "System Events" to keystroke "d" using option down 1309 | scriptargtype 1310 | 0 1311 | scriptfile 1312 | 1313 | type 1314 | 6 1315 | 1316 | type 1317 | alfred.workflow.action.script 1318 | uid 1319 | 92C0C789-DCAC-4D64-89C9-13EBC5B30825 1320 | version 1321 | 2 1322 | 1323 | 1324 | config 1325 | 1326 | concurrently 1327 | 1328 | escaping 1329 | 68 1330 | script 1331 | ignoring application responses try tell application "System Events" to tell process "ClashX" click menu bar item 1 of menu bar 2 end tell on error display dialog "Cannot find ClashX on your menu bar" end try end ignoring 1332 | delay 0.1 do shell script "killall System\\ Events" 1333 | delay 0.1 tell application "System Events" to keystroke "g" using option down 1334 | scriptargtype 1335 | 0 1336 | scriptfile 1337 | 1338 | type 1339 | 6 1340 | 1341 | type 1342 | alfred.workflow.action.script 1343 | uid 1344 | DFDFFA40-B9AA-4EBE-BE32-71F71A374136 1345 | version 1346 | 2 1347 | 1348 | 1349 | config 1350 | 1351 | conditions 1352 | 1353 | 1354 | inputstring 1355 | 1356 | matchcasesensitive 1357 | 1358 | matchmode 1359 | 0 1360 | matchstring 1361 | global 1362 | outputlabel 1363 | Use global 1364 | uid 1365 | 895D5D53-857A-4294-8DD5-F8634F1DCF82 1366 | 1367 | 1368 | inputstring 1369 | 1370 | matchcasesensitive 1371 | 1372 | matchmode 1373 | 0 1374 | matchstring 1375 | rule 1376 | outputlabel 1377 | Use rule 1378 | uid 1379 | 5471762F-A737-4CB8-BFCF-A849BE2630B1 1380 | 1381 | 1382 | inputstring 1383 | 1384 | matchcasesensitive 1385 | 1386 | matchmode 1387 | 0 1388 | matchstring 1389 | direct 1390 | outputlabel 1391 | Use direct 1392 | uid 1393 | 1F4B49AC-7092-46C6-8DB7-A3840DDD336C 1394 | 1395 | 1396 | inputstring 1397 | 1398 | matchcasesensitive 1399 | 1400 | matchmode 1401 | 0 1402 | matchstring 1403 | terminal 1404 | outputlabel 1405 | Open a terminal window with proxy 1406 | uid 1407 | 4B42DDF3-92EB-4A4C-90F1-4018DA669D8B 1408 | 1409 | 1410 | elselabel 1411 | else 1412 | 1413 | type 1414 | alfred.workflow.utility.conditional 1415 | uid 1416 | 80DA11E5-D01E-4202-9C5E-0D9B3324AC6C 1417 | version 1418 | 1 1419 | 1420 | 1421 | config 1422 | 1423 | lastpathcomponent 1424 | 1425 | onlyshowifquerypopulated 1426 | 1427 | removeextension 1428 | 1429 | text 1430 | Proxy is already enabled 1431 | title 1432 | ClashX 1433 | 1434 | type 1435 | alfred.workflow.output.notification 1436 | uid 1437 | D16821EF-C0FF-4482-956F-5143CA59DC20 1438 | version 1439 | 1 1440 | 1441 | 1442 | config 1443 | 1444 | concurrently 1445 | 1446 | escaping 1447 | 68 1448 | script 1449 | ignoring application responses 1450 | try tell application "System Events" to tell process "ClashX" click menu bar item 1 of menu bar 2 end tell on error display dialog "Cannot find ClashX on your menu bar" end try 1451 | end ignoring 1452 | delay 0.1 do shell script "killall System\\ Events" 1453 | delay 0.1 tell application "System Events" to keystroke "s" using command down 1454 | 1455 | delay 1 1456 | scriptargtype 1457 | 1 1458 | scriptfile 1459 | 1460 | type 1461 | 6 1462 | 1463 | type 1464 | alfred.workflow.action.script 1465 | uid 1466 | 96A0B9F4-7FE5-47CB-B9C7-A5F4B8D6CBF6 1467 | version 1468 | 2 1469 | 1470 | 1471 | config 1472 | 1473 | concurrently 1474 | 1475 | escaping 1476 | 102 1477 | script 1478 | bash test.sh 1479 | scriptargtype 1480 | 1 1481 | scriptfile 1482 | 1483 | type 1484 | 0 1485 | 1486 | type 1487 | alfred.workflow.action.script 1488 | uid 1489 | 0FEA4DCA-D31E-4050-8B42-60F3B78AFBC7 1490 | version 1491 | 2 1492 | 1493 | 1494 | config 1495 | 1496 | argumenttype 1497 | 1 1498 | keyword 1499 | pon 1500 | subtext 1501 | 1502 | text 1503 | Turn on the proxy 1504 | withspace 1505 | 1506 | 1507 | type 1508 | alfred.workflow.input.keyword 1509 | uid 1510 | D21D8E0D-183D-4DE2-9CF7-FD2D64CAEE89 1511 | version 1512 | 1 1513 | 1514 | 1515 | config 1516 | 1517 | conditions 1518 | 1519 | 1520 | inputstring 1521 | {query} 1522 | matchcasesensitive 1523 | 1524 | matchmode 1525 | 4 1526 | matchstring 1527 | Yes 1528 | outputlabel 1529 | 1530 | uid 1531 | 0BDC6CE9-57EB-4AA4-BA79-EC01E392A673 1532 | 1533 | 1534 | elselabel 1535 | else 1536 | 1537 | type 1538 | alfred.workflow.utility.conditional 1539 | uid 1540 | BB6490D2-A5DD-4B60-AE08-5DA6337FB33E 1541 | version 1542 | 1 1543 | 1544 | 1545 | readme 1546 | The Alfred workflow for clashx 1547 | 1548 | Keyword "clash" 1549 | 1550 | clash (status) to open clash dashboard, 1551 | on to enable proxy, 1552 | off to disable proxy, 1553 | toggle to turn on/off the proxy, 1554 | global/rule/direct to switch the mode. 1555 | uidata 1556 | 1557 | 05DED948-04F0-4ED0-8487-7405AF98EAF8 1558 | 1559 | xpos 1560 | 150 1561 | ypos 1562 | 125 1563 | 1564 | 05ED12A4-B7EF-47E9-98F4-BF6B55705C51 1565 | 1566 | xpos 1567 | 1030 1568 | ypos 1569 | 175 1570 | 1571 | 09172A3C-472F-4347-81E4-805CFD0DA206 1572 | 1573 | xpos 1574 | 1275 1575 | ypos 1576 | 330 1577 | 1578 | 0D89C787-CE7A-4363-940F-AFF99023FC85 1579 | 1580 | note 1581 | Copy shell command 1582 | xpos 1583 | 1285 1584 | ypos 1585 | 55 1586 | 1587 | 0FEA4DCA-D31E-4050-8B42-60F3B78AFBC7 1588 | 1589 | xpos 1590 | 820 1591 | ypos 1592 | 1055 1593 | 1594 | 1EE7FD00-55DB-4C99-A5FB-8F0F77BD2D1C 1595 | 1596 | xpos 1597 | 15 1598 | ypos 1599 | 185 1600 | 1601 | 45BE6B2E-BABE-4E88-BB17-A843CDDA4C6E 1602 | 1603 | xpos 1604 | 1230 1605 | ypos 1606 | 460 1607 | 1608 | 5B591AAE-36F9-4ACD-8BCC-898D52B1E6F2 1609 | 1610 | xpos 1611 | 550 1612 | ypos 1613 | 415 1614 | 1615 | 79077B04-6C3A-4369-A688-3430CD78742E 1616 | 1617 | xpos 1618 | 295 1619 | ypos 1620 | 860 1621 | 1622 | 7DD6D7E3-96F1-489D-8964-34B7CA51E88C 1623 | 1624 | xpos 1625 | 155 1626 | ypos 1627 | 860 1628 | 1629 | 7E9D0470-C68B-47F6-87A2-C24F07C97090 1630 | 1631 | xpos 1632 | 765 1633 | ypos 1634 | 930 1635 | 1636 | 80DA11E5-D01E-4202-9C5E-0D9B3324AC6C 1637 | 1638 | xpos 1639 | 175 1640 | ypos 1641 | 1035 1642 | 1643 | 86D3F625-4B51-47FB-ABED-3426A568C5FA 1644 | 1645 | xpos 1646 | 1120 1647 | ypos 1648 | 390 1649 | 1650 | 8FFB7263-3FEA-4D93-8548-0BD80C4EF6F7 1651 | 1652 | xpos 1653 | 655 1654 | ypos 1655 | 120 1656 | 1657 | 92C0C789-DCAC-4D64-89C9-13EBC5B30825 1658 | 1659 | xpos 1660 | 930 1661 | ypos 1662 | 935 1663 | 1664 | 96A0B9F4-7FE5-47CB-B9C7-A5F4B8D6CBF6 1665 | 1666 | xpos 1667 | 1180 1668 | ypos 1669 | 1050 1670 | 1671 | 99FF4987-D63E-4E5D-B4F7-C31A91977B12 1672 | 1673 | note 1674 | Toggle 1675 | xpos 1676 | 630 1677 | ypos 1678 | 745 1679 | 1680 | 9EB91321-8965-4647-8117-1F0AEF4716D8 1681 | 1682 | xpos 1683 | 770 1684 | ypos 1685 | 420 1686 | 1687 | A0FBAC45-A508-4B1A-886F-93ACD95858AA 1688 | 1689 | note 1690 | Status 1691 | xpos 1692 | 250 1693 | ypos 1694 | 635 1695 | 1696 | A7C811D8-A39B-42F0-892B-3C414D36C694 1697 | 1698 | xpos 1699 | 740 1700 | ypos 1701 | 90 1702 | 1703 | AB5491C2-EAD3-4BFE-B5A5-212EA8E08BC3 1704 | 1705 | xpos 1706 | 15 1707 | ypos 1708 | 555 1709 | 1710 | BB6490D2-A5DD-4B60-AE08-5DA6337FB33E 1711 | 1712 | xpos 1713 | 945 1714 | ypos 1715 | 1075 1716 | 1717 | BFA42EFD-EDC2-4B72-A0A5-ECFE1EFAC00C 1718 | 1719 | xpos 1720 | 730 1721 | ypos 1722 | 210 1723 | 1724 | C923DD5D-72F9-4E82-889D-41C99F15B511 1725 | 1726 | xpos 1727 | 1280 1728 | ypos 1729 | 195 1730 | 1731 | CB3F931E-7D33-43D3-99BC-7A6ED3C7C9ED 1732 | 1733 | xpos 1734 | 615 1735 | ypos 1736 | 625 1737 | 1738 | D16821EF-C0FF-4482-956F-5143CA59DC20 1739 | 1740 | xpos 1741 | 1015 1742 | ypos 1743 | 1045 1744 | 1745 | D21D8E0D-183D-4DE2-9CF7-FD2D64CAEE89 1746 | 1747 | xpos 1748 | 15 1749 | ypos 1750 | 1060 1751 | 1752 | DA1AA9D5-C1C4-4239-A1F1-82DC14F99632 1753 | 1754 | xpos 1755 | 660 1756 | ypos 1757 | 240 1758 | 1759 | DFDFFA40-B9AA-4EBE-BE32-71F71A374136 1760 | 1761 | xpos 1762 | 605 1763 | ypos 1764 | 935 1765 | 1766 | E0A79904-F577-4248-BAD9-CE7BFFFA94A7 1767 | 1768 | xpos 1769 | 530 1770 | ypos 1771 | 95 1772 | 1773 | E804755E-727D-4CE5-ABB3-119858071F9C 1774 | 1775 | xpos 1776 | 535 1777 | ypos 1778 | 220 1779 | 1780 | EE9825C3-229E-43C9-880E-AF921D64BF12 1781 | 1782 | xpos 1783 | 970 1784 | ypos 1785 | 370 1786 | 1787 | F7168A84-1201-4BBD-B642-69E9004B5F22 1788 | 1789 | xpos 1790 | 435 1791 | ypos 1792 | 860 1793 | 1794 | 1795 | variablesdontexport 1796 | 1797 | version 1798 | 1.1.0 1799 | webaddress 1800 | https://github.com/mikelxc/clashx-alfred 1801 | 1802 | 1803 | --------------------------------------------------------------------------------