From f62cfd95764c7cc848238d457b04a0152c7da3b2 Mon Sep 17 00:00:00 2001 From: Alexander Hosking Date: Tue, 5 Mar 2019 00:30:27 -0500 Subject: [PATCH] i3 update with status and new shortcuts --- .i3/i3status.conf | 10 +++++----- install.sh | 1 + system/.notification_state | 14 ++++++++++++++ 3 files changed, 20 insertions(+), 5 deletions(-) create mode 100755 system/.notification_state diff --git a/.i3/i3status.conf b/.i3/i3status.conf index 560e815..450cdf7 100755 --- a/.i3/i3status.conf +++ b/.i3/i3status.conf @@ -91,8 +91,8 @@ volume PCH { mixer = "Master" } -#external_script_notification { -# script_path = "~/bin/notification_state" -# strip_output = True -# cache_timeout = 30 -#} +external_script_notification { + script_path = "~/bin/notification_state" + strip_output = True + cache_timeout = 30 +} diff --git a/install.sh b/install.sh index 145deaf..df9bb0c 100755 --- a/install.sh +++ b/install.sh @@ -39,6 +39,7 @@ mkdir ~/bin ln -sfv "$DOTFILES_DIR/system/.bruise" ~/bin/bruise ln -sfv "$DOTFILES_DIR/.screenlayout" ~ ln -sfv "$DOTFILES_DIR/system/.keybrightness" ~/bin/keybrightness +ln -sfv "$DOTFILES_DIR/system/.notification_state" ~/bin/notification_state ln -sfv "$DOTFILES_DIR/git/.gitconfig" ~ ln -sfv "$DOTFILES_DIR/system/.vimrc" ~ ln -sfv "$DOTFILES_DIR/system/.dir_colors" ~ diff --git a/system/.notification_state b/system/.notification_state new file mode 100755 index 0000000..0fb1339 --- /dev/null +++ b/system/.notification_state @@ -0,0 +1,14 @@ +#!/bin/sh + +pgrep dunst >/dev/null +if [ $? -eq 0 ]; then + echo Notifications On + if [ ! -z $1 ]; then + ps -ef|grep -i dunst|grep -v grep|awk '{print $2}'|xargs kill -9 + fi +else + echo Quiet Mode + if [ ! -z $1 ]; then + dunst -config ~/.config/dunst & + fi +fi