mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-26 11:14:08 +00:00
feat(alacritty): update theme automagically
This commit is contained in:
@@ -34,6 +34,18 @@ have()
|
||||
bkt -- which "$1" >&/dev/null
|
||||
}
|
||||
|
||||
# function to run dark-notify and change alacritty theme
|
||||
# it uses flock to prevent running multiple instances
|
||||
# install flock with `brew install flock` on macOS
|
||||
function darknotify-alacritty {
|
||||
have flock && [[ -f /tmp/dark-notify-alacritty.lock ]] && return
|
||||
have dark-notify && {
|
||||
# true is used to prevent the command show it was backgrounded
|
||||
true & flock /tmp/dark-notify-alacritty.lock dark-notify -c "$HOME/.dotfiles/local/bin/x-change-alacritty-theme" &
|
||||
}
|
||||
}
|
||||
darknotify-alacritty
|
||||
|
||||
brew_installed()
|
||||
{
|
||||
bkt -- brew list
|
||||
|
||||
Reference in New Issue
Block a user