Skip to content

Commit

Permalink
fix: handle ecukes terminal mode where no background-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrieanKhisbe committed Oct 9, 2017
1 parent a7e5368 commit 5a52825
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions omni-scratch.el
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,10 @@
(face-remap-add-relative
'default
`((:slant italic
:background ,(if (eq 'dark (frame-parameter nil 'background-mode))
(omni-scratch--pale-light (face-attribute 'default :background) omni-scratch-pale-percent)
(omni-scratch--pale-dark (face-attribute 'default :background) omni-scratch-pale-percent)
))))
)
:background ,(pcase (frame-parameter nil 'background-mode)
(`dark (omni-scratch--pale-light (face-attribute 'default :background) omni-scratch-pale-percent))
(`light (omni-scratch--pale-dark (face-attribute 'default :background) omni-scratch-pale-percent))
(_ nil))))))

(defun omni-scratch--pale-dark (color percent)
"Give PERCENT darker and desature COLOR."
Expand Down

0 comments on commit 5a52825

Please sign in to comment.