diff --git a/.workflow/info.plist b/.workflow/info.plist
index c9aeb2e..be20397 100644
--- a/.workflow/info.plist
+++ b/.workflow/info.plist
@@ -123,18 +123,6 @@
vitoclose
-
- destinationuid
- 4C3AA443-3696-4DA1-BE97-18252F520E01
- modifiers
- 0
- modifiersubtext
-
- sourceoutputuid
- 623A4F44-A078-4672-8975-14041E57A33B
- vitoclose
-
-
destinationuid
50FCEAF1-2982-4F22-A6C4-7772EF3F958C
@@ -616,7 +604,7 @@
destinationuid
- D2D00E80-4891-40FF-9F52-AD4925066F25
+ 4C3AA443-3696-4DA1-BE97-18252F520E01
modifiers
0
modifiersubtext
@@ -855,7 +843,7 @@
runningsubtext
Loading...
script
- ./exe checksum $1
+ ./exe checksum "$1"
scriptargtype
1
scriptfile
@@ -902,7 +890,7 @@
runningsubtext
Loading...
script
- ./exe jwt $1
+ ./exe jwt "$1"
scriptargtype
1
scriptfile
@@ -1177,7 +1165,7 @@
runningsubtext
script
- ./exe decode $1
+ ./exe decode "$1"
scriptargtype
1
scriptfile
@@ -1226,7 +1214,7 @@
runningsubtext
script
- ./exe uuid $1
+ ./exe uuid "$1"
scriptargtype
1
scriptfile
@@ -1283,7 +1271,7 @@
runningsubtext
script
- ./exe li $1
+ ./exe li "$1"
scriptargtype
1
scriptfile
@@ -1332,7 +1320,7 @@
runningsubtext
script
- ./exe hash $1
+ ./exe hash "$1"
scriptargtype
1
scriptfile
@@ -1381,7 +1369,7 @@
runningsubtext
Loading...
script
- ./exe qrcode $1
+ ./exe qrcode "$1"
scriptargtype
1
scriptfile
@@ -1402,6 +1390,29 @@
version
3
+
+ config
+
+ path
+ {query}
+ sortBy
+ 0
+ sortDirection
+ 0
+ sortFoldersAtTop
+
+ sortOverride
+
+ stackBrowserView
+
+
+ type
+ alfred.workflow.action.browseinalfred
+ uid
+ 4C3AA443-3696-4DA1-BE97-18252F520E01
+ version
+ 1
+
config
@@ -1451,6 +1462,25 @@
version
3
+
+ config
+
+ autopaste
+
+ clipboardtext
+ {query}
+ ignoredynamicplaceholders
+
+ transient
+
+
+ type
+ alfred.workflow.output.clipboard
+ uid
+ 54185D5A-A90D-43D6-8911-882FCBFD4CA4
+ version
+ 3
+
config
@@ -1549,25 +1579,6 @@
version
3
-
- config
-
- autopaste
-
- clipboardtext
- {query}
- ignoredynamicplaceholders
-
- transient
-
-
- type
- alfred.workflow.output.clipboard
- uid
- 54185D5A-A90D-43D6-8911-882FCBFD4CA4
- version
- 3
-
config
@@ -1883,29 +1894,6 @@
version
3
-
- config
-
- path
- {query}
- sortBy
- 0
- sortDirection
- 0
- sortFoldersAtTop
-
- sortOverride
-
- stackBrowserView
-
-
- type
- alfred.workflow.action.browseinalfred
- uid
- 4C3AA443-3696-4DA1-BE97-18252F520E01
- version
- 1
-
config
@@ -1925,20 +1913,6 @@
uid
4D96CDF8-BDC6-41A4-B274-67CA02B1DE03
-
- inputstring
- {var:action}
- matchcasesensitive
-
- matchmode
- 0
- matchstring
- browse in alfred
- outputlabel
- browse in alfred
- uid
- 623A4F44-A078-4672-8975-14041E57A33B
-
inputstring
{var:action}
@@ -2822,7 +2796,7 @@ https://github.com/cage1016/alfred-devtoys
xpos
950
ypos
- 1025
+ 1040
2190908E-CE13-43D3-8C8C-A880648445DD
@@ -2857,7 +2831,7 @@ https://github.com/cage1016/alfred-devtoys
xpos
1185
ypos
- 1020
+ 695
4EE4E0AD-A4A7-47E0-8D37-3B95EC3522E0
@@ -2885,7 +2859,7 @@ https://github.com/cage1016/alfred-devtoys
xpos
1185
ypos
- 920
+ 885
60AD413A-80C1-486B-B448-F0161FBAE954
@@ -3058,9 +3032,9 @@ https://github.com/cage1016/alfred-devtoys
E377B5E7-7041-4785-A436-0EE645D6591D
xpos
- 1305
+ 1185
ypos
- 920
+ 1005
E6722CFB-EC4E-4094-AD75-F2B3D973B654
diff --git a/cmd/binary.go b/cmd/binary.go
index 06f5591..8b42313 100644
--- a/cmd/binary.go
+++ b/cmd/binary.go
@@ -23,7 +23,7 @@ var binaryCmd = &cobra.Command{
}
func runBinary(cmd *cobra.Command, args []string) {
- query := strings.Join(args, " ")
+ query := args[0]
if strings.TrimSpace(query) == "" {
query = string(clipboard.Read(clipboard.FmtText))
}
@@ -36,13 +36,31 @@ func runBinary(cmd *cobra.Command, args []string) {
wf.NewItem(fmt.Sprintf("`%s` is invalid binary", query)).Subtitle("Try a different query?").Icon(NumberGrayIcon)
} else {
b := lib.BinToDec(query)
- wf.NewItem(DecimalFormat(b)).Subtitle("➜ Binary to Decimal").Valid(true).Arg(b).Icon(NumberIcon).Var("action", "copy")
+ wf.NewItem(DecimalFormat(b)).
+ Subtitle(" ⌘+L, ↩ Copy Binary to Decimal").
+ Valid(true).
+ Arg(b).
+ Largetype(b).
+ Icon(NumberIcon).
+ Var("action", "copy")
o := lib.BinToOct(query)
- wf.NewItem(OctalFormat(o)).Subtitle("➜ Binary to Octal").Valid(true).Arg(o).Icon(NumberIcon).Var("action", "copy")
+ wf.NewItem(OctalFormat(o)).
+ Subtitle(" ⌘+L, ↩ Copy Binary to Octal").
+ Valid(true).
+ Arg(o).
+ Largetype(o).
+ Icon(NumberIcon).
+ Var("action", "copy")
h := lib.BinToHex(query)
- wf.NewItem(HexFormat(h)).Subtitle("➜ Binary to Hexadecimal").Valid(true).Arg(h).Icon(NumberIcon).Var("action", "copy")
+ wf.NewItem(HexFormat(h)).
+ Subtitle(" ⌘+L, ↩ Copy Binary to Hexadecimal").
+ Valid(true).
+ Arg(h).
+ Largetype(h).
+ Icon(NumberIcon).
+ Var("action", "copy")
}
wf.SendFeedback()
diff --git a/cmd/case.go b/cmd/case.go
index 05ea32e..f5f982b 100644
--- a/cmd/case.go
+++ b/cmd/case.go
@@ -54,7 +54,7 @@ var caseCmd = &cobra.Command{
}
func runCase(cmd *cobra.Command, args []string) {
- query := strings.Join(args, " ")
+ query := args[0]
if strings.TrimSpace(query) == "" {
query = string(clipboard.Read(clipboard.FmtText))
}
@@ -75,7 +75,13 @@ func runCase(cmd *cobra.Command, args []string) {
wf.NewItem(fmt.Sprintf("`%s` is invalid input", query)).Subtitle(fmt.Sprintf("Try a different query for %s?", v)).Icon(TextChangeCaseGrayIcon)
} else {
str := m.Fn(query)
- wf.NewItem(str).Subtitle(fmt.Sprintf("%s ➜ %s", v, m.Subtitle)).Valid(true).Arg(str).Icon(TextChangeCaseIcon).Var("action", "copy")
+ wf.NewItem(str).
+ Subtitle(fmt.Sprintf("%s ➜ ⌘+L, ↩ Copy %s", v, m.Subtitle)).
+ Valid(true).
+ Arg(str).
+ Largetype(str).
+ Icon(TextChangeCaseIcon).
+ Var("action", "copy")
}
}
} else {
@@ -84,7 +90,13 @@ func runCase(cmd *cobra.Command, args []string) {
wf.NewItem(fmt.Sprintf("`%s` is invalid input", query)).Subtitle(fmt.Sprintf("Try a different query for %s?", t)).Icon(TextChangeCaseGrayIcon)
} else {
str := m.Fn(query)
- wf.NewItem(str).Subtitle(fmt.Sprintf("%s ➜ %s", t, m.Subtitle)).Valid(true).Arg(str).Icon(TextChangeCaseIcon).Var("action", "copy")
+ wf.NewItem(str).
+ Subtitle(fmt.Sprintf("%s ➜ ⌘+L, ↩ Copy %s", t, m.Subtitle)).
+ Valid(true).
+ Arg(str).
+ Largetype(str).
+ Icon(TextChangeCaseIcon).
+ Var("action", "copy")
}
}
}
diff --git a/cmd/checksum.go b/cmd/checksum.go
index 1aa3c8c..f4c32b4 100644
--- a/cmd/checksum.go
+++ b/cmd/checksum.go
@@ -23,7 +23,7 @@ var checksumCmd = &cobra.Command{
}
func runChecksum(cmd *cobra.Command, args []string) {
- query := strings.Join(args, " ")
+ query := args[0]
if strings.TrimSpace(query) == "" {
query = string(clipboard.Read(clipboard.FmtText))
}
@@ -35,10 +35,41 @@ func runChecksum(cmd *cobra.Command, args []string) {
if err != nil {
wf.NewItem(fmt.Sprintf("`%s` is invalid file", query)).Subtitle("Try a different query?").Icon(HashGrayIcon)
} else {
- wf.NewItem(s.MD5()).Subtitle("MD5 CheckSum").Valid(true).Quicklook(query).Icon(HashIcon).Arg(s.MD5()).Var("action", "copy")
- wf.NewItem(s.SHA1()).Subtitle("SHA1 CheckSum").Valid(true).Quicklook(query).Icon(HashIcon).Arg(s.SHA1()).Var("action", "copy")
- wf.NewItem(s.SHA256()).Subtitle("SHA256 CheckSum").Valid(true).Quicklook(query).Icon(HashIcon).Arg(s.SHA256()).Var("action", "copy")
- wf.NewItem(s.SHA512()).Subtitle("SHA512 CheckSum").Valid(true).Quicklook(query).Icon(HashIcon).Arg(s.SHA512()).Var("action", "copy")
+ wf.NewItem(s.MD5()).
+ Subtitle("⌘+L ⇧, ↩ Copy MD5 CheckSum").
+ Valid(true).
+ Arg(s.MD5()).
+ Quicklook(query).
+ Largetype(s.MD5()).
+ Icon(HashIcon).
+ Var("action", "copy")
+
+ wf.NewItem(s.SHA1()).
+ Subtitle("⌘+L ⇧, ↩ Copy SHA1 CheckSum").
+ Valid(true).
+ Arg(s.SHA1()).
+ Quicklook(query).
+ Largetype(s.SHA1()).
+ Icon(HashIcon).
+ Var("action", "copy")
+
+ wf.NewItem(s.SHA256()).
+ Subtitle("⌘+L ⇧, ↩ Copy SHA256 CheckSum").
+ Valid(true).
+ Arg(s.SHA256()).
+ Quicklook(query).
+ Largetype(s.SHA256()).
+ Icon(HashIcon).
+ Var("action", "copy")
+
+ wf.NewItem(s.SHA512()).
+ Subtitle("⌘+L ⇧, ↩ Copy SHA512 CheckSum").
+ Valid(true).
+ Arg(s.SHA512()).
+ Quicklook(query).
+ Largetype(s.SHA512()).
+ Icon(HashIcon).
+ Var("action", "copy")
}
wf.SendFeedback()
diff --git a/cmd/decimal.go b/cmd/decimal.go
index ef41c4e..5ba52f5 100644
--- a/cmd/decimal.go
+++ b/cmd/decimal.go
@@ -41,13 +41,31 @@ func runDecimal(cmd *cobra.Command, args []string) {
wf.NewItem(fmt.Sprintf("`%s` is overflows int", query)).Subtitle("Try a different query?").Icon(NumberGrayIcon)
} else {
b := lib.DecToBin(query)
- wf.NewItem(BinaryFormat(b)).Subtitle("➜ Decimal to Binary").Valid(true).Arg(b).Icon(NumberIcon).Var("action", "copy")
+ wf.NewItem(BinaryFormat(b)).
+ Subtitle(" ⌘+L, ↩ Copy Decimal to Binary").
+ Valid(true).
+ Arg(b).
+ Largetype(b).
+ Icon(NumberIcon).
+ Var("action", "copy")
o := lib.DecToOct(query)
- wf.NewItem(OctalFormat(o)).Subtitle("➜ Decimal to Octal").Valid(true).Arg(o).Icon(NumberIcon).Var("action", "copy")
+ wf.NewItem(OctalFormat(o)).
+ Subtitle(" ⌘+L, ↩ Copy Decimal to Octal").
+ Valid(true).
+ Arg(o).
+ Largetype(o).
+ Icon(NumberIcon).
+ Var("action", "copy")
h := lib.DecToHex(query)
- wf.NewItem(HexFormat(h)).Subtitle("➜ Decimal to Hexadecimal").Valid(true).Arg(h).Icon(NumberIcon).Var("action", "copy")
+ wf.NewItem(HexFormat(h)).
+ Subtitle(" ⌘+L, ↩ Copy Decimal to Hexadecimal").
+ Valid(true).
+ Arg(h).
+ Largetype(h).
+ Icon(NumberIcon).
+ Var("action", "copy")
}
}
wf.SendFeedback()
diff --git a/cmd/decode.go b/cmd/decode.go
index a79b1d5..203103b 100644
--- a/cmd/decode.go
+++ b/cmd/decode.go
@@ -22,8 +22,7 @@ var decodeCmd = &cobra.Command{
}
func decodeRun(cmd *cobra.Command, args []string) {
- coder := lib.NewDecoder()
- query := strings.Join(args, " ")
+ query := args[0]
if strings.TrimSpace(query) == "" {
query = string(clipboard.Read(clipboard.FmtText))
}
@@ -31,14 +30,33 @@ func decodeRun(cmd *cobra.Command, args []string) {
CheckForUpdate()
+ coder := lib.NewDecoder()
b64DecodeStr := coder.Base64(query)
- wf.NewItem(b64DecodeStr).Subtitle("Base64 Decode").Valid(true).Arg(b64DecodeStr).Icon(Base64Icon).Var("action", "copy")
+ wf.NewItem(b64DecodeStr).
+ Subtitle("⌘+L, ↩ Copy Base64 Decode").
+ Valid(true).
+ Arg(b64DecodeStr).
+ Largetype(b64DecodeStr).
+ Icon(Base64Icon).
+ Var("action", "copy")
urlDecodeStr := coder.URL(query)
- wf.NewItem(urlDecodeStr).Subtitle("URL Decode").Valid(true).Arg(urlDecodeStr).Icon(UrlIcon).Var("action", "copy")
+ wf.NewItem(urlDecodeStr).
+ Subtitle("⌘+L, ↩ Copy URL Decode").
+ Valid(true).
+ Arg(urlDecodeStr).
+ Largetype(urlDecodeStr).
+ Icon(UrlIcon).
+ Var("action", "copy")
htmlDecodeStr := coder.HTML(query)
- wf.NewItem(htmlDecodeStr).Subtitle("HTML Decode").Valid(true).Arg(htmlDecodeStr).Icon(HtmlIcon).Var("action", "copy")
+ wf.NewItem(htmlDecodeStr).
+ Subtitle("⌘+L, ↩ Copy HTML Decode").
+ Valid(true).
+ Arg(htmlDecodeStr).
+ Largetype(htmlDecodeStr).
+ Icon(HtmlIcon).
+ Var("action", "copy")
wf.SendFeedback()
}
diff --git a/cmd/encode.go b/cmd/encode.go
index dc94390..a1725fa 100644
--- a/cmd/encode.go
+++ b/cmd/encode.go
@@ -22,8 +22,7 @@ var encodeCmd = &cobra.Command{
}
func encodeRun(cmd *cobra.Command, args []string) {
- coder := lib.NewEncoder()
- query := strings.Join(args, " ")
+ query := args[0]
if strings.TrimSpace(query) == "" {
query = string(clipboard.Read(clipboard.FmtText))
}
@@ -31,14 +30,33 @@ func encodeRun(cmd *cobra.Command, args []string) {
CheckForUpdate()
+ coder := lib.NewEncoder()
b64EncodeStr := coder.Base64(query)
- wf.NewItem(b64EncodeStr).Subtitle("Base64 Encode").Valid(true).Icon(Base64Icon).Arg(b64EncodeStr).Var("action", "copy")
+ wf.NewItem(b64EncodeStr).
+ Subtitle("⌘+L, ↩ Copy Base64 Encode").
+ Valid(true).
+ Largetype(b64EncodeStr).
+ Icon(Base64Icon).
+ Arg(b64EncodeStr).
+ Var("action", "copy")
urlEncodeStr := coder.URL(query)
- wf.NewItem(urlEncodeStr).Subtitle("URL Encode").Valid(true).Icon(UrlIcon).Arg(urlEncodeStr).Var("action", "copy")
+ wf.NewItem(urlEncodeStr).
+ Subtitle("⌘+L, ↩ Copy URL Encode").
+ Valid(true).
+ Largetype(urlEncodeStr).
+ Icon(UrlIcon).
+ Arg(urlEncodeStr).
+ Var("action", "copy")
htmlEncodeStr := coder.HTML(query)
- wf.NewItem(htmlEncodeStr).Subtitle("HTML Encode").Valid(true).Arg(htmlEncodeStr).Icon(HtmlIcon).Var("action", "copy")
+ wf.NewItem(htmlEncodeStr).
+ Subtitle("⌘+L, ↩ Copy HTML Encode").
+ Valid(true).
+ Arg(htmlEncodeStr).
+ Largetype(htmlEncodeStr).
+ Icon(HtmlIcon).
+ Var("action", "copy")
wf.SendFeedback()
}
diff --git a/cmd/hash.go b/cmd/hash.go
index 5701ed7..51d1241 100644
--- a/cmd/hash.go
+++ b/cmd/hash.go
@@ -22,7 +22,7 @@ var hashCmd = &cobra.Command{
}
func runHash(cmd *cobra.Command, args []string) {
- query := strings.Join(args, " ")
+ query := args[0]
if strings.TrimSpace(query) == "" {
query = string(clipboard.Read(clipboard.FmtText))
}
@@ -31,16 +31,40 @@ func runHash(cmd *cobra.Command, args []string) {
CheckForUpdate()
md5Str := lib.MD5(query)
- wf.NewItem(md5Str).Subtitle("MD5").Valid(true).Arg(md5Str).Icon(HashIcon).Var("action", "copy")
+ wf.NewItem(md5Str).
+ Subtitle("⌘+L, ↩ Copy MD5").
+ Valid(true).
+ Arg(md5Str).
+ Largetype(md5Str).
+ Icon(HashIcon).
+ Var("action", "copy")
sha1Str := lib.SHA1(query)
- wf.NewItem(sha1Str).Subtitle("SHA1").Valid(true).Arg(sha1Str).Icon(HashIcon).Var("action", "copy")
+ wf.NewItem(sha1Str).
+ Subtitle("⌘+L, ↩ Copy SHA1").
+ Valid(true).
+ Arg(sha1Str).
+ Largetype(sha1Str).
+ Icon(HashIcon).
+ Var("action", "copy")
sha256Str := lib.SHA256(query)
- wf.NewItem(sha256Str).Subtitle("SHA256").Valid(true).Arg(sha256Str).Icon(HashIcon).Var("action", "copy")
+ wf.NewItem(sha256Str).
+ Subtitle("⌘+L, ↩ Copy SHA256").
+ Valid(true).
+ Arg(sha256Str).
+ Largetype(sha256Str).
+ Icon(HashIcon).
+ Var("action", "copy")
sha512Str := lib.SHA512(query)
- wf.NewItem(sha512Str).Subtitle("SHA512").Valid(true).Arg(sha512Str).Icon(HashIcon).Var("action", "copy")
+ wf.NewItem(sha512Str).
+ Subtitle("⌘+L, ↩ Copy SHA512").
+ Valid(true).
+ Arg(sha512Str).
+ Largetype(sha512Str).
+ Icon(HashIcon).
+ Var("action", "copy")
wf.SendFeedback()
}
diff --git a/cmd/hexadecimal.go b/cmd/hexadecimal.go
index cd0ea36..71f218f 100644
--- a/cmd/hexadecimal.go
+++ b/cmd/hexadecimal.go
@@ -36,13 +36,31 @@ func runHexadecimal(cmd *cobra.Command, args []string) {
wf.NewItem(fmt.Sprintf("`%s` is invalid hexadecimal", query)).Subtitle("Try a different query?").Icon(NumberGrayIcon)
} else {
b := lib.HexToBin(query)
- wf.NewItem(BinaryFormat(b)).Subtitle("➜ Hexadecimal to Binary").Valid(true).Arg(b).Icon(NumberIcon).Var("action", "copy")
+ wf.NewItem(BinaryFormat(b)).
+ Subtitle(" ⌘+L, ↩ Copy Hexadecimal to Binary").
+ Valid(true).
+ Arg(b).
+ Largetype(b).
+ Icon(NumberIcon).
+ Var("action", "copy")
o := lib.HexToOct(query)
- wf.NewItem(OctalFormat(o)).Subtitle("➜ Hexadecimal to Octal").Valid(true).Arg(o).Icon(NumberIcon).Var("action", "copy")
+ wf.NewItem(OctalFormat(o)).
+ Subtitle(" ⌘+L, ↩ Copy Hexadecimal to Octal").
+ Valid(true).
+ Arg(o).
+ Largetype(o).
+ Icon(NumberIcon).
+ Var("action", "copy")
d := lib.HexToDec(query)
- wf.NewItem(DecimalFormat(d)).Subtitle("➜ Hexadecimal to Decimal").Valid(true).Arg(d).Icon(NumberIcon).Var("action", "copy")
+ wf.NewItem(DecimalFormat(d)).
+ Subtitle(" ⌘+L, ↩ Copy Hexadecimal to Decimal").
+ Valid(true).
+ Arg(d).
+ Largetype(d).
+ Icon(NumberIcon).
+ Var("action", "copy")
}
wf.SendFeedback()
diff --git a/cmd/imageB64.go b/cmd/imageB64.go
index d82ae73..38cec62 100644
--- a/cmd/imageB64.go
+++ b/cmd/imageB64.go
@@ -58,36 +58,40 @@ func runImageB64(cmd *cobra.Command, args []string) {
wf.NewItem(fmt.Sprintf("`%s` is invalid file", query)).Subtitle("Try a different query?").Icon(Base64ImgGrayIcon)
} else {
wf.NewItem(b64EncodeStr).
- Subtitle("Base64 string").
+ Subtitle("⌘+L ⇧, ↩ Copy Base64 string").
Valid(true).
Quicklook(query).
+ Largetype(b64EncodeStr).
Icon(Base64ImgIcon).
Arg(b64EncodeStr).
Var("action", "copy")
dataURI := fmt.Sprintf("data:%s;base64,%s", mtype, b64EncodeStr)
wf.NewItem(dataURI).
- Subtitle("Base64 Data URI").
+ Subtitle("⌘+L ⇧, ↩ Copy Base64 Data URI").
Valid(true).
Quicklook(query).
+ Largetype(dataURI).
Icon(Base64ImgIcon).
Arg(dataURI).
Var("action", "copy")
str2 := fmt.Sprintf("", dataURI)
wf.NewItem(str2).
- Subtitle("HTML code").
+ Subtitle("⌘+L ⇧, ↩ Copy HTML code").
Valid(true).
Quicklook(query).
+ Largetype(str2).
Icon(Base64ImgIcon).
Arg(str2).
Var("action", "copy")
str3 := fmt.Sprintf("background-image: url(\"%s\");", dataURI)
wf.NewItem(str3).
- Subtitle("CSS Background Source").
+ Subtitle("⌘+L ⇧, ↩ Copy CSS Background Source").
Valid(true).
Quicklook(query).
+ Largetype(str3).
Icon(Base64ImgIcon).
Arg(str3).
Var("action", "copy")
diff --git a/cmd/json.go b/cmd/json.go
index 4e7441c..736f86a 100644
--- a/cmd/json.go
+++ b/cmd/json.go
@@ -23,7 +23,7 @@ var jsonCmd = &cobra.Command{
}
func runJSON(cmd *cobra.Command, args []string) {
- query := strings.Join(args, " ")
+ query := args[0]
if strings.TrimSpace(query) == "" {
query = string(clipboard.Read(clipboard.FmtText))
}
@@ -33,10 +33,38 @@ func runJSON(cmd *cobra.Command, args []string) {
j := lib.NewJSONFormat()
if j.IsJSON(query) {
- wf.NewItem(query).Subtitle("Indent as Tab").Valid(true).Arg(j.TabIndent(query)).Icon(JsonIcon).Var("action", "action in alfred")
- wf.NewItem(query).Subtitle("Indent as 2 Spaces").Valid(true).Arg(j.TwoSpacesIndent(query)).Icon(JsonIcon).Var("action", "action in alfred")
- wf.NewItem(query).Subtitle("Indent as 4 Spaces").Valid(true).Arg(j.FourSpacesIndent(query)).Icon(JsonIcon).Var("action", "action in alfred")
- wf.NewItem(query).Subtitle("Minified").Valid(true).Arg(j.Minify(query)).Icon(JsonIcon).Var("action", "action in alfred")
+ wf.NewItem(query).
+ Subtitle("⌘+L, ↩ Action in Indent as Tab").
+ Valid(true).
+ Arg(j.TabIndent(query)).
+ Largetype(j.TabIndent(query)).
+ Icon(JsonIcon).
+ Var("action", "action in alfred")
+
+ wf.NewItem(query).
+ Subtitle("⌘+L, ↩ Action in Indent as 2 Spaces").
+ Valid(true).
+ Arg(j.TwoSpacesIndent(query)).
+ Largetype(j.TwoSpacesIndent(query)).
+ Icon(JsonIcon).
+ Var("action", "action in alfred")
+
+ wf.NewItem(query).
+ Subtitle("⌘+L, ↩ Action in Indent as 4 Spaces").
+ Valid(true).
+ Arg(j.FourSpacesIndent(query)).
+ Largetype(j.FourSpacesIndent(query)).
+ Icon(JsonIcon).
+ Var("action", "action in alfred")
+
+ wf.NewItem(query).
+ Subtitle("⌘+L, ↩ Action in Minified").
+ Valid(true).
+ Arg(j.Minify(query)).
+ Largetype(j.Minify(query)).
+ Icon(JsonIcon).
+ Var("action", "action in alfred")
+
} else {
wf.NewItem(fmt.Sprintf("`%s` is invalid JSON", query)).Subtitle("Try a different query?").Icon(JsonGrayIcon)
}
diff --git a/cmd/jwt.go b/cmd/jwt.go
index 4b8aae7..18233b5 100644
--- a/cmd/jwt.go
+++ b/cmd/jwt.go
@@ -24,7 +24,7 @@ var jwtCmd = &cobra.Command{
}
func runJwt(c *cobra.Command, args []string) {
- query := strings.Join(args, " ")
+ query := args[0]
if strings.TrimSpace(query) == "" {
query = string(clipboard.Read(clipboard.FmtText))
}
@@ -37,8 +37,21 @@ func runJwt(c *cobra.Command, args []string) {
a, _ := json.Marshal(token.Header)
b, _ := json.Marshal(token.Claims)
- wf.NewItem(string(a)).Subtitle("Header").Valid(true).Arg(string(a)).Icon(JwtIcon).Var("action", "action in alfred")
- wf.NewItem(string(b)).Subtitle("Payload").Valid(true).Arg(string(b)).Icon(JwtIcon).Var("action", "action in alfred")
+ wf.NewItem(string(a)).
+ Subtitle("⌘+L, ↩ Action in Header").
+ Valid(true).
+ Arg(string(a)).
+ Largetype(string(a)).
+ Icon(JwtIcon).
+ Var("action", "action in alfred")
+
+ wf.NewItem(string(b)).
+ Subtitle("⌘+L, ↩ Action in Payload").
+ Valid(true).
+ Arg(string(b)).
+ Largetype(string(b)).
+ Icon(JwtIcon).
+ Var("action", "action in alfred")
} else {
wf.NewItem(fmt.Sprintf("`%s` is invalid jwt", query)).Subtitle("Try a different query?").Icon(JwtGrayIcon)
}
diff --git a/cmd/loremipsum.go b/cmd/loremipsum.go
index c4aca5f..bd976a0 100644
--- a/cmd/loremipsum.go
+++ b/cmd/loremipsum.go
@@ -23,7 +23,7 @@ var loremCmd = &cobra.Command{
}
func runLorem(cmd *cobra.Command, args []string) {
- query := strings.Join(args, " ")
+ query := args[0]
if strings.TrimSpace(query) == "" {
query = string(clipboard.Read(clipboard.FmtText))
}
@@ -37,13 +37,29 @@ func runLorem(cmd *cobra.Command, args []string) {
} else {
loremIpsumGeneratoe := loremipsum.New()
words := loremIpsumGeneratoe.Words(int(c))
- wf.NewItem(words).Subtitle(fmt.Sprintf("%d Words", c)).Valid(true).Arg(words).Icon(LoremIpsumIcon).Var("action", "copy").Valid(true)
+ wf.NewItem(words).
+ Subtitle(fmt.Sprintf("⌘+L, ↩ Copy %d Words", c)).
+ Valid(true).
+ Arg(words).
+ Largetype(words).Icon(LoremIpsumIcon).
+ Var("action", "copy").
+ Valid(true)
sentences := loremIpsumGeneratoe.Sentences(int(c))
- wf.NewItem(sentences).Subtitle(fmt.Sprintf("%d Sentences", c)).Valid(true).Arg(sentences).Icon(LoremIpsumIcon).Var("action", "copy")
+ wf.NewItem(sentences).
+ Subtitle(fmt.Sprintf("⌘+L, ↩ Copy %d Sentences", c)).
+ Valid(true).
+ Arg(sentences).
+ Largetype(sentences).Icon(LoremIpsumIcon).
+ Var("action", "copy")
paragraphs := strings.Join(strings.Split(loremIpsumGeneratoe.Paragraphs(int(c)), `\n`), "\n\n")
- wf.NewItem(paragraphs).Subtitle(fmt.Sprintf("%d Paragraphs", c)).Valid(true).Arg(paragraphs).Icon(LoremIpsumIcon).Var("action", "copy")
+ wf.NewItem(paragraphs).
+ Subtitle(fmt.Sprintf("⌘+L, ↩ Copy %d Paragraphs", c)).
+ Valid(true).
+ Arg(paragraphs).
+ Largetype(paragraphs).Icon(LoremIpsumIcon).
+ Var("action", "copy")
}
wf.SendFeedback()
diff --git a/cmd/nscommand.go b/cmd/nscommand.go
index 13fe481..a71affd 100644
--- a/cmd/nscommand.go
+++ b/cmd/nscommand.go
@@ -18,10 +18,10 @@ var nscommandCmd = &cobra.Command{
func runNsCommand(cmd *cobra.Command, args []string) {
CheckForUpdate()
- wf.NewItem("Binary To ➜").Subtitle("Decimal, Octal, Hexadecimal").Valid(true).UID("1").Icon(NumberIcon).Var("type", "binary")
- wf.NewItem("Decimal To ➜").Subtitle("Binary, Octal, Hexadecimal").Valid(true).UID("2").Icon(NumberIcon).Var("type", "decimal")
- wf.NewItem("Octal To ➜").Subtitle("Binary, Decimal, Hexadecimal").Valid(true).UID("3").Icon(NumberIcon).Var("type", "octal")
- wf.NewItem("Hexadecimal To ➜").Subtitle("Binary, Octal, Decimal").Valid(true).UID("4").Icon(NumberIcon).Var("type", "hexadecimal")
+ wf.NewItem("Binary To ➜").Subtitle("↩ Launch Decimal, Octal, Hexadecimal").Valid(true).UID("1").Icon(NumberIcon).Var("type", "binary")
+ wf.NewItem("Decimal To ➜").Subtitle("↩ Launch Binary, Octal, Hexadecimal").Valid(true).UID("2").Icon(NumberIcon).Var("type", "decimal")
+ wf.NewItem("Octal To ➜").Subtitle("↩ Launch Binary, Decimal, Hexadecimal").Valid(true).UID("3").Icon(NumberIcon).Var("type", "octal")
+ wf.NewItem("Hexadecimal To ➜").Subtitle("↩ Launch Binary, Octal, Decimal").Valid(true).UID("4").Icon(NumberIcon).Var("type", "hexadecimal")
wf.Filter(args[0])
wf.WarnEmpty("No matching items", "Try a different query?")
diff --git a/cmd/octal.go b/cmd/octal.go
index 94f502e..64cf7e4 100644
--- a/cmd/octal.go
+++ b/cmd/octal.go
@@ -23,7 +23,7 @@ var octalCmd = &cobra.Command{
}
func runOctal(cmd *cobra.Command, args []string) {
- query := strings.Join(args, " ")
+ query := args[0]
if strings.TrimSpace(query) == "" {
query = string(clipboard.Read(clipboard.FmtText))
}
@@ -36,13 +36,31 @@ func runOctal(cmd *cobra.Command, args []string) {
wf.NewItem(fmt.Sprintf("`%s` is invalid octal", query)).Subtitle("Try a different query?").Icon(NumberGrayIcon)
} else {
b := lib.OctToBin(query)
- wf.NewItem(BinaryFormat(b)).Subtitle("➜ Octal to Binary").Valid(true).Arg(b).Icon(NumberIcon).Var("action", "copy")
+ wf.NewItem(BinaryFormat(b)).
+ Subtitle(" ⌘+L, ↩ Copy Octal to Binary").
+ Valid(true).
+ Arg(b).
+ Largetype(b).
+ Icon(NumberIcon).
+ Var("action", "copy")
o := lib.OctToDec(query)
- wf.NewItem(DecimalFormat(o)).Subtitle("➜ Octal to Decimal").Valid(true).Arg(o).Icon(NumberIcon).Var("action", "copy")
+ wf.NewItem(DecimalFormat(o)).
+ Subtitle(" ⌘+L, ↩ Copy Octal to Decimal").
+ Valid(true).
+ Arg(o).
+ Largetype(o).
+ Icon(NumberIcon).
+ Var("action", "copy")
h := lib.OctToHex(query)
- wf.NewItem(HexFormat(h)).Subtitle("➜ Octal to Hexadecimal").Valid(true).Arg(h).Icon(NumberIcon).Var("action", "copy")
+ wf.NewItem(HexFormat(h)).
+ Subtitle(" ⌘+L, ↩ Copy Octal to Hexadecimal").
+ Valid(true).
+ Arg(h).
+ Largetype(h).
+ Icon(NumberIcon).
+ Var("action", "copy")
}
wf.SendFeedback()
}
diff --git a/cmd/qrcode.go b/cmd/qrcode.go
index cc3aa6e..1008b7f 100644
--- a/cmd/qrcode.go
+++ b/cmd/qrcode.go
@@ -54,7 +54,7 @@ func createQRCodeByBoombuler(content string, quality qr.ErrorCorrectionLevel, si
}
func runQrcode(cmd *cobra.Command, args []string) {
- query := strings.Join(args, " ")
+ query := args[0]
if strings.TrimSpace(query) == "" {
query = string(clipboard.Read(clipboard.FmtText))
}
@@ -70,7 +70,14 @@ func runQrcode(cmd *cobra.Command, args []string) {
if err != createQRCodeByBoombuler(query, qr.M, s, path) {
wf.NewItem(err.Error()).Subtitle("QR Code").Valid(false).Icon(aw.IconError)
} else {
- wf.NewItem(query).Subtitle("QR code").Valid(true).Quicklook(path).Arg(path).Icon(&aw.Icon{Value: path}).Var("action", "browse in alfred")
+ wf.NewItem(query).
+ Subtitle("⌘+L ⇧, ↩ Brose QR code file").
+ Valid(true).
+ Quicklook(path).
+ Largetype(query).
+ Arg(path).
+ Icon(&aw.Icon{Value: path}).
+ Var("action", "browse in alfred")
}
}
wf.SendFeedback()
diff --git a/cmd/uuid.go b/cmd/uuid.go
index ef4736b..90c18a1 100644
--- a/cmd/uuid.go
+++ b/cmd/uuid.go
@@ -23,7 +23,7 @@ var uuidCmd = &cobra.Command{
}
func runUuid(cmd *cobra.Command, args []string) {
- query := strings.Join(args, " ")
+ query := args[0]
if strings.TrimSpace(query) == "" {
query = string(clipboard.Read(clipboard.FmtText))
}
@@ -40,8 +40,18 @@ func runUuid(cmd *cobra.Command, args []string) {
buf[i] = uuid.New().String()
}
for _, v := range buf {
- wf.NewItem(v).Subtitle("UUID, ⌥ to copy all").Valid(true).Arg(v).Icon(UuidIcon).Var("action", "copy").Valid(true).
- Opt().Subtitle(fmt.Sprintf("UUID, copy all of %d", c)).Arg(strings.Join(buf, "\n")).Var("action", "copy")
+ wf.NewItem(v).
+ Subtitle("⌘+L ⌥, ↩ Copy UUID").
+ Valid(true).
+ Largetype(v).
+ Arg(v).
+ Icon(UuidIcon).
+ Var("action", "copy").
+ Valid(true).
+ Opt().
+ Subtitle("↩ Copy all of UUIDs").
+ Arg(strings.Join(buf, "\n")).
+ Var("action", "copy")
}
}