From e73d320add6f4fd7963796e34fdba009719b4e51 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 9 Mar 2022 11:27:48 +0100 Subject: [PATCH 1/6] an2linux: Remove module I have not used an2linux in ages, time to remove. --- an2linux/.config/an2linux/config | 37 -------------------------------- an2linux/README.md | 12 ----------- 2 files changed, 49 deletions(-) delete mode 100644 an2linux/.config/an2linux/config delete mode 100644 an2linux/README.md diff --git a/an2linux/.config/an2linux/config b/an2linux/.config/an2linux/config deleted file mode 100644 index 4c0002a..0000000 --- a/an2linux/.config/an2linux/config +++ /dev/null @@ -1,37 +0,0 @@ -[tcp] -tcp_server = on -tcp_port = 46352 - -[bluetooth] -bluetooth_server = on - -# bluetooth_support_kitkat: enable bluetooth support for android 4.4 kitkat -# this setting is important for everyone using bluetooth -# you need to set this setting correctly otherwise it will not work -# if you are using android 4.4 kitkat this needs to be turned on -# because some cipher versions are not supported until after kitkat -# if you are using android 5.0+ you need to keep this setting off -bluetooth_support_kitkat = off - -[notification] -# notification_timeout: display notification for this many seconds -# set 0 to never expire -# this setting might be completely ignored by your notification server -notification_timeout = 5 - -# list_size_duplicates: number of latest notifications to keep -# integer 0-50, if a notification is in this list it will not be shown -# set to 0 to disable -list_size_duplicates = 0 - -# ignore_duplicates_list_for_titles: notification titles that ignore duplicates list -# comma-separated, case-sensitive -ignore_duplicates_list_for_titles = AN2Linux, title - -# keywords_to_ignore: do not show notifications that include these keywords in the notification titles -# comma-separated, case-sensitive. leading and trailing whitespace will be stripped. -keywords_to_ignore = Updating, Uploading - -# regexes_to_ignore: do not show notifications who's contents or title match the following regexes -regexes_to_ignore_in_title = -regexes_to_ignore_in_content = diff --git a/an2linux/README.md b/an2linux/README.md deleted file mode 100644 index 885ebb1..0000000 --- a/an2linux/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# an2linux - -[an2linux](https://github.com/rootkiwi/an2linuxserver) - mirror your android notifications on the linux desktop - -This module enables the bluetooth server portion of an2linuxserver, while disabling the wi-fi server. -Since these dotfiles are currently primarily running on a laptop, bluetooth is the easiest connection to make. -In order for bluetooth to work on archlinux, you will have to follow the set-up on the [archlinux wiki](https://wiki.archlinux.org/index.php/Bluetooth), as well as on the [`an2linux`](https://github.com/rootkiwi/an2linuxserver) github page. - -If the [services](/services) module is also enabled, `an2linux` will automatically start up on boot. -This is usually desirable, -but for initial pairing you will have to manually shut down the service and run the server manually with `an2linuxserver.py`. -The initial pairing needs interactive inputs and can not be done automatically -- once that is done, you can restart the service and everything should work perfectly. From 9a3b69386b30797e0d807386f1232dee2a425aac Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 10 Mar 2022 20:23:51 +0100 Subject: [PATCH 2/6] dunst: Add icon, Prepare for drop-in config option Added icons to be displayed on dunst notifications if there are any. Prepared dunst config for using the newly introduced (v1.8.0) drop-in configuration files. This allows spreading out dunst configuration over arbitrary files in the `dunstrc.d/` folder in the usual configuration folder. Will be perfect for less intrusive `styler` changes. --- dunst/.config/dunst/dunstrc | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/dunst/.config/dunst/dunstrc b/dunst/.config/dunst/dunstrc index 447448f..fac271d 100644 --- a/dunst/.config/dunst/dunstrc +++ b/dunst/.config/dunst/dunstrc @@ -160,10 +160,10 @@ ### Icons ### # Align icons left/right/off - icon_position = off + icon_position = left # Scale larger icons down to this size, set to 0 to disable - max_icon_size = 32 + max_icon_size = 128 # Paths to default icons. icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ @@ -415,22 +415,3 @@ # set_stack_tag = "volume" # # 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 From 9cb3ab9d7a42f3969995064567bdcaae66204200 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 10 Mar 2022 21:03:11 +0100 Subject: [PATCH 3/6] zathura: Update for drop-in file configuration. Zathura now makes use of include directive to be styled by styler. This means no more constant uncommitted changes to its configuration directory but only the single include directive in its configuration file. --- zathura/.config/zathura/zathurarc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zathura/.config/zathura/zathurarc b/zathura/.config/zathura/zathurarc index a7183e5..45fc1c7 100644 --- a/zathura/.config/zathura/zathurarc +++ b/zathura/.config/zathura/zathurarc @@ -1,8 +1,8 @@ - - set recolor "true" set selection-clipboard "clipboard" map r reload map R rotate map p print + +include colorscheme From 2983d705a3acd081ef3d6b05741c0381306ec7d0 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 10 Mar 2022 21:52:24 +0100 Subject: [PATCH 4/6] task: Move theme settings to additional file Moved all theme options into extra file that is included by main configuration file. This file is added to the repo but ignored, so any changes to it will not be tracked by git. That allows me to change colorscheme at any point without creating an 'uncommitted change' for something I really don't want to commit. --- taskwarrior/.config/task/colorscheme | 19 +++++++++++++++++++ taskwarrior/.config/task/taskrc | 18 +++--------------- 2 files changed, 22 insertions(+), 15 deletions(-) create mode 100644 taskwarrior/.config/task/colorscheme diff --git a/taskwarrior/.config/task/colorscheme b/taskwarrior/.config/task/colorscheme new file mode 100644 index 0000000..634e976 --- /dev/null +++ b/taskwarrior/.config/task/colorscheme @@ -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 diff --git a/taskwarrior/.config/task/taskrc b/taskwarrior/.config/task/taskrc index 0b5148e..1077e86 100644 --- a/taskwarrior/.config/task/taskrc +++ b/taskwarrior/.config/task/taskrc @@ -62,21 +62,9 @@ urgency.user.tag.next.coefficient=5.0 # Holidays for calendar 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 -#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 + +# Themes are in additional file +include colorscheme # Taskserver sync settings include task-sync.rc From 721a0662a4d87d1b1a6e6a87180c0b4d9eea9010 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 10 Mar 2022 21:54:14 +0100 Subject: [PATCH 5/6] task: Add timewarrior hook Added hook starting and stopping timewarrior tracking whenever starting, stopping or completing a task in taskwarrior. Really nice script, robust as well for starting multiple tasks and start/stopping intermittently. --- .../share/task/hooks/on-modify.timewarrior | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100755 taskwarrior/.local/share/task/hooks/on-modify.timewarrior diff --git a/taskwarrior/.local/share/task/hooks/on-modify.timewarrior b/taskwarrior/.local/share/task/hooks/on-modify.timewarrior new file mode 100755 index 0000000..46d82a9 --- /dev/null +++ b/taskwarrior/.local/share/task/hooks/on-modify.timewarrior @@ -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]) From 50fa8b2427662d0e0e639051c617ed55d8d91165 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 10 Mar 2022 22:08:00 +0100 Subject: [PATCH 6/6] bootstrap: Fix stow linking new files Forgot to update stow ignore list to include new package tsv file and associated update script. --- bootstrap/.stow-local-ignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap/.stow-local-ignore b/bootstrap/.stow-local-ignore index c2591e7..63d8fcb 100644 --- a/bootstrap/.stow-local-ignore +++ b/bootstrap/.stow-local-ignore @@ -1,6 +1,7 @@ # TODO find a more generic way to express 'ignore any non-folder files' ^/install_packages.sh -^/packages.*.txt +^/update_package_list.sh +^/packages.*.tsv ^/README.md ^/system-packages