Initial commit
This commit is contained in:
commit
a1780e0f07
33 changed files with 4388 additions and 0 deletions
48
flake.lock
generated
Normal file
48
flake.lock
generated
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690084763,
|
||||||
|
"narHash": "sha256-Nw680m/pyVoosSgXZW415Z657mfVM2BxaxDPjEk48Z0=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "fb03fa5516d4e86059d24ab35a611ffa3a359547",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690031011,
|
||||||
|
"narHash": "sha256-kzK0P4Smt7CL53YCdZCBbt9uBFFhE0iNvCki20etAf4=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "12303c652b881435065a98729eb7278313041e49",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
43
flake.nix
Normal file
43
flake.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { nixpkgs, home-manager, ... }:
|
||||||
|
let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
homeConfigurations = {
|
||||||
|
ooks = home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit pkgs;
|
||||||
|
extraSpecialArgs = { inherit nixpkgs system; };
|
||||||
|
modules = [
|
||||||
|
./users/main/home.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nixosConfigurations = {
|
||||||
|
ooksthink = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
./systems/laptop/laptop.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
ooksdesk = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
./systems/desktop/configuration.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
9
system/laptop/fonts.nix
Normal file
9
system/laptop/fonts.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
{ pkgs, ... }
|
||||||
|
{
|
||||||
|
|
||||||
|
# Fonts
|
||||||
|
|
||||||
|
font.fonts = with pkgs; [
|
||||||
|
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
||||||
|
];
|
||||||
61
system/laptop/hardware-configuration.nix
Normal file
61
system/laptop/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/db84a41f-6094-46b1-b98a-26e03afc18e1";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=root" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/3ea21f10-f705-457c-8366-a8268f658ba6";
|
||||||
|
|
||||||
|
fileSystems."/nix" =
|
||||||
|
{ device = "/dev/disk/by-uuid/db84a41f-6094-46b1-b98a-26e03afc18e1";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=nix" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/persist" =
|
||||||
|
{ device = "/dev/disk/by-uuid/db84a41f-6094-46b1-b98a-26e03afc18e1";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=persist" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/swap" =
|
||||||
|
{ device = "/dev/disk/by-uuid/db84a41f-6094-46b1-b98a-26e03afc18e1";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=swap" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/45D8-8DC3";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wwp0s20f0u2c2.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
288
system/laptop/laptop.nix
Normal file
288
system/laptop/laptop.nix
Normal file
|
|
@ -0,0 +1,288 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
# Imports
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ # Include the results of the hardware scan
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Bootloader
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
|
||||||
|
# Nix Settings
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
settings = {
|
||||||
|
auto-optimise-store = true;
|
||||||
|
experimental-features = "nix-command flakes";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
# Garbage Collection
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 2d";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# System Architecture
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
nixpkgs.system = "x86_64-linux";
|
||||||
|
|
||||||
|
# Allow Unfree
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# Networking
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "ooksthink"; # Define your hostname.
|
||||||
|
networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
# Time Zone
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
time.timeZone = "Pacific/Auckland";
|
||||||
|
|
||||||
|
# Localization
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
# X Server
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
displayManager = {
|
||||||
|
defaultSession = null;
|
||||||
|
startx.enable = true;
|
||||||
|
};
|
||||||
|
# displayManager.gdm = {
|
||||||
|
# enable = true;
|
||||||
|
# wayland = true;
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
|
||||||
|
# X11 Keymap
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# services.xserver.layout = "us";
|
||||||
|
# services.xserver.xkbOptions = "eurosign:e,caps:escape";
|
||||||
|
|
||||||
|
# Printing
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# services.printing.enable = true;
|
||||||
|
|
||||||
|
# Sound
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
sound.enable = false;
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
|
||||||
|
# Touchpad
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
|
# User
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
users.users = {
|
||||||
|
ooks = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
|
shell = pkgs.fish;
|
||||||
|
|
||||||
|
# User Packages
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
packages = with pkgs; [
|
||||||
|
firefox
|
||||||
|
tree
|
||||||
|
hyprland
|
||||||
|
kitty
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# System Environment
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
binsh = "${pkgs.dash}/bin/dash";
|
||||||
|
shells = with pkgs; [ fish ];
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
# Editor
|
||||||
|
# ------
|
||||||
|
neovim
|
||||||
|
# Utility
|
||||||
|
# ------
|
||||||
|
wget
|
||||||
|
dash
|
||||||
|
neofetch
|
||||||
|
glib
|
||||||
|
xdg-utils
|
||||||
|
pciutils
|
||||||
|
gdb
|
||||||
|
killall
|
||||||
|
jetbrains-mono
|
||||||
|
cargo
|
||||||
|
p7zip
|
||||||
|
joshuto
|
||||||
|
zip
|
||||||
|
rar
|
||||||
|
btop
|
||||||
|
git
|
||||||
|
libnotify
|
||||||
|
dunst
|
||||||
|
wl-clipboard
|
||||||
|
wlr-randr
|
||||||
|
wayland
|
||||||
|
wayland-scanner
|
||||||
|
wayland-utils
|
||||||
|
egl-wayland
|
||||||
|
wayland-protocols
|
||||||
|
wev
|
||||||
|
alsa-lib
|
||||||
|
alsa-utils
|
||||||
|
flac
|
||||||
|
pulsemixer
|
||||||
|
linux-firmware
|
||||||
|
lxappearance
|
||||||
|
pkgs.sway-contrib.grimshot
|
||||||
|
flameshot
|
||||||
|
grim
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Fonts
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
fonts.fonts = with pkgs; [
|
||||||
|
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
||||||
|
];
|
||||||
|
|
||||||
|
# Programs
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
programs.mtr.enable = true;
|
||||||
|
programs.gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSSHSupport = true;
|
||||||
|
};
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
xwayland.enable = true;
|
||||||
|
};
|
||||||
|
programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Services
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
|
services = {
|
||||||
|
pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
jack.enable = true;
|
||||||
|
wireplumber.enable = true;
|
||||||
|
};
|
||||||
|
dbus.packages = [ pkgs.gcr ];
|
||||||
|
getty.autologinUser = "ooks";
|
||||||
|
auto-cpufreq = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
battery = {
|
||||||
|
governor = "powersave";
|
||||||
|
turbo = "never";
|
||||||
|
};
|
||||||
|
charger = {
|
||||||
|
governor = "performance";
|
||||||
|
turbo = "auto";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd = {
|
||||||
|
user.services.polkit-gnome-authentication-agent-1 = {
|
||||||
|
description = "polkit-gnome-authentication-agent-1";
|
||||||
|
wantedBy = [ "graphical-session.target" ];
|
||||||
|
wants = [ "graphical-session.target" ];
|
||||||
|
after = [ "graphical-session.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 1;
|
||||||
|
TimeoutStopSec = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Security
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
security.polkit.enable = true;
|
||||||
|
security.sudo = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
ooks ALL=(ALL) NOPASSWD:ALL
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
# D-Bus
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
services.dbus.enable = true;
|
||||||
|
|
||||||
|
# Firewall
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
# Or disable the firewall altogether.
|
||||||
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
|
# System Version
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
system = {
|
||||||
|
autoUpgrade = {
|
||||||
|
enable = false;
|
||||||
|
channel = "https://nixos.org/channels/nix-unstable";
|
||||||
|
};
|
||||||
|
stateVersion = "23.11";
|
||||||
|
copySystemConfiguration = false;
|
||||||
|
};
|
||||||
|
}
|
||||||
78
system/laptop/packages.nix
Normal file
78
system/laptop/packages.nix
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
|
||||||
|
{ pkgs, ... }
|
||||||
|
{
|
||||||
|
# System Packages
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
binsh = with pkgs; [ fish ]
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
# Editor
|
||||||
|
neovim
|
||||||
|
# Utility
|
||||||
|
wget
|
||||||
|
neofetch
|
||||||
|
glib
|
||||||
|
xdg-utils
|
||||||
|
killall
|
||||||
|
zip
|
||||||
|
rar
|
||||||
|
btop
|
||||||
|
p7zip
|
||||||
|
git
|
||||||
|
pciutils
|
||||||
|
gdb
|
||||||
|
dash
|
||||||
|
curl
|
||||||
|
# Programming
|
||||||
|
cargo
|
||||||
|
# Fonts
|
||||||
|
jetbrains-mono
|
||||||
|
# File browsers
|
||||||
|
ranger
|
||||||
|
joshuto
|
||||||
|
# Wayland
|
||||||
|
wayland
|
||||||
|
wayland-scanner
|
||||||
|
wayland-utils
|
||||||
|
egl-wayland
|
||||||
|
wayland-protocols
|
||||||
|
wev # Wayland window debugger
|
||||||
|
wl-clipboard # Wayland clipboard
|
||||||
|
wlr-randr
|
||||||
|
# Firmware
|
||||||
|
linux-firmware
|
||||||
|
# Audio
|
||||||
|
alsa-lib
|
||||||
|
alsa-utils
|
||||||
|
flac
|
||||||
|
pulsemixer
|
||||||
|
# Appearance
|
||||||
|
lxappearance
|
||||||
|
# Screenshot
|
||||||
|
pkgs.sway-contrib.grimshot
|
||||||
|
flameshot
|
||||||
|
grim
|
||||||
|
# Notification
|
||||||
|
dunst
|
||||||
|
libnotify
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Programs
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
programs.mtr.enable = true
|
||||||
|
programs.gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
enabeSSHSupport = true;
|
||||||
|
};
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
xwayland.enable = true;
|
||||||
|
};
|
||||||
|
programs.fish = {
|
||||||
|
enable = true
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
70
user/ooks/home.nix
Normal file
70
user/ooks/home.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Home Manager needs a bit of information about you and the paths it should
|
||||||
|
# manage.
|
||||||
|
home.username = "ooks";
|
||||||
|
home.homeDirectory = "/home/ooks";
|
||||||
|
|
||||||
|
# This value determines the Home Manager release that your configuration is
|
||||||
|
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||||
|
# introduces backwards incompatible changes.
|
||||||
|
#
|
||||||
|
# You should not change this value, even if you update Home Manager. If you do
|
||||||
|
# want to update the value, then make sure to first check the Home Manager
|
||||||
|
# release notes.
|
||||||
|
home.stateVersion = "23.05"; # Please read the comment before changing.
|
||||||
|
|
||||||
|
# The home.packages option allows you to install Nix packages into your
|
||||||
|
# environment.
|
||||||
|
home.packages = [
|
||||||
|
# # Adds the 'hello' command to your environment. It prints a friendly
|
||||||
|
# # "Hello, world!" when run.
|
||||||
|
# pkgs.hello
|
||||||
|
|
||||||
|
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||||
|
# # overrides. You can do that directly here, just don't forget the
|
||||||
|
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
||||||
|
# # fonts?
|
||||||
|
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||||
|
|
||||||
|
# # You can also create simple shell scripts directly inside your
|
||||||
|
# # configuration. For example, this adds a command 'my-hello' to your
|
||||||
|
# # environment:
|
||||||
|
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||||
|
# echo "Hello, ${config.home.username}!"
|
||||||
|
# '')
|
||||||
|
];
|
||||||
|
|
||||||
|
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||||
|
# plain files is through 'home.file'.
|
||||||
|
home.file = {
|
||||||
|
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||||
|
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||||
|
# # symlink to the Nix store copy.
|
||||||
|
# ".screenrc".source = dotfiles/screenrc;
|
||||||
|
|
||||||
|
# # You can also set the file content immediately.
|
||||||
|
# ".gradle/gradle.properties".text = ''
|
||||||
|
# org.gradle.console=verbose
|
||||||
|
# org.gradle.daemon.idletimeout=3600000
|
||||||
|
# '';
|
||||||
|
};
|
||||||
|
|
||||||
|
# You can also manage environment variables but you will have to manually
|
||||||
|
# source
|
||||||
|
#
|
||||||
|
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
# or
|
||||||
|
#
|
||||||
|
# /etc/profiles/per-user/ooks/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
# if you don't want to manage your shell through Home Manager.
|
||||||
|
home.sessionVariables = {
|
||||||
|
# EDITOR = "emacs";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Let Home Manager install and manage itself.
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
}
|
||||||
198
user/ooks/modules/desktop/hyprland/home.nix
Normal file
198
user/ooks/modules/desktop/hyprland/home.nix
Normal file
|
|
@ -0,0 +1,198 @@
|
||||||
|
config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(import ../../environment/hypr-variable.nix)
|
||||||
|
];
|
||||||
|
programs = {
|
||||||
|
bash = {
|
||||||
|
initExtra = ''
|
||||||
|
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||||
|
exec Hyprland
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
fish = {
|
||||||
|
loginShellInit = ''
|
||||||
|
set TTY1 (tty)
|
||||||
|
[ "$TTY1" = "/dev/tty1" ] && exec Hyprland
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.user.targets.hyprland-session.Unit.Wants = [ "xdg-desktop-autostart.target" ];
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
systemdIntegration = true;
|
||||||
|
nvidiaPatches = false;
|
||||||
|
extraConfig = ''
|
||||||
|
monitor=,preferred,auto,auto
|
||||||
|
|
||||||
|
exec-once = swaybg -i ~/.dotfiles/walls/everforest/megacity.png
|
||||||
|
|
||||||
|
input {
|
||||||
|
kb_layout = us
|
||||||
|
kb_variant =
|
||||||
|
kb_model =
|
||||||
|
kb_options =
|
||||||
|
kb_rules =
|
||||||
|
|
||||||
|
follow_mouse = 1
|
||||||
|
|
||||||
|
touchpad {
|
||||||
|
natural_scroll = yes
|
||||||
|
}
|
||||||
|
|
||||||
|
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||||
|
}
|
||||||
|
|
||||||
|
general {
|
||||||
|
|
||||||
|
gaps_in = 5
|
||||||
|
gaps_out = 5
|
||||||
|
border_size = 2
|
||||||
|
col.active_border = 0xffA7C080
|
||||||
|
col.inactive_border = rgba(595959aa)
|
||||||
|
|
||||||
|
layout = dwindle
|
||||||
|
}
|
||||||
|
|
||||||
|
decoration {
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||||
|
|
||||||
|
rounding = 5
|
||||||
|
multisample_edges = true
|
||||||
|
blur = no
|
||||||
|
blur_size = 3
|
||||||
|
blur_passes = 1
|
||||||
|
blur_new_optimizations = on
|
||||||
|
|
||||||
|
drop_shadow = no
|
||||||
|
shadow_range = 4
|
||||||
|
shadow_render_power = 3
|
||||||
|
col.shadow = rgba(1a1a1aee)
|
||||||
|
}
|
||||||
|
|
||||||
|
misc {
|
||||||
|
animate_manual_resizes = false
|
||||||
|
enable_swallow = true
|
||||||
|
swallow_regex = ^(kitty)$
|
||||||
|
focus_on_activate = true
|
||||||
|
disable_hyprland_logo = true
|
||||||
|
}
|
||||||
|
# Animations
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
animations {
|
||||||
|
enabled = yes
|
||||||
|
bezier = overshot, 0.11, 1, 0.36, 1
|
||||||
|
animation = windows, 1, 4, overshot, slide
|
||||||
|
animation = windowsOut, 1, 5, default, popin 80%
|
||||||
|
animation = border, 1, 5, default
|
||||||
|
animation = fade, 1, 8, default
|
||||||
|
animation = workspaces, 1, 6, overshot, slide
|
||||||
|
}
|
||||||
|
|
||||||
|
# Layout
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
dwindle {
|
||||||
|
pseudotile = yes
|
||||||
|
preserve_split = yes
|
||||||
|
}
|
||||||
|
|
||||||
|
master {
|
||||||
|
new_is_master = true
|
||||||
|
}
|
||||||
|
|
||||||
|
# Gestures
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
gestures {
|
||||||
|
workspace_swipe = off
|
||||||
|
}
|
||||||
|
|
||||||
|
# Device Config
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
device:epic-mouse-v1 {
|
||||||
|
sensitivity = -0.5
|
||||||
|
}
|
||||||
|
|
||||||
|
# Window Rules
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Example windowrule v1
|
||||||
|
# windowrule = float, ^(kitty)$
|
||||||
|
# Example windowrule v2
|
||||||
|
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||||
|
|
||||||
|
# Main Mod
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
$mainMod = SUPER
|
||||||
|
|
||||||
|
# Program Binds
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
bind = $mainMod, return, exec, kitty
|
||||||
|
bind = $mainMod, Q, killactive,
|
||||||
|
bind = $mainMod, B, exec, firefox
|
||||||
|
bind = $mainMod, M, exit,
|
||||||
|
bind = $mainMod, space, togglefloating,
|
||||||
|
bind = $mainMod, P, pseudo, # dwindle
|
||||||
|
bind = $mainMod, J, togglesplit, # dwindle
|
||||||
|
|
||||||
|
# Move focus with mainMod + arrow keys
|
||||||
|
bind = $mainMod, left, movefocus, l
|
||||||
|
bind = $mainMod, right, movefocus, r
|
||||||
|
bind = $mainMod, up, movefocus, u
|
||||||
|
bind = $mainMod, down, movefocus, d
|
||||||
|
|
||||||
|
# Workspaces
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
bind = $mainMod, 1, workspace, 1
|
||||||
|
bind = $mainMod, 2, workspace, 2
|
||||||
|
bind = $mainMod, 3, workspace, 3
|
||||||
|
bind = $mainMod, 4, workspace, 4
|
||||||
|
bind = $mainMod, 5, workspace, 5
|
||||||
|
bind = $mainMod, 6, workspace, 6
|
||||||
|
bind = $mainMod, 7, workspace, 7
|
||||||
|
bind = $mainMod, 8, workspace, 8
|
||||||
|
bind = $mainMod, 9, workspace, 9
|
||||||
|
bind = $mainMod, 0, workspace, 10
|
||||||
|
binds {
|
||||||
|
workspace_back_and_forth = 1
|
||||||
|
allow_workspace_cycles = 1
|
||||||
|
}
|
||||||
|
bind=$mainMod,tab,workspace,previous
|
||||||
|
|
||||||
|
# Move To Workspaces
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||||
|
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||||
|
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||||
|
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||||
|
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||||
|
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||||
|
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||||
|
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||||
|
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||||
|
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||||
|
|
||||||
|
# Workspaces Scroll
|
||||||
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
bind = $mainMod, mouse_down, workspace, e+1
|
||||||
|
bind = $mainMod, mouse_up, workspace, e-1
|
||||||
|
|
||||||
|
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||||
|
bindm = $mainMod, mouse:272, movewindow
|
||||||
|
bindm = $mainMod, mouse:273, resizewindow
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
39
user/ooks/modules/environment/hypr-variable.nix
Normal file
39
user/ooks/modules/environment/hypr-variable.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
sessionVariables = {
|
||||||
|
EDITOR = "nvim";
|
||||||
|
BROWSER = "firefox";
|
||||||
|
TERMINAL = "kitty";
|
||||||
|
# GTK_IM_MODULE = "fcitx5";
|
||||||
|
# QT_IM_MODULE = "fcitx5";
|
||||||
|
# XMODIFIERS = "@im=fcitx5";
|
||||||
|
QT_QPA_PLATFORMTHEME = "gtk3";
|
||||||
|
QT_SCALE_FACTOR = "1";
|
||||||
|
MOZ_ENABLE_WAYLAND = "1";
|
||||||
|
SDL_VIDEODRIVER = "wayland";
|
||||||
|
_JAVA_AWT_WM_NONREPARENTING = "1";
|
||||||
|
QT_QPA_PLATFORM = "wayland";
|
||||||
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||||
|
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||||
|
WLR_DRM_DEVICES = "/dev/dri/card1:/dev/dri/card0";
|
||||||
|
WLR_NO_HARDWARE_CURSORS = "1"; # if no cursor,uncomment this line
|
||||||
|
WLR_RENDERER_ALLOW_SOFTWARE = "1";
|
||||||
|
# GBM_BACKEND = "nvidia-drm";
|
||||||
|
CLUTTER_BACKEND = "wayland";
|
||||||
|
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||||
|
LIBVA_DRIVER_NAME = "nvidia";
|
||||||
|
WLR_RENDERER = "vulkan";
|
||||||
|
# __NV_PRIME_RENDER_OFFLOAD = "1";
|
||||||
|
|
||||||
|
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||||
|
XDG_SESSION_DESKTOP = "Hyprland";
|
||||||
|
XDG_SESSION_TYPE = "wayland";
|
||||||
|
XDG_CACHE_HOME = "\${HOME}/.cache";
|
||||||
|
XDG_CONFIG_HOME = "\${HOME}/.config";
|
||||||
|
XDG_BIN_HOME = "\${HOME}/.local/bin";
|
||||||
|
XDG_DATA_HOME = "\${HOME}/.local/share";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
16
user/ooks/modules/programs/default.nix
Normal file
16
user/ooks/modules/programs/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
[
|
||||||
|
./joshuto/
|
||||||
|
./kitty/
|
||||||
|
./lazygit/
|
||||||
|
./neofetch/
|
||||||
|
./resource-monitor/
|
||||||
|
./search/
|
||||||
|
./starship/
|
||||||
|
./youtube-tui/
|
||||||
|
./yt-dlp/
|
||||||
|
./zathura/
|
||||||
|
./firefox/
|
||||||
|
./imgview/
|
||||||
|
./notify/
|
||||||
|
./mpv/
|
||||||
|
]
|
||||||
14
user/ooks/modules/programs/firefox/default.nix
Normal file
14
user/ooks/modules/programs/firefox/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
extraPolicies = {
|
||||||
|
DisplayBookmarksToolbar = true;
|
||||||
|
Preferences = {
|
||||||
|
"browser.toolbars.bookmarks.visibility" = "never";
|
||||||
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||||
|
"media.ffmpeg.vaapi.enabled" = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
8
user/ooks/modules/programs/imgview/default.nix
Normal file
8
user/ooks/modules/programs/imgview/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
imv
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
6
user/ooks/modules/programs/joshuto/config/bookmarks.toml
Normal file
6
user/ooks/modules/programs/joshuto/config/bookmarks.toml
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
bookmark = [
|
||||||
|
{ key = "r", path = "/" },
|
||||||
|
{ key = "e", path = "/etc" },
|
||||||
|
|
||||||
|
{ key = "h", path = "~/" },
|
||||||
|
]
|
||||||
38
user/ooks/modules/programs/joshuto/config/joshuto.toml
Normal file
38
user/ooks/modules/programs/joshuto/config/joshuto.toml
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
numbered_command = false
|
||||||
|
|
||||||
|
use_trash = false
|
||||||
|
watch_files = true
|
||||||
|
xdg_open = false
|
||||||
|
xdg_open_fork = false
|
||||||
|
|
||||||
|
|
||||||
|
[display]
|
||||||
|
# default, hsplit
|
||||||
|
mode = "default"
|
||||||
|
|
||||||
|
automatically_count_files = false
|
||||||
|
collapse_preview = true
|
||||||
|
# ratios for parent view (optional), current view and preview
|
||||||
|
column_ratio = [2, 3, 5]
|
||||||
|
scroll_offset = 6
|
||||||
|
show_borders = true
|
||||||
|
show_hidden = false
|
||||||
|
show_icons = true
|
||||||
|
tilde_in_titlebar = true
|
||||||
|
# none, absolute, relative
|
||||||
|
line_number_style = "none"
|
||||||
|
|
||||||
|
[display.sort]
|
||||||
|
# lexical, mtime, natural
|
||||||
|
method = "natural"
|
||||||
|
case_sensitive = false
|
||||||
|
directories_first = true
|
||||||
|
reverse = false
|
||||||
|
|
||||||
|
[preview]
|
||||||
|
max_preview_size = 2097152 # 2MB
|
||||||
|
preview_script = "~/.config/joshuto/preview_file.sh"
|
||||||
|
|
||||||
|
[tab]
|
||||||
|
# inherit, home, root
|
||||||
|
home_page = "home"
|
||||||
174
user/ooks/modules/programs/joshuto/config/keymap.toml
Normal file
174
user/ooks/modules/programs/joshuto/config/keymap.toml
Normal file
|
|
@ -0,0 +1,174 @@
|
||||||
|
[default_view]
|
||||||
|
|
||||||
|
keymap = [
|
||||||
|
{ keys = ["escape"], command = "escape" },
|
||||||
|
{ keys = ["ctrl+t"], command = "new_tab" },
|
||||||
|
{ keys = ["alt+t"], command = "new_tab --cursor" },
|
||||||
|
{ keys = ["T"], command = "new_tab --current" },
|
||||||
|
{ keys = ["W"], command = "close_tab" },
|
||||||
|
{ keys = ["ctrl+w"], command = "close_tab" },
|
||||||
|
{ keys = ["q"], command = "close_tab" },
|
||||||
|
{ keys = ["ctrl+c"], command = "quit" },
|
||||||
|
{ keys = ["Q"], command = "quit --output-current-directory" },
|
||||||
|
|
||||||
|
{ keys = ["R"], command = "reload_dirlist" },
|
||||||
|
{ keys = ["z", "h"], command = "toggle_hidden" },
|
||||||
|
{ keys = ["ctrl+h"], command = "toggle_hidden" },
|
||||||
|
{ keys = ["backspace"], command = "toggle_hidden" },
|
||||||
|
{ keys = ["\t"], command = "tab_switch 1" },
|
||||||
|
{ keys = ["backtab"], command = "tab_switch -1" },
|
||||||
|
|
||||||
|
{ keys = ["alt+1"], command = "tab_switch_index 1" },
|
||||||
|
{ keys = ["alt+2"], command = "tab_switch_index 2" },
|
||||||
|
{ keys = ["alt+3"], command = "tab_switch_index 3" },
|
||||||
|
{ keys = ["alt+4"], command = "tab_switch_index 4" },
|
||||||
|
{ keys = ["alt+5"], command = "tab_switch_index 5" },
|
||||||
|
|
||||||
|
{ keys = ["1"], command = "numbered_command 1" },
|
||||||
|
{ keys = ["2"], command = "numbered_command 2" },
|
||||||
|
{ keys = ["3"], command = "numbered_command 3" },
|
||||||
|
{ keys = ["4"], command = "numbered_command 4" },
|
||||||
|
{ keys = ["5"], command = "numbered_command 5" },
|
||||||
|
{ keys = ["6"], command = "numbered_command 6" },
|
||||||
|
{ keys = ["7"], command = "numbered_command 7" },
|
||||||
|
{ keys = ["8"], command = "numbered_command 8" },
|
||||||
|
{ keys = ["9"], command = "numbered_command 9" },
|
||||||
|
|
||||||
|
# arrow keys
|
||||||
|
{ keys = ["arrow_up"], command = "cursor_move_up" },
|
||||||
|
{ keys = ["arrow_down"], command = "cursor_move_down" },
|
||||||
|
{ keys = ["arrow_left"], command = "cd .." },
|
||||||
|
{ keys = ["arrow_right"], command = "open" },
|
||||||
|
{ keys = ["\n"], command = "open" },
|
||||||
|
{ keys = ["home"], command = "cursor_move_home" },
|
||||||
|
{ keys = ["end"], command = "cursor_move_end" },
|
||||||
|
{ keys = ["page_up"], command = "cursor_move_page_up" },
|
||||||
|
{ keys = ["page_down"], command = "cursor_move_page_down" },
|
||||||
|
{ keys = ["ctrl+u"], command = "cursor_move_page_up 0.5" },
|
||||||
|
{ keys = ["ctrl+d"], command = "cursor_move_page_down 0.5" },
|
||||||
|
|
||||||
|
# vim-like keybindings
|
||||||
|
{ keys = ["j"], command = "cursor_move_down" },
|
||||||
|
{ keys = ["k"], command = "cursor_move_up" },
|
||||||
|
{ keys = ["h"], command = "cd .." },
|
||||||
|
{ keys = ["l"], command = "open" },
|
||||||
|
{ keys = ["g", "g"], command = "cursor_move_home" },
|
||||||
|
{ keys = ["G"], command = "cursor_move_end" },
|
||||||
|
{ keys = ["r"], command = "open_with" },
|
||||||
|
|
||||||
|
{ keys = ["H"], command = "cursor_move_page_home" },
|
||||||
|
{ keys = ["L"], command = "cursor_move_page_middle" },
|
||||||
|
{ keys = ["M"], command = "cursor_move_page_end" },
|
||||||
|
|
||||||
|
{ keys = ["["], command = "parent_cursor_move_up" },
|
||||||
|
{ keys = ["]"], command = "parent_cursor_move_down" },
|
||||||
|
|
||||||
|
{ keys = ["c", "d"], command = ":cd " },
|
||||||
|
{ keys = ["d", "d"], command = "cut_files" },
|
||||||
|
{ keys = ["y", "y"], command = "copy_files" },
|
||||||
|
{ keys = ["y", "n"], command = "copy_filename" },
|
||||||
|
{ keys = ["y", "."], command = "copy_filename_without_extension" },
|
||||||
|
{ keys = ["y", "p"], command = "copy_filepath" },
|
||||||
|
{ keys = ["y", "d"], command = "copy_dirpath" },
|
||||||
|
|
||||||
|
{ keys = ["p", "l"], command = "symlink_files --relative=false" },
|
||||||
|
{ keys = ["p", "L"], command = "symlink_files --relative=true" },
|
||||||
|
|
||||||
|
{ keys = ["delete"], command = "delete_files" },
|
||||||
|
{ keys = ["d", "D"], command = "delete_files" },
|
||||||
|
|
||||||
|
{ keys = ["p", "p"], command = "paste_files" },
|
||||||
|
{ keys = ["p", "o"], command = "paste_files --overwrite=true" },
|
||||||
|
|
||||||
|
{ keys = ["a"], command = "rename_append" },
|
||||||
|
{ keys = ["A"], command = "rename_prepend" },
|
||||||
|
|
||||||
|
{ keys = ["f", "t"], command = ":touch " },
|
||||||
|
|
||||||
|
{ keys = [" "], command = "select --toggle=true" },
|
||||||
|
{ keys = ["t"], command = "select --all=true --toggle=true" },
|
||||||
|
{ keys = ["V"], command = "toggle_visual" },
|
||||||
|
|
||||||
|
{ keys = ["w"], command = "show_tasks --exit-key=w" },
|
||||||
|
{ keys = ["b", "b"], command = "bulk_rename" },
|
||||||
|
{ keys = ["="], command = "set_mode" },
|
||||||
|
|
||||||
|
{ keys = [":"], command = ":" },
|
||||||
|
{ keys = [";"], command = ":" },
|
||||||
|
|
||||||
|
{ keys = ["'"], command = ":shell " },
|
||||||
|
{ keys = ["m", "k"], command = ":mkdir " },
|
||||||
|
{ keys = ["c", "w"], command = ":rename " },
|
||||||
|
|
||||||
|
{ keys = ["/"], command = ":search " },
|
||||||
|
{ keys = ["|"], command = ":search_inc " },
|
||||||
|
{ keys = ["\\"], command = ":search_glob " },
|
||||||
|
{ keys = ["ctrl+f"], command = "search_fzf" },
|
||||||
|
{ keys = ["C"], command = "subdir_fzf" },
|
||||||
|
|
||||||
|
{ keys = ["n"], command = "search_next" },
|
||||||
|
{ keys = ["N"], command = "search_prev" },
|
||||||
|
|
||||||
|
{ keys = ["s", "r"], command = "sort reverse" },
|
||||||
|
{ keys = ["s", "l"], command = "sort lexical" },
|
||||||
|
{ keys = ["s", "m"], command = "sort mtime" },
|
||||||
|
{ keys = ["s", "n"], command = "sort natural" },
|
||||||
|
{ keys = ["s", "s"], command = "sort size" },
|
||||||
|
{ keys = ["s", "e"], command = "sort ext" },
|
||||||
|
|
||||||
|
{ keys = ["m", "s"], command = "linemode size" },
|
||||||
|
{ keys = ["m", "m"], command = "linemode mtime" },
|
||||||
|
{ keys = ["m", "M"], command = "linemode sizemtime" },
|
||||||
|
|
||||||
|
{ keys = ["g", "r"], command = "cd /" },
|
||||||
|
{ keys = ["g", "c"], command = "cd ~/.config" },
|
||||||
|
{ keys = ["g", "d"], command = "cd ~/Downloads" },
|
||||||
|
{ keys = ["g", "e"], command = "cd /etc" },
|
||||||
|
{ keys = ["g", "h"], command = "cd ~/" },
|
||||||
|
{ keys = ["g", "f"], command = "cd ~/Flakes" },
|
||||||
|
{ keys = ["?"], command = "help" },
|
||||||
|
|
||||||
|
# `Shift + s` enter shell
|
||||||
|
{ keys = ["S"], command = "shell fish" },
|
||||||
|
#youtube-dl
|
||||||
|
{ keys = ["y", "a"], command = ":shell yt-dlp -x --audio-format mp3 " },
|
||||||
|
{ keys = ["y", "v"], command = ":shell yt-dlp -x -ic " },
|
||||||
|
]
|
||||||
|
|
||||||
|
[task_view]
|
||||||
|
|
||||||
|
keymap = [
|
||||||
|
# arrow keys
|
||||||
|
{ keys = ["arrow_up"], command = "cursor_move_up" },
|
||||||
|
{ keys = ["arrow_down"], command = "cursor_move_down" },
|
||||||
|
{ keys = ["home"], command = "cursor_move_home" },
|
||||||
|
{ keys = ["end"], command = "cursor_move_end" },
|
||||||
|
|
||||||
|
# vim-like keybindings
|
||||||
|
{ keys = ["j"], command = "cursor_move_down" },
|
||||||
|
{ keys = ["k"], command = "cursor_move_up" },
|
||||||
|
{ keys = ["g", "g"], command = "cursor_move_home" },
|
||||||
|
{ keys = ["G"], command = "cursor_move_end" },
|
||||||
|
|
||||||
|
{ keys = ["w"], command = "show_tasks" },
|
||||||
|
{ keys = ["escape"], command = "show_tasks" },
|
||||||
|
]
|
||||||
|
|
||||||
|
[help_view]
|
||||||
|
|
||||||
|
keymap = [
|
||||||
|
# arrow keys
|
||||||
|
{ keys = ["arrow_up"], command = "cursor_move_up" },
|
||||||
|
{ keys = ["arrow_down"], command = "cursor_move_down" },
|
||||||
|
{ keys = ["home"], command = "cursor_move_home" },
|
||||||
|
{ keys = ["end"], command = "cursor_move_end" },
|
||||||
|
|
||||||
|
# vim-like keybindings
|
||||||
|
{ keys = ["j"], command = "cursor_move_down" },
|
||||||
|
{ keys = ["k"], command = "cursor_move_up" },
|
||||||
|
{ keys = ["g", "g"], command = "cursor_move_home" },
|
||||||
|
{ keys = ["G"], command = "cursor_move_end" },
|
||||||
|
|
||||||
|
{ keys = ["w"], command = "show_tasks" },
|
||||||
|
{ keys = ["escape"], command = "show_tasks" },
|
||||||
|
]
|
||||||
229
user/ooks/modules/programs/joshuto/config/mimetype.toml
Normal file
229
user/ooks/modules/programs/joshuto/config/mimetype.toml
Normal file
|
|
@ -0,0 +1,229 @@
|
||||||
|
[class]
|
||||||
|
audio_default = [
|
||||||
|
{ command = "mpv", args = [
|
||||||
|
"--",
|
||||||
|
] },
|
||||||
|
{ command = "mediainfo", confirm_exit = true },
|
||||||
|
]
|
||||||
|
|
||||||
|
image_default = [
|
||||||
|
{ command = "qimgv", args = [
|
||||||
|
"--",
|
||||||
|
], fork = true, silent = true },
|
||||||
|
{ command = "krita", args = [
|
||||||
|
"--",
|
||||||
|
], fork = true, silent = true },
|
||||||
|
{ command = "exiftool", confirm_exit = true },
|
||||||
|
{ command = "swappy", args = [
|
||||||
|
"-f",
|
||||||
|
], fork = true },
|
||||||
|
]
|
||||||
|
|
||||||
|
video_default = [
|
||||||
|
{ command = "mpv", args = [
|
||||||
|
"--",
|
||||||
|
], fork = true, silent = true },
|
||||||
|
{ command = "mediainfo", confirm_exit = true },
|
||||||
|
{ command = "mpv", args = [
|
||||||
|
"--mute",
|
||||||
|
"on",
|
||||||
|
"--",
|
||||||
|
], fork = true, silent = true },
|
||||||
|
]
|
||||||
|
|
||||||
|
text_default = [
|
||||||
|
{ command = "micro" },
|
||||||
|
{ command = "gedit", fork = true, silent = true },
|
||||||
|
{ command = "bat", args = [
|
||||||
|
"--paging=always",
|
||||||
|
] },
|
||||||
|
]
|
||||||
|
|
||||||
|
reader_default = [{ command = "evince", fork = true, silent = true }]
|
||||||
|
|
||||||
|
libreoffice_default = [{ command = "libreoffice", fork = true, silent = true }]
|
||||||
|
|
||||||
|
[extension]
|
||||||
|
|
||||||
|
## image formats
|
||||||
|
avif.inherit = "image_default"
|
||||||
|
bmp.inherit = "image_default"
|
||||||
|
gif.inherit = "image_default"
|
||||||
|
heic.inherit = "image_default"
|
||||||
|
jpeg.inherit = "image_default"
|
||||||
|
jpe.inherit = "image_default"
|
||||||
|
jpg.inherit = "image_default"
|
||||||
|
pgm.inherit = "image_default"
|
||||||
|
png.inherit = "image_default"
|
||||||
|
ppm.inherit = "image_default"
|
||||||
|
webp.inherit = "image_default"
|
||||||
|
|
||||||
|
svg.app_list = [
|
||||||
|
{ command = "inkview", fork = true, silent = true },
|
||||||
|
{ command = "inkscape", fork = true, silent = true },
|
||||||
|
]
|
||||||
|
tiff.app_list = [
|
||||||
|
{ command = "qimgv", fork = true, silent = true },
|
||||||
|
{ command = "krita", fork = true, silent = true },
|
||||||
|
]
|
||||||
|
|
||||||
|
## audio formats
|
||||||
|
flac.inherit = "audio_default"
|
||||||
|
m4a.inherit = "audio_default"
|
||||||
|
mp3.inherit = "audio_default"
|
||||||
|
ogg.inherit = "audio_default"
|
||||||
|
wav.inherit = "audio_default"
|
||||||
|
|
||||||
|
## video formats
|
||||||
|
avi.inherit = "video_default"
|
||||||
|
av1.inherit = "video_default"
|
||||||
|
flv.inherit = "video_default"
|
||||||
|
mkv.inherit = "video_default"
|
||||||
|
m4v.inherit = "video_default"
|
||||||
|
mov.inherit = "video_default"
|
||||||
|
mp4.inherit = "video_default"
|
||||||
|
ts.inherit = "video_default"
|
||||||
|
webm.inherit = "video_default"
|
||||||
|
wmv.inherit = "video_default"
|
||||||
|
|
||||||
|
## text formats
|
||||||
|
build.inherit = "text_default"
|
||||||
|
c.inherit = "text_default"
|
||||||
|
cmake.inherit = "text_default"
|
||||||
|
conf.inherit = "text_default"
|
||||||
|
cpp.inherit = "text_default"
|
||||||
|
css.inherit = "text_default"
|
||||||
|
csv.inherit = "text_default"
|
||||||
|
cu.inherit = "text_default"
|
||||||
|
ebuild.inherit = "text_default"
|
||||||
|
eex.inherit = "text_default"
|
||||||
|
env.inherit = "text_default"
|
||||||
|
ex.inherit = "text_default"
|
||||||
|
exs.inherit = "text_default"
|
||||||
|
go.inherit = "text_default"
|
||||||
|
h.inherit = "text_default"
|
||||||
|
hpp.inherit = "text_default"
|
||||||
|
hs.inherit = "text_default"
|
||||||
|
html.inherit = "text_default"
|
||||||
|
ini.inherit = "text_default"
|
||||||
|
java.inherit = "text_default"
|
||||||
|
js.inherit = "text_default"
|
||||||
|
json.inherit = "text_default"
|
||||||
|
kt.inherit = "text_default"
|
||||||
|
lua.inherit = "text_default"
|
||||||
|
log.inherit = "text_default"
|
||||||
|
md.inherit = "text_default"
|
||||||
|
micro.inherit = "text_default"
|
||||||
|
ninja.inherit = "text_default"
|
||||||
|
py.inherit = "text_default"
|
||||||
|
rkt.inherit = "text_default"
|
||||||
|
rs.inherit = "text_default"
|
||||||
|
scss.inherit = "text_default"
|
||||||
|
sh.inherit = "text_default"
|
||||||
|
srt.inherit = "text_default"
|
||||||
|
svelte.inherit = "text_default"
|
||||||
|
toml.inherit = "text_default"
|
||||||
|
tsx.inherit = "text_default"
|
||||||
|
txt.inherit = "text_default"
|
||||||
|
vim.inherit = "text_default"
|
||||||
|
xml.inherit = "text_default"
|
||||||
|
yaml.inherit = "text_default"
|
||||||
|
yml.inherit = "text_default"
|
||||||
|
|
||||||
|
# archive formats
|
||||||
|
7z.app_list = [
|
||||||
|
{ command = "7z", args = [
|
||||||
|
"x",
|
||||||
|
], confirm_exit = true },
|
||||||
|
{ command = "file-roller", fork = true, silent = true },
|
||||||
|
]
|
||||||
|
bz2.app_list = [
|
||||||
|
{ command = "tar", args = [
|
||||||
|
"-xvjf",
|
||||||
|
], confirm_exit = true },
|
||||||
|
{ command = "file-roller", fork = true, silent = true },
|
||||||
|
]
|
||||||
|
gz.app_list = [
|
||||||
|
{ command = "tar", args = [
|
||||||
|
"-xvzf",
|
||||||
|
], confirm_exit = true },
|
||||||
|
{ command = "file-roller", fork = true, silent = true },
|
||||||
|
]
|
||||||
|
tar.app_list = [
|
||||||
|
{ command = "tar", args = [
|
||||||
|
"-xvf",
|
||||||
|
], confirm_exit = true },
|
||||||
|
{ command = "file-roller", fork = true, silent = true },
|
||||||
|
]
|
||||||
|
tgz.app_list = [
|
||||||
|
{ command = "tar", args = [
|
||||||
|
"-xvzf",
|
||||||
|
], confirm_exit = true },
|
||||||
|
{ command = "file-roller", fork = true, silent = true },
|
||||||
|
]
|
||||||
|
rar.app_list = [
|
||||||
|
{ command = "unrar", args = [
|
||||||
|
"x",
|
||||||
|
], confirm_exit = true },
|
||||||
|
{ command = "file-roller", fork = true, silent = true },
|
||||||
|
]
|
||||||
|
xz.app_list = [
|
||||||
|
{ command = "tar", args = [
|
||||||
|
"-xvJf",
|
||||||
|
], confirm_exit = true },
|
||||||
|
{ command = "file-roller", fork = true, silent = true },
|
||||||
|
]
|
||||||
|
zip.app_list = [
|
||||||
|
{ command = "unzip", confirm_exit = true },
|
||||||
|
{ command = "file-roller", fork = true, silent = true },
|
||||||
|
]
|
||||||
|
|
||||||
|
# misc formats
|
||||||
|
aup.app_list = [{ command = "audacity", fork = true, silent = true }]
|
||||||
|
|
||||||
|
m3u.app_list = [
|
||||||
|
{ command = "micro" },
|
||||||
|
{ command = "mpv" },
|
||||||
|
{ command = "gedit", fork = true, silent = true },
|
||||||
|
{ command = "bat", confirm_exit = true },
|
||||||
|
]
|
||||||
|
|
||||||
|
odt.inherit = "libreoffice_default"
|
||||||
|
odf.inherit = "libreoffice_default"
|
||||||
|
ods.inherit = "libreoffice_default"
|
||||||
|
odp.inherit = "libreoffice_default"
|
||||||
|
|
||||||
|
doc.inherit = "libreoffice_default"
|
||||||
|
docx.inherit = "libreoffice_default"
|
||||||
|
xls.inherit = "libreoffice_default"
|
||||||
|
xlsx.inherit = "libreoffice_default"
|
||||||
|
ppt.inherit = "libreoffice_default"
|
||||||
|
pptx.inherit = "libreoffice_default"
|
||||||
|
|
||||||
|
pdf.inherit = "reader_default"
|
||||||
|
|
||||||
|
kra.app_list = [{ command = "krita", fork = true, silent = true }]
|
||||||
|
kdenlive.app_list = [{ command = "kdenlive", fork = true, silent = true }]
|
||||||
|
|
||||||
|
tex.app_list = [
|
||||||
|
{ command = "micro" },
|
||||||
|
{ command = "gedit", fork = true, silent = true },
|
||||||
|
{ command = "bat", confirm_exit = true },
|
||||||
|
{ command = "pdflatex" },
|
||||||
|
]
|
||||||
|
|
||||||
|
torrent.app_list = [{ command = "transmission-gtk" }]
|
||||||
|
|
||||||
|
[mimetype]
|
||||||
|
|
||||||
|
# application/octet-stream
|
||||||
|
[mimetype.application.subtype.octet-stream]
|
||||||
|
inherit = "video_default"
|
||||||
|
|
||||||
|
# text/*
|
||||||
|
[mimetype.text]
|
||||||
|
inherit = "text_default"
|
||||||
|
|
||||||
|
# text/*
|
||||||
|
[mimetype.video]
|
||||||
|
inherit = "video_default"
|
||||||
206
user/ooks/modules/programs/joshuto/config/preview_file.sh
Normal file
206
user/ooks/modules/programs/joshuto/config/preview_file.sh
Normal file
|
|
@ -0,0 +1,206 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
## This script is a template script for creating textual file previews in Joshuto.
|
||||||
|
##
|
||||||
|
## Copy this script to your Joshuto configuration directory and refer to this
|
||||||
|
## script in `joshuto.toml` in the `[preview]` section like
|
||||||
|
## ```
|
||||||
|
## preview_script = "~/.config/joshuto/preview_file.sh"
|
||||||
|
## ```
|
||||||
|
## Joshuto will call this script for each file when first hovered by the cursor.
|
||||||
|
## If this script returns with an exit code 0, the stdout of this script will be
|
||||||
|
## the file's preview text in Joshuto's right panel.
|
||||||
|
## The preview text will be cached by Joshuto and only renewed on reload.
|
||||||
|
## ANSI color codes are supported if Joshuto is build with the `syntax_highlight`
|
||||||
|
## feature.
|
||||||
|
##
|
||||||
|
## This script is considered a configuration file and must be updated manually.
|
||||||
|
## It will be left untouched if you upgrade Joshuto.
|
||||||
|
##
|
||||||
|
## Meanings of exit codes:
|
||||||
|
##
|
||||||
|
## code | meaning | action of ranger
|
||||||
|
## -----+------------+-------------------------------------------
|
||||||
|
## 0 | success | Display stdout as preview
|
||||||
|
## 1 | no preview | Display no preview at all
|
||||||
|
##
|
||||||
|
## This script is used only as a provider for textual previews.
|
||||||
|
## Image previews are independent from this script.
|
||||||
|
##
|
||||||
|
|
||||||
|
IFS=$'\n'
|
||||||
|
|
||||||
|
# Security measures:
|
||||||
|
# * noclobber prevents you from overwriting a file with `>`
|
||||||
|
# * noglob prevents expansion of wild cards
|
||||||
|
# * nounset causes bash to fail if an undeclared variable is used (e.g. typos)
|
||||||
|
# * pipefail causes a pipeline to fail also if a command other than the last one fails
|
||||||
|
set -o noclobber -o noglob -o nounset -o pipefail
|
||||||
|
|
||||||
|
FILE_PATH=""
|
||||||
|
PREVIEW_WIDTH=10
|
||||||
|
PREVIEW_HEIGHT=10
|
||||||
|
|
||||||
|
while [ "$#" -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
"--path")
|
||||||
|
shift
|
||||||
|
FILE_PATH="$1"
|
||||||
|
;;
|
||||||
|
"--preview-width")
|
||||||
|
shift
|
||||||
|
PREVIEW_WIDTH="$1"
|
||||||
|
;;
|
||||||
|
"--preview-height")
|
||||||
|
shift
|
||||||
|
PREVIEW_HEIGHT="$1"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
handle_extension() {
|
||||||
|
case "${FILE_EXTENSION_LOWER}" in
|
||||||
|
## Archive
|
||||||
|
a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
|
||||||
|
rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
|
||||||
|
atool --list -- "${FILE_PATH}" && exit 0
|
||||||
|
bsdtar --list --file "${FILE_PATH}" && exit 0
|
||||||
|
exit 1 ;;
|
||||||
|
rar)
|
||||||
|
## Avoid password prompt by providing empty password
|
||||||
|
unrar lt -p- -- "${FILE_PATH}" && exit 0
|
||||||
|
exit 1 ;;
|
||||||
|
7z)
|
||||||
|
## Avoid password prompt by providing empty password
|
||||||
|
7z l -p -- "${FILE_PATH}" && exit 0
|
||||||
|
exit 1 ;;
|
||||||
|
|
||||||
|
## PDF
|
||||||
|
pdf)
|
||||||
|
## Preview as text conversion
|
||||||
|
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - | \
|
||||||
|
fmt -w "${PREVIEW_WIDTH}" && exit 0
|
||||||
|
mutool draw -F txt -i -- "${FILE_PATH}" 1-10 | \
|
||||||
|
fmt -w "${PREVIEW_WIDTH}" && exit 0
|
||||||
|
exiftool "${FILE_PATH}" && exit 0
|
||||||
|
exit 1 ;;
|
||||||
|
|
||||||
|
## BitTorrent
|
||||||
|
torrent)
|
||||||
|
transmission-show -- "${FILE_PATH}" && exit 0
|
||||||
|
exit 1 ;;
|
||||||
|
|
||||||
|
## OpenDocument
|
||||||
|
odt|ods|odp|sxw)
|
||||||
|
## Preview as text conversion
|
||||||
|
odt2txt "${FILE_PATH}" && exit 0
|
||||||
|
## Preview as markdown conversion
|
||||||
|
pandoc -s -t markdown -- "${FILE_PATH}" && exit 0
|
||||||
|
exit 1 ;;
|
||||||
|
|
||||||
|
## XLSX
|
||||||
|
xlsx)
|
||||||
|
## Preview as csv conversion
|
||||||
|
## Uses: https://github.com/dilshod/xlsx2csv
|
||||||
|
xlsx2csv -- "${FILE_PATH}" && exit 0
|
||||||
|
exit 1 ;;
|
||||||
|
|
||||||
|
## HTML
|
||||||
|
htm|html|xhtml)
|
||||||
|
## Preview as text conversion
|
||||||
|
w3m -dump "${FILE_PATH}" && exit 0
|
||||||
|
lynx -dump -- "${FILE_PATH}" && exit 0
|
||||||
|
elinks -dump "${FILE_PATH}" && exit 0
|
||||||
|
pandoc -s -t markdown -- "${FILE_PATH}" && exit 0
|
||||||
|
;;
|
||||||
|
|
||||||
|
## JSON
|
||||||
|
json|ipynb)
|
||||||
|
jq --color-output . "${FILE_PATH}" && exit 0
|
||||||
|
python -m json.tool -- "${FILE_PATH}" && exit 0
|
||||||
|
;;
|
||||||
|
|
||||||
|
## Direct Stream Digital/Transfer (DSDIFF) and wavpack aren't detected
|
||||||
|
## by file(1).
|
||||||
|
dff|dsf|wv|wvc)
|
||||||
|
mediainfo "${FILE_PATH}" && exit 0
|
||||||
|
exiftool "${FILE_PATH}" && exit 0
|
||||||
|
;; # Continue with next handler on failure
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
handle_mime() {
|
||||||
|
local mimetype="${1}"
|
||||||
|
|
||||||
|
case "${mimetype}" in
|
||||||
|
## RTF and DOC
|
||||||
|
text/rtf|*msword)
|
||||||
|
## Preview as text conversion
|
||||||
|
## note: catdoc does not always work for .doc files
|
||||||
|
## catdoc: http://www.wagner.pp.ru/~vitus/software/catdoc/
|
||||||
|
catdoc -- "${FILE_PATH}" && exit 0
|
||||||
|
exit 1 ;;
|
||||||
|
|
||||||
|
## DOCX, ePub, FB2 (using markdown)
|
||||||
|
## You might want to remove "|epub" and/or "|fb2" below if you have
|
||||||
|
## uncommented other methods to preview those formats
|
||||||
|
*wordprocessingml.document|*/epub+zip|*/x-fictionbook+xml)
|
||||||
|
## Preview as markdown conversion
|
||||||
|
pandoc -s -t markdown -- "${FILE_PATH}" | bat -l markdown \
|
||||||
|
--color=always --paging=never \
|
||||||
|
--style=plain \
|
||||||
|
--terminal-width="${PREVIEW_WIDTH}" && exit 0
|
||||||
|
exit 1 ;;
|
||||||
|
|
||||||
|
## E-mails
|
||||||
|
message/rfc822)
|
||||||
|
## Parsing performed by mu: https://github.com/djcb/mu
|
||||||
|
mu view -- "${FILE_PATH}" && exit 0
|
||||||
|
exit 1 ;;
|
||||||
|
|
||||||
|
## XLS
|
||||||
|
*ms-excel)
|
||||||
|
## Preview as csv conversion
|
||||||
|
## xls2csv comes with catdoc:
|
||||||
|
## http://www.wagner.pp.ru/~vitus/software/catdoc/
|
||||||
|
xls2csv -- "${FILE_PATH}" && exit 0
|
||||||
|
exit 1 ;;
|
||||||
|
|
||||||
|
## Text
|
||||||
|
text/* | */xml)
|
||||||
|
bat --color=always --paging=never \
|
||||||
|
--style=plain \
|
||||||
|
--terminal-width="${PREVIEW_WIDTH}" \
|
||||||
|
"${FILE_PATH}" && exit 0
|
||||||
|
cat "${FILE_PATH}" && exit 0
|
||||||
|
exit 1 ;;
|
||||||
|
|
||||||
|
## DjVu
|
||||||
|
image/vnd.djvu)
|
||||||
|
## Preview as text conversion (requires djvulibre)
|
||||||
|
djvutxt "${FILE_PATH}" | fmt -w "${PREVIEW_WIDTH}" && exit 0
|
||||||
|
exiftool "${FILE_PATH}" && exit 0
|
||||||
|
exit 1 ;;
|
||||||
|
|
||||||
|
## Image
|
||||||
|
image/*)
|
||||||
|
## Preview as text conversion
|
||||||
|
exiftool "${FILE_PATH}" && exit 0
|
||||||
|
exit 1 ;;
|
||||||
|
|
||||||
|
## Video and audio
|
||||||
|
video/* | audio/*)
|
||||||
|
mediainfo "${FILE_PATH}" && exit 0
|
||||||
|
exiftool "${FILE_PATH}" && exit 0
|
||||||
|
exit 1 ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
FILE_EXTENSION="${FILE_PATH##*.}"
|
||||||
|
FILE_EXTENSION_LOWER="$(printf "%s" "${FILE_EXTENSION}" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
handle_extension
|
||||||
|
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
|
||||||
|
handle_mime "${MIMETYPE}"
|
||||||
|
|
||||||
|
exit 1
|
||||||
73
user/ooks/modules/programs/joshuto/config/theme.toml
Normal file
73
user/ooks/modules/programs/joshuto/config/theme.toml
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
[selection]
|
||||||
|
fg = "light_yellow"
|
||||||
|
bold = true
|
||||||
|
|
||||||
|
[visual_mode_selection]
|
||||||
|
fg = "light_red"
|
||||||
|
bold = true
|
||||||
|
|
||||||
|
[selection.prefix]
|
||||||
|
prefix = " "
|
||||||
|
size = 2
|
||||||
|
|
||||||
|
[executable]
|
||||||
|
fg = "light_green"
|
||||||
|
bold = true
|
||||||
|
|
||||||
|
[regular]
|
||||||
|
fg = "white"
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
fg = "light_blue"
|
||||||
|
bold = true
|
||||||
|
|
||||||
|
[link]
|
||||||
|
fg = "cyan"
|
||||||
|
bold = true
|
||||||
|
|
||||||
|
[link_invalid]
|
||||||
|
fg = "red"
|
||||||
|
bold = true
|
||||||
|
|
||||||
|
[socket]
|
||||||
|
fg = "light_magenta"
|
||||||
|
bold = true
|
||||||
|
|
||||||
|
[ext]
|
||||||
|
|
||||||
|
bmp.fg = "yellow"
|
||||||
|
gif.fg = "yellow"
|
||||||
|
heic.fg = "yellow"
|
||||||
|
jpg.fg = "yellow"
|
||||||
|
jpeg.fg = "yellow"
|
||||||
|
pgm.fg = "yellow"
|
||||||
|
png.fg = "yellow"
|
||||||
|
ppm.fg = "yellow"
|
||||||
|
svg.fg = "yellow"
|
||||||
|
|
||||||
|
wav.fg = "magenta"
|
||||||
|
flac.fg = "magenta"
|
||||||
|
mp3.fg = "magenta"
|
||||||
|
amr.fg = "magenta"
|
||||||
|
|
||||||
|
avi.fg = "magenta"
|
||||||
|
flv.fg = "magenta"
|
||||||
|
m3u.fg = "magenta"
|
||||||
|
m4a.fg = "magenta"
|
||||||
|
m4v.fg = "magenta"
|
||||||
|
mkv.fg = "magenta"
|
||||||
|
mov.fg = "magenta"
|
||||||
|
mp4.fg = "magenta"
|
||||||
|
mpg.fg = "magenta"
|
||||||
|
rmvb.fg = "magenta"
|
||||||
|
webm.fg = "magenta"
|
||||||
|
wmv.fg = "magenta"
|
||||||
|
|
||||||
|
7z.fg = "red"
|
||||||
|
bz2.fg = "red"
|
||||||
|
gz.fg = "red"
|
||||||
|
rar.fg = "red"
|
||||||
|
tar.fg = "red"
|
||||||
|
tgz.fg = "red"
|
||||||
|
xz.fg = "red"
|
||||||
|
zip.fg = "red"
|
||||||
10
user/ooks/modules/programs/joshuto/default.nix
Normal file
10
user/ooks/modules/programs/joshuto/default.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, config, ... }:
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
file
|
||||||
|
joshuto
|
||||||
|
];
|
||||||
|
};
|
||||||
|
home.file.".config/joshuto".source = ./config;
|
||||||
|
}
|
||||||
11
user/ooks/modules/programs/kitty/default.nix
Normal file
11
user/ooks/modules/programs/kitty/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
kitty = {
|
||||||
|
enable = true;
|
||||||
|
environment = { };
|
||||||
|
keybindings = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
8
user/ooks/modules/programs/lazygit/default.nix
Normal file
8
user/ooks/modules/programs/lazygit/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
lazygit
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
11
user/ooks/modules/programs/mpv/default.nix
Normal file
11
user/ooks/modules/programs/mpv/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ lib, pkgs, user, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
mpv = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home.file.".config/mpv/mpv.conf".source = ./mpv.conf;
|
||||||
|
home.file.".config/mpv/scripts/file-browser.lua".source = ./scripts/file-browser.lua;
|
||||||
|
}
|
||||||
8
user/ooks/modules/programs/mpv/mpv.conf
Normal file
8
user/ooks/modules/programs/mpv/mpv.conf
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
# hwdec=auto
|
||||||
|
# vo=gpu-next #This will break Anime4K
|
||||||
|
gpu-api=opengl
|
||||||
|
gpu-context=wayland
|
||||||
|
hwdec=auto-safe
|
||||||
|
vo=gpu
|
||||||
|
profile=gpu-hq
|
||||||
|
script-opts=ytdl_hook-ytdl_path=yt-dlp
|
||||||
2593
user/ooks/modules/programs/mpv/scripts/file-browser.lua
Normal file
2593
user/ooks/modules/programs/mpv/scripts/file-browser.lua
Normal file
File diff suppressed because it is too large
Load diff
5
user/ooks/modules/programs/neofetch/default.nix
Normal file
5
user/ooks/modules/programs/neofetch/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.neofetch ];
|
||||||
|
}
|
||||||
6
user/ooks/modules/programs/notify/default.nix
Normal file
6
user/ooks/modules/programs/notify/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.mako = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
8
user/ooks/modules/programs/resource-monitor/default.nix
Normal file
8
user/ooks/modules/programs/resource-monitor/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
btop = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
14
user/ooks/modules/programs/search/default.nix
Normal file
14
user/ooks/modules/programs/search/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
fd
|
||||||
|
bat
|
||||||
|
ripgrep
|
||||||
|
];
|
||||||
|
};
|
||||||
|
programs = {
|
||||||
|
fzf.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
15
user/ooks/modules/programs/starship/default.nix
Normal file
15
user/ooks/modules/programs/starship/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
starship = {
|
||||||
|
enable = true;
|
||||||
|
setting = {
|
||||||
|
character = {
|
||||||
|
success_symbol = "[➜](bold green)";
|
||||||
|
error_symbol = "[➜](bold red)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
8
user/ooks/modules/programs/youtube-tui/default.nix
Normal file
8
user/ooks/modules/programs/youtube-tui/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
youtube-tui
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
17
user/ooks/modules/programs/yt-dlp/default.nix
Normal file
17
user/ooks/modules/programs/yt-dlp/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
yt-dlp = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home.file = {
|
||||||
|
".config/yt-dlp/config".text = ''
|
||||||
|
--ignore-errors
|
||||||
|
-o ~/Videos/%(title)s.%(ext)s
|
||||||
|
# Prefer 1080p or lower resolutions
|
||||||
|
-f bestvideo[ext=mp4][width<2000][height<=1200]+bestaudio[ext=m4a]/bestvideo[ext=webm][width<2000][height<=1200]+bestaudio[ext=webm]/bestvideo[width<2000][height<=1200]+bestaudio/best[width<2000][height<=1200]/best
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
76
user/ooks/modules/programs/zathura/default.nix
Normal file
76
user/ooks/modules/programs/zathura/default.nix
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
{ lib, pkgs, user, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.zathura = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
# Zathura configuration file
|
||||||
|
# See man `man zathurarc'
|
||||||
|
|
||||||
|
# Open document in fit-width mode by default
|
||||||
|
set adjust-open "best-fit"
|
||||||
|
|
||||||
|
# One page per row by default
|
||||||
|
set pages-per-row 1
|
||||||
|
|
||||||
|
#stop at page boundries
|
||||||
|
set scroll-page-aware "true"
|
||||||
|
set scroll-full-overlap 0.01
|
||||||
|
set scroll-step 100
|
||||||
|
|
||||||
|
#zoom settings
|
||||||
|
set zoom-min 10
|
||||||
|
set guioptions ""
|
||||||
|
|
||||||
|
# zathurarc-dark
|
||||||
|
|
||||||
|
set font "JetBrains Mono Nerd Font 15"
|
||||||
|
set default-fg "#96CDFB"
|
||||||
|
set default-bg "#1A1823"
|
||||||
|
|
||||||
|
set completion-bg "#1A1823"
|
||||||
|
set completion-fg "#96cdfb"
|
||||||
|
set completion-highlight-bg "#302D41"
|
||||||
|
set completion-highlight-fg "#96cdfb"
|
||||||
|
set completion-group-bg "#1a1823"
|
||||||
|
set completion-group-fg "#89DCEB"
|
||||||
|
|
||||||
|
set statusbar-fg "#C9CBFF"
|
||||||
|
set statusbar-bg "#1A1823"
|
||||||
|
set statusbar-h-padding 10
|
||||||
|
set statusbar-v-padding 10
|
||||||
|
|
||||||
|
set notification-bg "#1A1823"
|
||||||
|
set notification-fg "#D9E0EE"
|
||||||
|
set notification-error-bg "#d9e0ee"
|
||||||
|
set notification-error-fg "#D9E0EE"
|
||||||
|
set notification-warning-bg "#FAE3B0"
|
||||||
|
set notification-warning-fg "#D9E0EE"
|
||||||
|
set selection-notification "true"
|
||||||
|
|
||||||
|
set inputbar-fg "#C9CBFF"
|
||||||
|
set inputbar-bg "#1A1823"
|
||||||
|
|
||||||
|
set recolor "true"
|
||||||
|
set recolor-lightcolor "#D9E0EE"
|
||||||
|
set recolor-darkcolor "#1A1823"
|
||||||
|
|
||||||
|
set index-fg "#96cdfb"
|
||||||
|
set index-bg "#1A1823"
|
||||||
|
set index-active-fg "#96cdfb"
|
||||||
|
set index-active-bg "#1A1823"
|
||||||
|
|
||||||
|
set render-loading-bg "#1A1823"
|
||||||
|
set render-loading-fg "#96cdfb"
|
||||||
|
|
||||||
|
set highlight-color "#96cdfb"
|
||||||
|
set highlight-active-color "#DDB6F2"
|
||||||
|
|
||||||
|
|
||||||
|
set render-loading "false"
|
||||||
|
set scroll-step 50
|
||||||
|
|
||||||
|
set selection-clipboard clipboard
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
BIN
walls/everforest/megacity.png
Normal file
BIN
walls/everforest/megacity.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9 MiB |
Loading…
Add table
Add a link
Reference in a new issue