added stuff
This commit is contained in:
parent
937f28770d
commit
236b8c2a6b
907 changed files with 70990 additions and 0 deletions
25
nyx/homes/notashelf/programs/terminal/tools/bat.nix
Normal file
25
nyx/homes/notashelf/programs/terminal/tools/bat.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{pkgs, ...}: let
|
||||
catppuccin = builtins.readFile (pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/catppuccin/bat/main/Catppuccin-mocha.tmTheme";
|
||||
hash = "sha256-qMQNJGZImmjrqzy7IiEkY5IhvPAMZpq0W6skLLsng/w=";
|
||||
});
|
||||
in {
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
themes = {
|
||||
Catppuccin-mocha = {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "bat";
|
||||
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
|
||||
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
|
||||
};
|
||||
file = "Catppuccin-mocha.tmTheme";
|
||||
};
|
||||
};
|
||||
config = {
|
||||
theme = "Catppuccin-mocha";
|
||||
pager = "less -FR"; # frfr
|
||||
};
|
||||
};
|
||||
}
|
33
nyx/homes/notashelf/programs/terminal/tools/bottom.nix
Normal file
33
nyx/homes/notashelf/programs/terminal/tools/bottom.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
# replace top and htop with bottom
|
||||
# if breaks shit? cope.
|
||||
(writeScriptBin "htop" ''exec btm'')
|
||||
(writeScriptBin "top" ''exec btm'')
|
||||
];
|
||||
programs.bottom = {
|
||||
enable = true;
|
||||
settings = {
|
||||
flags.group_processes = true;
|
||||
row = [
|
||||
{
|
||||
ratio = 2;
|
||||
child = [
|
||||
{type = "cpu";}
|
||||
{type = "mem";}
|
||||
];
|
||||
}
|
||||
{
|
||||
ratio = 3;
|
||||
child = [
|
||||
{
|
||||
type = "proc";
|
||||
ratio = 1;
|
||||
default = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
29
nyx/homes/notashelf/programs/terminal/tools/default.nix
Normal file
29
nyx/homes/notashelf/programs/terminal/tools/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
imports = [
|
||||
./fastfetch
|
||||
./git
|
||||
./neomutt
|
||||
./newsboat
|
||||
./vifm
|
||||
./xplr
|
||||
./yazi
|
||||
./zellij
|
||||
|
||||
./bat.nix
|
||||
./bottom.nix
|
||||
./dircolors.nix
|
||||
./eza.nix
|
||||
./gh.nix
|
||||
./gpg.nix
|
||||
./man.nix
|
||||
./nix-index.nix
|
||||
./nix-init.nix
|
||||
./nix-shell.nix
|
||||
./ranger.nix
|
||||
./ssh.nix
|
||||
./tealdeer.nix
|
||||
./transient-services.nix
|
||||
./xdg.nix
|
||||
./zoxide.nix
|
||||
];
|
||||
}
|
10
nyx/homes/notashelf/programs/terminal/tools/dircolors.nix
Normal file
10
nyx/homes/notashelf/programs/terminal/tools/dircolors.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
programs.dircolors = {
|
||||
enable = true;
|
||||
settings = {
|
||||
OTHER_WRITABLE = "30;46";
|
||||
".sh" = "01;32";
|
||||
".csh" = "01;32";
|
||||
};
|
||||
};
|
||||
}
|
12
nyx/homes/notashelf/programs/terminal/tools/eza.nix
Normal file
12
nyx/homes/notashelf/programs/terminal/tools/eza.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
icons = true;
|
||||
git = true;
|
||||
enableZshIntegration = false;
|
||||
extraOptions = [
|
||||
"--group-directories-first"
|
||||
"--header"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
home = {
|
||||
packages = [pkgs.fastfetch];
|
||||
};
|
||||
|
||||
xdg.configFile."fastfetch/config.jsonc".text = builtins.toJSON {
|
||||
"$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json";
|
||||
logo = {
|
||||
source = "nixos_small";
|
||||
padding = {
|
||||
left = 1;
|
||||
right = 3;
|
||||
};
|
||||
};
|
||||
display = {
|
||||
separator = " ";
|
||||
keyWidth = 14;
|
||||
};
|
||||
modules = [
|
||||
{
|
||||
type = "os";
|
||||
key = " system ";
|
||||
format = "{3}";
|
||||
}
|
||||
{
|
||||
type = "kernel";
|
||||
key = " kernel ";
|
||||
format = "{1} {2} ({4})";
|
||||
}
|
||||
{
|
||||
type = "uptime";
|
||||
key = " uptime ";
|
||||
}
|
||||
{
|
||||
type = "wm";
|
||||
key = " wm ";
|
||||
}
|
||||
{
|
||||
type = "command";
|
||||
key = " packages";
|
||||
text = "(${lib.getExe' pkgs.nix "nix-store"} --query --requisites /run/current-system | wc -l | tr -d '\n') && echo ' (nix; /run/current-system)'";
|
||||
}
|
||||
{
|
||||
type = "memory";
|
||||
key = " memory ";
|
||||
}
|
||||
{
|
||||
type = "disk";
|
||||
key = " storage ";
|
||||
format = "{1} / {2} ({3})";
|
||||
folders = "/";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
16
nyx/homes/notashelf/programs/terminal/tools/gh.nix
Normal file
16
nyx/homes/notashelf/programs/terminal/tools/gh.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{pkgs, ...}: {
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
gitCredentialHelper.enable = false;
|
||||
extensions = with pkgs; [
|
||||
gh-dash # dashboard with pull requests and issues
|
||||
gh-eco # explore the ecosystem
|
||||
gh-cal # contributions calender terminal viewer
|
||||
gh-poi # clean up local branches safely
|
||||
];
|
||||
settings = {
|
||||
git_protocol = "ssh";
|
||||
prompt = "enabled";
|
||||
};
|
||||
};
|
||||
}
|
23
nyx/homes/notashelf/programs/terminal/tools/git/aliases.nix
Normal file
23
nyx/homes/notashelf/programs/terminal/tools/git/aliases.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
programs.git.aliases = {
|
||||
br = "branch";
|
||||
c = "commit -m";
|
||||
ca = "commit -am";
|
||||
co = "checkout";
|
||||
d = "diff";
|
||||
df = "!git hist | peco | awk '{print $2}' | xargs -I {} git diff {}^ {}";
|
||||
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; vim `f`";
|
||||
fuck = "commit --amend -m";
|
||||
graph = "log --all --decorate --graph";
|
||||
ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)";
|
||||
pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)";
|
||||
af = "!git add $(git ls-files -m -o --exclude-standard | fzf -m)";
|
||||
st = "status";
|
||||
hist = ''
|
||||
log --pretty=format:"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)" --graph --date=relative --decorate --all
|
||||
'';
|
||||
llog = ''
|
||||
log --graph --name-status --pretty=format:"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset" --date=relative
|
||||
'';
|
||||
};
|
||||
}
|
111
nyx/homes/notashelf/programs/terminal/tools/git/default.nix
Normal file
111
nyx/homes/notashelf/programs/terminal/tools/git/default.nix
Normal file
|
@ -0,0 +1,111 @@
|
|||
{
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (osConfig) modules;
|
||||
cfg = modules.system.programs.git;
|
||||
in {
|
||||
imports = [
|
||||
./aliases.nix
|
||||
./ignore.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
home.packages = with pkgs; [
|
||||
gist # manage github gists
|
||||
act # local github actions
|
||||
zsh-forgit # zsh plugin to load forgit via `git forgit`
|
||||
gitflow
|
||||
];
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
|
||||
# my credientals
|
||||
userName = "NotAShelf";
|
||||
userEmail = "raf@notashelf.dev";
|
||||
|
||||
# lets sign using our own key
|
||||
# this must be provided by the host
|
||||
signing = {
|
||||
key = cfg.signingKey;
|
||||
signByDefault = true;
|
||||
};
|
||||
|
||||
lfs = {
|
||||
enable = true;
|
||||
skipSmudge = true;
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
# I don't care about the usage of the term "master"
|
||||
# but main is easier to type, so that's that
|
||||
init.defaultBranch = "main";
|
||||
|
||||
# disable the horrendous GUI password prompt for Git when auth fails
|
||||
core.askPass = "";
|
||||
|
||||
# prefer using libsecret for storing and retrieving credientals
|
||||
credential.helper = "${pkgs.gitAndTools.gitFull}/bin/git-credential-libsecret";
|
||||
|
||||
# delta is some kind of a syntax highlighting pager for git
|
||||
# it looks nice but I'd like to consider difftastic at some point
|
||||
delta = {
|
||||
enable = true;
|
||||
line-numbers = true;
|
||||
features = "decorations side-by-side navigate";
|
||||
options = {
|
||||
navigate = true;
|
||||
line-numbers = true;
|
||||
side-by-side = true;
|
||||
dark = true;
|
||||
};
|
||||
};
|
||||
|
||||
branch.autosetupmerge = "true";
|
||||
pull.ff = "only";
|
||||
|
||||
push = {
|
||||
default = "current";
|
||||
followTags = true;
|
||||
autoSetupRemote = true;
|
||||
};
|
||||
|
||||
merge = {
|
||||
stat = "true";
|
||||
conflictstyle = "diff3";
|
||||
};
|
||||
|
||||
core.whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol";
|
||||
color.ui = "auto";
|
||||
|
||||
repack.usedeltabaseoffset = "true";
|
||||
|
||||
rebase = {
|
||||
autoSquash = true;
|
||||
autoStash = true;
|
||||
};
|
||||
|
||||
rerere = {
|
||||
autoupdate = true;
|
||||
enabled = true;
|
||||
};
|
||||
|
||||
url = {
|
||||
"https://github.com/".insteadOf = "github:";
|
||||
"ssh://git@github.com/".pushInsteadOf = "github:";
|
||||
"https://gitlab.com/".insteadOf = "gitlab:";
|
||||
"ssh://git@gitlab.com/".pushInsteadOf = "gitlab:";
|
||||
"https://aur.archlinux.org/".insteadOf = "aur:";
|
||||
"ssh://aur@aur.archlinux.org/".pushInsteadOf = "aur:";
|
||||
"https://git.sr.ht/".insteadOf = "srht:";
|
||||
"ssh://git@git.sr.ht/".pushInsteadOf = "srht:";
|
||||
"https://codeberg.org/".insteadOf = "codeberg:";
|
||||
"ssh://git@codeberg.org/".pushInsteadOf = "codeberg:";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
53
nyx/homes/notashelf/programs/terminal/tools/git/ignore.nix
Normal file
53
nyx/homes/notashelf/programs/terminal/tools/git/ignore.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{lib, ...}: let
|
||||
general = ''
|
||||
.cache/
|
||||
tmp/
|
||||
*.tmp
|
||||
log/
|
||||
'';
|
||||
|
||||
ide = ''
|
||||
*.swp
|
||||
.idea/
|
||||
.~lock*
|
||||
'';
|
||||
|
||||
c = ''
|
||||
.tags
|
||||
tags
|
||||
*~
|
||||
*.o
|
||||
*.so
|
||||
*.cmake
|
||||
CMakeCache.txt
|
||||
CMakeFiles/
|
||||
cmake-build-debug/
|
||||
compile_commands.json
|
||||
.ccls*
|
||||
'';
|
||||
|
||||
nix = ''
|
||||
result
|
||||
result-*
|
||||
.direnv/
|
||||
'';
|
||||
|
||||
node = ''
|
||||
node_modules/
|
||||
'';
|
||||
|
||||
python = ''
|
||||
venv
|
||||
.venv
|
||||
*pyc
|
||||
*.egg-info/
|
||||
__pycached__/
|
||||
.mypy_cache
|
||||
'';
|
||||
|
||||
ignore = lib.concatStringsSep "\n" [general c nix node ide python];
|
||||
in {
|
||||
# construct the list of ignored files from a very large string containing
|
||||
# the list of ignored files, but in a plaintext format for my own convenience
|
||||
programs.git.ignores = map (v: "${toString v}") (builtins.split "\n" ignore);
|
||||
}
|
81
nyx/homes/notashelf/programs/terminal/tools/gpg.nix
Normal file
81
nyx/homes/notashelf/programs/terminal/tools/gpg.nix
Normal file
|
@ -0,0 +1,81 @@
|
|||
{
|
||||
osConfig,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
sys = osConfig.modules.system;
|
||||
|
||||
pinentryPkg =
|
||||
if sys.video.enable
|
||||
then pkgs.pinentry-gnome3 # requires services.dbus.packages = [ pkgs.gcr ]
|
||||
else pkgs.pinentry-curses;
|
||||
in {
|
||||
services = {
|
||||
gpg-agent = {
|
||||
enable = true;
|
||||
pinentryPackage = pinentryPkg;
|
||||
enableSshSupport = true;
|
||||
defaultCacheTtl = 1209600;
|
||||
defaultCacheTtlSsh = 1209600;
|
||||
maxCacheTtl = 1209600;
|
||||
maxCacheTtlSsh = 1209600;
|
||||
extraConfig = "allow-preset-passphrase";
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Allow manually restarting gpg-agent in case of failure
|
||||
systemd.user.services.gpg-agent.Unit.RefuseManualStart = lib.mkForce false;
|
||||
|
||||
programs = {
|
||||
gpg = {
|
||||
enable = true;
|
||||
homedir = "${config.xdg.dataHome}/gnupg";
|
||||
settings = {
|
||||
keyserver = "keys.openpgp.org";
|
||||
# https://github.com/drduh/config/blob/master/gpg.conf
|
||||
# https://www.gnupg.org/documentation/manuals/gnupg/GPG-Configuration-Options.html
|
||||
# https://www.gnupg.org/documentation/manuals/gnupg/GPG-Esoteric-Options.html
|
||||
# Use AES256, 192, or 128 as cipher
|
||||
personal-cipher-preferences = "AES256 AES192 AES";
|
||||
# Use SHA512, 384, or 256 as digest
|
||||
personal-digest-preferences = "SHA512 SHA384 SHA256";
|
||||
# Use ZLIB, BZIP2, ZIP, or no compression
|
||||
personal-compress-preferences = "ZLIB BZIP2 ZIP Uncompressed";
|
||||
# Default preferences for new keys
|
||||
default-preference-list = "SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed";
|
||||
# SHA512 as digest to sign keys
|
||||
cert-digest-algo = "SHA512";
|
||||
# SHA512 as digest for symmetric ops
|
||||
s2k-digest-algo = "SHA512";
|
||||
# AES256 as cipher for symmetric ops
|
||||
s2k-cipher-algo = "AES256";
|
||||
# UTF-8 support for compatibility
|
||||
charset = "utf-8";
|
||||
# Show Unix timestamps
|
||||
fixed-list-mode = "";
|
||||
# No comments in signature
|
||||
no-comments = "";
|
||||
# No version in signature
|
||||
no-emit-version = "";
|
||||
# Disable banner
|
||||
no-greeting = "";
|
||||
# Long hexidecimal key format
|
||||
keyid-format = "0xlong";
|
||||
# Display UID validity
|
||||
list-options = "show-uid-validity";
|
||||
verify-options = "show-uid-validity";
|
||||
# Display all keys and their fingerprints
|
||||
with-fingerprint = "";
|
||||
# Cross-certify subkeys are present and valid
|
||||
require-cross-certification = "";
|
||||
# Disable caching of passphrase for symmetrical ops
|
||||
no-symkey-cache = "";
|
||||
# Enable smartcard
|
||||
use-agent = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
6
nyx/homes/notashelf/programs/terminal/tools/man.nix
Normal file
6
nyx/homes/notashelf/programs/terminal/tools/man.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
programs.man = {
|
||||
enable = true;
|
||||
generateCaches = true; # slows down rebuilds
|
||||
};
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
binds = [
|
||||
{
|
||||
# Reply to a group or mailing list.
|
||||
action = "group-reply";
|
||||
key = "R";
|
||||
map = [
|
||||
"index"
|
||||
"pager"
|
||||
];
|
||||
}
|
||||
|
||||
{
|
||||
# Move to the previous box in the sidebar.
|
||||
action = "sidebar-prev";
|
||||
key = "\\cK";
|
||||
map = [
|
||||
"index"
|
||||
"pager"
|
||||
];
|
||||
}
|
||||
|
||||
{
|
||||
# Move to the next box in the sidebar.
|
||||
action = "sidebar-next";
|
||||
key = "\\cJ";
|
||||
map = [
|
||||
"index"
|
||||
"pager"
|
||||
];
|
||||
}
|
||||
|
||||
{
|
||||
# Open the current box highlighted in the sidebar.
|
||||
action = "sidebar-open";
|
||||
key = "\\cO";
|
||||
map = [
|
||||
"index"
|
||||
"pager"
|
||||
];
|
||||
}
|
||||
|
||||
{
|
||||
# View the raw contents of a message.
|
||||
action = "view-raw-message";
|
||||
key = "Z";
|
||||
map = [
|
||||
"index"
|
||||
"pager"
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
# vim: filetype=nix
|
||||
{pkgs, ...}: {
|
||||
muttColors = pkgs.writeTextFile {
|
||||
name = "muttColors";
|
||||
text = ''
|
||||
# vim: filetype=muttrc
|
||||
# Header colors:
|
||||
color header blue default ".*"
|
||||
color header brightmagenta default "^(From)"
|
||||
color header brightcyan default "^(Subject)"
|
||||
color header brightwhite default "^(CC|BCC)"
|
||||
|
||||
mono bold bold
|
||||
mono underline underline
|
||||
mono indicator reverse
|
||||
mono error bold
|
||||
color normal default default
|
||||
color indicator brightyellow default # currently selected message. default makes bar clear, disabled arrow to save space.
|
||||
color sidebar_highlight red default
|
||||
color sidebar_divider brightblack black
|
||||
color sidebar_flagged red black
|
||||
color sidebar_new green black
|
||||
color normal brightyellow default
|
||||
color error red default
|
||||
color tilde black default
|
||||
color message cyan default
|
||||
color markers red white
|
||||
color attachment white default
|
||||
color search brightmagenta default
|
||||
color status brightyellow black
|
||||
color hdrdefault brightgreen default
|
||||
color quoted green default
|
||||
color quoted1 blue default
|
||||
color quoted2 cyan default
|
||||
color quoted3 yellow default
|
||||
color quoted4 red default
|
||||
color quoted5 brightred default
|
||||
color signature brightgreen default
|
||||
color bold black default
|
||||
color underline black default
|
||||
color normal default default
|
||||
|
||||
color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses
|
||||
color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL
|
||||
color body green default "\`[^\`]*\`" # Green text between ` and `
|
||||
color body brightblue default "^# \.*" # Headings as bold blue
|
||||
color body brightcyan default "^## \.*" # Subheadings as bold cyan
|
||||
color body brightgreen default "^### \.*" # Subsubheadings as bold green
|
||||
color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow
|
||||
color body brightcyan default "[;:][-o][)/(|]" # emoticons
|
||||
color body brightcyan default "[;:][)(|]" # emoticons
|
||||
color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon?
|
||||
color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon?
|
||||
color body red default "(BAD signature)"
|
||||
color body cyan default "(Good signature)"
|
||||
color body brightblack default "^gpg: Good signature .*"
|
||||
color body brightyellow default "^gpg: "
|
||||
color body brightyellow red "^gpg: BAD signature from.*"
|
||||
mono body bold "^gpg: Good signature"
|
||||
mohttps://neomutt.org/code/config_vars.htmlno body bold "^gpg: BAD signature from.*"
|
||||
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
|
||||
|
||||
# Default index colors:
|
||||
color index yellow default '.*'
|
||||
color index_author red default '.*'
|
||||
color index_number blue default
|
||||
color index_subject cyan default '.*'
|
||||
|
||||
# For new mail:
|
||||
color index brightyellow black "~N"
|
||||
color index_author brightred black "~N"
|
||||
color index_subject brightcyan black "~N"
|
||||
|
||||
color progress black cyan
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mapAttrsToList flatten concatStringsSep;
|
||||
in {
|
||||
config = {
|
||||
programs.neomutt = {
|
||||
enable = true;
|
||||
vimKeys = true;
|
||||
checkStatsInterval = 60;
|
||||
|
||||
# sidebar
|
||||
sidebar = {
|
||||
enable = true;
|
||||
width = 30;
|
||||
format = "%D%?F? [%F]?%* %?N?%N/?%S";
|
||||
};
|
||||
|
||||
# sort default view by threads
|
||||
sort = "threads";
|
||||
|
||||
# get keybinds from their respective file
|
||||
inherit (import ./binds.nix) binds;
|
||||
|
||||
# get settings from their respective file
|
||||
inherit (import ./settings.nix {inherit config;}) settings;
|
||||
|
||||
# get macros from their respective file
|
||||
inherit (import ./macros.nix) macros;
|
||||
|
||||
extraConfig = let
|
||||
# collect all addresses and aliases from accounts.email.accounts attribute of home-manager
|
||||
accounts = mapAttrsToList (_: value: [value.address] ++ value.aliases) config.accounts.email.accounts;
|
||||
addresses = flatten accounts;
|
||||
in ''
|
||||
# add collected accounts to neomutt config
|
||||
alternates "${concatStringsSep "|" addresses}"
|
||||
|
||||
# mark anything marked by SpamAssassin as probably spam
|
||||
spam "X-Spam-Score: ([0-9\\.]+).*" "SA: %1"
|
||||
|
||||
# only show the basic mail headers
|
||||
ignore *
|
||||
unignore From To Cc Bcc Date Subject
|
||||
|
||||
# show headers in the following order
|
||||
unhdr_order *
|
||||
hdr_order From: To: Cc: Bcc: Date: Subject:
|
||||
|
||||
'';
|
||||
};
|
||||
|
||||
xdg = {
|
||||
desktopEntries = {
|
||||
neomutt = {
|
||||
name = "Neomutt";
|
||||
genericName = "Email Client";
|
||||
comment = "Read and send emails";
|
||||
exec = "neomutt %U";
|
||||
icon = "neomutt";
|
||||
terminal = true;
|
||||
categories = ["Network" "Email" "ConsoleOnly"];
|
||||
type = "Application";
|
||||
mimeType = ["x-scheme-handler/mailto"];
|
||||
};
|
||||
};
|
||||
mimeApps.defaultApplications = {
|
||||
"x-scheme-handler/mailto" = "neomutt.desktop";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
macros = [
|
||||
{
|
||||
# toggle the sidebar's visibility and refresh/redraw the screen
|
||||
action = "<enter-command>toggle sidebar_visible<enter><refresh>";
|
||||
key = "B";
|
||||
map = ["index"];
|
||||
}
|
||||
{
|
||||
action = "<enter-command>toggle sidebar_visible<enter><redraw-screen>";
|
||||
key = "B";
|
||||
map = ["pager"];
|
||||
}
|
||||
];
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
{config}: {
|
||||
settings = {
|
||||
# if the given mail doesn't have an explicit charset, assume an old
|
||||
# and Windows-y compatible charset as fallback
|
||||
assumed_charset = "iso-8859-1";
|
||||
|
||||
# use gpgme for cryptography
|
||||
crypt_use_gpgme = "yes";
|
||||
|
||||
# use PKA to find keys via DNS records and possibly check whether an email
|
||||
# address is controlled by who it says it is
|
||||
crypt_use_pka = "yes";
|
||||
|
||||
# always try to verify signatures
|
||||
crypt_verify_sig = "yes";
|
||||
|
||||
# ask to purge messages marked for delete when closing/syncing a box, with
|
||||
# the default to do so
|
||||
delete = "ask-yes";
|
||||
|
||||
# when editing outgoing mail, allow editing the headers too
|
||||
edit_headers = "yes";
|
||||
|
||||
# the format to use for subjects when forwarding messages
|
||||
forward_format = "\"Fwd: %s\"";
|
||||
|
||||
# save 10_000 lines of string buffer history per category
|
||||
history = "10000";
|
||||
|
||||
# save history to a file in neomutt's directory
|
||||
history_file = "${config.xdg.configHome}/neomutt/history";
|
||||
|
||||
# when connecting via IMAP, add all subscribed folders from the server
|
||||
imap_check_subscribed = "yes";
|
||||
|
||||
# keep IMAP connections alive with a keepalive every 5 minutes
|
||||
imap_keepalive = "300";
|
||||
|
||||
# use a smaller IMAP pipeline to play nice with servers like GMail
|
||||
imap_pipeline_depth = "5";
|
||||
|
||||
# check for new mail every minute
|
||||
mail_check = "60";
|
||||
|
||||
# the path to the mailcap file
|
||||
mailcap_path = "${config.home.homeDirectory}/.mailcap";
|
||||
|
||||
# use Maildir-style mailboxes
|
||||
mbox_type = "Maildir";
|
||||
|
||||
# scroll menus and such by a single line, rather than a whole page
|
||||
menu_scroll = "yes";
|
||||
|
||||
# show five lines of context when moving between pages in the pager
|
||||
pager_context = "5";
|
||||
|
||||
# the format for the pager status line.
|
||||
pager_format = "\" %C - %[%H:%M] %.20v, %s%* %?H? [%H] ?\"";
|
||||
|
||||
# when in the mail pager, show 10 lines of the index above the current
|
||||
# message
|
||||
pager_index_lines = "10";
|
||||
|
||||
# don't move to the next message when reaching the bottom of a message
|
||||
pager_stop = "yes";
|
||||
|
||||
# reply to mail using the same address the original was sent to
|
||||
reverse_name = "yes";
|
||||
|
||||
# send all mail as UTF-8
|
||||
send_charset = "utf-8";
|
||||
|
||||
# sort the mailboxes in the sidebar by mailbox path
|
||||
sidebar_sort_method = "path";
|
||||
|
||||
# sort by last message date if messages are in the same thread
|
||||
sort_aux = "last-date-received";
|
||||
|
||||
# separate matching spam headers with this separator
|
||||
spam_separator = ", ";
|
||||
|
||||
# only group messages as a thread by the In-Reply-To or References headers
|
||||
# rather than matching subject names
|
||||
strict_threads = "yes";
|
||||
|
||||
# search messages against their decoded contents
|
||||
thorough_search = "yes";
|
||||
|
||||
# pad blank lines at the bottom of the screen with tildes
|
||||
tilde = "yes";
|
||||
};
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf getExe;
|
||||
|
||||
mpv = "${getExe pkgs.mpv}";
|
||||
glow = "${getExe pkgs.glow}";
|
||||
pandoc = "${getExe pkgs.pandoc}";
|
||||
|
||||
dev = osConfig.modules.device;
|
||||
acceptedTypes = ["laptop" "desktop" "hybrid" "lite"];
|
||||
in {
|
||||
config = mkIf (builtins.elem dev.type acceptedTypes) {
|
||||
programs.newsboat = {
|
||||
enable = true;
|
||||
autoReload = true;
|
||||
|
||||
inherit ((import ./urls.nix)) urls;
|
||||
|
||||
extraConfig = ''
|
||||
error-log /dev/null
|
||||
|
||||
download-full-page yes
|
||||
download-retries 3
|
||||
cookie-cache ~/.cache/newsboat/cookies.txt
|
||||
|
||||
auto-reload yes
|
||||
max-items 0
|
||||
scrolloff 999
|
||||
reload-threads 100
|
||||
|
||||
bind-key j down
|
||||
bind-key k up
|
||||
bind-key j next articlelist
|
||||
bind-key k prev articlelist
|
||||
bind-key J next-feed articlelist
|
||||
bind-key K prev-feed articlelist
|
||||
bind-key G end
|
||||
bind-key g home
|
||||
bind-key d pagedown
|
||||
bind-key u pageup
|
||||
bind-key l open
|
||||
bind-key h quit
|
||||
bind-key a toggle-article-read
|
||||
bind-key n next-unread
|
||||
bind-key N prev-unread
|
||||
bind-key D pb-download
|
||||
bind-key U show-urls
|
||||
bind-key x pb-delete
|
||||
|
||||
color listnormal color15 default
|
||||
color listnormal_unread color2 default
|
||||
color listfocus_unread color2 color0
|
||||
color listfocus default color0
|
||||
color background default default
|
||||
color article default default
|
||||
color end-of-text-marker color8 default
|
||||
color info color4 color8
|
||||
color hint-separator default color8
|
||||
color hint-description default color8
|
||||
color title color14 color8
|
||||
|
||||
highlight article "^(Feed|Title|Author|Link|Date): .+" color4 default bold
|
||||
highlight article "^(Feed|Title|Author|Link|Date):" color14 default bold
|
||||
highlight article "\\((link|image|video)\\)" color8 default
|
||||
highlight article "https?://[^ ]+" color4 default
|
||||
highlight article "\[[0-9]+\]" color6 default bold
|
||||
user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
|
||||
|
||||
html-renderer "${pandoc} --from=html -t markdown_github-raw_html"
|
||||
pager "${glow} --pager --width 72"
|
||||
|
||||
# macros
|
||||
macro v set browser "${mpv} %u" ; open-in-browser ; set browser "firefox %u" -- "Open video on mpv"
|
||||
macro , open-in-browser
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
urls = [
|
||||
# Weekly NixOS news and some other stuff
|
||||
{
|
||||
title = "NixOS Weekly";
|
||||
tags = ["news" "twitter"];
|
||||
url = "https://weekly.nixos.org/feeds/all.rss.xml";
|
||||
}
|
||||
# https://hackaday.com/blog/feed/
|
||||
{
|
||||
title = "Hacker News";
|
||||
url = "https://hnrss.org/newest";
|
||||
tags = ["tech"];
|
||||
}
|
||||
{
|
||||
title = "Hacker News Daily";
|
||||
url = "https://www.daemonology.net/hn-daily/index.rss";
|
||||
tags = ["tech"];
|
||||
}
|
||||
# Reddit
|
||||
{
|
||||
title = "/r/neovim";
|
||||
url = "https://www.reddit.com/r/neovim/.rss";
|
||||
tags = ["neovim" "reddit"];
|
||||
}
|
||||
{
|
||||
title = "/r/unixporn";
|
||||
url = "https://www.reddit.com/r/unixporn/.rss";
|
||||
tags = ["unix" "ricing" "style"];
|
||||
}
|
||||
# Computerphile
|
||||
{
|
||||
title = "Computerphile";
|
||||
url = "https://www.youtube.com/feeds/videos.xml?channel_id=UC9-y-6csu5WGm29I7JiwpnA";
|
||||
tags = ["tech" "youtube"];
|
||||
}
|
||||
# Security news
|
||||
{
|
||||
title = "Krebson Security";
|
||||
url = "https://krebsonsecurity.com/feed/";
|
||||
tags = ["tech" "security"];
|
||||
}
|
||||
|
||||
# Unsorted
|
||||
{url = "https://nitter.net/GergelyOrosz/rss";}
|
||||
{url = "https://feeds.feedburner.com/ThePragmaticEngineer";}
|
||||
{url = "https://www.reddit.com/r/ExperiencedDevs/.rss";}
|
||||
{url = "https://news.ycombinator.com/rss";}
|
||||
{url = "https://programming.dev/feeds/local.xml?sort=Active";}
|
||||
{url = "https://programming.dev/feeds/c/functional_programming.xml?sort=Active";}
|
||||
{url = "https://programming.dev/feeds/c/linux.xml?sort=Active";}
|
||||
{url = "https://programming.dev/feeds/c/experienced_devs.xml?sort=Active";}
|
||||
{url = "https://programming.dev/feeds/c/nix.xml?sort=Active";}
|
||||
{url = "https://programming.dev/feeds/c/commandline.xml?sort=Active";}
|
||||
{url = "https://beehaw.org/feeds/c/technology.xml?sort=Active";}
|
||||
{url = "https://lobste.rs/rss";}
|
||||
{url = "https://kiszamolo.hu/feed";}
|
||||
];
|
||||
}
|
21
nyx/homes/notashelf/programs/terminal/tools/nix-index.nix
Normal file
21
nyx/homes/notashelf/programs/terminal/tools/nix-index.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{inputs, ...}: {
|
||||
imports = [inputs.nix-index-db.hmModules.nix-index];
|
||||
|
||||
config = {
|
||||
home.sessionVariables = {
|
||||
# auto-run programs using nix-index-database
|
||||
NIX_AUTO_RUN = "1";
|
||||
};
|
||||
|
||||
programs = {
|
||||
nix-index-database.comma.enable = true;
|
||||
|
||||
nix-index = {
|
||||
enable = true;
|
||||
|
||||
# link nix-inde database to ~/.cache/nix-index
|
||||
symlinkToCacheHome = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
12
nyx/homes/notashelf/programs/terminal/tools/nix-init.nix
Normal file
12
nyx/homes/notashelf/programs/terminal/tools/nix-init.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{pkgs, ...}: let
|
||||
toTOML = name: (pkgs.formats.toml {}).generate "${name}";
|
||||
in {
|
||||
config = {
|
||||
home.packages = [pkgs.nix-init];
|
||||
|
||||
xdg.configFile."nix-init/config.toml".source = toTOML "config.toml" {
|
||||
commit = true;
|
||||
maintainers = ["NotAShelf"];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{pkgs, ...}: {
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
alejandra
|
||||
nix-tree
|
||||
];
|
||||
};
|
||||
}
|
24
nyx/homes/notashelf/programs/terminal/tools/ranger.nix
Normal file
24
nyx/homes/notashelf/programs/terminal/tools/ranger.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
device = osConfig.modules.device;
|
||||
# TODO: maybe not have a TUI file manager on desktops, when GUI does it better
|
||||
acceptedTypes = ["laptop" "desktop" "hybrid" "server" "lite"];
|
||||
inherit (lib.strings) optionalString;
|
||||
in {
|
||||
config = lib.mkIf (builtins.elem device.type acceptedTypes) {
|
||||
home.packages = with pkgs; [
|
||||
ranger
|
||||
];
|
||||
|
||||
# TODO: more file preview methods
|
||||
xdg.configFile."ranger/rc.conf".text = ''
|
||||
set preview_images true
|
||||
${(optionalString config.programs.kitty.enable "set preview_images_method kitty")}
|
||||
'';
|
||||
};
|
||||
}
|
68
nyx/homes/notashelf/programs/terminal/tools/ssh.nix
Normal file
68
nyx/homes/notashelf/programs/terminal/tools/ssh.nix
Normal file
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
programs = {
|
||||
ssh = {
|
||||
enable = true;
|
||||
hashKnownHosts = true;
|
||||
compression = true;
|
||||
matchBlocks = let
|
||||
commonIdFile = "~/.ssh/id_ed25519";
|
||||
in {
|
||||
"aur" = {
|
||||
hostname = "aur.archlinux.org";
|
||||
identityFile = "~/.ssh/aur";
|
||||
};
|
||||
|
||||
"builder" = {
|
||||
hostname = "build.neushore.dev";
|
||||
user = "builder";
|
||||
identityFile = "~/.ssh/builder";
|
||||
port = 30;
|
||||
};
|
||||
|
||||
"helios" = {
|
||||
port = 30;
|
||||
};
|
||||
|
||||
"enyo" = {
|
||||
port = 30;
|
||||
};
|
||||
|
||||
"hermes" = {
|
||||
port = 30;
|
||||
};
|
||||
|
||||
"epimetheus" = {
|
||||
port = 30;
|
||||
};
|
||||
|
||||
"icarus" = {
|
||||
port = 30;
|
||||
};
|
||||
|
||||
"nix-builder" = {
|
||||
hostname = "helios";
|
||||
user = "nix-builder";
|
||||
identityFile = "~/.ssh/builder";
|
||||
};
|
||||
|
||||
"frozendev" = {
|
||||
hostname = "frzn.dev";
|
||||
user = "raf";
|
||||
identityFile = "~/.ssh/id_rsa";
|
||||
};
|
||||
|
||||
"github" = {
|
||||
hostname = "github.com";
|
||||
identityFile = "~/.ssh/github_rsa";
|
||||
};
|
||||
|
||||
"neushore" = {
|
||||
hostname = "ssh.neushore.dev";
|
||||
user = "raf";
|
||||
identityFile = "~/.ssh/neushore";
|
||||
port = 30;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
17
nyx/homes/notashelf/programs/terminal/tools/tealdeer.nix
Normal file
17
nyx/homes/notashelf/programs/terminal/tools/tealdeer.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
programs = {
|
||||
tealdeer = {
|
||||
enable = false;
|
||||
settings = {
|
||||
display = {
|
||||
compact = false;
|
||||
use_pager = true;
|
||||
};
|
||||
|
||||
updates = {
|
||||
auto_update = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.strings) optionalString concatStringsSep;
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
|
||||
sessionPath = optionalString (config.home.sessionPath != []) ''
|
||||
export PATH=${concatStringsSep ":" config.home.sessionPath}:$PATH
|
||||
'';
|
||||
|
||||
sessionVariables = concatStringsSep "\n" (mapAttrsToList (key: value: ''
|
||||
export ${key}="${toString value}"
|
||||
'')
|
||||
config.home.sessionVariables);
|
||||
|
||||
apply-hm-env = pkgs.writeShellScript "apply-hm-env" ''
|
||||
${sessionPath}
|
||||
${sessionVariables}
|
||||
${config.home.sessionVariablesExtra}
|
||||
exec "$@"
|
||||
'';
|
||||
|
||||
# runs processes as systemd transient services
|
||||
run-as-service = pkgs.writeShellScriptBin "run-as-service" ''
|
||||
exec ${pkgs.systemd}/bin/systemd-run \
|
||||
--slice=app-manual.slice \
|
||||
--property=ExitType=cgroup \
|
||||
--user \
|
||||
--wait \
|
||||
bash -lc "exec ${apply-hm-env} $@"
|
||||
'';
|
||||
in {
|
||||
home.packages = [run-as-service];
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
" vim:ft=vim
|
||||
cabbrev t touch
|
||||
cabbrev mk mkdir
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
" vim:ft=vim
|
||||
" :com[mand][!] command_name action
|
||||
" The following macros can be used in a command
|
||||
" %a is replaced with the user arguments.
|
||||
" %c the current file under the cursor.
|
||||
" %C the current file under the cursor in the other directory.
|
||||
" %f the current selected file, or files.
|
||||
" %F the current selected file, or files in the other directory.
|
||||
" %b same as %f %F.
|
||||
" %d the current directory name.
|
||||
" %D the other window directory name.
|
||||
" %m run the command in a menu window
|
||||
" more information: https://vifm.info/vimdoc.shtml#vifm-macros
|
||||
|
||||
command! df df -h %m 2> /dev/null
|
||||
command! diff nvim -d %f %F
|
||||
command! run !! ./%f
|
||||
command! make !!make %a
|
||||
command! mkcd :mkdir %a | cd %a
|
||||
command! vgrep vim "+grep %a"
|
||||
command! reload :write | restart
|
||||
command! dragon dragon-drop -a -x %f
|
||||
command! clear vifmimg clear
|
||||
command! print lp -n 1 -o sides=two-sided-long-edge %f
|
||||
command! sudoedit sudoedit %c
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
" vim:ft=vim
|
||||
|
||||
" Filetypes/directories
|
||||
set classify=' :dir:/, :exe:, :reg:, :link:,? :?:, ::../::'
|
||||
|
||||
" Specific files
|
||||
set classify+=' ::.Xdefaults,,.Xresources,,.bashprofile,,.bash_profile,,.bashrc,,.dmrc,,.d_store,,.fasd,,.gitconfig,,.gitignore,,.jack-settings,,.mime.types,,.nvidia-settings-rc,,.pam_environment,,.profile,,.recently-used,,.selected_editor,,.xinitpurc,,.zprofile,,.yarnc,,.snclirc,,.tmux.conf,,.urlview,,.config,,.ini,,.user-dirs.dirs,,.mimeapps.list,,.offlineimaprc,,.msmtprc,,.Xauthority,,config::'
|
||||
set classify+=' ::dropbox::'
|
||||
set classify+=' ::favicon.*,,README,,readme::'
|
||||
set classify+=' ::.vim,,.vimrc,,.gvimrc,,.vifm::'
|
||||
set classify+=' ::gruntfile.coffee,,gruntfile.js,,gruntfile.ls::'
|
||||
set classify+=' ::gulpfile.coffee,,gulpfile.js,,gulpfile.ls::'
|
||||
set classify+=' ::ledger::'
|
||||
set classify+=' ::license,,copyright,,copying,,LICENSE,,COPYRIGHT,,COPYING::'
|
||||
set classify+=' ::node_modules::'
|
||||
set classify+=' ::react.jsx::'
|
||||
|
||||
" File extensions
|
||||
set classify+='λ ::*.ml,,*.mli::'
|
||||
set classify+=' ::*.styl::'
|
||||
set classify+=' ::*.scss::'
|
||||
set classify+=' ::*.py,,*.pyc,,*.pyd,,*.pyo::'
|
||||
set classify+=' ::*.php::'
|
||||
set classify+=' ::*.markdown,,*.md::'
|
||||
set classify+=' ::*.json::'
|
||||
set classify+=' ::*.js::'
|
||||
set classify+=' ::*.bmp,,*.gif,,*.ico,,*.jpeg,,*.jpg,,*.png,,*.svg,,*.svgz,,*.tga,,*.tiff,,*.xmb,,*.xcf,,*.xpm,,*.xspf,,*.xwd,,*.cr2,,*.dng,,*.3fr,,*.ari,,*.arw,,*.bay,,*.crw,,*.cr3,,*.cap,,*.data,,*.dcs,,*.dcr,,*drf,,*.eip,,*.erf,,*.fff,,*.gpr,,*.iiq,,*.k25,,*.kdc,,*.mdc,,.*mef,,*.mos,,.*.mrw,,.*.obm,,*.orf,,*.pef,,*.ptx,,*.pxn,,*.r3d,,*.raf,,*.raw,,*.rwl,,*.rw2,,*.rwz,,*.sr2,,*.srf,,*.srf,,*.srw,,*.tif,,*.x3f::'
|
||||
set classify+=' ::*.ejs,,*.htm,,*.html,,*.slim,,*.xml::'
|
||||
set classify+=' ::*.mustasche::'
|
||||
set classify+=' ::*.css,,*.less,,*.bat,,*.conf,,*.ini,,*.rc,,*.yml,,*.cfg,,*.rc::'
|
||||
set classify+=' ::*.rss::'
|
||||
set classify+=' ::*.coffee::'
|
||||
set classify+=' ::*.twig::'
|
||||
set classify+=' ::*.c++,,*.cc,,*.cpp,,*.cxx,,*.h::'
|
||||
set classify+=' ::*.c::'
|
||||
set classify+=' ::*.hs,,*.lhs::'
|
||||
set classify+=' ::*.lua::'
|
||||
set classify+=' ::*.jl::'
|
||||
set classify+=' ::*.go::'
|
||||
set classify+=' ::*.ts::'
|
||||
set classify+=' ::*.db,,*.dump,,*.sql::'
|
||||
set classify+=' ::*.sln,,*.suo::'
|
||||
set classify+=' ::*.exe::'
|
||||
set classify+=' ::*.diff,,*.sum,,*.md5,,*.sha512::'
|
||||
set classify+=' ::*.scala::'
|
||||
set classify+=' ::*.java,,*.jar::'
|
||||
set classify+=' ::*.xul::'
|
||||
set classify+=' ::*.clj,,*.cljc::'
|
||||
set classify+=' ::*.pl,,*.pm,,*.t::'
|
||||
set classify+=' ::*.cljs,,*.edn::'
|
||||
set classify+=' ::*.rb::'
|
||||
set classify+=' ::*.fish,,*.sh,,*.bash::'
|
||||
set classify+=' ::*.dart::'
|
||||
set classify+=' ::*.f#,,*.fs,,*.fsi,,*.fsscript,,*.fsx::'
|
||||
set classify+=' ::*.rlib,,*.rs::'
|
||||
set classify+=' ::*.d::'
|
||||
set classify+=' ::*.erl,,*.hrl::'
|
||||
set classify+=' ::*.ai::'
|
||||
set classify+=' ::*.psb,,*.psd::'
|
||||
set classify+=' ::*.jsx::'
|
||||
set classify+=' ::*.aac,,*.anx,,*.asf,,*.au,,*.axa,,*.flac,,*.m2a,,*.m4a,,*.mid,,*.midi,,*.mp3,,*.mpc,,*.oga,,*.ogg,,*.ogx,,*.ra,,*.ram,,*.rm,,*.spx,,*.wav,,*.wma,,*.ac3::'
|
||||
set classify+=' ::*.avi,,*.flv,,*.mkv,,*.mov,,*.mov,,*.mp4,,*.mpeg,,*.mpg,,*.webm::'
|
||||
set classify+=' ::*.epub,,*.pdf,,*.fb2,,*.djvu::'
|
||||
set classify+=' ::*.7z,,*.apk,,*.bz2,,*.cab,,*.cpio,,*.deb,,*.gem,,*.gz,,*.gzip,,*.lh,,*.lzh,,*.lzma,,*.rar,,*.rpm,,*.tar,,*.tgz,,*.xz,,*.zip::'
|
||||
set classify+=' ::*.cbr,,*.cbz::'
|
||||
set classify+=' ::*.log::'
|
||||
set classify+=' ::*.doc,,*.docx,,*.adoc::'
|
||||
set classify+=' ::*.xls,,*.xls,,*.xlsmx::'
|
||||
set classify+=' ::*.pptx,,*.ppt::'
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
" vim:ft=vim
|
||||
" filextype: What should it do (which program should it use), when you want to open it
|
||||
" fileviewer: What should it do for the prievew?
|
||||
|
||||
filextype *.pdf zathura %c &
|
||||
|
||||
filextype *.ps,*.eps,*.ps.gz
|
||||
\ {View in sioyek}
|
||||
\ sioyek %f &
|
||||
|
||||
filextype *.xml,*.ipe ipe %c &
|
||||
|
||||
filextype *.djvu
|
||||
\ {View in sioyek}
|
||||
\ sioyek %f & ,
|
||||
\ {View in apvlv}
|
||||
\ apvlv %f,
|
||||
|
||||
filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus,*.MOD
|
||||
\ {Play using ffplay}
|
||||
\ ffplay -nodisp -autoexit %c &,
|
||||
\ {Play using MPlayer}
|
||||
\ mplayer %f &,
|
||||
fileviewer *.mp3 mp3info
|
||||
fileviewer *.flac soxi
|
||||
|
||||
filextype *.avi,*.mp4,*.wmv,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
||||
\*.fl[icv],*.m2v,*.mov,*.webm,*.mts,*.m4v,*.r[am],*.qt,*.divx,
|
||||
\*.as[fx]
|
||||
\ {View using ffplay}
|
||||
\ ffplay -fs -autoexit -volume 100 %f &,
|
||||
|
||||
filextype *.html,*.htm
|
||||
\ firefox %f &,
|
||||
filetype *.html,*.htm links, lynx
|
||||
fileviewer *.html
|
||||
\ w3m %c
|
||||
|
||||
filetype *.o,*.out objdump -d %f | less
|
||||
fileviewer *.o,*.out objdump -d %f
|
||||
|
||||
filetype *.[1-8] man ./%c
|
||||
fileviewer *.[1-8] man ./%c | col -b
|
||||
|
||||
filextype *.bmp,*.jpg,*.jpeg,*.png,*.xpm,*.svg,*.ico,*.gif
|
||||
"\ viewnior %c &
|
||||
" \ vimiv --log-level info --debug vimico %c &
|
||||
\ vimiv %c &
|
||||
|
||||
filextype *.ora
|
||||
\ {Edit in MyPaint}
|
||||
\ mypaint %f,
|
||||
|
||||
filextype *.vym
|
||||
\ {Open with VYM}
|
||||
\ vym %f &,
|
||||
|
||||
filetype *.md5
|
||||
\ {Check MD5 hash sum}
|
||||
\ md5sum -c %f %S,
|
||||
|
||||
filetype *.sha1
|
||||
\ {Check SHA1 hash sum}
|
||||
\ sha1sum -c %f %S,
|
||||
|
||||
filetype *.sha256
|
||||
\ {Check SHA256 hash sum}
|
||||
\ sha256sum -c %f %S,
|
||||
|
||||
filetype *.sha512
|
||||
\ {Check SHA512 hash sum}
|
||||
\ sha512sum -c %f %S,
|
||||
|
||||
filetype *.asc
|
||||
\ {Check signature}
|
||||
\ !!gpg --verify %c,
|
||||
|
||||
filetype *.torrent ktorrent %f &
|
||||
fileviewer *.torrent dumptorrent -v %c
|
||||
|
||||
filetype *.zip,*.jar,*.war,*.ear,*.oxt,*.apkg
|
||||
\ {Mount with fuse-zip}
|
||||
\ FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR,
|
||||
\ {View contents}
|
||||
\ zip -sf %c | less,
|
||||
\ {Extract here}
|
||||
\ tar -xf %c
|
||||
filetype *.zip unzip %f
|
||||
filetype *.tar.gz tar -xvf %f
|
||||
fileviewer *.zip,*.jar,*.war,*.ear,*.oxt zip -sf %c
|
||||
|
||||
filetype *.tar,*.tar.bz2,*.tbz2,*.tgz,*.tar.gz,*.tar.xz,*.txz
|
||||
\ {Mount with archivemount}
|
||||
\ FUSE_MOUNT|archivemount %SOURCE_FILE %DESTINATION_DIR,
|
||||
fileviewer *.tgz,*.tar.gz tar -tzf %c
|
||||
fileviewer *.tar.bz2,*.tbz2 tar -tjf %c
|
||||
fileviewer *.tar.txz,*.txz xz --list %c
|
||||
fileviewer *.tar tar -tf %c
|
||||
|
||||
filetype *.rar
|
||||
\ {Mount with rar2fs}
|
||||
\ FUSE_MOUNT|rar2fs %SOURCE_FILE %DESTINATION_DIR,
|
||||
fileviewer *.rar unrar v %c
|
||||
|
||||
filetype *.iso
|
||||
\ {Mount with fuseiso}
|
||||
\ FUSE_MOUNT|fuseiso %SOURCE_FILE %DESTINATION_DIR,
|
||||
|
||||
filetype *.ssh
|
||||
\ {Mount with sshfs}
|
||||
\ FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR %FOREGROUND,
|
||||
|
||||
filetype *.ftp
|
||||
\ {Mount with curlftpfs}
|
||||
\ FUSE_MOUNT2|curlftpfs -o ftp_port=-,,disable_eprt %PARAM %DESTINATION_DIR %FOREGROUND,
|
||||
|
||||
filetype *.7z
|
||||
\ {Mount with fuse-7z}
|
||||
\ FUSE_MOUNT|fuse-7z %SOURCE_FILE %DESTINATION_DIR,
|
||||
fileviewer *.7z 7z l %c
|
||||
|
||||
filextype *.odt,*.doc,*.docx,*.xls,*.xlsx,*.odp,*.pptx libreoffice %f &
|
||||
fileviewer *.odt odt2txt %f
|
||||
fileviewer *.docx docx2txt %f -
|
||||
|
||||
filetype *.tudu tudu -f %c
|
||||
|
||||
filextype *.pro qtcreator %f &
|
||||
|
||||
filextype */
|
||||
\ pacmanfm %f &,
|
||||
|
||||
fileviewer *.md glow %c
|
||||
|
||||
filetype *.xopp xournalpp %f &
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
" vim:ft=vim
|
||||
|
||||
fileviewer *.* bat --color=always --decorations=never %c
|
|
@ -0,0 +1,38 @@
|
|||
" vim:ft=vim
|
||||
|
||||
" Editing / Do something with the files
|
||||
nnoremap cd :cd
|
||||
nnoremap cD :diff<CR>
|
||||
vnoremap cD :diff<CR>
|
||||
|
||||
" start shell
|
||||
nmap S :shell<Cr>
|
||||
|
||||
" Display sorting dialog
|
||||
nnoremap s :sort<cr>
|
||||
|
||||
" preview window
|
||||
" Toggle visibility of preview window
|
||||
nnoremap w :view<cr>
|
||||
vnoremap w :view<cr>gv
|
||||
|
||||
" panel resize
|
||||
nnoremap < <C-w>5<
|
||||
nnoremap > <C-w>5>
|
||||
|
||||
" tabs
|
||||
nnoremap <C-t> :tabnew<CR>
|
||||
|
||||
" drag and drop
|
||||
nmap <C-h> :dragon<CR>
|
||||
vmap <C-h> :dragon<CR>
|
||||
|
||||
" Yank current directory path into the clipboard
|
||||
nnoremap yd :!echo -n %d | wl-copy %i<cr>:echo expand('%"d') "is yanked to clipboard"<cr>
|
||||
" Yank current file path into the clipboard
|
||||
nnoremap yf :!echo -n %c:p | wl-copy %i<cr>:echo expand('%"c:p') "is yanked to clipboard"<cr>
|
||||
|
||||
nnoremap q :q<cr>
|
||||
|
||||
"nnoremap ö q
|
||||
|
114
nyx/homes/notashelf/programs/terminal/tools/vifm/config/vifmrc
Normal file
114
nyx/homes/notashelf/programs/terminal/tools/vifm/config/vifmrc
Normal file
|
@ -0,0 +1,114 @@
|
|||
" vim:ft=vim
|
||||
|
||||
" editor
|
||||
set vicmd="nvim"
|
||||
|
||||
" This makes vifm perform file operations on its own instead of relying on
|
||||
" standard utilities like `cp`. While using `cp` and alike is a more universal
|
||||
" solution, it's also much slower when processing large amounts of files and
|
||||
" doesn't support progress measuring.
|
||||
set syscalls
|
||||
|
||||
" miller view
|
||||
set millerview
|
||||
set milleroptions="lsize:1,csize:2,rsize:0,rpreview:all"
|
||||
|
||||
set sizefmt=units:si,precision:2,space
|
||||
|
||||
" The display on the bottom left
|
||||
set rulerformat="%2l/%2S %[MAX: %2L%]"
|
||||
|
||||
set findprg="fd %A"
|
||||
set grepprg="rg -n -H %i %a %s"
|
||||
|
||||
" set fillchars=vborder:│
|
||||
|
||||
" execute files
|
||||
set runexec
|
||||
|
||||
set tuioptions="pu"
|
||||
|
||||
" controls details of file operations
|
||||
set iooptions=fastfilecloning
|
||||
|
||||
" Trash Directory
|
||||
" The default is to move files that are deleted with dd or :d to
|
||||
" the trash directory. If you change this you will not be able to move
|
||||
" files by deleting them and then using p to put the file in the new location.
|
||||
" I recommend not changing this until you are familiar with vifm.
|
||||
" This probably shouldn't be an option.
|
||||
set trash
|
||||
set trashdir="~/.local/share/Trash/files"
|
||||
|
||||
" This is how many directories to store in the directory history.
|
||||
set history=100
|
||||
|
||||
" number of spaces of a tab"
|
||||
set tabstop=4
|
||||
|
||||
" With this option turned on you can run partially entered commands with
|
||||
" unambiguous beginning using :! (e.g. :!Te instead of :!Terminal or :!Te<tab>).
|
||||
set fastrun
|
||||
|
||||
" Natural sort of (version) numbers within text.
|
||||
set sortnumbers
|
||||
|
||||
" Maximum number of changes that can be undone.
|
||||
set undolevels=100
|
||||
|
||||
" If you installed the vim.txt help file set vimhelp.
|
||||
" If would rather use a plain text help file set novimhelp.
|
||||
set vimhelp
|
||||
|
||||
" If you would like to run an executable file when you
|
||||
" press return on the file name set this.
|
||||
set norunexec
|
||||
|
||||
set rnu
|
||||
set dotdirs=
|
||||
|
||||
" colorscheme custom
|
||||
|
||||
" Format for displaying time in file list. For example:
|
||||
" TIME_STAMP_FORMAT=%m/%d-%H:%M
|
||||
" See man date or man strftime for details.
|
||||
set timefmt=%d.%m.%Y\ \ %H:%M
|
||||
|
||||
" Show list of matches on tab completion in command-line mode
|
||||
set wildmenu
|
||||
" Display completions in a form of popup with descriptions of the matches
|
||||
set wildstyle=popup
|
||||
|
||||
" Display suggestions in normal, visual and view modes for keys, marks and
|
||||
" registers (at most 5 files). In other view, when available.
|
||||
set suggestoptions=normal,visual,view,otherpane,keys,marks,registers,delay:0
|
||||
|
||||
" Ignore case in search patterns unless it contains at least one uppercase
|
||||
" letter
|
||||
set ignorecase
|
||||
set smartcase
|
||||
|
||||
" Don't highlight search results automatically
|
||||
set nohlsearch
|
||||
|
||||
" Use increment searching (search while typing)
|
||||
set incsearch
|
||||
|
||||
" Try to leave some space from cursor to upper/lower border in lists
|
||||
set scrolloff=4
|
||||
|
||||
" Don't do too many requests to slow file systems
|
||||
if !has('win')
|
||||
set slowfs=curlftpfs
|
||||
endif
|
||||
|
||||
set statusline=" %A %10u:%-7g %20d Free Space: %a"
|
||||
|
||||
set vifminfo=dhistory,chistory,state,tui,shistory,
|
||||
\phistory,fhistory,dirstack,registers,bookmarks,bmarks
|
||||
|
||||
" ------------
|
||||
" panels
|
||||
" ------------
|
||||
set viewcolumns=-{name},{size}
|
||||
|
22
nyx/homes/notashelf/programs/terminal/tools/vifm/default.nix
Normal file
22
nyx/homes/notashelf/programs/terminal/tools/vifm/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
self,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [self.homeManagerModules.vifm];
|
||||
config = {
|
||||
programs.vifm = {
|
||||
enable = true;
|
||||
package = pkgs.vifm-full;
|
||||
config = builtins.readFile "${./config/vifmrc}";
|
||||
extraConfigFiles = [
|
||||
"${./config/settings/abbr.vifm}"
|
||||
"${./config/settings/commands.vifm}"
|
||||
"${./config/settings/favicons.vifm}"
|
||||
"${./config/settings/ft.vifm}"
|
||||
"${./config/settings/fv.vifm}"
|
||||
"${./config/settings/mappings.vifm}"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
82
nyx/homes/notashelf/programs/terminal/tools/xdg.nix
Normal file
82
nyx/homes/notashelf/programs/terminal/tools/xdg.nix
Normal file
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
browser = ["Schizofox.desktop"];
|
||||
mailer = ["thunderbird.desktop"];
|
||||
zathura = ["org.pwmt.zathura.desktop.desktop"];
|
||||
fileManager = ["org.kde.dolphin.desktop"];
|
||||
|
||||
associations = {
|
||||
"text/html" = browser;
|
||||
"x-scheme-handler/http" = browser;
|
||||
"x-scheme-handler/https" = browser;
|
||||
"x-scheme-handler/ftp" = browser;
|
||||
"x-scheme-handler/about" = browser;
|
||||
"x-scheme-handler/unknown" = browser;
|
||||
"application/x-extension-htm" = browser;
|
||||
"application/x-extension-html" = browser;
|
||||
"application/x-extension-shtml" = browser;
|
||||
"application/xhtml+xml" = browser;
|
||||
"application/x-extension-xhtml" = browser;
|
||||
"application/x-extension-xht" = browser;
|
||||
|
||||
"inode/directory" = fileManager;
|
||||
"application/x-xz-compressed-tar" = ["org.kde.ark.desktop"];
|
||||
|
||||
"audio/*" = ["mpv.desktop"];
|
||||
"video/*" = ["mpv.dekstop"];
|
||||
"image/*" = ["imv.desktop"];
|
||||
"application/json" = browser;
|
||||
"application/pdf" = zathura;
|
||||
"x-scheme-handler/tg" = ["telegramdesktop.desktop"];
|
||||
"x-scheme-handler/spotify" = ["spotify.desktop"];
|
||||
"x-scheme-handler/discord" = ["WebCord.desktop"];
|
||||
"x-scheme-handler/mailto" = mailer;
|
||||
};
|
||||
|
||||
template = import lib.xdgTemplate "home-manager";
|
||||
in {
|
||||
#home.sessionVariables = template.sysEnv;
|
||||
xdg = {
|
||||
enable = true;
|
||||
cacheHome = "${config.home.homeDirectory}/.cache";
|
||||
configHome = "${config.home.homeDirectory}/.config";
|
||||
dataHome = "${config.home.homeDirectory}/.local/share";
|
||||
stateHome = "${config.home.homeDirectory}/.local/state";
|
||||
|
||||
configFile = {
|
||||
"npm/npmrc" = template.npmrc;
|
||||
"python/pythonrc" = template.pythonrc;
|
||||
};
|
||||
|
||||
userDirs = {
|
||||
enable = pkgs.stdenv.isLinux;
|
||||
createDirectories = true;
|
||||
|
||||
download = "${config.home.homeDirectory}/Downloads";
|
||||
desktop = "${config.home.homeDirectory}/Desktop";
|
||||
documents = "${config.home.homeDirectory}/Documents";
|
||||
|
||||
publicShare = "${config.home.homeDirectory}/.local/share/public";
|
||||
templates = "${config.home.homeDirectory}/.local/share/templates";
|
||||
|
||||
music = "${config.home.homeDirectory}/Media/Music";
|
||||
pictures = "${config.home.homeDirectory}/Media/Pictures";
|
||||
videos = "${config.home.homeDirectory}/Media/Videos";
|
||||
|
||||
extraConfig = {
|
||||
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
|
||||
XDG_MAIL_DIR = "${config.home.homeDirectory}/Mail";
|
||||
};
|
||||
};
|
||||
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
associations.added = associations;
|
||||
defaultApplications = associations;
|
||||
};
|
||||
};
|
||||
}
|
57
nyx/homes/notashelf/programs/terminal/tools/xplr/default.nix
Normal file
57
nyx/homes/notashelf/programs/terminal/tools/xplr/default.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
device = osConfig.modules.device;
|
||||
acceptedTypes = ["laptop" "desktop" "hybrid" "server" "lite"];
|
||||
in {
|
||||
config = lib.mkIf (builtins.elem device.type acceptedTypes) {
|
||||
home.packages = with pkgs; [
|
||||
xplr
|
||||
];
|
||||
|
||||
xdg.configFile."xplr/init.lua".text = let
|
||||
# get plugin derivations from plugins.nix so that this file remains clean
|
||||
inherit (import ./plugins.nix pkgs) wl-clipboard-plugin nuke-plugin;
|
||||
in ''
|
||||
version = '${pkgs.xplr.version}'
|
||||
|
||||
package.path =
|
||||
"${wl-clipboard-plugin}/init.lua;" ..
|
||||
"${nuke-plugin}/init.lua;" ..
|
||||
package.path
|
||||
|
||||
|
||||
require("wl-clipboard").setup{
|
||||
copy_command = "wl-copy -t text/uri-list",
|
||||
paste_command = "wl-paste",
|
||||
keep_selection = true,
|
||||
}
|
||||
|
||||
require("nuke").setup{
|
||||
pager = "less -R",
|
||||
open = {
|
||||
run_executables = true, -- default: false
|
||||
custom = {
|
||||
{extension = "jpg", command = "imv {}"},
|
||||
{extension = "pdf", command = "zathura {}"},
|
||||
{mime_regex = "^video/.*", command = "mpv {}"},
|
||||
{mime_regex = ".*", command = "xdg-open {}"}
|
||||
}
|
||||
},
|
||||
|
||||
view = {
|
||||
show_line_numbers = true, -- default: false
|
||||
},
|
||||
|
||||
smart_view = {
|
||||
custom = {
|
||||
{extension = "so", command = "ldd -r {} | less"},
|
||||
},
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
14
nyx/homes/notashelf/programs/terminal/tools/xplr/plugins.nix
Normal file
14
nyx/homes/notashelf/programs/terminal/tools/xplr/plugins.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
pkgs: {
|
||||
wl-clipboard-plugin = pkgs.fetchFromGitHub {
|
||||
owner = "sayanarijit";
|
||||
repo = "wl-clipboard.xplr";
|
||||
rev = "a3ffc87460c5c7f560bffea689487ae14b36d9c3";
|
||||
hash = "sha256-I4rh5Zks9hiXozBiPDuRdHwW5I7ppzEpQNtirY0Lcks=";
|
||||
};
|
||||
nuke-plugin = pkgs.fetchFromGitHub {
|
||||
owner = "Junker";
|
||||
repo = "nuke.xplr";
|
||||
rev = "f83a7ed58a7212771b15fbf1fdfb0a07b23c81e9";
|
||||
hash = "sha256-k/yre9SYNPYBM2W1DPpL6Ypt3w3EMO9dznHwa+fw/n0=";
|
||||
};
|
||||
}
|
40
nyx/homes/notashelf/programs/terminal/tools/yazi/default.nix
Normal file
40
nyx/homes/notashelf/programs/terminal/tools/yazi/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./theme/icons.nix
|
||||
./theme/manager.nix
|
||||
./theme/status.nix
|
||||
];
|
||||
|
||||
home.packages = [pkgs.exiftool];
|
||||
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
|
||||
enableBashIntegration = config.programs.bash.enable;
|
||||
enableZshIntegration = config.programs.zsh.enable;
|
||||
|
||||
settings = {
|
||||
manager = {
|
||||
layout = [1 4 3];
|
||||
sort_by = "alphabetical";
|
||||
sort_sensitive = true;
|
||||
sort_reverse = false;
|
||||
sort_dir_first = true;
|
||||
linemode = "none";
|
||||
show_hidden = false;
|
||||
show_symlink = true;
|
||||
};
|
||||
|
||||
preview = {
|
||||
tab_size = 2;
|
||||
max_width = 600;
|
||||
max_height = 900;
|
||||
cache_dir = "${config.xdg.cacheHome}/yazi";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
146
nyx/homes/notashelf/programs/terminal/tools/yazi/theme/icons.nix
Normal file
146
nyx/homes/notashelf/programs/terminal/tools/yazi/theme/icons.nix
Normal file
|
@ -0,0 +1,146 @@
|
|||
{
|
||||
programs.yazi.theme.icons = {
|
||||
# Default
|
||||
"*" = "";
|
||||
"*/" = "";
|
||||
|
||||
# Home
|
||||
".config/" = "";
|
||||
".ssh/" = "";
|
||||
"Desktop/" = "";
|
||||
"Development/" = "";
|
||||
"Documents/" = "";
|
||||
"Downloads/" = "";
|
||||
"Library/" = "";
|
||||
"Movies/" = "";
|
||||
"Music/" = "";
|
||||
"Pictures/" = "";
|
||||
"Videos/" = "";
|
||||
"Public/" = "";
|
||||
|
||||
# Git
|
||||
".git/" = "";
|
||||
".gitignore" = "";
|
||||
".gitmodules" = "";
|
||||
".gitattributes" = "";
|
||||
|
||||
# Dotfiles
|
||||
".DS_Store" = "";
|
||||
".bashrc" = "";
|
||||
".bashprofile" = "";
|
||||
".zshrc" = "";
|
||||
".zshenv" = "";
|
||||
".zprofile" = "";
|
||||
".vimrc" = "";
|
||||
|
||||
# Text
|
||||
"*.txt" = "";
|
||||
"*.md" = "";
|
||||
"*.rst" = "";
|
||||
COPYING = "";
|
||||
LICENSE = "";
|
||||
|
||||
# Archives
|
||||
"*.zip" = "";
|
||||
"*.tar" = "";
|
||||
"*.gz" = "";
|
||||
"*.7z" = "";
|
||||
"*.bz2" = "";
|
||||
"*.xz" = "";
|
||||
|
||||
# Documents
|
||||
"*.csv" = "";
|
||||
"*.doc" = "";
|
||||
"*.doct" = "";
|
||||
"*.docx" = "";
|
||||
"*.dot" = "";
|
||||
"*.ods" = "";
|
||||
"*.ots" = "";
|
||||
"*.pdf" = "";
|
||||
"*.pom" = "";
|
||||
"*.pot" = "";
|
||||
"*.ppm" = "";
|
||||
"*.pps" = "";
|
||||
"*.ppt" = "";
|
||||
"*.potx" = "";
|
||||
"*.ppmx" = "";
|
||||
"*.ppsx" = "";
|
||||
"*.pptx" = "";
|
||||
"*.xlc" = "";
|
||||
"*.xlm" = "";
|
||||
"*.xls" = "";
|
||||
"*.xlt" = "";
|
||||
"*.xlsm" = "";
|
||||
"*.xlsx" = "";
|
||||
|
||||
# Audio
|
||||
"*.mp3" = "";
|
||||
"*.flac" = "";
|
||||
"*.wav" = "";
|
||||
"*.aac" = "";
|
||||
"*.ogg" = "";
|
||||
"*.m4a" = "";
|
||||
"*.mp2" = "";
|
||||
|
||||
# Movies
|
||||
"*.mp4" = "";
|
||||
"*.mkv" = "";
|
||||
"*.avi" = "";
|
||||
"*.mov" = "";
|
||||
"*.webm" = "";
|
||||
|
||||
# Images
|
||||
"*.jpg" = "";
|
||||
"*.jpeg" = "";
|
||||
"*.png" = "";
|
||||
"*.gif" = "";
|
||||
"*.webp" = "";
|
||||
"*.avif" = "";
|
||||
"*.bmp" = "";
|
||||
"*.ico" = "";
|
||||
"*.svg" = "";
|
||||
"*.xcf" = "";
|
||||
"*.HEIC" = "";
|
||||
|
||||
# Programming
|
||||
"*.c" = "";
|
||||
"*.cpp" = "";
|
||||
"*.h" = "";
|
||||
"*.hpp" = "";
|
||||
"*.rs" = "";
|
||||
"*.go" = "";
|
||||
"*.py" = "";
|
||||
"*.hs" = "";
|
||||
"*.js" = "";
|
||||
"*.ts" = "";
|
||||
"*.tsx" = "";
|
||||
"*.jsx" = "";
|
||||
"*.rb" = "";
|
||||
"*.php" = "";
|
||||
"*.java" = "";
|
||||
"*.sh" = "";
|
||||
"*.fish" = "";
|
||||
"*.swift" = "";
|
||||
"*.vim" = "";
|
||||
"*.lua" = "";
|
||||
"*.html" = "";
|
||||
"*.css" = "";
|
||||
"*.sass" = "";
|
||||
"*.scss" = "";
|
||||
"*.json" = "";
|
||||
"*.toml" = "";
|
||||
"*.yml" = "";
|
||||
"*.yaml" = "";
|
||||
"*.ini" = "";
|
||||
"*.conf" = "";
|
||||
"*.lock" = "";
|
||||
"*.nix" = "";
|
||||
Containerfile = "";
|
||||
Dockerfile = "";
|
||||
|
||||
# Misc
|
||||
"*.bin" = "";
|
||||
"*.exe" = "";
|
||||
"*.pkg" = "";
|
||||
};
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
programs.yazi.theme.manager = {
|
||||
cwd = {fg = "cyan";};
|
||||
|
||||
# Hovered
|
||||
hovered = {
|
||||
fg = "black";
|
||||
bg = "lightblue";
|
||||
};
|
||||
|
||||
preview_hovered = {
|
||||
fg = "black";
|
||||
bg = "lightblue";
|
||||
};
|
||||
|
||||
# Find
|
||||
find_keyword = {
|
||||
fg = "yellow";
|
||||
italic = true;
|
||||
};
|
||||
find_position = {
|
||||
fg = "magenta";
|
||||
bg = "reset";
|
||||
italic = true;
|
||||
};
|
||||
|
||||
# Marker
|
||||
marker_selected = {
|
||||
fg = "lightgreen";
|
||||
# bg = "lightgreen";
|
||||
};
|
||||
marker_copied = {
|
||||
fg = "lightyellow";
|
||||
# bg = "lightyellow";
|
||||
};
|
||||
marker_cut = {
|
||||
fg = "lightred";
|
||||
# bg = "lightred";
|
||||
};
|
||||
|
||||
# Tab
|
||||
tab_active = {
|
||||
fg = "black";
|
||||
bg = "lightblue";
|
||||
};
|
||||
tab_inactive = {
|
||||
fg = "white";
|
||||
bg = "darkgray";
|
||||
};
|
||||
tab_width = 1;
|
||||
|
||||
# Border;
|
||||
border_symbol = "│";
|
||||
border_style = {fg = "gray";};
|
||||
|
||||
# Offset;
|
||||
folder_offset = [1 0 1 0];
|
||||
preview_offset = [1 1 1 1];
|
||||
|
||||
# Highlighting;
|
||||
syntect_theme = "";
|
||||
};
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
programs.yazi.theme.status = {
|
||||
separator_open = "█";
|
||||
separator_close = "█";
|
||||
separator_style = {
|
||||
fg = "darkgray";
|
||||
bg = "darkgray";
|
||||
};
|
||||
|
||||
# Mode;
|
||||
mode_normal = {
|
||||
fg = "black";
|
||||
bg = "lightblue";
|
||||
bold = true;
|
||||
};
|
||||
mode_select = {
|
||||
fg = "black";
|
||||
bg = "lightgreen";
|
||||
bold = true;
|
||||
};
|
||||
mode_unset = {
|
||||
fg = "black";
|
||||
bg = "lightmagenta";
|
||||
bold = true;
|
||||
};
|
||||
|
||||
# Progress;
|
||||
progress_label = {bold = true;};
|
||||
progress_normal = {
|
||||
fg = "blue";
|
||||
bg = "black";
|
||||
};
|
||||
progress_error = {
|
||||
fg = "red";
|
||||
bg = "black";
|
||||
};
|
||||
|
||||
# Permissions;
|
||||
permissions_t = {fg = "blue";};
|
||||
permissions_r = {fg = "lightyellow";};
|
||||
permissions_w = {fg = "lightred";};
|
||||
permissions_x = {fg = "lightgreen";};
|
||||
permissions_s = {fg = "darkgray";};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
{osConfig, ...}: let
|
||||
inherit (osConfig.modules.style.colorScheme) slug colors;
|
||||
in {
|
||||
config = {
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
enableZshIntegration = false; # do NOT auto-start, thank you
|
||||
settings = {
|
||||
# custom defined layouts
|
||||
layout_dir = "${./layouts}";
|
||||
|
||||
# clipboard provider
|
||||
copy_command = "wl-copy";
|
||||
|
||||
auto_layouts = true;
|
||||
|
||||
default_layout = "system"; # or compact
|
||||
default_mode = "locked";
|
||||
|
||||
on_force_close = "quit";
|
||||
pane_frames = true;
|
||||
session_serialization = false;
|
||||
|
||||
ui.pane_frames = {
|
||||
rounded_corners = true;
|
||||
hide_session_name = true;
|
||||
};
|
||||
|
||||
# load internal plugins from built-in paths
|
||||
plugins = {
|
||||
tab-bar.path = "tab-bar";
|
||||
status-bar.path = "status-bar";
|
||||
strider.path = "strider";
|
||||
compact-bar.path = "compact-bar";
|
||||
};
|
||||
|
||||
# generate a local colorscheme from the system theming module
|
||||
# using the color palette and the slug provided by the module
|
||||
# this will ensure consistency, generally, with differing
|
||||
# colorschemes
|
||||
themes = {
|
||||
"${slug}" = with colors; {
|
||||
bg = "#${base00}";
|
||||
fg = "#${base05}";
|
||||
red = "#${base08}";
|
||||
green = "#${base0A}";
|
||||
blue = "#${base0D}";
|
||||
yellow = "#${base06}";
|
||||
magenta = "#${base0E}";
|
||||
orange = "#${base09}";
|
||||
cyan = "#${base0C}";
|
||||
black = "#${base00}";
|
||||
white = "#${base05}";
|
||||
};
|
||||
};
|
||||
|
||||
# set theme to Catppuccin Mocha
|
||||
theme = "${slug}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,127 @@
|
|||
// this is my custom "system" layout, loosely based on the official
|
||||
// zellij development layout - it's simplified for desktop use
|
||||
// and allows me to remain in a single workspace even when I'm
|
||||
// using a tiling window manager and am constrained to a single
|
||||
// workspace. It provides default tabs for media, file browsing
|
||||
// which should be everything that I need, but I may add more
|
||||
// in the future
|
||||
|
||||
layout {
|
||||
// define default tab layout
|
||||
default_tab_template {
|
||||
// tab bar on the top
|
||||
pane size=1 borderless=true {
|
||||
plugin location="zellij:tab-bar"
|
||||
}
|
||||
|
||||
// child tabs and panes
|
||||
children
|
||||
|
||||
// status bar on the bottom
|
||||
pane size=2 borderless=true {
|
||||
plugin location="zellij:status-bar"
|
||||
}
|
||||
}
|
||||
|
||||
// strider tab uses the strider plugin of zellij
|
||||
// which is similar to neovim's nvimtree
|
||||
// ...but slower and much less configurable
|
||||
tab_template name="strider_tab" {
|
||||
pane size=1 borderless=true {
|
||||
plugin location="zellij:tab-bar"
|
||||
}
|
||||
|
||||
// use the strider plugin on the left side of the screen
|
||||
// to achieve a nvim-tree like layout on the left 15% of
|
||||
// the terminal window - looks cool but is not flexible
|
||||
pane split_direction="Vertical" {
|
||||
pane size="15%" name="Filetree" {
|
||||
plugin location="zellij:strider"
|
||||
}
|
||||
children
|
||||
}
|
||||
|
||||
pane size=2 borderless=true {
|
||||
plugin location="zellij:status-bar"
|
||||
}
|
||||
}
|
||||
|
||||
// define a template pane for the terminal
|
||||
// this once again imitates the neovim layout
|
||||
// by providing a terminal instance on the bottom
|
||||
// 25% of the screen that enters the z shell when
|
||||
// zellij starts - the exec duration for zsh matters
|
||||
// here as it'll repeat for each "tab" that exists
|
||||
pane_template name="term" {
|
||||
// horizontal split to place the terminal
|
||||
// on the bottom half of the screen like the
|
||||
// toggleterm neovim plugin
|
||||
pane split_direction="horizontal" {
|
||||
children
|
||||
pane command="zsh" size="25%" name="Shell"
|
||||
}
|
||||
}
|
||||
|
||||
// create a "strider tab" for my system configuration
|
||||
// which is a tab that utilizes the strider tab template
|
||||
// that we have defined earlier, provides a file-tree
|
||||
// view in my system config directory, and opens flake.nix
|
||||
// with the $EDITOR variable - has focus, is the first tab
|
||||
strider_tab name="Nyx" cwd="~dots" focus=true {
|
||||
term split_direction="vertical" {
|
||||
// FIXME: edit does not open the file from cwd
|
||||
// instead opens a buffer named flake.nix in cwd
|
||||
// which should be the original flake.nix
|
||||
// but is not
|
||||
pane edit="./flake.nix" name="Flake"
|
||||
}
|
||||
}
|
||||
|
||||
// regular vertical tab that will open btop automatically for
|
||||
// viewing active processes in a standalone tab
|
||||
// more utilities can go here if seen necessary
|
||||
tab name="Processes" split_direction="vertical" {
|
||||
pane {
|
||||
// open btop in the home directory
|
||||
// doesn't really matter where you open it
|
||||
cwd "$HOME"
|
||||
command "btop"
|
||||
}
|
||||
}
|
||||
|
||||
// the media tab opens musikcube, the TUI music player
|
||||
// and pulsemixer for volume control across different
|
||||
// audio devices - this is split horizontally so that
|
||||
// the mixer covers less space on the screen, at the
|
||||
// bottom 35% of the active tab
|
||||
tab name="Media" split_direction="vertical" {
|
||||
// run musikcube in the Music directory
|
||||
// the CWD doesn't really matter as musikcube
|
||||
// is capable of binding to mpd daemon but
|
||||
// the music directory seemed suitable as
|
||||
// the working directory for the player
|
||||
pane split_direction="horizontal" name="Player" {
|
||||
pane {
|
||||
cwd "$HOME/Music"
|
||||
command "musikcube"
|
||||
}
|
||||
}
|
||||
|
||||
// standalone pane for pulsemixer
|
||||
pane split_direction="horizontal" name="Mixer" {
|
||||
pane size="35%" {
|
||||
command "pulsemixer"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The last tab is a file browser that opens in the home directory
|
||||
// so that I may freely browse my files and open them using the XDG
|
||||
// specs when yazi can handle the file type.
|
||||
tab name="Files" split_direction="horizontal" name="Files" {
|
||||
pane {
|
||||
cwd "$HOME"
|
||||
command "yazi"
|
||||
}
|
||||
}
|
||||
}
|
6
nyx/homes/notashelf/programs/terminal/tools/zoxide.nix
Normal file
6
nyx/homes/notashelf/programs/terminal/tools/zoxide.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
options = ["--cmd cd"];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue