fix cli tools config
This commit is contained in:
parent
555068556f
commit
816b85e06e
9 changed files with 393 additions and 353 deletions
|
@ -34,12 +34,13 @@ in
|
||||||
yazi.enable = true;
|
yazi.enable = true;
|
||||||
eza.enable = true;
|
eza.enable = true;
|
||||||
git.enable = true;
|
git.enable = true;
|
||||||
|
zoxide.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
home.packages = attrValues {
|
home.packages = attrValues {
|
||||||
inherit (pkgs) any-nix-shell pwgen yt-dlp ripdrag yazi;
|
inherit (pkgs) any-nix-shell pwgen yt-dlp ripdrag;
|
||||||
inherit (pkgs) bat fd zoxide;
|
inherit (pkgs) fd;
|
||||||
|
|
||||||
rgFull = pkgs.ripgrep.override {withPCRE2 = true;};
|
rgFull = pkgs.ripgrep.override {withPCRE2 = true;};
|
||||||
};
|
};
|
||||||
|
@ -62,11 +63,6 @@ in
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
config.whitelist.prefix = ["/home"];
|
config.whitelist.prefix = ["/home"];
|
||||||
};
|
};
|
||||||
|
|
||||||
bat.enable = true;
|
|
||||||
eza.enable = true;
|
|
||||||
fzf.enable = true;
|
|
||||||
zoxide.enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,91 +1,94 @@
|
||||||
{ config, options, lib, pkgs, user, ... }:
|
{ config, lib, pkgs, user, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib) mkIf mkEnableOption;
|
||||||
inherit (lib.strings) concatStringsSep;
|
inherit (lib.strings) concatStringsSep;
|
||||||
|
|
||||||
|
cfg = config.modules.${user}.shell.toolset.btop;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.${user}.shell.toolset.btop = let
|
options.modules.${user}.shell.toolset.btop = {
|
||||||
inherit (lib.options) mkEnableOption;
|
enable = mkEnableOption "system-monitor";
|
||||||
in { enable = mkEnableOption "system-monitor"; };
|
};
|
||||||
|
|
||||||
config = mkIf config.modules.${user}.shell.toolset.btop.enable {
|
config = mkIf cfg.enable {
|
||||||
home-manager.users.${user}.programs.btop = let
|
home-manager.users.${user} = {
|
||||||
inherit (config.modules.themes) active;
|
packages = with pkgs; [ btop ];
|
||||||
in
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
force_tty = false;
|
|
||||||
vim_keys = true; # Directional keys: "h,j,k,l,g,G"
|
|
||||||
update_ms = 1500; # ms (s^{-3})
|
|
||||||
temp_scale = "celsius";
|
|
||||||
base_10_sizes = false;
|
|
||||||
show_cpu_freq = true;
|
|
||||||
clock_format = "%H:%M";
|
|
||||||
background_update = true;
|
|
||||||
disks_filter = "exclude=/boot";
|
|
||||||
|
|
||||||
rounded_corners = true;
|
programs.btop = {
|
||||||
theme_background = false;
|
enable = true;
|
||||||
truecolor = true;
|
settings = {
|
||||||
presets = concatStringsSep "," [
|
force_tty = false;
|
||||||
"cpu:1:default"
|
vim_keys = true; # Directional keys: "h,j,k,l,g,G"
|
||||||
"proc:0:default cpu:0:default"
|
update_ms = 1500; # ms (s^{-3})
|
||||||
"mem:0:default"
|
temp_scale = "celsius";
|
||||||
"net:0:default cpu:0:block"
|
base_10_sizes = false;
|
||||||
"net:0:tty"
|
show_cpu_freq = true;
|
||||||
];
|
clock_format = "%H:%M";
|
||||||
graph_symbol = "braille";
|
background_update = true;
|
||||||
graph_symbol_cpu = "default";
|
disks_filter = "exclude=/boot";
|
||||||
graph_symbol_mem = "default";
|
|
||||||
graph_symbol_net = "default";
|
|
||||||
graph_symbol_proc = "default";
|
|
||||||
shown_boxes = "proc cpu mem net";
|
|
||||||
|
|
||||||
proc_sorting = "cpu lazy";
|
rounded_corners = true;
|
||||||
proc_reversed = false;
|
theme_background = false;
|
||||||
proc_tree = false;
|
truecolor = true;
|
||||||
proc_colors = true;
|
presets = concatStringsSep "," [
|
||||||
proc_gradient = true;
|
"cpu:1:default"
|
||||||
proc_per_core = true;
|
"proc:0:default cpu:0:default"
|
||||||
proc_mem_bytes = true;
|
"mem:0:default"
|
||||||
proc_info_smaps = false;
|
"net:0:default cpu:0:block"
|
||||||
proc_left = false;
|
"net:0:tty"
|
||||||
|
];
|
||||||
|
graph_symbol = "braille";
|
||||||
|
graph_symbol_cpu = "default";
|
||||||
|
graph_symbol_mem = "default";
|
||||||
|
graph_symbol_net = "default";
|
||||||
|
graph_symbol_proc = "default";
|
||||||
|
shown_boxes = "proc cpu mem net";
|
||||||
|
|
||||||
cpu_graph_upper = "total";
|
proc_sorting = "cpu lazy";
|
||||||
cpu_graph_lower = "total";
|
proc_reversed = false;
|
||||||
cpu_single_graph = false;
|
proc_tree = false;
|
||||||
cpu_bottom = false;
|
proc_colors = true;
|
||||||
show_uptime = true;
|
proc_gradient = true;
|
||||||
check_temp = true;
|
proc_per_core = true;
|
||||||
cpu_sensor = "Auto";
|
proc_mem_bytes = true;
|
||||||
show_coretemp = true;
|
proc_info_smaps = false;
|
||||||
cpu_core_map = "";
|
proc_left = false;
|
||||||
custom_cpu_name = "";
|
|
||||||
|
|
||||||
mem_graphs = true;
|
cpu_graph_upper = "total";
|
||||||
mem_below_net = false;
|
cpu_graph_lower = "total";
|
||||||
|
cpu_single_graph = false;
|
||||||
|
cpu_bottom = false;
|
||||||
|
show_uptime = true;
|
||||||
|
check_temp = true;
|
||||||
|
cpu_sensor = "Auto";
|
||||||
|
show_coretemp = true;
|
||||||
|
cpu_core_map = "";
|
||||||
|
custom_cpu_name = "";
|
||||||
|
|
||||||
show_swap = true;
|
mem_graphs = true;
|
||||||
swap_disk = true;
|
mem_below_net = false;
|
||||||
show_disks = true;
|
|
||||||
only_physical = true;
|
|
||||||
use_fstab = false; # Enable -> disables `only_physical`
|
|
||||||
disk_free_priv = false;
|
|
||||||
show_io_stat = true;
|
|
||||||
|
|
||||||
io_mode = false;
|
show_swap = true;
|
||||||
io_graph_combined = false;
|
swap_disk = true;
|
||||||
io_graph_speeds = "";
|
show_disks = true;
|
||||||
|
only_physical = true;
|
||||||
|
use_fstab = false; # Enable -> disables `only_physical`
|
||||||
|
disk_free_priv = false;
|
||||||
|
show_io_stat = true;
|
||||||
|
|
||||||
net_download = 100;
|
io_mode = false;
|
||||||
net_upload = 100;
|
io_graph_combined = false;
|
||||||
net_auto = true;
|
io_graph_speeds = "";
|
||||||
net_sync = false;
|
|
||||||
net_iface = "br0";
|
net_download = 100;
|
||||||
show_battery = true;
|
net_upload = 100;
|
||||||
selected_battery = "Auto";
|
net_auto = true;
|
||||||
log_level = "DEBUG";
|
net_sync = false;
|
||||||
|
net_iface = "br0";
|
||||||
|
show_battery = true;
|
||||||
|
selected_battery = "Auto";
|
||||||
|
log_level = "DEBUG";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,20 +7,24 @@ let
|
||||||
cfg = config.modules.${user}.shell.toolset.eza;
|
cfg = config.modules.${user}.shell.toolset.eza;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.${user}.shell.toolset.eza = {
|
options.modules.${user}.shell.toolset.eza = {
|
||||||
enable = mkEnableOption "system-monitor";
|
enable = mkEnableOption "system-monitor";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home-manager.users.${user}.programs.eza = {
|
home-manager.users.${user} = {
|
||||||
enable = true;
|
packages = with pkgs; [ eza ];
|
||||||
icons = "auto";
|
|
||||||
git = true;
|
programs.eza = {
|
||||||
extraOptions = [
|
enable = true;
|
||||||
"--hyperlink"
|
icons = "auto";
|
||||||
"--across"
|
git = true;
|
||||||
"--group-directories-first"
|
extraOptions = [
|
||||||
];
|
"--hyperlink"
|
||||||
|
"--across"
|
||||||
|
"--group-directories-first"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,34 +1,37 @@
|
||||||
{ config, options, lib, pkgs, user, ... }:
|
{ config, options, lib, pkgs, user, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib.attrsets) optionalAttrs;
|
inherit (lib) mkIf mkEnableOption;
|
||||||
inherit (lib.modules) mkIf;
|
|
||||||
|
defShell = config.modules.${user}.shell.default;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.${user}.shell.toolset.fzf = let
|
options.modules.${user}.shell.toolset.fzf = {
|
||||||
inherit (lib.options) mkEnableOption;
|
enable = mkEnableOption "TUI Fuzzy Finder.";
|
||||||
in { enable = mkEnableOption "TUI Fuzzy Finder."; };
|
};
|
||||||
|
|
||||||
config = mkIf config.modules.${user}.shell.toolset.fzf.enable {
|
config = mkIf config.modules.${user}.shell.toolset.fzf.enable {
|
||||||
home-manager.users.${user}.programs.fzf = let
|
home-manager.users.${user} = {
|
||||||
defShell = config.modules.${user}.shell.default;
|
packages = with pkgs; [ fzf ];
|
||||||
in {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
enableZshIntegration = defShell == "zsh";
|
|
||||||
enableFishIntegration = defShell == "fish";
|
|
||||||
|
|
||||||
tmux.enableShellIntegration = true;
|
programs.fzf = {
|
||||||
tmux.shellIntegrationOptions = ["-d 40%"];
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = defShell == "zsh";
|
||||||
|
enableFishIntegration = defShell == "fish";
|
||||||
|
|
||||||
defaultCommand = "fd --type f";
|
tmux.enableShellIntegration = true;
|
||||||
defaultOptions = ["--height 40%" "--border"];
|
tmux.shellIntegrationOptions = ["-d 40%"];
|
||||||
|
|
||||||
changeDirWidgetCommand = "fd --type d";
|
defaultCommand = "fd --type f";
|
||||||
changeDirWidgetOptions = ["--preview 'tree -C {} | head -200'"];
|
defaultOptions = ["--height 40%" "--border"];
|
||||||
|
|
||||||
fileWidgetCommand = "fd --type f";
|
changeDirWidgetCommand = "fd --type d";
|
||||||
fileWidgetOptions = ["--preview 'head {}'"];
|
changeDirWidgetOptions = ["--preview 'tree -C {} | head -200'"];
|
||||||
historyWidgetOptions = ["--sort" "--exact"];
|
|
||||||
|
fileWidgetCommand = "fd --type f";
|
||||||
|
fileWidgetOptions = ["--preview 'head {}'"];
|
||||||
|
historyWidgetOptions = ["--sort" "--exact"];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,103 +14,103 @@ in
|
||||||
|
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
home.packages = attrValues {
|
home.packages = attrValues {
|
||||||
inherit (pkgs) act dura lazygit;
|
inherit (pkgs) git act dura lazygit;
|
||||||
inherit (pkgs.gitAndTools) gh git-open git-crypt;
|
inherit (pkgs.gitAndTools) gh git-open git-crypt;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
zsh.initExtra = ''
|
zsh.initExtra = ''
|
||||||
# -------===[ Helpful Git Fn's ]===------- #
|
# -------===[ Helpful Git Fn's ]===------- #
|
||||||
gitignore() {
|
gitignore() {
|
||||||
curl -s -o .gitignore https://gitignore.io/api/$1
|
curl -s -o .gitignore https://gitignore.io/api/$1
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fish.functions = {
|
fish.functions = {
|
||||||
gitignore = "curl -sL https://www.gitignore.io/api/$argv";
|
gitignore = "curl -sL https://www.gitignore.io/api/$argv";
|
||||||
};
|
};
|
||||||
|
|
||||||
git = {
|
git = {
|
||||||
enable = true;
|
|
||||||
package = pkgs.gitFull;
|
|
||||||
difftastic = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
background = "dark";
|
package = pkgs.gitFull;
|
||||||
color = "always";
|
difftastic = {
|
||||||
display = "inline";
|
enable = true;
|
||||||
};
|
background = "dark";
|
||||||
|
color = "always";
|
||||||
ignores = [
|
display = "inline";
|
||||||
# General:
|
|
||||||
"*.bloop"
|
|
||||||
"*.bsp"
|
|
||||||
"*.metals"
|
|
||||||
"*.metals.sbt"
|
|
||||||
"*metals.sbt"
|
|
||||||
"*.direnv"
|
|
||||||
"*.envrc"
|
|
||||||
"*hie.yaml"
|
|
||||||
"*.mill-version"
|
|
||||||
"*.jvmopts"
|
|
||||||
|
|
||||||
# OS-related:
|
|
||||||
".DS_Store?"
|
|
||||||
".DS_Store"
|
|
||||||
".CFUserTextEncoding"
|
|
||||||
".Trash"
|
|
||||||
".Xauthority"
|
|
||||||
"thumbs.db"
|
|
||||||
"Thumbs.db"
|
|
||||||
"Icon?"
|
|
||||||
|
|
||||||
# Compiled residues:
|
|
||||||
"*.class"
|
|
||||||
"*.exe"
|
|
||||||
"*.o"
|
|
||||||
"*.pyc"
|
|
||||||
"*.elc"
|
|
||||||
];
|
|
||||||
|
|
||||||
extraConfig = {
|
|
||||||
init.defaultBranch = "main";
|
|
||||||
core = {
|
|
||||||
editor = "nvim";
|
|
||||||
whitespace = "trailing-space,space-before-tab";
|
|
||||||
};
|
|
||||||
credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret";
|
|
||||||
|
|
||||||
user = {
|
|
||||||
name = config.modules.${user}.user.full_name;
|
|
||||||
email = config.modules.${user}.user.email;
|
|
||||||
signingKey = "~/.ssh/id_rsa.pub";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
gpg.format = "ssh";
|
ignores = [
|
||||||
commit.gpgSign = true;
|
# General:
|
||||||
tag.gpgSign = true;
|
"*.bloop"
|
||||||
|
"*.bsp"
|
||||||
|
"*.metals"
|
||||||
|
"*.metals.sbt"
|
||||||
|
"*metals.sbt"
|
||||||
|
"*.direnv"
|
||||||
|
"*.envrc"
|
||||||
|
"*hie.yaml"
|
||||||
|
"*.mill-version"
|
||||||
|
"*.jvmopts"
|
||||||
|
|
||||||
push = {
|
# OS-related:
|
||||||
autoSetupRemote = true;
|
".DS_Store?"
|
||||||
default = "current";
|
".DS_Store"
|
||||||
gpgSign = "if-asked";
|
".CFUserTextEncoding"
|
||||||
autoSquash = true;
|
".Trash"
|
||||||
};
|
".Xauthority"
|
||||||
pull.rebase = true;
|
"thumbs.db"
|
||||||
|
"Thumbs.db"
|
||||||
|
"Icon?"
|
||||||
|
|
||||||
filter = {
|
# Compiled residues:
|
||||||
required = true;
|
"*.class"
|
||||||
smudge = "git-lfs smudge -- %f";
|
"*.exe"
|
||||||
process = "git-lfs filter-process";
|
"*.o"
|
||||||
clean = "git-lfs clean -- %f";
|
"*.pyc"
|
||||||
};
|
"*.elc"
|
||||||
|
];
|
||||||
|
|
||||||
url = {
|
extraConfig = {
|
||||||
"https://github.com/".insteadOf = "gh:";
|
init.defaultBranch = "main";
|
||||||
"git@github.com:".insteadOf = "ssh+gh:";
|
core = {
|
||||||
|
editor = "nvim";
|
||||||
|
whitespace = "trailing-space,space-before-tab";
|
||||||
|
};
|
||||||
|
credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret";
|
||||||
|
|
||||||
|
user = {
|
||||||
|
name = config.modules.${user}.user.full_name;
|
||||||
|
email = config.modules.${user}.user.email;
|
||||||
|
signingKey = "~/.ssh/id_rsa.pub";
|
||||||
|
};
|
||||||
|
|
||||||
|
gpg.format = "ssh";
|
||||||
|
commit.gpgSign = true;
|
||||||
|
tag.gpgSign = true;
|
||||||
|
|
||||||
|
push = {
|
||||||
|
autoSetupRemote = true;
|
||||||
|
default = "current";
|
||||||
|
gpgSign = "if-asked";
|
||||||
|
autoSquash = true;
|
||||||
|
};
|
||||||
|
pull.rebase = true;
|
||||||
|
|
||||||
|
filter = {
|
||||||
|
required = true;
|
||||||
|
smudge = "git-lfs smudge -- %f";
|
||||||
|
process = "git-lfs filter-process";
|
||||||
|
clean = "git-lfs clean -- %f";
|
||||||
|
};
|
||||||
|
|
||||||
|
url = {
|
||||||
|
"https://github.com/".insteadOf = "gh:";
|
||||||
|
"git@github.com:".insteadOf = "ssh+gh:";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, user, ... }:
|
{ config, lib, pkgs, user, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.options) mkEnableOption;
|
inherit (lib.options) mkEnableOption;
|
||||||
|
@ -9,87 +9,91 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf config.modules.${user}.shell.toolset.starship.enable {
|
config = mkIf config.modules.${user}.shell.toolset.starship.enable {
|
||||||
home-manager.users.${user}.programs.starship = {
|
home-manager.users.${user} = {
|
||||||
enable = true;
|
packages = with pkgs; [ starship ];
|
||||||
settings = {
|
|
||||||
format = "[╭](bold green) $username@$hostname$nix_shell: $directory$cmd_duration$git_branch$git_commit$git_state$git_status$line_break[╰](green bold)$character";
|
|
||||||
|
|
||||||
username = {
|
programs.starship = {
|
||||||
format = "[$user]($style)";
|
enable = true;
|
||||||
show_always = true;
|
settings = {
|
||||||
};
|
format = "[╭](bold green) $username@$hostname$nix_shell: $directory$cmd_duration$git_branch$git_commit$git_state$git_status$line_break[╰](green bold)$character";
|
||||||
|
|
||||||
hostname = {
|
username = {
|
||||||
ssh_only = false;
|
format = "[$user]($style)";
|
||||||
ssh_symbol = "🌐 ";
|
show_always = true;
|
||||||
format = "[$hostname](bold red)";
|
|
||||||
trim_at = ".local";
|
|
||||||
disabled = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
nix_shell = {
|
|
||||||
symbol = " ";
|
|
||||||
format = "[$symbol$name]($style) ";
|
|
||||||
style = "magenta bold";
|
|
||||||
};
|
|
||||||
|
|
||||||
git_branch = {
|
|
||||||
only_attached = true;
|
|
||||||
format = "[$symbol$branch]($style) ";
|
|
||||||
symbol = " ";
|
|
||||||
style = "yellow bold";
|
|
||||||
};
|
|
||||||
|
|
||||||
git_commit = {
|
|
||||||
tag_disabled = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
git_state = {
|
|
||||||
style = "magenta bold";
|
|
||||||
};
|
|
||||||
|
|
||||||
git_status = {
|
|
||||||
format = "[$all_status $ahead_behind]($style) ";
|
|
||||||
style = "bold green";
|
|
||||||
conflicted = "🏳";
|
|
||||||
up_to_date = "";
|
|
||||||
untracked = " ";
|
|
||||||
ahead = "⇡\${count}";
|
|
||||||
diverged = "⇕⇡\${ahead_count}⇣\${behind_count}";
|
|
||||||
behind = "⇣\${count}";
|
|
||||||
stashed = " ";
|
|
||||||
modified = " ";
|
|
||||||
staged = "[++\($count\)](green)";
|
|
||||||
renamed = "襁 ";
|
|
||||||
deleted = " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
directory = {
|
|
||||||
read_only = " ";
|
|
||||||
};
|
|
||||||
|
|
||||||
cmd_duration = {
|
|
||||||
format = "[$duration]($style) ";
|
|
||||||
style = "blue";
|
|
||||||
};
|
|
||||||
|
|
||||||
os = {
|
|
||||||
format = "[$symbol](bold white)";
|
|
||||||
disabled = false;
|
|
||||||
|
|
||||||
symbols = {
|
|
||||||
Windows = " ";
|
|
||||||
Arch = "";
|
|
||||||
Ubuntu = "";
|
|
||||||
Macos = "";
|
|
||||||
Manjaro = " ";
|
|
||||||
Nobara = " ";
|
|
||||||
Unknown = "";
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
fill = {
|
hostname = {
|
||||||
symbol = " ";
|
ssh_only = false;
|
||||||
|
ssh_symbol = "🌐 ";
|
||||||
|
format = "[$hostname](bold red)";
|
||||||
|
trim_at = ".local";
|
||||||
|
disabled = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
nix_shell = {
|
||||||
|
symbol = " ";
|
||||||
|
format = "[$symbol$name]($style) ";
|
||||||
|
style = "magenta bold";
|
||||||
|
};
|
||||||
|
|
||||||
|
git_branch = {
|
||||||
|
only_attached = true;
|
||||||
|
format = "[$symbol$branch]($style) ";
|
||||||
|
symbol = " ";
|
||||||
|
style = "yellow bold";
|
||||||
|
};
|
||||||
|
|
||||||
|
git_commit = {
|
||||||
|
tag_disabled = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
git_state = {
|
||||||
|
style = "magenta bold";
|
||||||
|
};
|
||||||
|
|
||||||
|
git_status = {
|
||||||
|
format = "[$all_status $ahead_behind]($style) ";
|
||||||
|
style = "bold green";
|
||||||
|
conflicted = "🏳";
|
||||||
|
up_to_date = "";
|
||||||
|
untracked = " ";
|
||||||
|
ahead = "⇡\${count}";
|
||||||
|
diverged = "⇕⇡\${ahead_count}⇣\${behind_count}";
|
||||||
|
behind = "⇣\${count}";
|
||||||
|
stashed = " ";
|
||||||
|
modified = " ";
|
||||||
|
staged = "[++\($count\)](green)";
|
||||||
|
renamed = "襁 ";
|
||||||
|
deleted = " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
directory = {
|
||||||
|
read_only = " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
cmd_duration = {
|
||||||
|
format = "[$duration]($style) ";
|
||||||
|
style = "blue";
|
||||||
|
};
|
||||||
|
|
||||||
|
os = {
|
||||||
|
format = "[$symbol](bold white)";
|
||||||
|
disabled = false;
|
||||||
|
|
||||||
|
symbols = {
|
||||||
|
Windows = " ";
|
||||||
|
Arch = "";
|
||||||
|
Ubuntu = "";
|
||||||
|
Macos = "";
|
||||||
|
Manjaro = " ";
|
||||||
|
Nobara = " ";
|
||||||
|
Unknown = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fill = {
|
||||||
|
symbol = " ";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,96 +8,100 @@ in
|
||||||
in { enable = mkEnableOption "terminal multiplexer"; };
|
in { enable = mkEnableOption "terminal multiplexer"; };
|
||||||
|
|
||||||
config = mkIf config.modules.${user}.shell.toolset.tmux.enable {
|
config = mkIf config.modules.${user}.shell.toolset.tmux.enable {
|
||||||
home-manager.users.${user}.programs.tmux = {
|
home-manager.users.${user} = {
|
||||||
enable = true;
|
packages = with pkgs; [ tmux ];
|
||||||
secureSocket = true;
|
|
||||||
keyMode = "vi";
|
|
||||||
prefix = "C-a";
|
|
||||||
terminal = "tmux-256color";
|
|
||||||
|
|
||||||
baseIndex = 1;
|
programs.tmux = {
|
||||||
clock24 = true;
|
enable = true;
|
||||||
disableConfirmationPrompt = true;
|
secureSocket = true;
|
||||||
escapeTime = 0;
|
keyMode = "vi";
|
||||||
|
prefix = "C-a";
|
||||||
|
terminal = "tmux-256color";
|
||||||
|
|
||||||
aggressiveResize = false;
|
baseIndex = 1;
|
||||||
resizeAmount = 2;
|
clock24 = true;
|
||||||
reverseSplit = false;
|
disableConfirmationPrompt = true;
|
||||||
historyLimit = 5000;
|
escapeTime = 0;
|
||||||
newSession = true;
|
|
||||||
|
|
||||||
plugins = let
|
aggressiveResize = false;
|
||||||
inherit (pkgs.tmuxPlugins) resurrect continuum;
|
resizeAmount = 2;
|
||||||
in [
|
reverseSplit = false;
|
||||||
{
|
historyLimit = 5000;
|
||||||
plugin = resurrect;
|
newSession = true;
|
||||||
extraConfig = "set -g @resurrect-strategy-nvim 'session'";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
plugin = continuum;
|
|
||||||
extraConfig = ''
|
|
||||||
set -g @continuum-restore 'on'
|
|
||||||
set -g @continuum-save-interval '60' # minutes
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
extraConfig = ''
|
plugins = let
|
||||||
# -------===[ Color Correction ]===------- #
|
inherit (pkgs.tmuxPlugins) resurrect continuum;
|
||||||
set-option -ga terminal-overrides ",*256col*:Tc"
|
in [
|
||||||
set-option -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
|
{
|
||||||
set-environment -g COLORTERM "truecolor"
|
plugin = resurrect;
|
||||||
|
extraConfig = "set -g @resurrect-strategy-nvim 'session'";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = continuum;
|
||||||
|
extraConfig = ''
|
||||||
|
set -g @continuum-restore 'on'
|
||||||
|
set -g @continuum-save-interval '60' # minutes
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
# -------===[ General-Configurations ]===------- #
|
extraConfig = ''
|
||||||
set-option -g renumber-windows on
|
# -------===[ Color Correction ]===------- #
|
||||||
set-window-option -g automatic-rename on
|
set-option -ga terminal-overrides ",*256col*:Tc"
|
||||||
set-window-option -g word-separators ' @"=()[]'
|
set-option -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
|
||||||
|
set-environment -g COLORTERM "truecolor"
|
||||||
|
|
||||||
set-option -g mouse on
|
# -------===[ General-Configurations ]===------- #
|
||||||
set-option -s focus-events on
|
set-option -g renumber-windows on
|
||||||
set-option -g renumber-windows on
|
set-window-option -g automatic-rename on
|
||||||
set-option -g allow-rename off
|
set-window-option -g word-separators ' @"=()[]'
|
||||||
|
|
||||||
# -------===[ Activity/Sound ]===------- #
|
set-option -g mouse on
|
||||||
set-option -g bell-action none
|
set-option -s focus-events on
|
||||||
set-option -g visual-bell off
|
set-option -g renumber-windows on
|
||||||
set-option -g visual-silence off
|
set-option -g allow-rename off
|
||||||
set-option -g visual-activity off
|
|
||||||
set-window-option -g monitor-activity off
|
|
||||||
|
|
||||||
# -------===[ Status-Bar ]===------- #
|
# -------===[ Activity/Sound ]===------- #
|
||||||
set-option -g status on
|
set-option -g bell-action none
|
||||||
set-option -g status-interval 1
|
set-option -g visual-bell off
|
||||||
set-option -g status-style bg=default,bold,italics
|
set-option -g visual-silence off
|
||||||
|
set-option -g visual-activity off
|
||||||
|
set-window-option -g monitor-activity off
|
||||||
|
|
||||||
set-option -g status-position top
|
# -------===[ Status-Bar ]===------- #
|
||||||
set-option -g status-justify left
|
set-option -g status on
|
||||||
|
set-option -g status-interval 1
|
||||||
|
set-option -g status-style bg=default,bold,italics
|
||||||
|
|
||||||
set-option -g status-left-length "40"
|
set-option -g status-position top
|
||||||
set-option -g status-right-length "80"
|
set-option -g status-justify left
|
||||||
|
|
||||||
# -------===[ Keybindings ]===------- #
|
set-option -g status-left-length "40"
|
||||||
bind-key c clock-mode
|
set-option -g status-right-length "80"
|
||||||
|
|
||||||
# Window Control(s):
|
# -------===[ Keybindings ]===------- #
|
||||||
bind-key q kill-session
|
bind-key c clock-mode
|
||||||
bind-key Q kill-server
|
|
||||||
bind-key t new-window -c '#{pane_current_path}'
|
|
||||||
|
|
||||||
# Buffers:
|
# Window Control(s):
|
||||||
bind-key b list-buffers
|
bind-key q kill-session
|
||||||
bind-key p paste-buffer
|
bind-key Q kill-server
|
||||||
bind-key P choose-buffer
|
bind-key t new-window -c '#{pane_current_path}'
|
||||||
|
|
||||||
# Split bindings:
|
# Buffers:
|
||||||
bind-key - split-window -v -c '#{pane_current_path}'
|
bind-key b list-buffers
|
||||||
bind-key / split-window -h -c '#{pane_current_path}'
|
bind-key p paste-buffer
|
||||||
|
bind-key P choose-buffer
|
||||||
|
|
||||||
# Copy/Paste bindings:
|
# Split bindings:
|
||||||
bind-key -T copy-mode-vi v send-keys -X begin-selection -N "Start visual mode for selection"
|
bind-key - split-window -v -c '#{pane_current_path}'
|
||||||
bind-key -T copy-mode-vi y send-keys -X copy-selection -N "Yank text into buffer"
|
bind-key / split-window -h -c '#{pane_current_path}'
|
||||||
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle -N "Yank region into buffer"
|
|
||||||
'';
|
# Copy/Paste bindings:
|
||||||
|
bind-key -T copy-mode-vi v send-keys -X begin-selection -N "Start visual mode for selection"
|
||||||
|
bind-key -T copy-mode-vi y send-keys -X copy-selection -N "Yank text into buffer"
|
||||||
|
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle -N "Yank region into buffer"
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, user, ... }:
|
{ config, lib, pkgs, user, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.options) mkEnableOption;
|
inherit (lib.options) mkEnableOption;
|
||||||
|
@ -11,8 +11,12 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home-manager.users.${user}.programs.yazi = {
|
home-manager.users.${user} = {
|
||||||
enable = true;
|
packages = with pkgs; [ yazi ];
|
||||||
|
|
||||||
|
programs.yazi = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
22
modules/home/shell/toolset/zoxide.nix
Normal file
22
modules/home/shell/toolset/zoxide.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{ config, lib, pkgs, user, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (lib.options) mkEnableOption;
|
||||||
|
|
||||||
|
cfg = config.modules.${user}.shell.toolset.zoxide;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.${user}.shell.toolset.zoxide = {
|
||||||
|
enable = mkEnableOption "system-monitor";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home-manager.users.${user} = {
|
||||||
|
packages = with pkgs; [ zoxide ];
|
||||||
|
|
||||||
|
programs.zoxide = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue