mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 01:24:05 +08:00
opt some
This commit is contained in:
parent
73a0cd7bbc
commit
1095aee85c
@ -158,6 +158,7 @@ func init() {
|
||||
mdb.SEARCH: {Hand: func(m *ice.Message, arg ...string) {
|
||||
if runtime.GOOS == DARWIN && tcp.IsLocalHost(m, m.Option(ice.MSG_USERIP)) {
|
||||
if arg[0] == mdb.FOREACH && arg[1] == "" {
|
||||
return
|
||||
list := map[string]bool{"Terminal.app": true, "Docker.app": true, "Google Chrome.app": true}
|
||||
for _, p := range strings.Split(m.Cmdx("", nfs.SH, "-c", `ps aux|grep /Applications/|grep -v Cache|grep -v Helper|grep -v Widget|grep -v Extension|grep -v Chrome|grep -v com.app|grep -v grep|grep -o "[^/]*.app"|sort|uniq`), ice.NL) {
|
||||
list[p] = true
|
||||
|
@ -164,6 +164,7 @@ func init() {
|
||||
}},
|
||||
mdb.SEARCH: {Hand: func(m *ice.Message, arg ...string) {
|
||||
if arg[0] == mdb.FOREACH && arg[1] == "" && m.Cmdx("host", "islocal", m.Option(ice.MSG_USERIP)) == ice.OK {
|
||||
return
|
||||
kit.For([]string{"Desktop", "Documents", "Downloads", "Pictures"}, func(p string) {
|
||||
p = kit.HomePath(p)
|
||||
m.Cmd(DIR, PWD, mdb.NAME, mdb.TIME, kit.Dict(DIR_ROOT, p)).SortStrR(mdb.TIME).TablesLimit(5, func(value ice.Maps) {
|
||||
|
@ -84,7 +84,7 @@ func init() {
|
||||
push := func(k, p string) {
|
||||
kit.IfNoKey(list, kit.Select(k, k+ice.DF, k != "")+p, func(p string) { m.Push(nfs.PATH, p) })
|
||||
}
|
||||
mdb.HashSelect(m.Spawn()).TablesLimit(10, func(value ice.Maps) { push("", value[nfs.PATH]) })
|
||||
mdb.HashSelect(m.Spawn()).TablesLimit(30, func(value ice.Maps) { push("", value[nfs.PATH]) })
|
||||
m.Cmd(mdb.SEARCH, mdb.FOREACH, "", ice.OptionFields("type,name,text")).Sort("type,name,text").Table(func(value ice.Maps) {
|
||||
switch value[mdb.TYPE] {
|
||||
case nfs.FILE:
|
||||
|
Loading…
x
Reference in New Issue
Block a user