refactor module system
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
{
|
||||
imports = [
|
||||
./fish.nix
|
||||
./utils.nix
|
||||
./tmux.nix
|
||||
./yazi.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
nitch
|
||||
set -g fish_key_bindings fish_hybrid_key_bindings
|
||||
set fish_greeting
|
||||
'';
|
||||
shellAliases = {
|
||||
ls = "eza -al --no-time --no-user --no-permissions --no-filesize";
|
||||
ll = "eza -la";
|
||||
cat = "bat";
|
||||
cp = "cp -v";
|
||||
ff = "fastfetch";
|
||||
grep = "grep -i";
|
||||
rg = "rg -i";
|
||||
hyprland = "start-hyprland";
|
||||
mv = "mv -v";
|
||||
n = "nvim";
|
||||
py = "uv run";
|
||||
r = "rsync -avh --info=progress2";
|
||||
rm = "gomi";
|
||||
ssh = "kitten ssh";
|
||||
nd = "nix develop";
|
||||
df = "df -h -x tmpfs -x devtmpfs -x squashfs -x overlay -x efivarfs";
|
||||
ms = "music-sort";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
|
||||
prefix = "C-b";
|
||||
|
||||
terminal = "tmux-256color";
|
||||
|
||||
baseIndex = 0;
|
||||
|
||||
mouse = false;
|
||||
|
||||
keyMode = "vi";
|
||||
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
sensible
|
||||
vim-tmux-navigator
|
||||
resurrect
|
||||
continuum
|
||||
{
|
||||
plugin = tmux-sessionx;
|
||||
extraConfig = ''
|
||||
set -g @sessionx-bind 'o'
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
extraConfig = ''
|
||||
set-option -ga terminal-overrides ",xterm-256color:Tc"
|
||||
|
||||
unbind r
|
||||
bind r source-file ~/.tmux.conf
|
||||
|
||||
set-option -g status-style bg=default
|
||||
set -g status-position bottom
|
||||
set -g status-justify "absolute-centre"
|
||||
|
||||
set-option -g window-status-current-style fg=yellow
|
||||
set-option -g window-status-style fg=brightwhite
|
||||
|
||||
set -wg automatic-rename on
|
||||
set -g automatic-rename-format "#{pane_current_command}"
|
||||
|
||||
set -g @resurrect-capture-pane-contents "on"
|
||||
set -g @continuum-restore "on"
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
options = [ "--cmd cd" ];
|
||||
};
|
||||
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
git = true;
|
||||
icons = "always";
|
||||
extraOptions = [
|
||||
"-1"
|
||||
];
|
||||
};
|
||||
|
||||
programs.fzf.enable = true;
|
||||
programs.fzf.enableFishIntegration = true;
|
||||
programs.ripgrep.enable = true;
|
||||
programs.fd.enable = true;
|
||||
|
||||
programs.aria2.enable = true;
|
||||
|
||||
programs.btop.enable = true;
|
||||
programs.fastfetch.enable = true;
|
||||
|
||||
programs.lazygit.enable = true;
|
||||
programs.lazygit.enableFishIntegration = true;
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
enableFishIntegration = true;
|
||||
config = {
|
||||
hide_env_diff = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
paging = "never";
|
||||
style = "numbers,changes,rule";
|
||||
theme = "TwoDark";
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,610 @@
|
||||
{
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
keymap = {
|
||||
mgr.prepend_keymap = [
|
||||
{
|
||||
run = "close";
|
||||
on = "q";
|
||||
}
|
||||
{
|
||||
run = "plugin zoxide";
|
||||
on = "z";
|
||||
}
|
||||
{
|
||||
run = "plugin fzf";
|
||||
on = "Z";
|
||||
}
|
||||
{
|
||||
run = "open --interactive";
|
||||
on = "<C-Enter>";
|
||||
}
|
||||
{
|
||||
run = ''
|
||||
shell -- for f in %s; do
|
||||
d="''${f%.*}"
|
||||
mkdir -p "$d"
|
||||
7zz x -y -o"$d" "$f"
|
||||
done
|
||||
'';
|
||||
on = "X";
|
||||
}
|
||||
{
|
||||
run = "copy path";
|
||||
on = [
|
||||
"y"
|
||||
"p"
|
||||
];
|
||||
}
|
||||
{
|
||||
run = [
|
||||
"yank"
|
||||
"escape --visual --select"
|
||||
];
|
||||
on = [
|
||||
"y"
|
||||
"y"
|
||||
];
|
||||
}
|
||||
{
|
||||
run = "tab_create --current";
|
||||
on = "t";
|
||||
}
|
||||
{
|
||||
run = "cd ~/.local/share/Trash/files";
|
||||
on = [
|
||||
"g"
|
||||
"t"
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
};
|
||||
settings = {
|
||||
mgr = {
|
||||
sort_by = "natural";
|
||||
linemode = "mtime";
|
||||
show_hidden = true;
|
||||
};
|
||||
|
||||
preview = {
|
||||
tab_size = 4;
|
||||
max_width = 1200;
|
||||
max_height = 1200;
|
||||
cache_dir = "";
|
||||
image_filter = "lanczos3";
|
||||
image_quality = 90;
|
||||
sixel_fraction = 10;
|
||||
ueberzug_scale = 1;
|
||||
ueberzug_offset = [
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
];
|
||||
};
|
||||
|
||||
opener = {
|
||||
edit = [
|
||||
{
|
||||
run = "nvim %s";
|
||||
desc = "neovim";
|
||||
block = true;
|
||||
for = "unix";
|
||||
}
|
||||
{
|
||||
run = "neovide %s";
|
||||
desc = "neovide";
|
||||
}
|
||||
];
|
||||
|
||||
open = [
|
||||
{
|
||||
run = "xdg-open %s1";
|
||||
desc = "Open";
|
||||
for = "linux";
|
||||
}
|
||||
];
|
||||
|
||||
reveal = [
|
||||
{
|
||||
run = "clear; exiftool %s1; echo 'Press enter to exit'; read _";
|
||||
desc = "Show EXIF";
|
||||
for = "unix";
|
||||
block = true;
|
||||
}
|
||||
];
|
||||
|
||||
extract = [
|
||||
{
|
||||
run = "unzip %s1";
|
||||
desc = "Extract here";
|
||||
for = "unix";
|
||||
}
|
||||
];
|
||||
|
||||
play = [
|
||||
{
|
||||
run = "mpv %s1";
|
||||
orphan = true;
|
||||
for = "unix";
|
||||
}
|
||||
{
|
||||
run = "vlc %s1";
|
||||
orphan = true;
|
||||
for = "unix";
|
||||
}
|
||||
{
|
||||
run = "losslesscut %s1";
|
||||
orphan = true;
|
||||
for = "unix";
|
||||
}
|
||||
{
|
||||
run = "kdenlive %s1";
|
||||
orphan = true;
|
||||
for = "unix";
|
||||
}
|
||||
];
|
||||
|
||||
audio = [
|
||||
{
|
||||
run = "org.gnome.Decibels %s1";
|
||||
desc = "Decibels";
|
||||
for = "unix";
|
||||
}
|
||||
{
|
||||
run = "spek %s1";
|
||||
desc = "Spek";
|
||||
for = "unix";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
open = {
|
||||
rules = [
|
||||
{
|
||||
url = "*/";
|
||||
use = [
|
||||
"edit"
|
||||
"open"
|
||||
"reveal"
|
||||
];
|
||||
}
|
||||
{
|
||||
mime = "text/*";
|
||||
use = [
|
||||
"edit"
|
||||
"reveal"
|
||||
];
|
||||
}
|
||||
{
|
||||
mime = "image/*";
|
||||
use = [
|
||||
"open"
|
||||
"reveal"
|
||||
];
|
||||
}
|
||||
{
|
||||
url = "*.m4a";
|
||||
use = [
|
||||
"audio"
|
||||
"reveal"
|
||||
];
|
||||
}
|
||||
{
|
||||
mime = "video/*";
|
||||
use = [
|
||||
"play"
|
||||
"reveal"
|
||||
];
|
||||
}
|
||||
{
|
||||
mime = "audio/*";
|
||||
use = [
|
||||
"audio"
|
||||
"reveal"
|
||||
];
|
||||
}
|
||||
{
|
||||
mime = "inode/x-empty";
|
||||
use = [
|
||||
"edit"
|
||||
"reveal"
|
||||
];
|
||||
}
|
||||
{
|
||||
mime = "application/json";
|
||||
use = [
|
||||
"edit"
|
||||
"reveal"
|
||||
];
|
||||
}
|
||||
{
|
||||
mime = "*/javascript";
|
||||
use = [
|
||||
"edit"
|
||||
"reveal"
|
||||
];
|
||||
}
|
||||
{
|
||||
mime = "application/zip";
|
||||
use = [
|
||||
"extract"
|
||||
"reveal"
|
||||
];
|
||||
}
|
||||
{
|
||||
mime = "application/gzip";
|
||||
use = [
|
||||
"extract"
|
||||
"reveal"
|
||||
];
|
||||
}
|
||||
{
|
||||
mime = "application/x-tar";
|
||||
use = [
|
||||
"extract"
|
||||
"reveal"
|
||||
];
|
||||
}
|
||||
{
|
||||
mime = "application/x-bzip";
|
||||
use = [
|
||||
"extract"
|
||||
"reveal"
|
||||
];
|
||||
}
|
||||
{
|
||||
mime = "application/x-bzip2";
|
||||
use = [
|
||||
"extract"
|
||||
"reveal"
|
||||
];
|
||||
}
|
||||
{
|
||||
mime = "application/x-7z-compressed";
|
||||
use = [
|
||||
"extract"
|
||||
"reveal"
|
||||
];
|
||||
}
|
||||
{
|
||||
mime = "application/x-rar";
|
||||
use = [
|
||||
"extract"
|
||||
"reveal"
|
||||
];
|
||||
}
|
||||
{
|
||||
mime = "application/xz";
|
||||
use = [
|
||||
"extract"
|
||||
"reveal"
|
||||
];
|
||||
}
|
||||
{
|
||||
mime = "*";
|
||||
use = [
|
||||
"open"
|
||||
"reveal"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
tasks = {
|
||||
micro_workers = 10;
|
||||
macro_workers = 25;
|
||||
bizarre_retry = 5;
|
||||
image_alloc = 536870912;
|
||||
image_bound = [
|
||||
0
|
||||
0
|
||||
];
|
||||
suppress_preload = false;
|
||||
};
|
||||
|
||||
plugin = {
|
||||
|
||||
spotters = [
|
||||
{
|
||||
url = "*/";
|
||||
run = "folder";
|
||||
}
|
||||
{
|
||||
mime = "text/*";
|
||||
run = "code";
|
||||
}
|
||||
{
|
||||
mime = "application/{mbox,javascript,wine-extension-ini}";
|
||||
run = "code";
|
||||
}
|
||||
{
|
||||
mime = "image/{avif,hei?,jxl}";
|
||||
run = "magick";
|
||||
}
|
||||
{
|
||||
mime = "image/svg+xml";
|
||||
run = "svg";
|
||||
}
|
||||
{
|
||||
mime = "image/*";
|
||||
run = "image";
|
||||
}
|
||||
{
|
||||
mime = "video/*";
|
||||
run = "video";
|
||||
}
|
||||
{
|
||||
mime = "vfs/*";
|
||||
run = "vfs";
|
||||
}
|
||||
{
|
||||
mime = "null/*";
|
||||
run = "null";
|
||||
}
|
||||
{
|
||||
url = "*";
|
||||
run = "file";
|
||||
}
|
||||
];
|
||||
|
||||
preloaders = [
|
||||
{
|
||||
mime = "image/{avif,hei?,jxl}";
|
||||
run = "magick";
|
||||
}
|
||||
{
|
||||
mime = "image/svg+xml";
|
||||
run = "svg";
|
||||
}
|
||||
{
|
||||
mime = "image/*";
|
||||
run = "image";
|
||||
}
|
||||
{
|
||||
mime = "video/*";
|
||||
run = "video";
|
||||
}
|
||||
{
|
||||
mime = "application/pdf";
|
||||
run = "pdf";
|
||||
}
|
||||
{
|
||||
mime = "font/*";
|
||||
run = "font";
|
||||
}
|
||||
{
|
||||
mime = "application/ms-opentype";
|
||||
run = "font";
|
||||
}
|
||||
];
|
||||
|
||||
previewers = [
|
||||
{
|
||||
url = "*/";
|
||||
run = "folder";
|
||||
}
|
||||
{
|
||||
mime = "text/*";
|
||||
run = "code";
|
||||
}
|
||||
{
|
||||
mime = "application/{mbox,javascript,wine-extension-ini}";
|
||||
run = "code";
|
||||
}
|
||||
{
|
||||
mime = "application/{json,ndjson}";
|
||||
run = "json";
|
||||
}
|
||||
{
|
||||
mime = "image/{avif,hei?,jxl}";
|
||||
run = "magick";
|
||||
}
|
||||
{
|
||||
mime = "image/svg+xml";
|
||||
run = "svg";
|
||||
}
|
||||
{
|
||||
mime = "image/*";
|
||||
run = "image";
|
||||
}
|
||||
{
|
||||
mime = "video/*";
|
||||
run = "video";
|
||||
}
|
||||
{
|
||||
mime = "application/pdf";
|
||||
run = "pdf";
|
||||
}
|
||||
{
|
||||
mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
mime = "application/{debian*-package,redhat-package-manager,rpm,android.package-archive}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
url = "*.{AppImage,appimage}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
mime = "application/{iso9660-image,qemu-disk,ms-wim,apple-diskimage}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
mime = "application/virtualbox-{vhd,vhdx}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
url = "*.{img,fat,ext,ext2,ext3,ext4,squashfs,ntfs,hfs,hfsx}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
mime = "font/*";
|
||||
run = "font";
|
||||
}
|
||||
{
|
||||
mime = "application/ms-opentype";
|
||||
run = "font";
|
||||
}
|
||||
{
|
||||
mime = "inode/empty";
|
||||
run = "empty";
|
||||
}
|
||||
{
|
||||
mime = "vfs/*";
|
||||
run = "vfs";
|
||||
}
|
||||
{
|
||||
mime = "null/*";
|
||||
run = "null";
|
||||
}
|
||||
{
|
||||
url = "*";
|
||||
run = "file";
|
||||
}
|
||||
];
|
||||
|
||||
prepend_previewers = [
|
||||
{
|
||||
mime = "audio/*";
|
||||
run = "exifaudio";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
input = {
|
||||
cd_title = "Change directory:";
|
||||
cd_origin = "top-center";
|
||||
cd_offset = [
|
||||
0
|
||||
2
|
||||
50
|
||||
3
|
||||
];
|
||||
|
||||
create_title = [
|
||||
"Create:"
|
||||
"Create (dir):"
|
||||
];
|
||||
create_origin = "top-center";
|
||||
create_offset = [
|
||||
0
|
||||
2
|
||||
50
|
||||
3
|
||||
];
|
||||
|
||||
rename_title = "Rename:";
|
||||
rename_origin = "hovered";
|
||||
rename_offset = [
|
||||
0
|
||||
1
|
||||
50
|
||||
3
|
||||
];
|
||||
|
||||
trash_title = "Move {n} selected file{s} to trash? (y/N)";
|
||||
trash_origin = "top-center";
|
||||
trash_offset = [
|
||||
0
|
||||
2
|
||||
50
|
||||
3
|
||||
];
|
||||
|
||||
delete_title = "Delete {n} selected file{s} permanently? (y/N)";
|
||||
delete_origin = "top-center";
|
||||
delete_offset = [
|
||||
0
|
||||
2
|
||||
50
|
||||
3
|
||||
];
|
||||
|
||||
filter_title = "Filter:";
|
||||
filter_origin = "top-center";
|
||||
filter_offset = [
|
||||
0
|
||||
2
|
||||
50
|
||||
3
|
||||
];
|
||||
|
||||
find_title = [
|
||||
"Find next:"
|
||||
"Find previous:"
|
||||
];
|
||||
find_origin = "top-center";
|
||||
find_offset = [
|
||||
0
|
||||
2
|
||||
50
|
||||
3
|
||||
];
|
||||
|
||||
search_title = "Search via {n}:";
|
||||
search_origin = "top-center";
|
||||
search_offset = [
|
||||
0
|
||||
2
|
||||
50
|
||||
3
|
||||
];
|
||||
|
||||
shell_title = [
|
||||
"Shell:"
|
||||
"Shell (block):"
|
||||
];
|
||||
shell_origin = "top-center";
|
||||
shell_offset = [
|
||||
0
|
||||
2
|
||||
50
|
||||
3
|
||||
];
|
||||
shell = "/bin/fish";
|
||||
|
||||
overwrite_title = "Overwrite an existing file? (y/N)";
|
||||
overwrite_origin = "top-center";
|
||||
overwrite_offset = [
|
||||
0
|
||||
2
|
||||
50
|
||||
3
|
||||
];
|
||||
|
||||
quit_title = "{n} task{s} running, sure to quit? (y/N)";
|
||||
quit_origin = "top-center";
|
||||
quit_offset = [
|
||||
0
|
||||
2
|
||||
50
|
||||
3
|
||||
];
|
||||
};
|
||||
|
||||
select = {
|
||||
open_title = "Open with:";
|
||||
open_origin = "hovered";
|
||||
open_offset = [
|
||||
0
|
||||
1
|
||||
50
|
||||
7
|
||||
];
|
||||
};
|
||||
|
||||
which = {
|
||||
sort_by = "none";
|
||||
sort_sensitive = false;
|
||||
sort_reverse = false;
|
||||
};
|
||||
|
||||
log.enabled = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user