This commit is contained in:
Lennart J. Kurzweg (Nx2)
2024-05-29 01:53:08 +02:00
parent 43a2bf1fcb
commit 2acb68a89d
6 changed files with 101 additions and 32 deletions

View File

@@ -1,4 +1,4 @@
{ config, pkgs, lib, system, user, allowed, secrets, ... }:
{ pkgs, lib, user, rice, ... }:
lib.mkIf (user != "tv")
{
home.packages = with pkgs; [
@@ -50,4 +50,20 @@ lib.mkIf (user != "tv")
};
};
};
programs.lazygit = {
enable = true;
settings = {
windowSize = "normal";
gui.theme = with rice.color; {
lightTheme = false;
activeBorderColor = [ border "bold"];
inactiveBorderColor = [ black.bright ];
optionsTextColor = [ blue.base ];
selectedLineBgColor = [ foreground ];
selectedRangeByColor = [ magenta.bright ];
showRandomTip = true;
animateExplosion = true;
};
};
};
}

View File

@@ -1,13 +1,16 @@
{ config, pkgs, lib, system, user, allowed, secrets, ... }:
{ pkgs, lib, system, user, inputs, ... }:
lib.mkIf (user != "tv")
{
home.packages = [
pkgs.yazi
];
home.packages = with pkgs; [
yazi
dragon
unar
];
programs.yazi = {
enable = true;
# package = inputs.yazi.packages.${system}.default;
enableFishIntegration = true;
settings = {
manager = {
@@ -19,6 +22,10 @@ lib.mkIf (user != "tv")
linemode = "size";
show_hidden = false;
show_symlink = true;
append_keymap = [
{ on = [ "<C-g>" ]; run = "lazygit"; desc = "Run Lazygit in current directory"; }
{ on = [ "<C-D>" ]; exec = ''shell 'dragon -x -i -T "$1"' --confirm''; }
];
};
opener = {
edit = [
@@ -45,10 +52,51 @@ lib.mkIf (user != "tv")
{ exec = ''zathura "$@"''; desc = "zathura"; }
{ exec = ''firefox "$@"''; desc = "firefox"; }
];
browser = [
{ exec = ''firefox "$@"''; desc = "firefox"; }
];
office = [
{ exec = ''libreoffice "$@"''; desc = "libreoffice"; }
{ exec = ''libreoffice --view "$@"''; desc = "libreoffice read-only"; }
];
shell = [
{ exec = ''sh -c "$@"''; desc = "sh -c"; }
{ exec = ''bash -c "$@"''; desc = "bash -c"; }
];
python = [
{ exec = ''python "$@"''; desc = "python"; }
];
};
open.rules = [
{ mime = "text/*"; use = "edit"; }
{ mime = "text/plain"; use = "edit"; }
{ mime = "text/html"; use = ["edit" "browser"]; }
{ mime = "text/htm"; use = ["edit" "browser"]; }
{ mime = "application/x-httpd-php"; use = ["edit" "browser"]; }
{ mime = "application/json"; use = "edit"; }
{ mime = "application/ld+json"; use = "edit"; }
{ mime = "image/*"; use = "image"; }
{ mime = "image/svg"; use = ["image" "edit"]; }
{ mime = "application/pdf"; use = "document"; }
{ mime = "application/epub"; use = "document"; }
{ mime = "video/*"; use = "video"; }
{ mime = "application/vnd.oasis.opendocument.*"; use = "office"; }
{ mime = "application/vnd.ms-powerpoint"; use = "office"; }
{ mime = "application/vnd.ms-excel"; use = "office"; }
{ mime = "application/vnd.openxmlformats-officedocument.*"; use = ["office" "edit"]; }
{ mime = "application/rtf"; use = "office"; }
{ mime = "application/x-sh"; use = ["edit" "shell"]; }
{ mime = "application/x-python-code"; use = "python"; }
{ mime = "text/x-python"; use = "python"; }
{ mime = "application/xml"; use = "edit"; }
{ mime = "application/xul"; use = "edit"; }
{ mime = "application/x-bzip"; use = "archive"; }
{ mime = "application/x-bzip2"; use = "archive"; }
{ mime = "application/gzip"; use = "archive"; }
{ mime = "application/vnd.rar"; use = "archive"; }
{ mime = "application/x-tar"; use = "archive"; }
{ mime = "application/zip"; use = "archive"; }
{ mime = "application/x-7z-compressed"; use = "archive"; }
];
};
};