diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-10-24 16:35:58 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-10-24 16:35:58 -0200 |
commit | f9188428999bfc45658c8875eadf9a64f397bbd4 (patch) | |
tree | a6265245d3a0b3e7865827560648195d4c325f12 | |
parent | 0ddf8e790be472e9ed3eb945400048c2207ecd79 (diff) | |
download | timelog-f9188428999bfc45658c8875eadf9a64f397bbd4.tar.gz timelog-f9188428999bfc45658c8875eadf9a64f397bbd4.tar.bz2 |
Enhancing timelog_window_title()
-rwxr-xr-x | timelog | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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 |