From 12b0f14748c80001dd219f066cae80515d2baa4f Mon Sep 17 00:00:00 2001 From: Severin Kaderli Date: Tue, 2 Jul 2019 20:35:18 +0200 Subject: [PATCH 1/4] Fix crontab Signed-off-by: Severin Kaderli --- system/.config/cron/crontab | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/.config/cron/crontab b/system/.config/cron/crontab index b389929..df91665 100644 --- a/system/.config/cron/crontab +++ b/system/.config/cron/crontab @@ -11,10 +11,10 @@ # This file is loaded on boot by crontab. # Synchronize Google Drive every 15 minutes -0/15 * * * * $HOME/.local/bin/sync-drive 2>> $HOME/.local/log/cron.log +*/15 * * * * $HOME/.local/bin/sync-drive 2>> $HOME/.local/log/cron.log # Synchronize notes every 10 minutes -2/10 * * * * $HOME/.local/bin/sync-notes 2>> $HOME/.local/log/cron.log +*/10 * * * * $HOME/.local/bin/sync-notes 2>> $HOME/.local/log/cron.log # Synchronize tasks every 5 minutes -0/5 * * * * $HOME/.local/bin/sync-tasks 2>> $HOME/.local/log/cron.log +*/5 * * * * $HOME/.local/bin/sync-tasks 2>> $HOME/.local/log/cron.log From f602972a523e633fcae717c4477015f4852c42b5 Mon Sep 17 00:00:00 2001 From: Severin Kaderli Date: Tue, 9 Jul 2019 21:14:26 +0200 Subject: [PATCH 2/4] Remove notes and tasks scripts Signed-off-by: Severin Kaderli --- install | 27 --------------------------- system/.config/cron/crontab | 8 +------- system/.local/bin/sync-notes | 30 ------------------------------ system/.local/bin/sync-tasks | 33 --------------------------------- 4 files changed, 1 insertion(+), 97 deletions(-) delete mode 100755 system/.local/bin/sync-notes delete mode 100755 system/.local/bin/sync-tasks diff --git a/install b/install index 73925a5..9018ebe 100755 --- a/install +++ b/install @@ -245,33 +245,6 @@ do mkdir -p "${HOME}/${dir}" done -print_section "Setup notes directory" -if [ ! -d "${HOME}/notes" ]; then - git clone gl:notes "${HOME}/notes" - print_log "Created notes directory" -else - print_log "Notes directory already exists" -fi - -print_section "Setup tasks directory" -if [ ! -d "${HOME}/tasks" ]; then - git clone gl:tasks "${HOME}/tasks" - print_log "Created tasks directory" -else - OLD_DIR=$(pwd) - cd "${HOME}/tasks" || exit - - if git rev-parse --git-dir > /dev/null 2>&1; then - print_log "Tasks directory already exists" - else - cd "${OLD_DIR}" - rm -rf "${HOME:?}/tasks" - git clone gl:tasks "${HOME}/tasks" - print_log "Created tasks directory" - fi - - cd "${OLD_DIR}" || exit -fi ############################################################################### # Prepare work tools # diff --git a/system/.config/cron/crontab b/system/.config/cron/crontab index df91665..83e1525 100644 --- a/system/.config/cron/crontab +++ b/system/.config/cron/crontab @@ -11,10 +11,4 @@ # This file is loaded on boot by crontab. # Synchronize Google Drive every 15 minutes -*/15 * * * * $HOME/.local/bin/sync-drive 2>> $HOME/.local/log/cron.log - -# Synchronize notes every 10 minutes -*/10 * * * * $HOME/.local/bin/sync-notes 2>> $HOME/.local/log/cron.log - -# Synchronize tasks every 5 minutes -*/5 * * * * $HOME/.local/bin/sync-tasks 2>> $HOME/.local/log/cron.log +*/15 * * * * $HOME/.local/bin/sync-drive 2>> $HOME/.local/log/cron.log \ No newline at end of file diff --git a/system/.local/bin/sync-notes b/system/.local/bin/sync-notes deleted file mode 100755 index 7dda257..0000000 --- a/system/.local/bin/sync-notes +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -# -# SCRIPT NAME: -# sync-notes -# -# AUTHOR: -# Severin Kaderli -# -# DESCRIPTION: -# Sync notes in ~/Notes using git -# -# USAGE: -# ./sync-notes -. /home/severin/.local/bin/utils - -if [ ! -d "/home/severin/notes" ]; then - exit -fi - -print_time_log "sync-notes" "Synchronizing notes" - -if [ "${IS_WORK}" = "1" ]; then - export GIT_SSH_COMMAND="ssh -i /home/severin/.ssh/severin_id_rsa" -fi - -cd "/home/severin/notes" || exit -git pull -X theirs -git add --all -git commit -s -m "Update notes" -git push origin master diff --git a/system/.local/bin/sync-tasks b/system/.local/bin/sync-tasks deleted file mode 100755 index 3595b98..0000000 --- a/system/.local/bin/sync-tasks +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash -# -# SCRIPT NAME: -# sync-tasks -# -# AUTHOR: -# Severin Kaderli -# -# DESCRIPTION: -# Sync tasks in ~/tasks using git -# -# USAGE: -# ./sync-tasks -. /home/severin/.local/bin/utils - -if [ ! -d "/home/severin/tasks" ]; then - exit -fi - -print_time_log "sync-tasks" "Synchronizing tasks" - -export TASKDATA="/home/severin/tasks" -export TASKRC="/home/severin/.config/task/taskrc" - -if [ "${IS_WORK}" = "1" ]; then - export GIT_SSH_COMMAND="ssh -i /home/severin/.ssh/severin_id_rsa" -fi - -cd "/home/severin/tasks" || exit -git pull -X theirs -git add --all -git commit -s -m "Update tasks" -git push origin master From bc4275413a5fe048c43a3b084965766fb313811d Mon Sep 17 00:00:00 2001 From: Severin Kaderli Date: Tue, 9 Jul 2019 21:28:10 +0200 Subject: [PATCH 3/4] Remove todo count from polybar Signed-off-by: Severin Kaderli --- system/.config/polybar/config | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/system/.config/polybar/config b/system/.config/polybar/config index 3a95b4d..0c34e5a 100644 --- a/system/.config/polybar/config +++ b/system/.config/polybar/config @@ -43,7 +43,7 @@ module-margin = 2 modules-left = i3 modules-center = -modules-right = update gmail todo battery volume backlight vpn wlan ethernet date power +modules-right = update gmail battery volume backlight vpn wlan ethernet date power tray-position = none separator = | @@ -137,18 +137,6 @@ interval = 60 click-left = xdg-open https://mail.google.com -############################################################################### -# Todo # -############################################################################### -[module/todo] -type = custom/script -exec = task count due.before:tomorrow and status:pending or due: and status:pending - -format =