Skip to content

Instantly share code, notes, and snippets.

@rocknrollMarc
Forked from doitian/.guard.rb
Last active August 29, 2015 14:13
Show Gist options
  • Save rocknrollMarc/3aa34d0f5c67d5409fd4 to your computer and use it in GitHub Desktop.
Save rocknrollMarc/3aa34d0f5c67d5409fd4 to your computer and use it in GitHub Desktop.

Revisions

  1. @doitian doitian revised this gist Jan 30, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .guard.rb
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@
    ::Guard::Notifier::NOTIFIERS.each do |group|
    group.map { |n| n.first }.find { |notifier|
    ::Guard::Notifier.add_notification(notifier,
    notifiers_options[notifier],
    notifiers_options[notifier] || {},
    true)
    }
    end
  2. @doitian doitian revised this gist Jan 30, 2013. 1 changed file with 8 additions and 9 deletions.
    17 changes: 8 additions & 9 deletions .guard.rb
    Original file line number Diff line number Diff line change
    @@ -1,27 +1,26 @@
    require 'guard/notifier'

    if ::Guard::Notifier::Emacs.available?(true)
    notification :emacs, {
    notifiers_options = {
    :emacs => {
    :fontcolor => "#acbc90",
    :default => "#1e2320",
    :success => "#013009",
    :failed => "#310602",
    :pending => "#534626"
    }
    end

    if ::Guard::Notifier::Tmux.available?(true)
    notification :tmux, {
    },
    :tmux => {
    :success => 'colour64',
    :failed => 'colour124',
    :pending => 'colour136',
    :default => 'colour239',
    :display_message => false,
    }
    end
    }

    ::Guard::Notifier::NOTIFIERS.each do |group|
    group.map { |n| n.first }.find { |notifier|
    ::Guard::Notifier.add_notification(notifier, {}, true) unless %w(emacs tmux).include?(notifier.to_s)
    ::Guard::Notifier.add_notification(notifier,
    notifiers_options[notifier],
    true)
    }
    end
  3. @doitian doitian created this gist Jan 30, 2013.
    27 changes: 27 additions & 0 deletions .guard.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    require 'guard/notifier'

    if ::Guard::Notifier::Emacs.available?(true)
    notification :emacs, {
    :fontcolor => "#acbc90",
    :default => "#1e2320",
    :success => "#013009",
    :failed => "#310602",
    :pending => "#534626"
    }
    end

    if ::Guard::Notifier::Tmux.available?(true)
    notification :tmux, {
    :success => 'colour64',
    :failed => 'colour124',
    :pending => 'colour136',
    :default => 'colour239',
    :display_message => false,
    }
    end

    ::Guard::Notifier::NOTIFIERS.each do |group|
    group.map { |n| n.first }.find { |notifier|
    ::Guard::Notifier.add_notification(notifier, {}, true) unless %w(emacs tmux).include?(notifier.to_s)
    }
    end
    6 changes: 6 additions & 0 deletions guardreset
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    #!/bin/bash

    # resetore the original colors

    emacsclient --eval '(set-face-attribute '\''mode-line nil :background "#1e2320" :foreground "#acbc90")'
    tmux set status-left-bg colour239