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

EI Capitian 如何修改截图的默认文件名?

  •  
  •   nmgwddj · 2016-01-02 12:03:49 +08:00 · 2594 次点击
    这是一个创建于 3036 天前的主题,其中的信息可能已经有所发展或是发生改变。

    现在保存的文件名是如下这种格式:

    屏幕快照 2016-01-01 17.24.08.png

    我想截图后得到

    2016-01-01 17.24.08.png

    去掉前面的中文和空格,因为我经常需要将图片上传到博客,如果出现中或者空格,就会有转义字符,这样会导致图片的 URL 非常的长。我尝试过网络上的方法,虽然可以设定前缀为空,但是中间的那个空格还是去不掉。改系统文件的方法,已经不能使用了,系统提示没有权限。还请帮忙谢谢!

    13 条回复    2016-01-04 13:17:42 +08:00
    aerolqr
        1
    aerolqr  
       2016-01-02 12:13:44 +08:00 via iPhone
    Onyx 好像可以改。
    lukertty
        3
    lukertty  
       2016-01-02 13:23:08 +08:00   ❤️ 1
    没有办法改的,除非把 sip 去了
    /System/Library/CoreServices/SystemUIServer.app/Contents/Resources/English.lproj/ScreenCapture.strings
    这个文件系统不让改
    187j3x1
        4
    187j3x1  
       2016-01-02 14:01:35 +08:00   ❤️ 1
    用机器人搞 workflow 监视桌面自动改名
    regist
        5
    regist  
       2016-01-02 14:10:39 +08:00
    defaults write com.apple.screencapture name "screenshot"
    lukertty
        6
    lukertty  
       2016-01-02 14:16:25 +08:00
    @187j3x1 不如机器人用终端命令 screencapture 直接做一个 service, 在绑定到另外的快捷键
    regist
        7
    regist  
       2016-01-02 14:17:37 +08:00
    killall SystemUIServer
    regist
        8
    regist  
       2016-01-02 14:20:35 +08:00   ❤️ 1
    不要时间的话
    defaults write com.apple.screencapture name "screenshot"
    defaults write com.apple.screencapture "include-date" 0
    killall SystemUIServer

    最终

    screenshot.png
    screenshot 1.png
    screenshot 2.png
    Vincent720
        9
    Vincent720  
       2016-01-02 17:53:57 +08:00 via iPhone
    Hazel 可以试试
    nmgwddj
        10
    nmgwddj  
    OP
       2016-01-02 20:12:23 +08:00
    @regist 谢谢,我只想去掉前面的中文和空格。
    nmgwddj
        11
    nmgwddj  
    OP
       2016-01-02 20:15:04 +08:00
    @lukertty 谢谢, Google 上的方法都试过,无法达到我的需求。
    nmgwddj
        12
    nmgwddj  
    OP
       2016-01-02 21:35:42 +08:00
    谢谢各位,问题我已经自己成功解决,有需要同样修改的朋友,可以参考我的博客: http://www.mycode.net.cn/platform/linux-unix/1398.html
    Superoutman
        13
    Superoutman  
       2016-01-04 13:17:42 +08:00
    Hazel 可以,不过有个延迟
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5261 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 01:24 · PVG 09:24 · LAX 18:24 · JFK 21:24
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.