rowlnotify 명령줄 유틸리티와 함께 ​​사용할 표시 스타일 지정

rowlnotify 명령줄 유틸리티와 함께 ​​사용할 표시 스타일 지정

growlnotify명령줄 유틸리티 에 사용되는 표시 스타일을 변경할 수 있는 방법이 있습니까 ? 기본 값은 변경하지 않고 해당 명령 인스턴스에 사용되는 값만 변경하고 싶습니다.

답변1

man growlnotify옵션을 허용하지 않으며 growlnotify --help아무 것도 언급하지 않습니다. 발급 소프트웨어가 스타일을 제어하지 않기 때문에 이는 의미가 있습니다.당신은-- 시스템 환경설정을 통해!

그런데 growlnotify거기 입장이알림 유형이 하나만 있습니다.Command-Line Growl Notification(예: 우선순위당 하나의 알림 유형이 아님) 그러므로나는 그것이 가능하다고 생각하지 않는다.


그러나 Growl API를 사용하여 일부 매개변수에 따라 다양한 유형의 알림을 발행하는 AppleScript 응용 프로그램/스크립트를 생성할 수 있습니다.AppleScript를 통해 액세스하는 방법에 대한 Growl 문서.

AppleScript Editor의 샘플 스크립트는 다음과 같습니다.

on run argv
    tell application "GrowlHelperApp"
        set the allNotificationsList to ¬
            {"1", "2"}
        set the enabledNotificationsList to ¬
            {"1", "2"}
        register as application ¬
            "My Growl Notification App" all notifications allNotificationsList ¬
            default notifications enabledNotificationsList ¬
            icon of application "Script Editor"

        notify with name ¬
            (item 1 of argv) title ¬
            (item 2 of argv) description ¬
            (item 3 of argv) application name "My Growl Notification App"
    end tell
end run

"1"과 "2"는 지원되는 알림 유형의 이름입니다. 이 스크립트를 다음과 같이 실행하세요.

osascript growlstyle.scpt 2 Hello\ World This\ is\ the\ text

매개변수는 순서대로 알림 유형 이름, 제목, 설명입니다.

대체 텍스트

한 번 실행한 후 시스템 환경설정에서 알림 유형에 대한 표시 설정을 구성할 수 있습니다.

대체 텍스트

관련 정보