Compare commits
5 commits
27cbf30da0
...
50fa8b2427
Author | SHA1 | Date | |
---|---|---|---|
50fa8b2427 | |||
721a0662a4 | |||
2983d705a3 | |||
9cb3ab9d7a | |||
9a3b69386b |
6 changed files with 130 additions and 39 deletions
|
@ -1,6 +1,7 @@
|
||||||
# TODO find a more generic way to express 'ignore any non-folder files'
|
# TODO find a more generic way to express 'ignore any non-folder files'
|
||||||
|
|
||||||
^/install_packages.sh
|
^/install_packages.sh
|
||||||
^/packages.*.txt
|
^/update_package_list.sh
|
||||||
|
^/packages.*.tsv
|
||||||
^/README.md
|
^/README.md
|
||||||
^/system-packages
|
^/system-packages
|
||||||
|
|
|
@ -160,10 +160,10 @@
|
||||||
### Icons ###
|
### Icons ###
|
||||||
|
|
||||||
# Align icons left/right/off
|
# Align icons left/right/off
|
||||||
icon_position = off
|
icon_position = left
|
||||||
|
|
||||||
# Scale larger icons down to this size, set to 0 to disable
|
# Scale larger icons down to this size, set to 0 to disable
|
||||||
max_icon_size = 32
|
max_icon_size = 128
|
||||||
|
|
||||||
# Paths to default icons.
|
# Paths to default icons.
|
||||||
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
|
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
|
||||||
|
@ -415,22 +415,3 @@
|
||||||
# set_stack_tag = "volume"
|
# set_stack_tag = "volume"
|
||||||
#
|
#
|
||||||
# vim: ft=cfg
|
# vim: ft=cfg
|
||||||
# Base16 bespin - dunst color config
|
|
||||||
frame_color = "#8a8986"
|
|
||||||
separator_color = "#8a8986"
|
|
||||||
|
|
||||||
[base16_low]
|
|
||||||
msg_urgency = low
|
|
||||||
background = "#36312e"
|
|
||||||
foreground = "#666666"
|
|
||||||
|
|
||||||
[base16_normal]
|
|
||||||
msg_urgency = normal
|
|
||||||
background = "#5e5d5c"
|
|
||||||
foreground = "#8a8986"
|
|
||||||
|
|
||||||
[base16_critical]
|
|
||||||
msg_urgency = critical
|
|
||||||
background = "#cf6a4c"
|
|
||||||
foreground = "#9d9b97"
|
|
||||||
# Base16End bespin - dunst color config
|
|
||||||
|
|
19
taskwarrior/.config/task/colorscheme
Normal file
19
taskwarrior/.config/task/colorscheme
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Themes are in this file so it can be ignored by
|
||||||
|
# git and theme changes don't show up as committable
|
||||||
|
# edits.
|
||||||
|
|
||||||
|
# Color theme (uncomment one to use)
|
||||||
|
#include /usr/share/doc/task/rc/light-16.theme
|
||||||
|
#include /usr/share/doc/task/rc/light-256.theme
|
||||||
|
#include /usr/share/doc/task/rc/dark-16.theme
|
||||||
|
#include /usr/share/doc/task/rc/dark-256.theme
|
||||||
|
#include /usr/share/doc/task/rc/dark-red-256.theme
|
||||||
|
#include /usr/share/doc/task/rc/dark-green-256.theme
|
||||||
|
#include /usr/share/doc/task/rc/dark-blue-256.theme
|
||||||
|
#include /usr/share/doc/task/rc/dark-violets-256.theme
|
||||||
|
#include /usr/share/doc/task/rc/dark-yellow-green.theme
|
||||||
|
#include /usr/share/doc/task/rc/dark-gray-256.theme
|
||||||
|
#include /usr/share/doc/task/rc/dark-gray-blue-256.theme
|
||||||
|
include /usr/share/doc/task/rc/solarized-dark-256.theme
|
||||||
|
#include /usr/share/doc/task/rc/solarized-light-256.theme
|
||||||
|
#include /usr/share/doc/task/rc/no-color.theme
|
|
@ -62,21 +62,9 @@ urgency.user.tag.next.coefficient=5.0
|
||||||
|
|
||||||
# Holidays for calendar
|
# Holidays for calendar
|
||||||
include /usr/share/doc/task/rc/holidays.de-DE.rc
|
include /usr/share/doc/task/rc/holidays.de-DE.rc
|
||||||
# Color theme (uncomment one to use)
|
|
||||||
include /usr/share/doc/task/rc/light-16.theme
|
# Themes are in additional file
|
||||||
#include /usr/share/doc/task/rc/light-256.theme
|
include colorscheme
|
||||||
#include /usr/share/doc/task/rc/dark-16.theme
|
|
||||||
#include /usr/share/doc/task/rc/dark-256.theme
|
|
||||||
#include /usr/share/doc/task/rc/dark-red-256.theme
|
|
||||||
#include /usr/share/doc/task/rc/dark-green-256.theme
|
|
||||||
#include /usr/share/doc/task/rc/dark-blue-256.theme
|
|
||||||
#include /usr/share/doc/task/rc/dark-violets-256.theme
|
|
||||||
#include /usr/share/doc/task/rc/dark-yellow-green.theme
|
|
||||||
#include /usr/share/doc/task/rc/dark-gray-256.theme
|
|
||||||
#include /usr/share/doc/task/rc/dark-gray-blue-256.theme
|
|
||||||
#include /usr/share/doc/task/rc/solarized-dark-256.theme
|
|
||||||
#include /usr/share/doc/task/rc/solarized-light-256.theme
|
|
||||||
#include /usr/share/doc/task/rc/no-color.theme
|
|
||||||
|
|
||||||
# Taskserver sync settings
|
# Taskserver sync settings
|
||||||
include task-sync.rc
|
include task-sync.rc
|
||||||
|
|
102
taskwarrior/.local/share/task/hooks/on-modify.timewarrior
Executable file
102
taskwarrior/.local/share/task/hooks/on-modify.timewarrior
Executable file
|
@ -0,0 +1,102 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Copyright 2016 - 2021, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included
|
||||||
|
# in all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
# SOFTWARE.
|
||||||
|
#
|
||||||
|
# https://www.opensource.org/licenses/mit-license.php
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
|
import json
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# Hook should extract all of the following for use as Timewarrior tags:
|
||||||
|
# UUID
|
||||||
|
# Project
|
||||||
|
# Tags
|
||||||
|
# Description
|
||||||
|
# UDAs
|
||||||
|
|
||||||
|
try:
|
||||||
|
input_stream = sys.stdin.buffer
|
||||||
|
except AttributeError:
|
||||||
|
input_stream = sys.stdin
|
||||||
|
|
||||||
|
# Make no changes to the task, simply observe.
|
||||||
|
old = json.loads(input_stream.readline().decode("utf-8", errors="replace"))
|
||||||
|
new = json.loads(input_stream.readline().decode("utf-8", errors="replace"))
|
||||||
|
print(json.dumps(new))
|
||||||
|
|
||||||
|
|
||||||
|
def extract_tags_from(json_obj):
|
||||||
|
# Extract attributes for use as tags.
|
||||||
|
tags = [json_obj['description']]
|
||||||
|
|
||||||
|
if 'project' in json_obj:
|
||||||
|
tags.append(json_obj['project'])
|
||||||
|
|
||||||
|
if 'tags' in json_obj:
|
||||||
|
tags.extend(json_obj['tags'])
|
||||||
|
|
||||||
|
return tags
|
||||||
|
|
||||||
|
|
||||||
|
def extract_annotation_from(json_obj):
|
||||||
|
|
||||||
|
if 'annotations' not in json_obj:
|
||||||
|
return '\'\''
|
||||||
|
|
||||||
|
return json_obj['annotations'][0]['description']
|
||||||
|
|
||||||
|
|
||||||
|
start_or_stop = ''
|
||||||
|
|
||||||
|
# Started task.
|
||||||
|
if 'start' in new and 'start' not in old:
|
||||||
|
start_or_stop = 'start'
|
||||||
|
|
||||||
|
# Stopped task.
|
||||||
|
elif ('start' not in new or 'end' in new) and 'start' in old:
|
||||||
|
start_or_stop = 'stop'
|
||||||
|
|
||||||
|
if start_or_stop:
|
||||||
|
tags = extract_tags_from(new)
|
||||||
|
|
||||||
|
subprocess.call(['timew', start_or_stop] + tags + [':yes'])
|
||||||
|
|
||||||
|
# Modifications to task other than start/stop
|
||||||
|
elif 'start' in new and 'start' in old:
|
||||||
|
old_tags = extract_tags_from(old)
|
||||||
|
new_tags = extract_tags_from(new)
|
||||||
|
|
||||||
|
if old_tags != new_tags:
|
||||||
|
subprocess.call(['timew', 'untag', '@1'] + old_tags + [':yes'])
|
||||||
|
subprocess.call(['timew', 'tag', '@1'] + new_tags + [':yes'])
|
||||||
|
|
||||||
|
old_annotation = extract_annotation_from(old)
|
||||||
|
new_annotation = extract_annotation_from(new)
|
||||||
|
|
||||||
|
if old_annotation != new_annotation:
|
||||||
|
subprocess.call(['timew', 'annotate', '@1', new_annotation])
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
set recolor "true"
|
set recolor "true"
|
||||||
set selection-clipboard "clipboard"
|
set selection-clipboard "clipboard"
|
||||||
|
|
||||||
map r reload
|
map r reload
|
||||||
map R rotate
|
map R rotate
|
||||||
map p print
|
map p print
|
||||||
|
|
||||||
|
include colorscheme
|
||||||
|
|
Loading…
Reference in a new issue