mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-21 03:25:41 +08:00
完善标签等功能
This commit is contained in:
61
src/js/options/commandTypes.js
Normal file
61
src/js/options/commandTypes.js
Normal file
@@ -0,0 +1,61 @@
|
||||
const commandTypes = {
|
||||
keyword: {
|
||||
name: "keyword",
|
||||
label: "关键词",
|
||||
icon: "font_download",
|
||||
matchLabel: "关键词",
|
||||
desc: "在主输入框输入对应关键字进入插件,最通用的一种模式,关键字可以设置多个",
|
||||
valueType: "array"
|
||||
},
|
||||
regex: {
|
||||
name: "regex",
|
||||
label: "正则/划词",
|
||||
matchLabel: "正则",
|
||||
icon: "rule",
|
||||
desc: "匹配主输入框或超级面板选中的文本,可以获取输入框文本或选中文本作为变量",
|
||||
valueType: "regex"
|
||||
},
|
||||
over: {
|
||||
name: "over",
|
||||
label: "所有文本",
|
||||
matchLabel: "无需设置",
|
||||
icon: "emergency",
|
||||
desc: "匹配主输入框的所有文本,但只有在该文本未设置对应的插件或功能时才生效",
|
||||
valueType: "null"
|
||||
},
|
||||
window: {
|
||||
name: "window",
|
||||
label: "窗口/进程",
|
||||
matchLabel: "进程名",
|
||||
icon: "widgets",
|
||||
desc: "匹配呼出uTools前或唤出超级面板时的活动窗口,可以获取窗口的信息或文件夹路径作为变量",
|
||||
valueType: "array"
|
||||
},
|
||||
img: {
|
||||
name: "img",
|
||||
label: "图片",
|
||||
matchLabel: "无需配置",
|
||||
icon: "panorama",
|
||||
desc: "匹配主输入框或超级面板选中的图片,并返回图片的 base64",
|
||||
valueType: "null"
|
||||
},
|
||||
files: {
|
||||
name: "files",
|
||||
label: "复制/选中文件",
|
||||
matchLabel: "正则",
|
||||
icon: "description",
|
||||
desc: "匹配主输入框或超级面板选中的文件,可以获取复制及选中的文件信息作为变量",
|
||||
valueType: "regex"
|
||||
|
||||
},
|
||||
professional: {
|
||||
name: "professional",
|
||||
label: "专业模式",
|
||||
matchLabel: "json配置",
|
||||
icon: "construction",
|
||||
desc: "通过json格式的配置实现同时匹配关键字、窗口、文件甚至图片,或者指定文件数量、窗口类等",
|
||||
valueType: "json"
|
||||
}
|
||||
}
|
||||
|
||||
export default commandTypes
|
||||
44
src/js/options/outputTypes.js
Normal file
44
src/js/options/outputTypes.js
Normal file
@@ -0,0 +1,44 @@
|
||||
const outputTypes = {
|
||||
ignore: {
|
||||
name: "ignore",
|
||||
label: "忽略输出并隐藏",
|
||||
icon: "more_horiz"
|
||||
},
|
||||
nothing: {
|
||||
name: "nothing",
|
||||
label: "忽略输出且不隐藏",
|
||||
icon: "blur_linear"
|
||||
},
|
||||
text: {
|
||||
name: "text",
|
||||
label: "纯文本输出",
|
||||
icon: "text_snippet"
|
||||
},
|
||||
html: {
|
||||
name: "html",
|
||||
label: "html格式输出",
|
||||
icon: "html"
|
||||
},
|
||||
terminal: {
|
||||
name: "terminal",
|
||||
label: "在终端显示",
|
||||
icon: "terminal"
|
||||
},
|
||||
clip: {
|
||||
name: "clip",
|
||||
label: "复制到剪贴板",
|
||||
icon: "content_paste"
|
||||
},
|
||||
send: {
|
||||
name: "send",
|
||||
label: "发送到活动窗口",
|
||||
icon: "web_asset"
|
||||
},
|
||||
notice: {
|
||||
name: "notice",
|
||||
label: "发送系统通知",
|
||||
icon: "sms"
|
||||
},
|
||||
};
|
||||
|
||||
export default outputTypes
|
||||
107
src/js/options/programs.js
Normal file
107
src/js/options/programs.js
Normal file
@@ -0,0 +1,107 @@
|
||||
/**
|
||||
* 所有支持的编程语言
|
||||
*/
|
||||
|
||||
const programs = {
|
||||
quickcommand: {
|
||||
name: "quickcommand",
|
||||
highlight: "javascript",
|
||||
bin: "",
|
||||
argv: "",
|
||||
ext: "",
|
||||
color: "#006e54",
|
||||
},
|
||||
shell: {
|
||||
name: "shell",
|
||||
bin: "bash",
|
||||
argv: "",
|
||||
ext: "sh",
|
||||
color: "#89e051",
|
||||
},
|
||||
applescript: {
|
||||
name: "applescript",
|
||||
bin: "osascript",
|
||||
argv: "",
|
||||
ext: "scpt",
|
||||
color: "#101F1F",
|
||||
},
|
||||
cmd: {
|
||||
name: "cmd",
|
||||
highlight: "bat",
|
||||
bin: "",
|
||||
argv: "",
|
||||
ext: "bat",
|
||||
color: "#C1F12E",
|
||||
},
|
||||
powershell: {
|
||||
name: "powershell",
|
||||
bin: "powershell",
|
||||
argv: "-NoProfile -File",
|
||||
ext: "ps1",
|
||||
color: "#012456",
|
||||
},
|
||||
python: {
|
||||
name: "python",
|
||||
bin: "python",
|
||||
argv: "-u",
|
||||
ext: "py",
|
||||
color: "#3572A5",
|
||||
},
|
||||
javascript: {
|
||||
name: "javascript",
|
||||
bin: "node",
|
||||
argv: "",
|
||||
ext: "js",
|
||||
color: "#f1e05a",
|
||||
},
|
||||
ruby: {
|
||||
name: "ruby",
|
||||
bin: "ruby",
|
||||
argv: "",
|
||||
ext: "rb",
|
||||
color: "#701516",
|
||||
},
|
||||
php: {
|
||||
name: "php",
|
||||
bin: "php",
|
||||
argv: "",
|
||||
ext: "php",
|
||||
color: "#4F5D95",
|
||||
},
|
||||
c: {
|
||||
name: "c",
|
||||
bin: "gcc",
|
||||
argv: "-o",
|
||||
ext: "c",
|
||||
color: "#555555",
|
||||
},
|
||||
csharp: {
|
||||
name: "csharp",
|
||||
bin: "C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\csc.exe",
|
||||
argv: "/Nologo",
|
||||
ext: "cs",
|
||||
color: "#178600",
|
||||
},
|
||||
lua: {
|
||||
name: "lua",
|
||||
bin: "lua",
|
||||
argv: "",
|
||||
ext: "lua",
|
||||
color: "#000080",
|
||||
},
|
||||
perl: {
|
||||
name: "perl",
|
||||
bin: "perl",
|
||||
argv: "",
|
||||
ext: "pl",
|
||||
color: "#0298c3",
|
||||
},
|
||||
custom: {
|
||||
name: "custom",
|
||||
bin: "",
|
||||
argv: "",
|
||||
ext: "",
|
||||
color: "#438eff",
|
||||
},
|
||||
};
|
||||
export default programs
|
||||
Reference in New Issue
Block a user