aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-10-24 16:35:58 -0200
committerSilvio Rhatto <rhatto@riseup.net>2014-10-24 16:35:58 -0200
commitf9188428999bfc45658c8875eadf9a64f397bbd4 (patch)
treea6265245d3a0b3e7865827560648195d4c325f12
parent0ddf8e790be472e9ed3eb945400048c2207ecd79 (diff)
downloadtimelog-f9188428999bfc45658c8875eadf9a64f397bbd4.tar.gz
timelog-f9188428999bfc45658c8875eadf9a64f397bbd4.tar.bz2
Enhancing timelog_window_title()
-rwxr-xr-xtimelog12
1 files changed, 8 insertions, 4 deletions
diff --git a/timelog b/timelog
index 4dbbbc6..f3f753d 100755
--- a/timelog
+++ b/timelog
@@ -21,9 +21,9 @@ EDITOR=${EDITOR:=vi}
# http://stackoverflow.com/questions/899609/gnu-screen-run-script-that-sends-commands-to-the-screen-session-it-is-being-run
function timelog_window_title {
if [ -n "$STY" ]; then
- screen -p $WINDOW -X title $1
+ screen -p $WINDOW -X title "$*"
else
- xtitle $1
+ xtitle "$*"
fi
}
@@ -79,21 +79,25 @@ function timelog_menu {
exit 1
fi
else
- echo "Usage: $BASENAME <group> [edit]"
+ echo "Usage: $BASENAME [group] [edit]"
exit 1
fi
}
-# Run
+# Run worklog for a given project
function timelog_run {
+ # Set window title
timelog_window_title "log: $GROUP"
+ # Set base folder
if [ -d "$CODE/$GROUP" ] && [ ! -d "$BASE/$GROUP" ]; then
BASE="$CODE"
fi
+ # Ensure folder exist
mkdir -p $BASE/$GROUP/worklog
+ # Run
if [ ! -e "$BASE/$GROUP/worklog/projects" ]; then
timelog_setup
elif [ "$ACTION" == "edit" ]; then