update yazi

This commit is contained in:
Tigor Hutasuhut 2024-08-28 19:00:18 +07:00
parent a930955644
commit 03d35a039a
6 changed files with 90 additions and 41 deletions

View file

@ -41,6 +41,16 @@
"bind"
];
};
fileSystems."/nas/public/Public" = {
device = "/nas/Syncthing/Sync/Public";
fsType = "auto";
options = [
"defaults"
"nofail"
"nobootwait"
"bind"
];
};
swapDevices = [ ];
@ -86,6 +96,7 @@
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.enableAllFirmware = true;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.opengl = {
enable = true;

View file

@ -227,7 +227,7 @@ in
];
};
extraConfig = /*hyprlang*/ ''
exec-once=dbus-update-activation-enviroment --all
exec-once=dbus-update-activation-environment --all
exec-once=${gnome-keyring.path} ${config.sops.secrets."gnome-keyring/${config.home.username}".path}
exec-once=foot --server

View file

@ -5,32 +5,31 @@ let
in
{
config = mkIf cfg.enable {
programs.yazi = {
enable = true;
enableZshIntegration = true;
keymap = {
manager.prepend_keymap = [
{
on = [ "m" ];
run = "plugin bookmarks --args=save";
desc = "Save current position as a bookmark";
}
{
on = [ "'" ];
run = "plugin bookmarks --args=jump";
desc = "Jump to a bookmark";
}
{
on = [ "b" "d" ];
run = "plugin bookmarks --args=delete";
desc = "Delete a bookmark";
}
{
on = [ "b" "D" ];
run = "plugin bookmarks --args=delete_all";
desc = "Delete all bookmarks";
}
# {
# on = [ "m" ];
# run = "plugin bookmarks --args=save";
# desc = "Save current position as a bookmark";
# }
# {
# on = [ "'" ];
# run = "plugin bookmarks --args=jump";
# desc = "Jump to a bookmark";
# }
# {
# on = [ "b" "d" ];
# run = "plugin bookmarks --args=delete";
# desc = "Delete a bookmark";
# }
# {
# on = [ "b" "D" ];
# run = "plugin bookmarks --args=delete_all";
# desc = "Delete all bookmarks";
# }
];
};
settings = {
@ -80,6 +79,12 @@ in
{ name = "*"; use = "open"; }
];
};
plugin = {
prepend_previewers = [
{ mime = "{image,audio,video}/*"; run = "mediainfo"; }
{ mime = "application/x-subrip"; run = "mediainfo"; }
];
};
};
};
home.file = {
@ -92,22 +97,31 @@ in
sha256 = "sha256-TSmZwy9jhf0D+6l4KbNQ6BjHbL0Vfo/yL3wt8bjo/EM=";
};
};
".config/yazi/init.lua".text = /*lua*/ ''
require("bookmarks"):setup({
last_directory = { enable = false, persist = false },
persist = "none",
desc_format = "full",
notify = {
enable = false,
timeout = 1,
message = {
new = "New bookmark '<key>' -> '<folder>'",
delete = "Deleted bookmark in '<key>'",
delete_all = "Deleted all bookmarks",
},
},
})
'';
".config/yazi/plugins/mediainfo.yazi" = {
recursive = true;
source = pkgs.fetchFromGitHub {
owner = "Ape";
repo = "mediainfo.yazi";
rev = "c69314e80f5b45fe87a0e06a10d064ed54110439";
hash = "sha256-8xdBPdKSiwB7iRU8DJdTHY+BjfR9D3FtyVtDL9tNiy4=";
};
};
# ".config/yazi/init.lua".text = /*lua*/ ''
# require("bookmarks"):setup({
# last_directory = { enable = false, persist = false },
# persist = "none",
# desc_format = "full",
# notify = {
# enable = false,
# timeout = 1,
# message = {
# new = "New bookmark '<key>' -> '<folder>'",
# delete = "Deleted bookmark in '<key>'",
# delete_all = "Deleted all bookmarks",
# },
# },
# })
# '';
};
};
}

View file

@ -2,11 +2,11 @@
let
dbus-sway-environment = pkgs.writeTextFile {
name = "dbus-sway-environment";
destination = "/bin/dbus-sway-enviroment";
destination = "/bin/dbus-sway-environment";
executable = true;
text = ''
dbus-update-activation-enviroment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
systemctl --user start pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
'';

View file

@ -1,10 +1,14 @@
{ config, lib, ... }:
{ config, lib, pkgs, ... }:
let
cfg = config.profile.programs.yazi;
inherit (lib) mkIf;
in
{
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
mediainfo
ffmpegthumbnailer
];
programs.yazi = {
enable = true;
settings = {

View file

@ -143,6 +143,26 @@ in
"living-room-system"
];
};
"/nas/Syncthing/Sync/General" = {
label = "General";
id = "General";
devices = [
"s20fe"
"work-laptop"
"windows"
"living-room-system"
];
};
"/nas/Syncthing/Sync/Public" = {
label = "Public";
id = "Public";
devices = [
"s20fe"
"work-laptop"
"windows"
"living-room-system"
];
};
};
devices = {
s20fe = {