better aliases

This commit is contained in:
Jana Dönszelmann 2025-09-26 10:36:35 -07:00
parent 816c61985d
commit c89bd50f8e
No known key found for this signature in database
4 changed files with 150 additions and 31 deletions

48
flake.lock generated
View file

@ -95,6 +95,30 @@
"type": "github"
}
},
"cosmic-manager": {
"inputs": {
"flake-parts": "flake-parts",
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1744387566,
"narHash": "sha256-O39zTv7LdRgr4Hw38d+eQG2LYpP75rw2XKqTGV5qzgs=",
"owner": "HeitorAugustoLN",
"repo": "cosmic-manager",
"rev": "52d3fdd080a9dd4639948687682a68282fbf0314",
"type": "github"
},
"original": {
"owner": "HeitorAugustoLN",
"repo": "cosmic-manager",
"type": "github"
}
},
"crane": {
"locked": {
"lastModified": 1741481578,
@ -215,6 +239,27 @@
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"cosmic-manager",
"nixpkgs"
]
},
"locked": {
"lastModified": 1738453229,
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
@ -823,7 +868,7 @@
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts",
"flake-parts": "flake-parts_2",
"nixpkgs": [
"nixpkgs"
],
@ -1009,6 +1054,7 @@
},
"root": {
"inputs": {
"cosmic-manager": "cosmic-manager",
"dumpasm": "dumpasm",
"flake-utils": "flake-utils_2",
"home-manager": "home-manager",

View file

@ -33,6 +33,14 @@
};
rahul-config.url = "github:jdonszelmann/nix-config";
cosmic-manager = {
url = "github:HeitorAugustoLN/cosmic-manager";
inputs = {
nixpkgs.follows = "nixpkgs";
home-manager.follows = "home-manager";
};
};
nixgl.url = "github:nix-community/nixGL";
};
@ -45,6 +53,7 @@
, dumpasm
, jujutsu
, nixgl
, cosmic-manager
, ...
}@inputs:
let
@ -71,7 +80,13 @@
root: args:
home-manager.lib.homeManagerConfiguration (
{
modules = [ root ] ++ homeManagerModules ++ (args.modules or [ ]);
modules =
[
cosmic-manager.homeManagerModules.cosmic-manager
root
]
++ homeManagerModules
++ (args.modules or [ ]);
pkgs = pkgsForSystem (args.system or "x86_64-linux");
}
// {

View file

@ -0,0 +1,25 @@
{ pkgs
, lib
, cosmicLib
, ...
}:
let
ron = cosmicLib.cosmic.mkRON;
in
{
wayland.desktopManager.cosmic = {
enable = true;
# shortcuts = [
# {
# action = ron "enum" "Close";
# key = "Super+Q";
# }
# {
# action = ron "enum" "maximize";
# key = "Super+d";
# }
# ];
};
}

View file

@ -12,9 +12,15 @@
ui = {
paginate = "never";
pager = "${pkgs.delta}/bin/delta";
# pager = "${pkgs.delta}/bin/delta";
# for delta
diff-formatter = ":git";
# diff-formatter = ":git";
diff-formatter = [
"${pkgs.difftastic}/bin/difft"
"--color=always"
"$left"
"$right"
];
default-command = [
"log"
@ -52,33 +58,60 @@
"format_timestamp(timestamp)" = "timestamp.ago()";
};
aliases = {
tug = [
"bookmark"
"move"
"--from"
"closest_bookmark(@-)"
"--to"
"@"
];
catchup = [
"rebase"
"-b"
"all:current"
"-d"
"tronk()"
"--skip-emptied"
];
move = [
"rebase"
"-r"
];
mdiff = [
"diff"
"--from"
"tronk()"
];
};
aliases =
let
util = script: [
"util"
"exec"
"--"
"bash"
"-c"
script
];
in
{
tug = [
"bookmark"
"move"
"--from"
"closest_bookmark(@-)"
"--to"
"@"
];
catchup = [
"rebase"
"-b"
"all:current"
"-d"
"tronk()"
"--skip-emptied"
];
pull = util ''
jj git fetch
jj catchup
'';
ch = [
"show"
"--stat"
];
st = [
"status"
];
move = [
"rebase"
"-r"
];
ll = [
"log"
"-T"
"builtin_log_compact"
];
mdiff = [
"diff"
"--from"
"tronk()"
];
};
templates = {
log_node = ''