This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
liangfen@iMac
committed
Sep 5, 2017
1 parent
cf0359c
commit cf0d6f5
Showing
18 changed files
with
121 additions
and
24 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# encoding: utf-8 | ||
|
||
from links import icons, config | ||
from links.util import workflow, relaunch_alfred | ||
from links.models.preferences import Preferences | ||
|
||
|
||
def filter(args): | ||
prefs = Preferences.current_prefs() | ||
|
||
icon = icons.TASK | ||
if prefs.maxResultCount == 7: | ||
icon = icons.TASK_COMPLETED | ||
workflow().add_item( | ||
u'设定最大值为 7', | ||
arg='-result_count max_7', valid=True, icon=icon | ||
) | ||
|
||
icon = icons.TASK | ||
if prefs.maxResultCount == 20: | ||
icon = icons.TASK_COMPLETED | ||
workflow().add_item( | ||
u'设定最大值为 20', | ||
u'VIP账户才能生效', | ||
arg='-result_count max_20', valid=True, icon=icon | ||
) | ||
|
||
workflow().add_item( | ||
u'返回主菜单', | ||
autocomplete=' ', icon=icons.BACK | ||
) | ||
|
||
|
||
def commit(args, modifier=None): | ||
prefs = Preferences.current_prefs() | ||
relaunch_command = 'lk ' | ||
|
||
if 'max_7' in args: | ||
prefs.maxResultCount = 7 | ||
|
||
elif 'max_20' in args: | ||
prefs.maxResultCount = 20 | ||
|
||
if relaunch_command: | ||
relaunch_alfred(relaunch_command) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters