i3 update with status and new shortcuts

This commit is contained in:
Alexander Hosking 2019-03-05 00:30:27 -05:00
parent abe7ebebc4
commit f62cfd9576
3 changed files with 20 additions and 5 deletions

View File

@ -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
}

View File

@ -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" ~

14
system/.notification_state Executable file
View File

@ -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