V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
yqf0215
V2EX  ›  macOS

macos 有没有可以 类似 shuttle 这种,但 ui 功能更超级的自定义命令管理器

  •  
  •   yqf0215 · 2022-03-30 13:58:38 +08:00 · 886 次点击
    这是一个创建于 750 天前的主题,其中的信息可能已经有所发展或是发生改变。
    请教,macos 有没有可以 类似 shuttle 这种,但 ui 功能更超级的自定义命令管理器
    但 shuttle 只能放到菜单栏,菜单栏还是太小了
    希望有一种不放到菜单栏,可以管理很多个命令的管理器。
    因为命令比较多,希望有分组功能。
    cattyhouse
        1
    cattyhouse  
       2022-03-30 14:13:56 +08:00   ❤️ 1
    系统自带的 zsh, 举例

    alias:

    alias la="ls -lArth"

    function:

    batteryinfo () {
    local arr remain_battery charge_state cycle health capacity source
    arr=($(system_profiler -json SPPowerDataType | jq -r '(.SPPowerDataType[0] | (.sppower_battery_charge_info | .sppower_battery_state_of_charge, .sppower_battery_is_charging), (.sppower_battery_health_info | .sppower_battery_cycle_count, .sppower_battery_health, .sppower_battery_health_maximum_capacity)), (.SPPowerDataType[1] | ."AC Power" ."Current Power Source")'))
    remain_battery="${arr[1]}"
    charge_state="${arr[2]}"
    cycle="${arr[3]}"
    health="${arr[4]}"
    capacity="${arr[5]}"
    [[ ${arr[6]} = 'TRUE' ]] && source=外部电源 || source=内部电池
    printf "%s\n%s\n%s\n%s\n%s\n%s\n" "剩余电量 : ${ggg} ${remain_battery}% ${nnn}" "是否充电 : ${ggg} $charge_state ${nnn}" "供电系统 : ${ggg} $source ${nnn}" "循环次数 : ${ggg} $cycle ${nnn}" "健康状况 : ${ggg} $health ${nnn}" "健康程度 : ${ggg} $capacity ${nnn}"
    }
    yqf0215
        2
    yqf0215  
    OP
       2022-03-30 14:24:18 +08:00
    ?? 看不懂啊。。。怎么用啊?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3509 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 04:44 · PVG 12:44 · LAX 21:44 · JFK 00:44
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.