Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd807b550f | ||
|
|
a74e75d9ab |
No files matched your search
Generated
+22
@@ -56,6 +56,27 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ct": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1793028894,
|
||||||
|
"narHash": "sha256-V0LaVoOrYJIaXO57+0U/i+X8lmLpVNHMuyzT/Uv5YuE=",
|
||||||
|
"ref": "main",
|
||||||
|
"rev": "277bab546659c448c4a90fa10d553d1ed83864ef",
|
||||||
|
"revCount": 3,
|
||||||
|
"type": "git",
|
||||||
|
"url": "file:///home/alex/code/own/ct"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"ref": "main",
|
||||||
|
"type": "git",
|
||||||
|
"url": "file:///home/alex/code/own/ct"
|
||||||
|
}
|
||||||
|
},
|
||||||
"dagbok": {
|
"dagbok": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -915,6 +936,7 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
|
"ct": "ct",
|
||||||
"dagbok": "dagbok",
|
"dagbok": "dagbok",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"emacs-overlay": "emacs-overlay",
|
"emacs-overlay": "emacs-overlay",
|
||||||
|
|||||||
@@ -116,6 +116,12 @@
|
|||||||
# url = "git+file:///home/alex/code/own/dagbok?ref=main";
|
# url = "git+file:///home/alex/code/own/dagbok?ref=main";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ct = {
|
||||||
|
url = "git+file:///home/alex/code/own/ct?ref=main";
|
||||||
|
# url = "git+ssh://gitea@git.ppp.pm:1122/alex/ct.git?ref=main";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
@@ -7,6 +8,25 @@
|
|||||||
let
|
let
|
||||||
enabled = config.mod.ai.enable;
|
enabled = config.mod.ai.enable;
|
||||||
|
|
||||||
|
ct = inputs.ct.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||||
|
|
||||||
|
ctConfig = builtins.toJSON {
|
||||||
|
addr = "127.0.0.1:7777";
|
||||||
|
open = "split";
|
||||||
|
defaultProfile = "personal";
|
||||||
|
profiles = {
|
||||||
|
work = {
|
||||||
|
configDir = "/home/alex/.claude-work";
|
||||||
|
tmuxSession = "w";
|
||||||
|
paths = [ "/home/alex/code/work" ];
|
||||||
|
};
|
||||||
|
personal = {
|
||||||
|
configDir = "/home/alex/.claude-personal";
|
||||||
|
tmuxSession = "p";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Shared statusline: show the logged-in account email.
|
# Shared statusline: show the logged-in account email.
|
||||||
statusLine = {
|
statusLine = {
|
||||||
type = "command";
|
type = "command";
|
||||||
@@ -27,6 +47,7 @@ let
|
|||||||
inherit statusLine;
|
inherit statusLine;
|
||||||
theme = "dark";
|
theme = "dark";
|
||||||
editorMode = "vim";
|
editorMode = "vim";
|
||||||
|
cleanupPeriodDays = 3650;
|
||||||
attribution = {
|
attribution = {
|
||||||
commit = "";
|
commit = "";
|
||||||
pr = "";
|
pr = "";
|
||||||
@@ -57,6 +78,7 @@ in
|
|||||||
home-manager.users.alex = {
|
home-manager.users.alex = {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.claude-code
|
pkgs.claude-code
|
||||||
|
ct
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.zsh.shellAliases = {
|
programs.zsh.shellAliases = {
|
||||||
@@ -67,6 +89,33 @@ in
|
|||||||
|
|
||||||
home.file.".claude-work/settings.json".text = settings;
|
home.file.".claude-work/settings.json".text = settings;
|
||||||
home.file.".claude-personal/settings.json".text = settings;
|
home.file.".claude-personal/settings.json".text = settings;
|
||||||
|
|
||||||
|
xdg.configFile."ct/config.json".text = ctConfig;
|
||||||
|
|
||||||
|
programs.tmux.extraConfig = lib.mkAfter ''
|
||||||
|
bind-key T display-menu -T "ct" \
|
||||||
|
"New thread (full context)" t 'display-popup -EE -w 80 -h 10 -T " new thread " "ct thread --pane #{pane_id}"' \
|
||||||
|
"New thread (pick turns)" p 'display-popup -EE -w 90% -h 90% -T " pick turns " "ct thread --pick --pane #{pane_id}"' \
|
||||||
|
"" \
|
||||||
|
"Browse threads" b 'display-popup -EE -w 90% -h 90% -T " threads " "ct --pane #{pane_id}"' \
|
||||||
|
"Open in browser" w 'run-shell -b "ct web --pane #{pane_id}"'
|
||||||
|
'';
|
||||||
|
|
||||||
|
systemd.user.services.ct-web = {
|
||||||
|
Unit = {
|
||||||
|
Description = "ct web UI";
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${lib.getExe ct} serve";
|
||||||
|
Environment = "TMUX_TMPDIR=%t";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 5;
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -9,28 +9,39 @@ let
|
|||||||
hyprlandEnabled = config.mod.hyprland.enable;
|
hyprlandEnabled = config.mod.hyprland.enable;
|
||||||
|
|
||||||
grimblast = inputs.hyprland-contrib.packages.${pkgs.stdenv.hostPlatform.system}.grimblast;
|
grimblast = inputs.hyprland-contrib.packages.${pkgs.stdenv.hostPlatform.system}.grimblast;
|
||||||
area = "${pkgs.libnotify}/bin/notify-send 'ps: selected area' && ${grimblast}/bin/grimblast copy area";
|
satty = "${pkgs.satty}/bin/satty --filename - --copy-command ${pkgs.wl-clipboard}/bin/wl-copy --initial-tool brush --actions-on-enter save-to-clipboard,exit --early-exit copy";
|
||||||
screen = "${pkgs.libnotify}/bin/notify-send 'ps: selected screen' &&${grimblast}/bin/grimblast copy output";
|
|
||||||
|
# Short timeout so the notification is gone before the capture happens.
|
||||||
|
# Output captures are instant, so they wait for it to disappear.
|
||||||
|
notify = msg: "${pkgs.libnotify}/bin/notify-send -t 500 'ps: ${msg}'";
|
||||||
|
waitForNotify = "${pkgs.coreutils}/bin/sleep 0.6";
|
||||||
|
|
||||||
|
area = "${notify "selected area"} && ${grimblast}/bin/grimblast copy area";
|
||||||
|
screen = "${notify "selected screen"} && ${waitForNotify} && ${grimblast}/bin/grimblast copy output";
|
||||||
|
annotateArea = "${notify "annotate area"} && ${grimblast}/bin/grimblast save area - | ${satty}";
|
||||||
|
annotateScreen = "${notify "annotate screen"} && ${waitForNotify} && ${grimblast}/bin/grimblast save output - | ${satty}";
|
||||||
|
|
||||||
|
bind = keys: cmd: {
|
||||||
|
_args = [
|
||||||
|
keys
|
||||||
|
(lib.generators.mkLuaInline ''hl.dsp.exec_cmd("${cmd}")'')
|
||||||
|
];
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home-manager.users.alex = {
|
home-manager.users.alex = {
|
||||||
home.packages = [ grimblast ];
|
home.packages = [
|
||||||
|
grimblast
|
||||||
|
pkgs.satty
|
||||||
|
];
|
||||||
|
|
||||||
wayland.windowManager.hyprland = lib.mkIf hyprlandEnabled {
|
wayland.windowManager.hyprland = lib.mkIf hyprlandEnabled {
|
||||||
settings = {
|
settings = {
|
||||||
bind = [
|
bind = [
|
||||||
{
|
(bind "SUPER + Print" area)
|
||||||
_args = [
|
(bind "SUPER + CTRL + Print" screen)
|
||||||
"SUPER + Print"
|
(bind "SUPER + SHIFT + Print" annotateArea)
|
||||||
(lib.generators.mkLuaInline ''hl.dsp.exec_cmd("${area}")'')
|
(bind "SUPER + CTRL + SHIFT + Print" annotateScreen)
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
_args = [
|
|
||||||
"SUPER + CTRL + Print"
|
|
||||||
(lib.generators.mkLuaInline ''hl.dsp.exec_cmd("${screen}")'')
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user