From e8b9f41910501009cecdd7fd13de77c73ddf9fc4 Mon Sep 17 00:00:00 2001 From: neodarz Date: Wed, 13 Sep 2017 00:19:46 +0200 Subject: Add some alias with scripts --- scripts/.scripts/notify | 1 + scripts/.scripts/weechat_notify.sh | 12 ++++++++++++ services/twmnd.service | 7 +++++-- twmn/.config/twmn/twmn.conf | 2 +- zsh/.zsh/aliases.zsh | 3 +++ 5 files changed, 22 insertions(+), 3 deletions(-) create mode 100755 scripts/.scripts/notify create mode 100755 scripts/.scripts/weechat_notify.sh diff --git a/scripts/.scripts/notify b/scripts/.scripts/notify new file mode 100755 index 0000000..6445914 --- /dev/null +++ b/scripts/.scripts/notify @@ -0,0 +1 @@ +$@ ; twmnc -t "$1" -c "Job end !" diff --git a/scripts/.scripts/weechat_notify.sh b/scripts/.scripts/weechat_notify.sh new file mode 100755 index 0000000..e2b28af --- /dev/null +++ b/scripts/.scripts/weechat_notify.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +if [[ $1 == "start" ]]; then + python2 /home/neodarz/Code/weechat_notify/pyrnotify.py 4323 & + ssh -fNT -R 4323:localhost:4323 neodarz@neodarz.net -p 19977 +elif [[ $1 == "stop" ]]; then + sudo kill -9 $(ps aux | grep pyrnotify.py | awk '{print $2}') + sudo kill -9 $(ps aux | grep " ssh -fNT -R 4323:localhost:4323 neodarz@neodarz.net -p 19977" | awk '{print $2}') +fi + + + diff --git a/services/twmnd.service b/services/twmnd.service index 69e6fa1..355d8ec 100644 --- a/services/twmnd.service +++ b/services/twmnd.service @@ -1,8 +1,11 @@ [Unit] -Description=twmnd -After=network.target +Description=twmn server +After=graphical.target [Service] +Type=simple +StandardOutput=null +Restart=on-failure ExecStart=/usr/bin/twmnd [Install] diff --git a/twmn/.config/twmn/twmn.conf b/twmn/.config/twmn/twmn.conf index 07cee78..1d775d1 100644 --- a/twmn/.config/twmn/twmn.conf +++ b/twmn/.config/twmn/twmn.conf @@ -19,7 +19,7 @@ screen= [icons] critical_icon= -info_icon="!" +info_icon= warning_icon= [main] diff --git a/zsh/.zsh/aliases.zsh b/zsh/.zsh/aliases.zsh index 1f0a882..c165cc4 100755 --- a/zsh/.zsh/aliases.zsh +++ b/zsh/.zsh/aliases.zsh @@ -87,6 +87,9 @@ alias record="ffmpeg -f x11grab -s 1920x1080 -an -r 16 -loglevel quiet -i :0.0 - alias nullify="~/.scripts/nullify" alias ff="nullify firefox-developer" alias lo="nullify libreoffice" +alias notify="~/.scripts/notify" +alias weenotistart="~/.scripts/weechat_notify.sh start" +alias weenotistop="~/.scripts/weechat_notify.sh stop" alias fixit='sudo rm -f /var/lib/pacman/db.lck' #alias mirrors='sudo pacman-mirrors -g' -- cgit v1.2.1