From 2e144b6f0be18596a51028302b29c4837ab56590 Mon Sep 17 00:00:00 2001 From: NeodarZ Date: Fri, 7 Apr 2017 20:51:56 +0200 Subject: Add scripts for task management and a better watch command --- scripts/.scripts/task | 28 ++++++++++++++++++++++++++++ scripts/.scripts/watch | 12 ++++++++++++ 2 files changed, 40 insertions(+) create mode 100755 scripts/.scripts/task create mode 100755 scripts/.scripts/watch (limited to 'scripts') diff --git a/scripts/.scripts/task b/scripts/.scripts/task new file mode 100755 index 0000000..f15e4a6 --- /dev/null +++ b/scripts/.scripts/task @@ -0,0 +1,28 @@ +#!/bin/sh +SESSION=task + +optios $@ + +tmux kill-session -t $SESSION +tmux -2 new-session -d -s $SESSION +tmux send-keys "watch task calendar" C-m +tmux split-window -v +tmux resize-pan -D 10 +tmux resize-pan -U 10 +tmux send-keys "watch task $@" C-m +tmux split-window -v +tmux resize-pan -D 20 +tmux resize-pan -U 5 +l1="┳━┓┓ ┃┳━┓┏┏┓┳━┓┳ ┳━┓ ┏━┓┳━┓ ┓━┓┏━┓┏┏┓┳━┓ ┏━┓┏━┓┏┏┓┏┏┓┳━┓┏┓┓┳━┓┓━┓" +l2="┣━ ┏╋┛┃━┫┃┃┃ ┃━┛┃ ┣━ ┃ ┃┣━ ┗━┓┃ ┃┃┃┃ ┣━ ┃ ┃ ┃┃┃┃ ┃┃┃ ┃━┫┃┃┃┃ ┃┗━┓" +l3="┻━┛┇ ┗┛ ┇┛ ┇┇ ┇━┛┻━┛ ┛━┛┇ ━━┛┛━┛┛ ┇┻━┛ ┗━┛┛━┛┛ ┇┛ ┇┛ ┇┇┗┛┇━┛━━┛" +tmux send-keys "clear;echo -e '$l1\n$l2\n$l3\n\ntmux send-keys -t task:0.1 C-c \`\` C-m\nMore info about task on the next page !'" C-m +tmux split-window -v +tmux resize-pan -D 5 +tmux new-window +tmux select-window -t 1 +tmux send-keys "task help | less" C-m +tmux select-window -t 0 +tmux rename-window -t 0 "task" +tmux rename-window -t 1 "help" +tmux -2 attach-session -t $SESSION diff --git a/scripts/.scripts/watch b/scripts/.scripts/watch new file mode 100755 index 0000000..b40c0af --- /dev/null +++ b/scripts/.scripts/watch @@ -0,0 +1,12 @@ +#!/bin/bash +command=$@ + +clear + +while true +do + eval "$command" + sleep 1 + echo -n -e "$clearline" + clear +done -- cgit v1.2.1