Compare commits

...

3 Commits

Author SHA1 Message Date
ae48d799af test: try taskwarrior hooks to track slots 2026-02-17 19:55:32 +01:00
859512599d fix: make 'colmena' available 2026-02-17 19:55:32 +01:00
8d10b38d0d feat: set up 'stylix' 2026-02-17 19:55:31 +01:00
9 changed files with 131 additions and 5 deletions

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env python3
import sys
import json
SLOTS_FILE = "/home/h/.local/share/task/add_slots"
def get_slots():
try:
with open(SLOTS_FILE, "r") as f:
return int(f.read().strip())
except:
return 0
slots = get_slots()
if slots <= 0:
print(f"Cannot add task: No slots available (0/{slots}).")
print("Delete or complete a task first to earn an add slot.")
sys.exit(1)
with open(SLOTS_FILE, "w") as f:
f.write(str(slots - 1))
print(f"Task added. Slots remaining: {slots - 1}")
for line in sys.stdin:
task = json.loads(line)
print(json.dumps(task))
sys.exit(0)

View File

@@ -0,0 +1,34 @@
#!/usr/bin/env python3
import sys
import json
SLOTS_FILE = "/home/h/.local/share/task/add_slots"
def get_slots():
try:
with open(SLOTS_FILE, "r") as f:
return int(f.read().strip())
except:
return 0
data = sys.stdin.read().strip().split("\n")
if len(data) < 2:
for line in data:
if line:
print(line)
sys.exit(0)
old_task = json.loads(data[0])
new_task = json.loads(data[1])
was_pending = old_task.get("status") == "pending"
is_not_pending = new_task.get("status") in ("completed", "deleted")
if was_pending and is_not_pending:
slots = get_slots() + 1
with open(SLOTS_FILE, "w") as f:
f.write(str(slots))
print(f"Slot earned! Total slots: {slots}")
print(json.dumps(new_task))
sys.exit(0)

View File

@@ -61,6 +61,7 @@
nix-on-droid, nix-on-droid,
nixgl, nixgl,
git-hooks, git-hooks,
colmena,
... ...
}@inputs: }@inputs:
let let
@@ -134,6 +135,7 @@
}; };
}; };
apps.${system}.colmena = inputs.colmena.apps.${system}.default;
colmenaHive = import ./deploy/colmena.nix { colmenaHive = import ./deploy/colmena.nix {
inherit inherit
self self

View File

@@ -1,10 +1,5 @@
{ lib, ... }:
{ {
services.mako = { services.mako = {
enable = true; enable = true;
settings = {
border-color = lib.mkForce "#bbbbbb";
};
}; };
} }

View File

@@ -32,6 +32,10 @@
profileNames = [ "default" ]; profileNames = [ "default" ];
colorTheme.enable = true; colorTheme.enable = true;
}; };
librewolf = {
profileNames = [ "default" ];
colorTheme.enable = true;
};
gnome.enable = false; gnome.enable = false;
gtk.enable = false; gtk.enable = false;
kitty = { kitty = {

View File

@@ -39,6 +39,14 @@ in
".local/share/task/hooks/on-exit.sync.py" = { ".local/share/task/hooks/on-exit.sync.py" = {
source = dotsPath + "/.local/share/task/hooks/on-exit.sync.py"; source = dotsPath + "/.local/share/task/hooks/on-exit.sync.py";
}; };
".local/share/task/hooks/on-add.limit.py" = {
source = dotsPath + "/.local/share/task/hooks/on-add.limit.py";
executable = true;
};
".local/share/task/hooks/on-modify.limit.py" = {
source = dotsPath + "/.local/share/task/hooks/on-modify.limit.py";
executable = true;
};
".local/share/task/scripts/sync-and-notify.sh" = { ".local/share/task/scripts/sync-and-notify.sh" = {
source = dotsPath + "/.local/share/task/scripts/sync-and-notify.sh"; source = dotsPath + "/.local/share/task/scripts/sync-and-notify.sh";
executable = true; executable = true;

View File

@@ -11,6 +11,7 @@ in
{ {
imports = [ imports = [
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
../stylix.nix
]; ];
system.stateVersion = "25.05"; system.stateVersion = "25.05";

35
modules/stylix.nix Normal file
View File

@@ -0,0 +1,35 @@
{
config,
inputs,
pkgs,
...
}:
{
imports = [ inputs.stylix.nixosModules.stylix ];
stylix = {
enable = true;
polarity = "dark";
base16Scheme = ../stylix/zenwritten-dark.yaml;
image = config.lib.stylix.pixel "base00";
fonts = {
monospace = {
package = pkgs.iosevka-bin.override { variant = "SS08"; };
name = "Iosevka Term SS08";
};
};
autoEnable = true;
};
home-manager.sharedModules = [
{
stylix.targets = {
firefox.profileNames = [ "default" ];
librewolf.profileNames = [ "default" ];
kitty.enable = false;
waybar.enable = false;
};
}
];
}

View File

@@ -0,0 +1,18 @@
scheme: "zenwritten-dark"
author: "derived from zenbones.nvim zenwritten_dark"
base00: "191919" # background
base01: "303030" # inactive tab bg
base02: "404040" # selection bg
base03: "8E8E8E" # bright white (comments)
base04: "3D3839" # bright black
base05: "BBBBBB" # foreground
base06: "C9C9C9" # cursor
base07: "EEEEEE" # light foreground
base08: "DE6E7C" # red
base09: "B77E64" # yellow (orange)
base0A: "D68C67" # bright yellow
base0B: "819B69" # green
base0C: "66A5AD" # cyan
base0D: "6099C0" # blue
base0E: "B279A7" # magenta
base0F: "65435E" # active tab bg (brown)