diff --git a/.envrc b/.envrc
deleted file mode 100644
index 3550a30f..00000000
--- a/.envrc
+++ /dev/null
@@ -1 +0,0 @@
-use flake
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index 90e05c40..00000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-# To get started with Dependabot version updates, you'll need to specify which
-# package ecosystems to update and where the package manifests are located.
-# Please see the documentation for all configuration options:
-# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
-
-version: 2
-updates:
- - package-ecosystem: "github-actions" # See documentation for possible values
- directory: "/" # Location of package manifests
- schedule:
- interval: "weekly"
diff --git a/.github/workflows/update-riscv.yaml b/.github/workflows/update-riscv.yaml
deleted file mode 100644
index 2ed87d2c..00000000
--- a/.github/workflows/update-riscv.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
-name: update-riscv
-on:
- push:
- branches:
- - main
-jobs:
- pr:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- - name: Create update pull request
- run: |
- curl -X 'POST' \
- 'https://git.chir.rs/api/v1/repos/darkkirb/nixos-config/pulls' \
- -H 'Authorization: Bearer ${{secrets.GITHUB_TOKEN}}' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "base": "main-riscv",
- "body": "Keeping main-riscv up to date",
- "head": "main",
- "title": "Update RISC-V config"
- }'
diff --git a/.gitignore b/.gitignore
index 52c1f543..e2f5dd2e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1 @@
-result
-*.qcow2
-*.fd
-.direnv
-/efi/secret
+result
\ No newline at end of file
diff --git a/.sops.yaml b/.sops.yaml
deleted file mode 100644
index 0d26cb84..00000000
--- a/.sops.yaml
+++ /dev/null
@@ -1,75 +0,0 @@
-keys:
- - &lotte age1tltjgexkp5fz3rum4j0k66ty5q4u8ptvkgkepumd20zal24g2qfs5xgw76
- - &nixos-8gb-fsn1-1 age1273ps5thcy70ckdt0270s2nysqgu48t38pq3wq975v3y7mf4eavsw38wsl
- - &thinkrac age1p400545a482fma40yfgytu40p6wr5a75v4f8yeudvgf7eh5erufqxhgynr
- - &nas age1c7y687sxh428wk34s8ws6kemu62mggafpt40rmanevgkuj5xa59q6f7tlc
- - &instance-20221213-1915 age1elra3uklw8rmwkevqms2l4tsd06d5utqda9d2w4qvqpz898uzuesugxkhc
- - &vf2 age1emv3kzvwgl36hgllrv7rlekqy3y3c6eztadl3lv09ks3z9vv6vdqw06yqa
- - &rainbow-resort age19vzypddhexvvsf8xylstxc9znnkd8rxmamhjlt7elvz4j3zaf5tqqura6f
- - &devterm age1sqvl2cwvzeztuelpwppaestqufzeap8uf0vgy7t5mzr9rwc3dpxqhx8ly9
-creation_rules:
- - path_regex: secrets/shared\.yaml$
- key_groups:
- - age:
- - *nixos-8gb-fsn1-1
- - *thinkrac
- - *nas
- - *instance-20221213-1915
- - *vf2
- - *rainbow-resort
- - *lotte
- - *devterm
- - path_regex: secrets/nixos-8gb-fsn1-1\.yaml$
- key_groups:
- - age:
- - *nixos-8gb-fsn1-1
- - *lotte
- - path_regex: secrets/thinkrac\.yaml$
- key_groups:
- - age:
- - *thinkrac
- - *lotte
- - path_regex: secrets/nixos\.yaml$
- key_groups:
- - age:
- - *lotte
- - path_regex: secrets/nas\.yaml$
- key_groups:
- - age:
- - *nas
- - *lotte
- - path_regex: secrets/desktop\.yaml$
- key_groups:
- - age:
- - *thinkrac
- - *rainbow-resort
- - *lotte
- - *devterm
- - path_regex: secrets/instance-20221213-1915\.yaml$
- key_groups:
- - age:
- - *instance-20221213-1915
- - *lotte
- - path_regex: secrets/vf2\.yaml$
- key_groups:
- - age:
- - *vf2
- - *lotte
- - path_regex: secrets/rainbow-resort\.yaml$
- key_groups:
- - age:
- - *rainbow-resort
- - *lotte
- - path_regex: secrets/devterm\.yaml$
- key_groups:
- - age:
- - *devterm
- - *lotte
- - path_regex: secrets/kubernetes\.yaml$
- key_groups:
- - age:
- - *nixos-8gb-fsn1-1
- - *nas
- - *instance-20221213-1915
- - *rainbow-resort
- - *lotte
diff --git a/.vscode/settings.json b/.vscode/settings.json
deleted file mode 100644
index b48e6728..00000000
--- a/.vscode/settings.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "python.formatting.provider": "yapf",
- "conventionalCommits.scopes": ["thinkrac", "aarch64"],
- "files.associations": {
- "*.hujson": "jsonc"
- },
- "json.schemas": [
- {
- "fileMatch": ["*.hujson"],
- "schema": {
- "allowTrailingCommas": true
- }
- }
- ],
- "files.watcherExclude": {
- "**/target": true
- }
-}
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..7dd58835
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# Lotte’s New Nix configuration
+
+Very WIP rewrite
\ No newline at end of file
diff --git a/config/bittorrent-blocker.nix b/config/bittorrent-blocker.nix
deleted file mode 100644
index 496de109..00000000
--- a/config/bittorrent-blocker.nix
+++ /dev/null
@@ -1,50 +0,0 @@
-_: {
- networking.firewall.extraCommands = ''
- # Taken from https://gist.github.com/rampageX/5cbe95be43ca3165f4d963629e3bb946
- # Block Torrent algo string using Boyer-Moore (bm)
- iptables -I FORWARD 1 -m string --algo bm --string "BitTorrent" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string "BitTorrent protocol" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string "peer_id=" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string ".torrent" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string "announce.php?passkey=" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string "torrent" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string "announce" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string "info_hash" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string "/default.ida?" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string ".exe?/c+dir" -j DROP
- iptables -I FORWARD 1 -m string --algo bm --string ".exe?/c_tftp" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string "BitTorrent" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string "BitTorrent protocol" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string "peer_id=" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string ".torrent" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string "announce.php?passkey=" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string "torrent" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string "announce" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string "info_hash" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string "/default.ida?" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string ".exe?/c+dir" -j DROP
- ip6tables -I FORWARD 1 -m string --algo bm --string ".exe?/c_tftp" -j DROP
- # Block Torrent keys
- iptables -I FORWARD 1 -m string --algo kmp --string "peer_id" -j DROP
- iptables -I FORWARD 1 -m string --algo kmp --string "BitTorrent" -j DROP
- iptables -I FORWARD 1 -m string --algo kmp --string "BitTorrent protocol" -j DROP
- iptables -I FORWARD 1 -m string --algo kmp --string "bittorrent-announce" -j DROP
- iptables -I FORWARD 1 -m string --algo kmp --string "announce.php?passkey=" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "peer_id" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "BitTorrent" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "BitTorrent protocol" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "bittorrent-announce" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "announce.php?passkey=" -j DROP
- # Block Distributed Hash Table (DHT) keywords
- iptables -I FORWARD 1 -m string --algo kmp --string "find_node" -j DROP
- iptables -I FORWARD 1 -m string --algo kmp --string "info_hash" -j DROP
- iptables -I FORWARD 1 -m string --algo kmp --string "get_peers" -j DROP
- iptables -I FORWARD 1 -m string --algo kmp --string "announce" -j DROP
- iptables -I FORWARD 1 -m string --algo kmp --string "announce_peers" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "find_node" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "info_hash" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "get_peers" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "announce" -j DROP
- ip6tables -I FORWARD 1 -m string --algo kmp --string "announce_peers" -j DROP
- '';
-}
diff --git a/config/default.nix b/config/default.nix
deleted file mode 100644
index 4916fb34..00000000
--- a/config/default.nix
+++ /dev/null
@@ -1,91 +0,0 @@
-{
- config,
- pkgs,
- system,
- ...
-}: {
- imports = [
- ./users/darkkirb.nix
- ./users/root.nix
- ./nix.nix
- ./sops.nix
- ./home.nix
- ./services/restic.nix
- ./specialization.nix
- ./services/promtail.nix
- ./env.nix
- ./tailscale.nix
- ./services/otel.nix
- ];
- services.openssh.enable = true;
- environment.systemPackages = with pkgs;
- [
- git
- ]
- ++ (
- if system != "riscv64-linux"
- then [kitty.terminfo]
- else []
- );
- networking.firewall.allowedTCPPorts = [22];
- networking.firewall.allowedUDPPortRanges = [
- {
- from = 60000;
- to = 61000;
- }
- ];
-
- users.defaultUserShell = pkgs.zsh;
-
- environment.pathsToLink = ["/share/zsh"];
-
- console.keyMap = "neo";
-
- security.sudo.extraConfig = ''
- Defaults env_keep += "TMUX"
- '';
-
- programs.zsh.enable = true;
- users.mutableUsers = false;
-
- sops.secrets."root/aws/credentials" = {
- sopsFile = ../secrets/shared.yaml;
- owner = "root";
- key = "aws/credentials";
- path = "/root/.aws/credentials";
- };
- sops.secrets."root/ssh/builder_id_ed25519" = {
- sopsFile = ../secrets/shared.yaml;
- owner = "root";
- key = "ssh/builder_id_ed25519";
- path = "/root/.ssh/builder_id_ed25519";
- };
- sops.secrets."darkkirb/ssh/builder_id_ed25519" = {
- sopsFile = ../secrets/shared.yaml;
- owner = "darkkirb";
- key = "ssh/builder_id_ed25519";
- path = "/home/darkkirb/.ssh/builder_id_ed25519";
- };
-
- programs.ssh.knownHosts = {
- "nas.int.chir.rs".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhao1I1Kd1gK5bERUdjMxP9yHDrSHYZsTN2TcSk0K/U";
- "backup.int.chir.rs".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhao1I1Kd1gK5bERUdjMxP9yHDrSHYZsTN2TcSk0K/U";
- };
- boot.kernel.sysctl = {
- "fs.inotify.max_user_watches" = 524288;
- };
- services.prometheus.exporters.node = {
- port = 31941;
- enabledCollectors = [
- "buddyinfo"
- "cgroups"
- "systemd"
- "ethtool"
- ];
- enable = true;
- };
- i18n.defaultLocale = "nl_NL.UTF-8";
- nixpkgs.config.permittedInsecurePackages = [
- "olm-3.2.16"
- ];
-}
diff --git a/config/desktop-secrets.nix b/config/desktop-secrets.nix
deleted file mode 100644
index 268becca..00000000
--- a/config/desktop-secrets.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-_: let
- mkSopsSecret = {
- name,
- path,
- }: {
- name = "desktop/${name}";
- value = {
- sopsFile = ../secrets/desktop.yaml;
- owner = "darkkirb";
- key = name;
- path = "/home/darkkirb/${path}";
- };
- };
-in {
- sops.secrets = builtins.listToAttrs (map mkSopsSecret [
- {
- name = "aws/credentials";
- path = ".aws/credentials";
- }
- {
- name = ".config/gh/hosts.yml";
- path = ".config/gh/hosts.yml";
- }
- ]);
-}
diff --git a/config/desktop.nix b/config/desktop.nix
deleted file mode 100644
index 3925ea09..00000000
--- a/config/desktop.nix
+++ /dev/null
@@ -1,209 +0,0 @@
-{
- system,
- config,
- pkgs,
- lib,
- ...
-} @ args: let
- lockscreen-all = pkgs.writeScript "lockscreen-all" ''
- #!${pkgs.bash}/bin/bash
-
- if ${pkgs.coreutils}/bin/[ -z "$(${pkgs.usbutils}/bin/lsusb | grep Yubico)" ]; then
- ${pkgs.systemd}/bin/loginctl list-sessions | ${pkgs.gnugrep}/bin/grep '^\ ' | ${pkgs.gawk}/bin/awk '{print $1}' | ${pkgs.findutils}/bin/xargs -i ${pkgs.systemd}/bin/loginctl lock-session {}
- fi
- '';
-in {
- imports =
- [
- ./services/pipewire.nix
- ./desktop-secrets.nix
- ./services/cups.nix
- ./services/docker.nix
- ./services/cifs.nix
- ./kde.nix
- #./sway.nix
- ]
- /*
- ++ (
- if system == "x86_64-linux"
- then [./programs/virtualbox.nix]
- else []
- )
- */
- ;
- fonts = {
- fontDir.enable = true;
- fontconfig = {
- enable = true;
- defaultFonts = {
- emoji = ["Noto Color Emoji"];
- monospace = ["Fira Code" "Font Awesome 5 Free"];
- sansSerif = ["Noto Sans" "Font Awesome 5 Free"];
- serif = ["Noto Serif" "Font Awesome 5 Free"];
- };
- };
- packages = with pkgs; [
- fira-code
- fira-code-symbols
- font-awesome
- noto-fonts
- noto-fonts-cjk-sans
- noto-fonts-emoji
- noto-fonts-extra
- (nerdfonts.override {fonts = ["FiraCode" "DroidSansMono" "Noto"];})
- nasin-nanpa
- fairfax-hd
- (pkgs.stdenvNoCC.mkDerivation rec {
- pname = "zbalermorna";
- version = "920b28d798ae1c06885c674bbf02b08ffed12b2f";
- src = pkgs.fetchFromGitHub {
- owner = "jackhumbert";
- repo = pname;
- rev = version;
- sha256 = "00sl3f1x4frh166mq85lwl9v1f5r3ckkfg8id5fibafymick5vyp";
- };
- installPhase = ''
- mkdir -p $out/share/fonts
- cp -r $src/fonts/*.otf $out/share/fonts
- '';
- })
- ];
- };
- fonts.fontconfig.localConf = ''
-
-
-
-
-
- Fairfax HD
-
-
- 100
-
-
-
- '';
-
- time.timeZone = "Europe/Berlin";
- services.pcscd.enable = true;
-
- security.pam = {
- services.login.u2fAuth = true;
- services.swaylock.u2fAuth = true;
- u2f = {
- enable = true;
- control = "required";
- };
- };
- services.udev.extraRules = ''
- ACTION=="remove", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0407", RUN+="${lockscreen-all}"
- ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="e621", ATTRS{idProduct}=="0000", TAG+="uaccess"
- ACTION=="add", SUBSYSTEM=="hidraw*", ATTRS{idVendor}=="e621", ATTRS{idProduct}=="0000", TAG+="uaccess"
- ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", TAG+="uaccess"
- ACTION=="add", SUBSYSTEM=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0306", TAG+="uaccess"
- ACTION=="add", SUBSYSTEM=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0330", TAG+="uaccess"
- ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS={idProduct}=="6010", OWNER="user", MODE="0777", GROUP="dialout"
- '';
- programs.steam.enable = system == "x86_64-linux";
- nixpkgs.overlays = [
- (curr: prev: {
- steam = prev.steam.override {
- extraPkgs = pkgs:
- with pkgs; [
- mono
- fuse
- ];
- };
- })
- ];
- services.flatpak.enable = true;
- programs.java.enable = true;
- hardware.opengl.driSupport32Bit = lib.mkForce (system == "x86_64-linux");
- home-manager.users.darkkirb = import ./home-manager/darkkirb.nix {
- desktop = true;
- inherit args;
- };
-
- # For syncthing
- networking.firewall.allowedTCPPorts = [22000];
- networking.firewall.allowedUDPPorts = [22000];
- networking.firewall.allowedTCPPortRanges = [
- {
- from = 1714;
- to = 1764;
- }
- ];
- networking.firewall.allowedUDPPortRanges = [
- {
- from = 1714;
- to = 1764;
- }
- ];
-
- environment.systemPackages = with pkgs; [
- pinentry-qt
- dotool
- wl-clipboard
- #plasma5Packages.thirdParty.lightly
- ];
-
- xdg.portal = {
- enable = true;
- wlr.enable = true;
- # gtk portal needed to make gtk apps happy
- extraPortals = [pkgs.xdg-desktop-portal-gtk];
- config.common.default = "*";
- };
- programs.dconf.enable = true;
- services.xserver = {
- enable = true;
- libinput.enable = true;
- layout = "de";
- xkbVariant = "neo";
- displayManager.lightdm.enable = false;
- extraLayouts.zlr = {
- description = "lojban layout";
- languages = ["jbo"];
- symbolsFile = ../extra/keyboard/symbols;
- };
- };
- i18n.inputMethod = {
- enabled = "ibus";
- ibus.engines = with pkgs.ibus-engines; [anthy];
- };
- security.polkit.enable = true;
- services.dbus.enable = true;
- services.dbus.packages = with pkgs; [dconf];
- # Futureproofing: on non-x86 machines, emulate x86
- boot.binfmt.emulatedSystems =
- if system != "x86_64-linux"
- then [
- "x86_64-linux"
- "i686-linux"
- ]
- else [];
-
- virtualisation = {
- waydroid.enable = true;
- lxd.enable = true;
- };
-
- programs.gamemode.enable = true;
- nixpkgs.config.permittedInsecurePackages = ["electron-26.3.0"];
-
- boot = {
- plymouth.enable = true;
- consoleLogLevel = 0;
- initrd.verbose = false;
- kernelParams = [
- "quiet"
- "splash"
- "boot.shell_on_fail"
- "loglevel=3"
- "rd.systemd.show_status=false"
- "rd.udev.log_level=3"
- "udev.log_priority=3"
- ];
- loader.timeout = 0;
- };
-}
diff --git a/config/devterm.nix b/config/devterm.nix
deleted file mode 100644
index 65cf8ddd..00000000
--- a/config/devterm.nix
+++ /dev/null
@@ -1,114 +0,0 @@
-{
- nixos-hardware,
- config,
- lib,
- pkgs,
- ...
-}: {
- boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-devterm;
- boot.kernelParams = ["fbcon=rotate:1"];
- networking.hostName = "devterm";
- imports = [
- ./desktop.nix
- ];
- boot.loader = {
- grub.enable = lib.mkDefault false;
- generic-extlinux-compatible.enable = lib.mkDefault true;
- };
- boot.initrd = {
- includeDefaultModules = false;
- availableKernelModules = [
- "usbhid"
- "usb_storage"
- "vc4"
- "pcie_brcmstb" # required for the pcie bus to work
- "reset-raspberrypi" # required for vl805 firmware to load
- "mmc_block"
- "usbhid"
- "hid_generic"
- "panel_cwd686"
- "ocp8178_bl"
- "ti_adc081c"
- ];
- };
- environment.systemPackages = with pkgs; [
- libraspberrypi
- raspberrypi-eeprom
- ];
- system.stateVersion = "24.05";
- fileSystems."/" = {
- device = "/dev/mmcblk0p2";
- fsType = "btrfs";
- options = ["compress=zstd"];
- };
-
- fileSystems."/boot" = {
- device = "/dev/mmcblk0p1";
- fsType = "vfat";
- };
- security.pam = {
- services.login.u2fAuth = lib.mkForce false;
- services.swaylock.u2fAuth = lib.mkForce false;
- u2f.enable = lib.mkForce false;
- services.sddm.u2fAuth = lib.mkForce false;
- };
- networking.networkmanager.enable = true;
- users.users.darkkirb.extraGroups = ["networkmanager"];
- hardware.deviceTree.filter = "*rpi*.dtb";
- hardware.deviceTree.overlays = [
- {
- name = "dwc2";
- dtsFile = ./devterm/dwc2-overlay.dts;
- }
- {
- name = "cma";
- dtsFile = ./devterm/cma-overlay.dts;
- }
- {
- name = "vc4-kms-v3d-pi4";
- dtsFile = ./devterm/vc4-kms-v3d-pi4-overlay.dts;
- }
- {
- name = "devterm-pmu";
- dtsFile = ./devterm/devterm-pmu-overlay.dts;
- }
- {
- name = "devterm-panel";
- dtsFile = ./devterm/devterm-panel-overlay.dts;
- }
- {
- name = "devterm-misc";
- dtsFile = ./devterm/devterm-misc-overlay.dts;
- }
- {
- name = "audremap";
- dtsFile = ./devterm/audremap-overlay.dts;
- }
- {
- name = "spi";
- dtsFile = ./devterm/spi0-overlay.dts;
- }
- {
- name = "devterm-overlay";
- dtsFile = ./devterm/devterm-overlay.dts;
- }
- ];
- hardware.enableRedistributableFirmware = true;
- services.xserver.xkbVariant = lib.mkForce "us";
- console.keyMap = lib.mkForce "us";
- home-manager.users.darkkirb.wayland.windowManager.sway.config.input."*" = lib.mkForce {
- xkb_layout = "us";
- xkb_variant = "altgr-intl";
- };
- boot.initrd.systemd.tpm2.enable = lib.mkForce false;
- systemd.tpm2.enable = lib.mkForce false;
- services.displayManager = {
- autoLogin = {
- enable = true;
- user = "darkkirb";
- };
- sddm = {
- autoLogin.relogin = true;
- };
- };
-}
diff --git a/config/devterm/audremap-overlay.dts b/config/devterm/audremap-overlay.dts
deleted file mode 100644
index 9f4c01e2..00000000
--- a/config/devterm/audremap-overlay.dts
+++ /dev/null
@@ -1,23 +0,0 @@
-/dts-v1/;
-/plugin/;
-
-/ {
- compatible = "brcm,bcm2711";
-
- fragment@0 {
- target = <&audio_pins>;
- __overlay__ {
- status = "okay";
- };
- };
-
- fragment@1 {
- target = <&audio_pins>;
- __overlay__ {
- brcm,pins = < 12 13 >;
- brcm,function = < 4 >; /* alt0 alt0 */
- };
- };
-
-
-};
\ No newline at end of file
diff --git a/config/devterm/cma-overlay.dts b/config/devterm/cma-overlay.dts
deleted file mode 100644
index 969d79ed..00000000
--- a/config/devterm/cma-overlay.dts
+++ /dev/null
@@ -1,14 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/ {
- compatible = "brcm,bcm2711";
-
- fragment@0 {
- target = <&cma>;
- __overlay__ {
- size = <(384 * 1024 * 1024)>;
- };
- };
-};
\ No newline at end of file
diff --git a/config/devterm/devterm-misc-overlay.dts b/config/devterm/devterm-misc-overlay.dts
deleted file mode 100644
index 4f98a9be..00000000
--- a/config/devterm/devterm-misc-overlay.dts
+++ /dev/null
@@ -1,80 +0,0 @@
-/dts-v1/;
-/plugin/;
-
-/{
- compatible = "brcm,bcm2711";
-
- fragment@0 {
- target = <&i2c1>;
- __overlay__ {
- #address-cells = <1>;
- #size-cells = <0>;
- pinctrl-names = "default";
- pinctrl-0 = <&i2c1_pins>;
- status = "okay";
-
- adc101c: adc@54 {
- reg = <0x54>;
- compatible = "ti,adc101c";
- status = "okay";
- };
- };
- };
-
- fragment@1 {
- target = <&spi4>;
- __overlay__ {
- pinctrl-names = "default";
- pinctrl-0 = <&spi4_pins &spi4_cs_pins>;
- cs-gpios = <&gpio 4 1>;
- status = "okay";
-
- spidev4_0: spidev@0 {
- compatible = "spidev";
- reg = <0>; /* CE0 */
- #address-cells = <1>;
- #size-cells = <0>;
- spi-max-frequency = <125000000>;
- status = "okay";
- };
- };
- };
-
- fragment@2 {
- target = <&uart1>;
- __overlay__ {
- pinctrl-names = "default";
- pinctrl-0 = <&uart1_pins>;
- status = "okay";
- };
- };
-
- fragment@3 {
- target = <&gpio>;
- __overlay__ {
-
- i2c1_pins: i2c1 {
- brcm,pins = <44 45>;
- brcm,function = <6>;
- };
-
- spi4_pins: spi4_pins {
- brcm,pins = <6 7>;
- brcm,function = <7>;
- };
-
- spi4_cs_pins: spi0_cs_pins {
- brcm,pins = <4>;
- brcm,function = <1>;
- };
-
- uart1_pins: uart1_pins {
- brcm,pins = <14 15>;
- brcm,function = <2>;
- brcm,pull = <0 2>;
- };
-
- };
- };
-
-};
\ No newline at end of file
diff --git a/config/devterm/devterm-overlay.dts b/config/devterm/devterm-overlay.dts
deleted file mode 100644
index e9a5f012..00000000
--- a/config/devterm/devterm-overlay.dts
+++ /dev/null
@@ -1,130 +0,0 @@
-/dts-v1/;
-/plugin/;
-
-/ {
- compatible = "brcm,bcm2711";
- fragment@0 {
- target = <&dma40>;
- __overlay__ {
- dma-channel-mask = <0x3000>;
- };
- };
- fragment@1 {
- target = <&hdmi0>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@2 {
- target = <&uart0_pins>;
- __overlay__ {
- brcm,pull = <0x02 0x00 0x00 0x02>;
- brcm,pins = <0x1e 0x1f 0x20 0x21>;
- };
- };
- fragment@3 {
- target = <&dvp>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@4 {
- target = <&pixelvalve4>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@5 {
- target = <&ddc1>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@6 {
- target = <&txp>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@7 {
- target = <&hvs>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@8 {
- target = <&pixelvalve3>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@9 {
- target = <&spi4>;
- __overlay__ {
- pinctrl-0 = <0xf0 0xf1>;
- };
- };
- fragment@10 {
- target = <&pixelvalve2>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@11 {
- target = <&uart1>;
- __overlay__ {
- pinctrl-0 = <0xf2>;
- status = "disabled";
- };
- };
- fragment@12 {
- target = <&pixelvalve1>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@13 {
- target = <&hdmi1>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@14 {
- target = <&spi4>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@15 {
- target = <&ddc0>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@16 {
- target = <&aon_intr>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@17 {
- target = <&pixelvalve0>;
- __overlay__ {
- status = "okay";
- };
- };
- fragment@18 {
- target = <&audio>;
- __overlay__ {
- brcm,disable-headphones = <0x00>;
- status = "okay";
- bcrm,disable-hdmi;
- };
- };
- fragment@19 {
- target-path = "/chosen";
- __overlay__ {
- bootargs = "coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 8250.nr_uarts=0 smsc95xx.macaddr=E4:5F:01:E4:FE:2D vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 8250.nr_uarts=1";
- };
- };
-};
\ No newline at end of file
diff --git a/config/devterm/devterm-panel-overlay.dts b/config/devterm/devterm-panel-overlay.dts
deleted file mode 100644
index b4703cb3..00000000
--- a/config/devterm/devterm-panel-overlay.dts
+++ /dev/null
@@ -1,47 +0,0 @@
-/dts-v1/;
-/plugin/;
-
-/ {
- compatible = "brcm,bcm2711";
-
- fragment@0 {
- target=<&dsi1>;
- __overlay__ {
- #address-cells = <1>;
- #size-cells = <0>;
- status = "okay";
-
- port {
- dsi_out_port: endpoint {
- remote-endpoint = <&panel_dsi_port>;
- };
- };
-
- panel_cwd686: panel@0 {
- compatible = "cw,cwd686";
- reg = <0>;
- reset-gpio = <&gpio 8 1>;
- backlight = <&ocp8178_backlight>;
- rotation = <0x5a>;
-
- port {
- panel_dsi_port: endpoint {
- remote-endpoint = <&dsi_out_port>;
- };
- };
- };
- };
- };
-
- fragment@1 {
- target-path = "/";
- __overlay__ {
- ocp8178_backlight: backlight@0 {
- compatible = "ocp8178-backlight";
- backlight-control-gpios = <&gpio 9 0>;
- default-brightness = <5>;
- };
- };
- };
-
-};
\ No newline at end of file
diff --git a/config/devterm/devterm-pmu-overlay.dts b/config/devterm/devterm-pmu-overlay.dts
deleted file mode 100644
index 526163e0..00000000
--- a/config/devterm/devterm-pmu-overlay.dts
+++ /dev/null
@@ -1,104 +0,0 @@
-/dts-v1/;
-/plugin/;
-
-/ {
- compatible = "brcm,bcm2711";
-
- fragment@0 {
- target = <&i2c0if>;
- __overlay__ {
- #address-cells = <1>;
- #size-cells = <0>;
- pinctrl-0 = <&i2c0_pins>;
- pinctrl-names = "default";
- status = "okay";
-
- axp22x: pmic@34 {
- interrupt-controller;
- #interrupt-cells = <1>;
- compatible = "x-powers,axp223";
- reg = <0x34>; /* i2c address */
- interrupt-parent = <&gpio>;
- interrupts = <2 8>; /* IRQ_TYPE_EDGE_FALLING */
- irq-gpios = <&gpio 2 0>;
-
- regulators {
-
- x-powers,dcdc-freq = <3000>;
-
- reg_aldo1: aldo1 {
- regulator-always-on;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "audio-vdd";
- };
-
- reg_aldo2: aldo2 {
- regulator-always-on;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "display-vcc";
- };
-
- reg_dldo2: dldo2 {
- regulator-always-on;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "dldo2";
- };
-
- reg_dldo3: dldo3 {
- regulator-always-on;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "dldo3";
- };
-
- reg_dldo4: dldo4 {
- regulator-always-on;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "dldo4";
- };
-
- };
-
- battery_power_supply: battery-power-supply {
- compatible = "x-powers,axp221-battery-power-supply";
- monitored-battery = <&battery>;
- };
-
- ac_power_supply: ac_power_supply {
- compatible = "x-powers,axp221-ac-power-supply";
- };
-
- };
- };
- };
-
- fragment@1 {
- target = <&i2c0if>;
- __overlay__ {
- compatible = "brcm,bcm2708-i2c";
- };
- };
-
- fragment@2 {
- target-path = "/aliases";
- __overlay__ {
- i2c0 = "/soc/i2c@7e205000";
- };
- };
-
- fragment@3 {
- target-path = "/";
- __overlay__ {
- battery: battery@0 {
- compatible = "simple-battery";
- constant-charge-current-max-microamp = <2100000>;
- voltage-min-design-microvolt = <3300000>;
- };
- };
- };
-
-};
\ No newline at end of file
diff --git a/config/devterm/dwc2-overlay.dts b/config/devterm/dwc2-overlay.dts
deleted file mode 100644
index 6561464a..00000000
--- a/config/devterm/dwc2-overlay.dts
+++ /dev/null
@@ -1,22 +0,0 @@
-/dts-v1/;
-/plugin/;
-
-/ {
- compatible = "brcm,bcm2711";
-
- fragment@0 {
- target = <&usb>;
- #address-cells = <0x01>;
- #size-cells = <0x01>;
-
- __overlay__ {
- compatible = "brcm,bcm2835-usb";
- dr_mode = "host";
- g-np-tx-fifo-size = <0x20>;
- g-rx-fifo-size = <0x22e>;
- g-tx-fifo-size = <0x200 0x200 0x200 0x200 0x200 0x100 0x100>;
- status = "okay";
- phandle = <0x01>;
- };
- };
-};
\ No newline at end of file
diff --git a/config/devterm/spi0-overlay.dts b/config/devterm/spi0-overlay.dts
deleted file mode 100644
index 00ddedc7..00000000
--- a/config/devterm/spi0-overlay.dts
+++ /dev/null
@@ -1,11 +0,0 @@
-/dts-v1/;
-/plugin/;
-/ {
- compatible = "bcrm,bcm2711";
- fragment@0 {
- target = <&spi>;
- __overlay__ {
- status = "okay";
- };
- };
-};
\ No newline at end of file
diff --git a/config/devterm/vc4-kms-v3d-pi4-overlay.dts b/config/devterm/vc4-kms-v3d-pi4-overlay.dts
deleted file mode 100644
index 42d5786f..00000000
--- a/config/devterm/vc4-kms-v3d-pi4-overlay.dts
+++ /dev/null
@@ -1,35 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/dts-v1/;
-/plugin/;
-
-/ {
- compatible = "brcm,bcm2711";
-
- fragment@1 {
- target = <&fb>;
- __overlay__ {
- status = "disabled";
- };
- };
-
- fragment@2 {
- target = <&firmwarekms>;
- __overlay__ {
- status = "disabled";
- };
- };
-
- fragment@3 {
- target = <&v3d>;
- __overlay__ {
- status = "okay";
- };
- };
-
- fragment@4 {
- target = <&vc4>;
- __overlay__ {
- status = "okay";
- };
- };
-};
\ No newline at end of file
diff --git a/config/env.nix b/config/env.nix
deleted file mode 100644
index 7f1c0324..00000000
--- a/config/env.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- config,
- pkgs,
- lib,
- ...
-}: {
- environment.extraInit = let
- systemdBin = lib.getBin config.systemd.package;
- in ''
- set -a
- . /dev/fd/0 <= 5.1 is required.
- [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
-
- # The list of segments shown on the left. Fill it with the most important segments.
- typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
- # =========================[ Line #1 ]=========================
- os_icon # os identifier
- dir # current directory
- vcs # git status
- # =========================[ Line #2 ]=========================
- newline # \n
- # prompt_char # prompt symbol
- )
-
- # The list of segments shown on the right. Fill it with less important segments.
- # Right prompt on the last prompt line (where you are typing your commands) gets
- # automatically hidden when the input line reaches it. Right prompt above the
- # last prompt line gets hidden if it would overlap with left prompt.
- typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
- # =========================[ Line #1 ]=========================
- status # exit code of the last command
- command_execution_time # duration of the last command
- background_jobs # presence of background jobs
- direnv # direnv status (https://direnv.net/)
- asdf # asdf version manager (https://github.com/asdf-vm/asdf)
- virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
- anaconda # conda environment (https://conda.io/)
- pyenv # python environment (https://github.com/pyenv/pyenv)
- goenv # go environment (https://github.com/syndbg/goenv)
- nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv)
- nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)
- nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)
- # node_version # node.js version
- # go_version # go version (https://golang.org)
- rust_version # rustc version (https://www.rust-lang.org)
- # dotnet_version # .NET version (https://dotnet.microsoft.com)
- # php_version # php version (https://www.php.net/)
- # laravel_version # laravel php framework version (https://laravel.com/)
- # java_version # java version (https://www.java.com/)
- # package # name@version from package.json (https://docs.npmjs.com/files/package.json)
- rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv)
- rvm # ruby version from rvm (https://rvm.io)
- fvm # flutter version management (https://github.com/leoafarias/fvm)
- luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
- jenv # java version from jenv (https://github.com/jenv/jenv)
- plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
- perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew)
- phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
- scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
- haskell_stack # haskell version from stack (https://haskellstack.org/)
- kubecontext # current kubernetes context (https://kubernetes.io/)
- terraform # terraform workspace (https://www.terraform.io)
- # terraform_version # terraform version (https://www.terraform.io)
- aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
- aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)
- azure # azure account name (https://docs.microsoft.com/en-us/cli/azure)
- gcloud # google cloud cli account and project (https://cloud.google.com/)
- google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production)
- toolbox # toolbox name (https://github.com/containers/toolbox)
- context # user@hostname
- nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
- ranger # ranger shell (https://github.com/ranger/ranger)
- nnn # nnn shell (https://github.com/jarun/nnn)
- lf # lf shell (https://github.com/gokcehan/lf)
- xplr # xplr shell (https://github.com/sayanarijit/xplr)
- vim_shell # vim shell indicator (:sh)
- midnight_commander # midnight commander shell (https://midnight-commander.org/)
- nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
- vi_mode # vi mode (you don't need this if you've enabled prompt_char)
- # vpn_ip # virtual private network indicator
- load # CPU load
- # disk_usage # disk usage
- # ram # free RAM
- # swap # used swap
- todo # todo items (https://github.com/todotxt/todo.txt-cli)
- timewarrior # timewarrior tracking status (https://timewarrior.net/)
- taskwarrior # taskwarrior task count (https://taskwarrior.org/)
- # cpu_arch # CPU architecture
- time # current time
- # =========================[ Line #2 ]=========================
- newline # \n
- # ip # ip address and bandwidth usage for a specified network interface
- # public_ip # public IP address
- # proxy # system-wide http/https/ftp proxy
- battery # internal battery
- # wifi # wifi speed
- # example # example user-defined segment (see prompt_example function below)
- )
-
- # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you.
- typeset -g POWERLEVEL9K_MODE=nerdfont-complete
- # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid
- # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added.
- typeset -g POWERLEVEL9K_ICON_PADDING=none
-
- # When set to true, icons appear before content on both sides of the prompt. When set
- # to false, icons go after content. If empty or not set, icons go before content in the left
- # prompt and after content in the right prompt.
- #
- # You can also override it for a specific segment:
- #
- # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false
- #
- # Or for a specific segment in specific state:
- #
- # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false
- typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=
-
- # Add an empty line before each prompt.
- typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
-
- # Connect left prompt lines with these symbols. You'll probably want to use the same color
- # as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND below.
- typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%244F╭─'
- typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%244F├─'
- typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%244F╰─'
- # Connect right prompt lines with these symbols.
- typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX='%244F─╮'
- typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX='%244F─┤'
- typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX='%244F─╯'
-
- # Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or
- # '─'. The last two make it easier to see the alignment between left and right prompt and to
- # separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false
- # for more compact prompt if using this option.
- typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR='·'
- typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND=
- typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND=
- if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then
- # The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE
- # ornaments defined above.
- typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=244
- # Start filler from the edge of the screen if there are no left segments on the first line.
- typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}'
- # End filler on the edge of the screen if there are no right segments on the first line.
- typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}'
- fi
-
- # Default background color.
- typeset -g POWERLEVEL9K_BACKGROUND=240
-
- # Separator between same-color segments on the left.
- typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='%250F\uE0B1'
- # Separator between same-color segments on the right.
- typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='%250F\uE0B3'
- # Separator between different-color segments on the left.
- typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0'
- # Separator between different-color segments on the right.
- typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2'
- # The right end of left prompt.
- typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0'
- # The left end of right prompt.
- typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2'
- # The left end of left prompt.
- typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B6'
- # The right end of right prompt.
- typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B4'
- # Left prompt terminator for lines without any segments.
- typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=
-
- #################################[ os_icon: os identifier ]##################################
- # OS identifier color.
- typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=255
- # Custom icon.
- # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐'
-
- ################################[ prompt_char: prompt symbol ]################################
- # Transparent background.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND=
- # Green prompt symbol if the last command succeeded.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76
- # Red prompt symbol if the last command failed.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196
- # Default prompt symbol.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'
- # Prompt symbol in command vi mode.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮'
- # Prompt symbol in visual vi mode.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V'
- # Prompt symbol in overwrite vi mode.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶'
- typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true
- # No line terminator if prompt_char is the last segment.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=
- # No line introducer if prompt_char is the first segment.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=
- # No surrounding whitespace.
- typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_{LEFT,RIGHT}_WHITESPACE=
-
- ##################################[ dir: current directory ]##################################
- # Default current directory color.
- typeset -g POWERLEVEL9K_DIR_FOREGROUND=31
- # If directory is too long, shorten some of its segments to the shortest possible unique
- # prefix. The shortened directory can be tab-completed to the original.
- typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
- # Replace removed segment suffixes with this symbol.
- typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=
- # Color of the shortened directory segments.
- typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103
- # Color of the anchor directory segments. Anchor segments are never shortened. The first
- # segment is always an anchor.
- typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39
- # Display anchor directory segments in bold.
- typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true
- # Don't shorten directories that contain any of these files. They are anchors.
- local anchor_files=(
- .bzr
- .citc
- .git
- .hg
- .node-version
- .python-version
- .go-version
- .ruby-version
- .lua-version
- .java-version
- .perl-version
- .php-version
- .tool-version
- .shorten_folder_marker
- .svn
- .terraform
- CVS
- Cargo.toml
- composer.json
- go.mod
- package.json
- stack.yaml
- )
- typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})"
- # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains
- # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is
- # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first)
- # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers
- # and other directories don't.
- #
- # Optionally, "first" and "last" can be followed by ":" where is an integer.
- # This moves the truncation point to the right (positive offset) or to the left (negative offset)
- # relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0"
- # respectively.
- typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false
- # Don't shorten this many last directory segments. They are anchors.
- typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
- # Shorten directory if it's longer than this even if there is space for it. The value can
- # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty,
- # directory will be shortened only when prompt doesn't fit or when other parameters demand it
- # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below).
- # If set to `0`, directory will always be shortened to its minimum length.
- typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80
- # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this
- # many columns for typing commands.
- typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40
- # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least
- # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands.
- typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50
- # If set to true, embed a hyperlink into the directory. Useful for quickly
- # opening a directory in the file manager simply by clicking the link.
- # Can also be handy when the directory is shortened, as it allows you to see
- # the full directory that was used in previous commands.
- typeset -g POWERLEVEL9K_DIR_HYPERLINK=false
-
- # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON
- # and POWERLEVEL9K_DIR_CLASSES below.
- typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3
-
- # The default icon shown next to non-writable and non-existent directories when
- # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3.
- # typeset -g POWERLEVEL9K_LOCK_ICON='⭐'
-
- # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different
- # directories. It must be an array with 3 * N elements. Each triplet consists of:
- #
- # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with
- # extended_glob option enabled.
- # 2. Directory class for the purpose of styling.
- # 3. An empty string.
- #
- # Triplets are tried in order. The first triplet whose pattern matches $PWD wins.
- #
- # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories
- # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively.
- #
- # For example, given these settings:
- #
- # typeset -g POWERLEVEL9K_DIR_CLASSES=(
- # '~/work(|/*)' WORK ''
- # '~(|/*)' HOME ''
- # '*' DEFAULT '')
- #
- # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one
- # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or
- # WORK_NON_EXISTENT.
- #
- # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an
- # option to define custom colors and icons for different directory classes.
- #
- # # Styling for WORK.
- # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31
- # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103
- # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39
- #
- # # Styling for WORK_NOT_WRITABLE.
- # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=31
- # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103
- # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39
- #
- # # Styling for WORK_NON_EXISTENT.
- # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=31
- # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=103
- # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=39
- #
- # If a styling parameter isn't explicitly defined for some class, it falls back to the classless
- # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls
- # back to POWERLEVEL9K_DIR_FOREGROUND.
- #
- # typeset -g POWERLEVEL9K_DIR_CLASSES=()
-
- # Custom prefix.
- # typeset -g POWERLEVEL9K_DIR_PREFIX='%250Fin '
-
- #####################################[ vcs: git status ]######################################
- # Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon.
- typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 '
-
- # Untracked files icon. It's really a question mark, your font isn't broken.
- # Change the value of this parameter to show a different icon.
- typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?'
-
- # Formatter for Git status.
- #
- # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
- #
- # You can edit the function to customize how Git status looks.
- #
- # VCS_STATUS_* parameters are set by gitstatus plugin. See reference:
- # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh.
- function my_git_formatter() {
- emulate -L zsh
-
- if [[ -n $P9K_CONTENT ]]; then
- # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from
- # gitstatus plugin). VCS_STATUS_* parameters are not available in this case.
- typeset -g my_git_format=$P9K_CONTENT
- return
- fi
-
- if (( $1 )); then
- # Styling for up-to-date Git status.
- local meta='%250F' # grey foreground
- local clean='%76F' # green foreground
- local modified='%178F' # yellow foreground
- local untracked='%39F' # blue foreground
- local conflicted='%196F' # red foreground
- else
- # Styling for incomplete and stale Git status.
- local meta='%244F' # grey foreground
- local clean='%244F' # grey foreground
- local modified='%244F' # grey foreground
- local untracked='%244F' # grey foreground
- local conflicted='%244F' # grey foreground
- fi
-
- local res
-
- if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then
- local branch=${(V)VCS_STATUS_LOCAL_BRANCH}
- # If local branch name is at most 32 characters long, show it in full.
- # Otherwise show the first 12 … the last 12.
- # Tip: To always show local branch name in full without truncation, delete the next line.
- (( $#branch > 32 )) && branch[13,-13]="…" # <-- this line
- res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}"
- fi
-
- if [[ -n $VCS_STATUS_TAG
- # Show tag only if not on a branch.
- # Tip: To always show tag, delete the next line.
- && -z $VCS_STATUS_LOCAL_BRANCH # <-- this line
- ]]; then
- local tag=${(V)VCS_STATUS_TAG}
- # If tag name is at most 32 characters long, show it in full.
- # Otherwise show the first 12 … the last 12.
- # Tip: To always show tag name in full without truncation, delete the next line.
- (( $#tag > 32 )) && tag[13,-13]="…" # <-- this line
- res+="${meta}#${clean}${tag//\%/%%}"
- fi
-
- # Display the current Git commit if there is no branch and no tag.
- # Tip: To always display the current Git commit, delete the next line.
- [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line
- res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}"
-
- # Show tracking branch name if it differs from local branch.
- if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then
- res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}"
- fi
-
- # Display "wip" if the latest commit's summary contains "wip" or "WIP".
- if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then
- res+=" ${modified}wip"
- fi
-
- # ⇣42 if behind the remote.
- (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
- # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
- (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
- (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
- # ⇠42 if behind the push remote.
- (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}"
- (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
- # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42.
- (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}"
- # *42 if have stashes.
- (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}"
- # 'merge' if the repo is in an unusual state.
- [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}"
- # ~42 if have merge conflicts.
- (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}"
- # +42 if have staged changes.
- (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}"
- # !42 if have unstaged changes.
- (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}"
- # ?42 if have untracked files. It's really a question mark, your font isn't broken.
- # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon.
- # Remove the next line if you don't want to see untracked files at all.
- (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}"
- # "─" if the number of unstaged files is unknown. This can happen due to
- # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower
- # than the number of files in the Git index, or due to bash.showDirtyState being set to false
- # in the repository config. The number of staged and untracked files may also be unknown
- # in this case.
- (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─"
-
- typeset -g my_git_format=$res
- }
- functions -M my_git_formatter 2>/dev/null
-
- # Don't count the number of unstaged, untracked and conflicted files in Git repositories with
- # more than this many files in the index. Negative value means infinity.
- #
- # If you are working in Git repositories with tens of millions of files and seeing performance
- # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output
- # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's
- # config: `git config bash.showDirtyState false`.
- typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1
-
- # Don't show Git status in prompt for repositories whose workdir matches this pattern.
- # For example, if set to '~', the Git repository at $HOME/.git will be ignored.
- # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'.
- typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'
-
- # Disable the default Git status formatting.
- typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true
- # Install our own Git status formatter.
- typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}'
- typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}'
- # Enable counters for staged, unstaged, etc.
- typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1
-
- # Icon color.
- typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76
- typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244
- # Custom icon.
- # typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # Custom prefix.
- typeset -g POWERLEVEL9K_VCS_PREFIX='%250Fon '
-
- # Show status of repositories of these types. You can add svn and/or hg if you are
- # using them. If you do, your prompt may become slow even when your current directory
- # isn't in an svn or hg reposotiry.
- typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)
-
- # These settings are used for repositories other than Git or when gitstatusd fails and
- # Powerlevel10k has to fall back to using vcs_info.
- typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76
- typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76
- typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178
-
- ##########################[ status: exit code of the last command ]###########################
- # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and
- # style them independently from the regular OK and ERROR state.
- typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true
-
- # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as
- # it will signify success by turning green.
- typeset -g POWERLEVEL9K_STATUS_OK=true
- typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70
- typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔'
-
- # Status when some part of a pipe command fails but the overall exit status is zero. It may look
- # like this: 1|0.
- typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true
- typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=70
- typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔'
-
- # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as
- # it will signify error by turning red.
- typeset -g POWERLEVEL9K_STATUS_ERROR=true
- typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160
- typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘'
-
- # Status when the last command was terminated by a signal.
- typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true
- typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160
- # Use terse signal names: "INT" instead of "SIGINT(2)".
- typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false
- typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘'
-
- # Status when some part of a pipe command fails and the overall exit status is also non-zero.
- # It may look like this: 1|0.
- typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true
- typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160
- typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘'
-
- ###################[ command_execution_time: duration of the last command ]###################
- # Show duration of the last command if takes at least this many seconds.
- typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3
- # Show this many fractional digits. Zero means round to seconds.
- typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
- # Execution time color.
- typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=248
- # Duration format: 1d 2h 3m 4s.
- typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'
- # Custom icon.
- # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # Custom prefix.
- typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%250Ftook '
-
- #######################[ background_jobs: presence of background jobs ]#######################
- # Don't show the number of background jobs.
- typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false
- # Background jobs color.
- typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=37
- # Custom icon.
- # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #######################[ direnv: direnv status (https://direnv.net/) ]########################
- # Direnv color.
- typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178
- # Custom icon.
- # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]###############
- # Default asdf color. Only used to display tools for which there is no color override (see below).
- # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND.
- typeset -g POWERLEVEL9K_ASDF_FOREGROUND=66
-
- # There are four parameters that can be used to hide asdf tools. Each parameter describes
- # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at
- # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to
- # hide a tool, it gets shown.
- #
- # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and
- # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands:
- #
- # asdf local python 3.8.1
- # asdf global python 3.8.1
- #
- # After running both commands the current python version is 3.8.1 and its source is "local" as
- # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false,
- # it'll hide python version in this case because 3.8.1 is the same as the global version.
- # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't
- # contain "local".
-
- # Hide tool versions that don't come from one of these sources.
- #
- # Available sources:
- #
- # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable"
- # - local `asdf current` says "set by /some/not/home/directory/file"
- # - global `asdf current` says "set by /home/username/file"
- #
- # Note: If this parameter is set to (shell local global), it won't hide tools.
- # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES.
- typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global)
-
- # If set to false, hide tool versions that are the same as global.
- #
- # Note: The name of this parameter doesn't reflect its meaning at all.
- # Note: If this parameter is set to true, it won't hide tools.
- # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW.
- typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false
-
- # If set to false, hide tool versions that are equal to "system".
- #
- # Note: If this parameter is set to true, it won't hide tools.
- # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM.
- typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true
-
- # If set to non-empty value, hide tools unless there is a file matching the specified file pattern
- # in the current directory, or its parent directory, or its grandparent directory, and so on.
- #
- # Note: If this parameter is set to empty value, it won't hide tools.
- # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments.
- # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB.
- #
- # Example: Hide nodejs version when there is no package.json and no *.js files in the current
- # directory, in `..`, in `../..` and so on.
- #
- # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json'
- typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB=
-
- # Ruby version from asdf.
- typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=168
- # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Python version from asdf.
- typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=37
- # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Go version from asdf.
- typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=37
- # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Node.js version from asdf.
- typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=70
- # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Rust version from asdf.
- typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=37
- # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # .NET Core version from asdf.
- typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=134
- # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Flutter version from asdf.
- typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=38
- # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Lua version from asdf.
- typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=32
- # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Java version from asdf.
- typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=32
- # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Perl version from asdf.
- typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=67
- # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Erlang version from asdf.
- typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=125
- # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Elixir version from asdf.
- typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=129
- # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Postgres version from asdf.
- typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=31
- # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # PHP version from asdf.
- typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=99
- # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Haskell version from asdf.
- typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=172
- # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- # Julia version from asdf.
- typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=70
- # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar'
-
- ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]###########
- # NordVPN connection indicator color.
- typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39
- # Hide NordVPN connection indicator when not connected.
- typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION=
- typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION=
- # Custom icon.
- # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]##################
- # Ranger shell color.
- typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178
- # Custom icon.
- # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
- # Nnn shell color.
- typeset -g POWERLEVEL9K_NNN_FOREGROUND=72
- # Custom icon.
- # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ######################[ lf: lf shell (https://github.com/gokcehan/lf) ]#######################
- # lf shell color.
- typeset -g POWERLEVEL9K_LF_FOREGROUND=72
- # Custom icon.
- # typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]##################
- # xplr shell color.
- typeset -g POWERLEVEL9K_XPLR_FOREGROUND=72
- # Custom icon.
- # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###########################[ vim_shell: vim shell indicator (:sh) ]###########################
- # Vim shell indicator color.
- typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34
- # Custom icon.
- # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]######
- # Midnight Commander shell color.
- typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178
- # Custom icon.
- # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]##
- # Nix shell color.
- typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74
-
- # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
- # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##################################[ disk_usage: disk usage ]##################################
- # Colors for different levels of disk usage.
- typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35
- typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=220
- typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=160
- # Thresholds for different levels of disk usage (percentage points).
- typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90
- typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95
- # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent.
- typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false
- # Custom icon.
- # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###########[ vi_mode: vi mode (you don't need this if you've enabled prompt_char) ]###########
- # Text and color for normal (a.k.a. command) vi mode.
- typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL
- typeset -g POWERLEVEL9K_VI_MODE_NORMAL_FOREGROUND=106
- # Text and color for visual vi mode.
- typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL
- typeset -g POWERLEVEL9K_VI_MODE_VISUAL_FOREGROUND=68
- # Text and color for overtype (a.k.a. overwrite and replace) vi mode.
- typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE
- typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_FOREGROUND=172
- # Text and color for insert vi mode.
- typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=
- typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=66
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ######################################[ ram: free RAM ]#######################################
- # RAM color.
- typeset -g POWERLEVEL9K_RAM_FOREGROUND=66
- # Custom icon.
- # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #####################################[ swap: used swap ]######################################
- # Swap color.
- typeset -g POWERLEVEL9K_SWAP_FOREGROUND=96
- # Custom icon.
- # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ######################################[ load: CPU load ]######################################
- # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15.
- typeset -g POWERLEVEL9K_LOAD_WHICH=5
- # Load color when load is under 50%.
- typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66
- # Load color when load is between 50% and 70%.
- typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178
- # Load color when load is over 70%.
- typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166
- # Custom icon.
- # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################
- # Todo color.
- typeset -g POWERLEVEL9K_TODO_FOREGROUND=110
- # Hide todo when the total number of tasks is zero.
- typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true
- # Hide todo when the number of tasks after filtering is zero.
- typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false
-
- # Todo format. The following parameters are available within the expansion.
- #
- # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks.
- # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering.
- #
- # These variables correspond to the last line of the output of `todo.sh -p ls`:
- #
- # TODO: 24 of 42 tasks shown
- #
- # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT.
- #
- # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT'
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############
- # Timewarrior color.
- typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110
- # If the tracked task is longer than 24 characters, truncate and append "…".
- # Tip: To always display tasks without truncation, delete the following parameter.
- # Tip: To hide task names and display just the icon when time tracking is enabled, set the
- # value of the following parameter to "".
- typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}'
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]##############
- # Taskwarrior color.
- typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74
-
- # Taskwarrior segment format. The following parameters are available within the expansion.
- #
- # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`.
- # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`.
- #
- # Zero values are represented as empty parameters.
- #
- # The default format:
- #
- # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT'
- #
- # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT'
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ################################[ cpu_arch: CPU architecture ]################################
- # CPU architecture color.
- typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172
-
- # Hide the segment when on a specific CPU architecture.
- # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION=
- # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION=
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##################################[ context: user@hostname ]##################################
- # Context color when running with privileges.
- typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178
- # Context color in SSH without privileges.
- typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180
- # Default context color (no privileges, no SSH).
- typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180
-
- # Context format when running with privileges: bold user@hostname.
- typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m'
- # Context format when in SSH without privileges: user@hostname.
- typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m'
- # Default context format (no privileges, no SSH): user@hostname.
- typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m'
-
- # Don't show context unless running with privileges or in SSH.
- # Tip: Remove the next line to always show context.
- typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # Custom prefix.
- typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%250Fwith '
-
- ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###
- # Python virtual environment color.
- typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37
- # Don't show Python version next to the virtual environment name.
- typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
- # If set to "false", won't show virtualenv if pyenv is already shown.
- # If set to "if-different", won't show virtualenv if it's the same as pyenv.
- typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false
- # Separate environment name from Python version only with a space.
- typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
- # Custom icon.
- # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #####################[ anaconda: conda environment (https://conda.io/) ]######################
- # Anaconda environment color.
- typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37
-
- # Anaconda segment format. The following parameters are available within the expansion.
- #
- # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment.
- # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment.
- # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below).
- # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version).
- #
- # CONDA_PROMPT_MODIFIER can be configured with the following command:
- #
- # conda config --set env_prompt '({default_env}) '
- #
- # The last argument is a Python format string that can use the following variables:
- #
- # - prefix The same as CONDA_PREFIX.
- # - default_env The same as CONDA_DEFAULT_ENV.
- # - name The last segment of CONDA_PREFIX.
- # - stacked_env Comma-separated list of names in the environment stack. The first element is
- # always the same as default_env.
- #
- # Note: '({default_env}) ' is the default value of env_prompt.
- #
- # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER
- # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former
- # is empty.
- typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}'
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################
- # Pyenv color.
- typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37
- # Hide python version if it doesn't come from one of these sources.
- typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global)
- # If set to false, hide python version if it's the same as global:
- # $(pyenv version-name) == $(pyenv global).
- typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false
- # If set to false, hide python version if it's equal to "system".
- typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true
-
- # Pyenv segment format. The following parameters are available within the expansion.
- #
- # - P9K_CONTENT Current pyenv environment (pyenv version-name).
- # - P9K_PYENV_PYTHON_VERSION Current python version (python --version).
- #
- # The default format has the following logic:
- #
- # 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or
- # starts with "$P9K_PYENV_PYTHON_VERSION/".
- # 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION".
- typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}'
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################
- # Goenv color.
- typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37
- # Hide go version if it doesn't come from one of these sources.
- typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global)
- # If set to false, hide go version if it's the same as global:
- # $(goenv version-name) == $(goenv global).
- typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false
- # If set to false, hide go version if it's equal to "system".
- typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]##########
- # Nodenv color.
- typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70
- # Hide node version if it doesn't come from one of these sources.
- typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global)
- # If set to false, hide node version if it's the same as global:
- # $(nodenv version-name) == $(nodenv global).
- typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false
- # If set to false, hide node version if it's equal to "system".
- typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
- # Nvm color.
- typeset -g POWERLEVEL9K_NVM_FOREGROUND=70
- # Custom icon.
- # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############
- # Nodeenv color.
- typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70
- # Don't show Node version next to the environment name.
- typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false
- # Separate environment name from Node version only with a space.
- typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER=
- # Custom icon.
- # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##############################[ node_version: node.js version ]###############################
- # Node version color.
- typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70
- # Show node version only when in a directory tree containing package.json.
- typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #######################[ go_version: go version (https://golang.org) ]########################
- # Go version color.
- typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37
- # Show go version only when in a go project subdirectory.
- typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #################[ rust_version: rustc version (https://www.rust-lang.org) ]##################
- # Rust version color.
- typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37
- # Show rust version only when in a rust project subdirectory.
- typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################
- # .NET version color.
- typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134
- # Show .NET version only when in a .NET project subdirectory.
- typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #####################[ php_version: php version (https://www.php.net/) ]######################
- # PHP version color.
- typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=99
- # Show PHP version only when in a PHP project subdirectory.
- typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]###########
- # Laravel version color.
- typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=161
- # Custom icon.
- # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ####################[ java_version: java version (https://www.java.com/) ]####################
- # Java version color.
- typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=32
- # Show java version only when in a java project subdirectory.
- typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true
- # Show brief version.
- typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false
- # Custom icon.
- # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]####
- # Package color.
- typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=117
- # Package format. The following parameters are available within the expansion.
- #
- # - P9K_PACKAGE_NAME The value of `name` field in package.json.
- # - P9K_PACKAGE_VERSION The value of `version` field in package.json.
- #
- # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}'
- # Custom icon.
- # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]##############
- # Rbenv color.
- typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168
- # Hide ruby version if it doesn't come from one of these sources.
- typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global)
- # If set to false, hide ruby version if it's the same as global:
- # $(rbenv version-name) == $(rbenv global).
- typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false
- # If set to false, hide ruby version if it's equal to "system".
- typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #######################[ rvm: ruby version from rvm (https://rvm.io) ]########################
- # Rvm color.
- typeset -g POWERLEVEL9K_RVM_FOREGROUND=168
- # Don't show @gemset at the end.
- typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false
- # Don't show ruby- at the front.
- typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false
- # Custom icon.
- # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############
- # Fvm color.
- typeset -g POWERLEVEL9K_FVM_FOREGROUND=38
- # Custom icon.
- # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]###########
- # Lua color.
- typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32
- # Hide lua version if it doesn't come from one of these sources.
- typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global)
- # If set to false, hide lua version if it's the same as global:
- # $(luaenv version-name) == $(luaenv global).
- typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false
- # If set to false, hide lua version if it's equal to "system".
- typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################
- # Java color.
- typeset -g POWERLEVEL9K_JENV_FOREGROUND=32
- # Hide java version if it doesn't come from one of these sources.
- typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global)
- # If set to false, hide java version if it's the same as global:
- # $(jenv version-name) == $(jenv global).
- typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false
- # If set to false, hide java version if it's equal to "system".
- typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############
- # Perl color.
- typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67
- # Hide perl version if it doesn't come from one of these sources.
- typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global)
- # If set to false, hide perl version if it's the same as global:
- # $(plenv version-name) == $(plenv global).
- typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false
- # If set to false, hide perl version if it's equal to "system".
- typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############
- # Perlbrew color.
- typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67
- # Show perlbrew version only when in a perl project subdirectory.
- typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true
- # Don't show "perl-" at the front.
- typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false
- # Custom icon.
- # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############
- # PHP color.
- typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99
- # Hide php version if it doesn't come from one of these sources.
- typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global)
- # If set to false, hide php version if it's the same as global:
- # $(phpenv version-name) == $(phpenv global).
- typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false
- # If set to false, hide php version if it's equal to "system".
- typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]#######
- # Scala color.
- typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=160
- # Hide scala version if it doesn't come from one of these sources.
- typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global)
- # If set to false, hide scala version if it's the same as global:
- # $(scalaenv version-name) == $(scalaenv global).
- typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false
- # If set to false, hide scala version if it's equal to "system".
- typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]###########
- # Haskell color.
- typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172
- # Hide haskell version if it doesn't come from one of these sources.
- #
- # shell: version is set by STACK_YAML
- # local: version is set by stack.yaml up the directory tree
- # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml)
- typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local)
- # If set to false, hide haskell version if it's the same as in the implicit global project.
- typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true
- # Custom icon.
- # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ################[ terraform: terraform workspace (https://www.terraform.io) ]#################
- # Don't show terraform workspace if it's literally "default".
- typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false
- # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element
- # in each pair defines a pattern against which the current terraform workspace gets matched.
- # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
- # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters,
- # you'll see this value in your prompt. The second element of each pair in
- # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The
- # first match wins.
- #
- # For example, given these settings:
- #
- # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(
- # '*prod*' PROD
- # '*test*' TEST
- # '*' OTHER)
- #
- # If your current terraform workspace is "project_test", its class is TEST because "project_test"
- # doesn't match the pattern '*prod*' but does match '*test*'.
- #
- # You can define different colors, icons and content expansions for different classes:
- #
- # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28
- # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
- typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(
- # '*prod*' PROD # These values are examples that are unlikely
- # '*test*' TEST # to match your needs. Customize them as needed.
- '*' OTHER)
- typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38
- # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #############[ terraform_version: terraform version (https://www.terraform.io) ]##############
- # Terraform version color.
- typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=38
- # Custom icon.
- # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
- # Show kubecontext only when the command you are typing invokes one of these tools.
- # Tip: Remove the next line to always show kubecontext.
- typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent'
-
- # Kubernetes context classes for the purpose of using different colors, icons and expansions with
- # different contexts.
- #
- # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element
- # in each pair defines a pattern against which the current kubernetes context gets matched.
- # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
- # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters,
- # you'll see this value in your prompt. The second element of each pair in
- # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The
- # first match wins.
- #
- # For example, given these settings:
- #
- # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(
- # '*prod*' PROD
- # '*test*' TEST
- # '*' DEFAULT)
- #
- # If your current kubernetes context is "deathray-testing/default", its class is TEST
- # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'.
- #
- # You can define different colors, icons and content expansions for different classes:
- #
- # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28
- # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
- typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(
- # '*prod*' PROD # These values are examples that are unlikely
- # '*test*' TEST # to match your needs. Customize them as needed.
- '*' DEFAULT)
- typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134
- # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext
- # segment. Parameter expansions are very flexible and fast, too. See reference:
- # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.
- #
- # Within the expansion the following parameters are always available:
- #
- # - P9K_CONTENT The content that would've been displayed if there was no content
- # expansion defined.
- # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the
- # output of `kubectl config get-contexts`.
- # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the
- # output of `kubectl config get-contexts`.
- # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE
- # in the output of `kubectl config get-contexts`. If there is no
- # namespace, the parameter is set to "default".
- # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the
- # output of `kubectl config get-contexts`.
- #
- # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS),
- # the following extra parameters are available:
- #
- # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks".
- # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID.
- # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone.
- # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster.
- #
- # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example,
- # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01":
- #
- # - P9K_KUBECONTEXT_CLOUD_NAME=gke
- # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account
- # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a
- # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01
- #
- # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01":
- #
- # - P9K_KUBECONTEXT_CLOUD_NAME=eks
- # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012
- # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1
- # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01
- typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION=
- # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME.
- POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}'
- # Append the current context's namespace if it's not "default".
- POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'
-
- # Custom prefix.
- typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%250Fat '
-
- #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
- # Show aws only when the command you are typing invokes one of these tools.
- # Tip: Remove the next line to always show aws.
- typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt'
-
- # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
- # in each pair defines a pattern against which the current AWS profile gets matched.
- # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
- # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters,
- # you'll see this value in your prompt. The second element of each pair in
- # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The
- # first match wins.
- #
- # For example, given these settings:
- #
- # typeset -g POWERLEVEL9K_AWS_CLASSES=(
- # '*prod*' PROD
- # '*test*' TEST
- # '*' DEFAULT)
- #
- # If your current AWS profile is "company_test", its class is TEST
- # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'.
- #
- # You can define different colors, icons and content expansions for different classes:
- #
- # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28
- # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
- typeset -g POWERLEVEL9K_AWS_CLASSES=(
- # '*prod*' PROD # These values are examples that are unlikely
- # '*test*' TEST # to match your needs. Customize them as needed.
- '*' DEFAULT)
- typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208
- # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- # AWS segment format. The following parameters are available within the expansion.
- #
- # - P9K_AWS_PROFILE The name of the current AWS profile.
- # - P9K_AWS_REGION The region associated with the current AWS profile.
- typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}'
-
- #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]#
- # AWS Elastic Beanstalk environment color.
- typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70
- # Custom icon.
- # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########
- # Show azure only when the command you are typing invokes one of these tools.
- # Tip: Remove the next line to always show azure.
- typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
- # Azure account name color.
- typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32
- # Custom icon.
- # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
- # Show gcloud only when the command you are typing invokes one of these tools.
- # Tip: Remove the next line to always show gcloud.
- typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil'
- # Google cloud color.
- typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32
-
- # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or
- # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative
- # enough. You can use the following parameters in the expansions. Each of them corresponds to the
- # output of `gcloud` tool.
- #
- # Parameter | Source
- # -------------------------|--------------------------------------------------------------------
- # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)'
- # P9K_GCLOUD_ACCOUNT | gcloud config get-value account
- # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project
- # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)'
- #
- # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'.
- #
- # Obtaining project name requires sending a request to Google servers. This can take a long time
- # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud
- # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets
- # set and gcloud prompt segment transitions to state COMPLETE.
- #
- # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL
- # and COMPLETE. You can also hide gcloud in state PARTIAL by setting
- # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and
- # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty.
- typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}'
- typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}'
-
- # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name
- # this often. Negative value disables periodic polling. In this mode project name is retrieved
- # only when the current configuration, account or project id changes.
- typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60
-
- # Custom icon.
- # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#
- # Show google_app_cred only when the command you are typing invokes one of these tools.
- # Tip: Remove the next line to always show google_app_cred.
- typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt'
-
- # Google application credentials classes for the purpose of using different colors, icons and
- # expansions with different credentials.
- #
- # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first
- # element in each pair defines a pattern against which the current kubernetes context gets
- # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion
- # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION
- # parameters, you'll see this value in your prompt. The second element of each pair in
- # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order.
- # The first match wins.
- #
- # For example, given these settings:
- #
- # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(
- # '*:*prod*:*' PROD
- # '*:*test*:*' TEST
- # '*' DEFAULT)
- #
- # If your current Google application credentials is "service_account deathray-testing x@y.com",
- # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'.
- #
- # You can define different colors, icons and content expansions for different classes:
- #
- # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28
- # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID'
- typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(
- # '*:*prod*:*' PROD # These values are examples that are unlikely
- # '*:*test*:*' TEST # to match your needs. Customize them as needed.
- '*' DEFAULT)
- typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32
- # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by
- # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference:
- # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.
- #
- # You can use the following parameters in the expansion. Each of them corresponds to one of the
- # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS.
- #
- # Parameter | JSON key file field
- # ---------------------------------+---------------
- # P9K_GOOGLE_APP_CRED_TYPE | type
- # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id
- # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email
- #
- # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'.
- typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}'
-
- ##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]###############
- # Toolbox color.
- typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=178
- # Don't display the name of the toolbox if it matches fedora-toolbox-*.
- typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}'
- # Custom icon.
- # typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # Custom prefix.
- typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='%250Fin '
-
- ###############################[ public_ip: public IP address ]###############################
- # Public IP color.
- typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94
- # Custom icon.
- # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ########################[ vpn_ip: virtual private network indicator ]#########################
- # VPN IP color.
- typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81
- # When on VPN, show just an icon without the IP address.
- # Tip: To display the private IP address when on VPN, remove the next line.
- typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=
- # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN
- # to see the name of the interface.
- typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*'
- # If set to true, show one segment per matching network interface. If set to false, show only
- # one segment corresponding to the first matching network interface.
- # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION.
- typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false
- # Custom icon.
- # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ###########[ ip: ip address and bandwidth usage for a specified network interface ]###########
- # IP color.
- typeset -g POWERLEVEL9K_IP_FOREGROUND=38
- # The following parameters are accessible within the expansion:
- #
- # Parameter | Meaning
- # ----------------------+-------------------------------------------
- # P9K_IP_IP | IP address
- # P9K_IP_INTERFACE | network interface
- # P9K_IP_RX_BYTES | total number of bytes received
- # P9K_IP_TX_BYTES | total number of bytes sent
- # P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt
- # P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt
- # P9K_IP_RX_RATE | receive rate (since last prompt)
- # P9K_IP_TX_RATE | send rate (since last prompt)
- typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+%70F⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+%215F⇡$P9K_IP_TX_RATE }%38F$P9K_IP_IP'
- # Show information for the first network interface whose name matches this regular expression.
- # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces.
- typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*'
- # Custom icon.
- # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- #########################[ proxy: system-wide http/https/ftp proxy ]##########################
- # Proxy color.
- typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68
- # Custom icon.
- # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- ################################[ battery: internal battery ]#################################
- # Show battery in red when it's below this level and not connected to power supply.
- typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20
- typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160
- # Show battery in green when it's charging or fully charged.
- typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70
- # Show battery in yellow when it's discharging.
- typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178
- # Battery pictograms going from low to high level of charge.
- typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578'
- # Don't show the remaining time to charge/discharge.
- typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
-
- #####################################[ wifi: wifi speed ]#####################################
- # WiFi color.
- typeset -g POWERLEVEL9K_WIFI_FOREGROUND=68
- # Custom icon.
- # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS).
- #
- # # Wifi colors and icons for different signal strength levels (low to high).
- # typeset -g my_wifi_fg=(68 68 68 68 68) # <-- change these values
- # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values
- #
- # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps'
- # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}'
- #
- # The following parameters are accessible within the expansions:
- #
- # Parameter | Meaning
- # ----------------------+---------------
- # P9K_WIFI_SSID | service set identifier, a.k.a. network name
- # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown
- # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second
- # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0
- # P9K_WIFI_NOISE | noise in dBm, from -120 to 0
- # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE)
-
- ####################################[ time: current time ]####################################
- # Current time color.
- typeset -g POWERLEVEL9K_TIME_FOREGROUND=66
- # Format for the current time: 09:51:02. See `man 3 strftime`.
- typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}'
- # If set to true, time will update when you hit enter. This way prompts for the past
- # commands will contain the start times of their commands as opposed to the default
- # behavior where they contain the end times of their preceding commands.
- typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
- # Custom icon.
- # typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'
- # Custom prefix.
- typeset -g POWERLEVEL9K_TIME_PREFIX='%250Fat '
-
- # Example of a user-defined prompt segment. Function prompt_example will be called on every
- # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or
- # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user.
- #
- # Type `p10k help segment` for documentation and a more sophisticated example.
- function prompt_example() {
- p10k segment -f 208 -i '⭐' -t 'hello, %n'
- }
-
- # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
- # is to generate the prompt segment for display in instant prompt. See
- # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
- #
- # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function
- # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
- # will replay these calls without actually calling instant_prompt_*. It is imperative that
- # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this
- # rule is not observed, the content of instant prompt will be incorrect.
- #
- # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If
- # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt.
- function instant_prompt_example() {
- # Since prompt_example always makes the same `p10k segment` calls, we can call it from
- # instant_prompt_example. This will give us the same `example` prompt segment in the instant
- # and regular prompts.
- prompt_example
- }
-
- # User-defined prompt segments can be customized the same way as built-in segments.
- # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208
- # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐'
-
- # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt
- # when accepting a command line. Supported values:
- #
- # - off: Don't change prompt when accepting a command line.
- # - always: Trim down prompt when accepting a command line.
- # - same-dir: Trim down prompt when accepting a command line unless this is the first command
- # typed after changing current working directory.
- typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always
-
- # Instant prompt mode.
- #
- # - off: Disable instant prompt. Choose this if you've tried instant prompt and found
- # it incompatible with your zsh configuration files.
- # - quiet: Enable instant prompt and don't print warnings when detecting console output
- # during zsh initialization. Choose this if you've read and understood
- # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
- # - verbose: Enable instant prompt and print a warning when detecting console output during
- # zsh initialization. Choose this if you've never tried instant prompt, haven't
- # seen the warning, or if you are unsure what this all means.
- typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose
-
- # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.
- # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload
- # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you
- # really need it.
- typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
-
- # If p10k is already loaded, reload configuration.
- # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.
- (( ! $+functions[p10k] )) || p10k reload
-}
-
-# Tell `p10k configure` which file it should overwrite.
-typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a}
-
-(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}
-'builtin' 'unset' 'p10k_config_opts'
diff --git a/config/home-manager/base.nix b/config/home-manager/base.nix
deleted file mode 100644
index fd9035a9..00000000
--- a/config/home-manager/base.nix
+++ /dev/null
@@ -1,120 +0,0 @@
-desktop: {
- pkgs,
- system,
- lib,
- config,
- ...
-}: {
- imports =
- [
- (import ../programs/zsh.nix desktop)
- ../programs/tmux.nix
- (import ../programs/vim desktop)
- ]
- ++ (
- if desktop
- then [
- ../programs/mail.nix
- ../programs/taskwarrior.nix
- ]
- else []
- );
- programs = {
- zsh = {
- enable = true;
- oh-my-zsh = {
- enable = true;
- };
- initExtraBeforeCompInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
-
- initExtra =
- if system != "riscv64-linux"
- then ''
- [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
-
- test -n "$KITTY_INSTALLATION_DIR" || export KITTY_INSTALLATION_DIR=${pkgs.kitty}/lib/kitty
- export KITTY_SHELL_INTEGRATION=enabled
- autoload -Uz -- "$KITTY_INSTALLATION_DIR"/shell-integration/zsh/kitty-integration
- kitty-integration
- unfunction kitty-integration
- ''
- else "";
-
- plugins = [
- ];
- };
- autojump.enable = true;
- jq.enable = true;
- ledger.enable = true;
- };
- home.file.".p10k.zsh".source = ./.p10k.zsh;
-
- home = {
- shellAliases =
- {
- cat = "bat";
- less = "bat";
- }
- // (
- if system != "riscv64-linux"
- then {
- icat = "${pkgs.kitty}/bin/kitty +kitten icat";
- d = "${pkgs.kitty}/bin/kitty +kitten diff";
- hg = "${pkgs.kitty}/bin/kitty +kitten hyperlinked_grep";
- #ssh = "${pkgs.kitty}/bin/kitty +kitten ssh";
- cargo = "${pkgs.cargo-mommy}/bin/cargo-mommy";
- }
- else {}
- );
- packages = with pkgs;
- [
- mosh
- ripgrep
- gh
- htop
- sops
- progress
- hexyl
- mc
- rclone
- libarchive
- p7zip
- unrar
- ]
- ++ (
- if desktop
- then [
- yubikey-manager
- yt-dlp
- oxipng
- jpegoptim
- #picard
- easytag
- alejandra
- yubico-piv-tool
- ]
- else []
- );
- sessionVariables = if desktop then {
- QT_PLUGIN_PATH = lib.mkForce "\${QT_PLUGIN_PATH}:${config.i18n.inputMethod.package}/${pkgs.qt6.qtbase.qtPluginPrefix}:${pkgs.kdePackages.kimageformats}/${pkgs.qt6.qtbase.qtPluginPrefix}";
- } else {};
- };
-
- programs.eza = {
- enable = true;
- enableZshIntegration = true;
- };
-
- programs.bat = {
- enable = true;
- };
-
- programs.fzf = {
- enable = true;
- tmux.enableShellIntegration = true;
- };
- home.stateVersion = "22.05";
- manual.manpages.enable = false; # broken
-
- _module.args.withNSFW = false;
-}
diff --git a/config/home-manager/darkkirb.nix b/config/home-manager/darkkirb.nix
deleted file mode 100644
index f8cb5f2d..00000000
--- a/config/home-manager/darkkirb.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- desktop,
- args,
-}: {pkgs, ...}: {
- imports =
- [
- (import ./base.nix desktop)
- ../programs/ssh.nix
- (import ../programs/git.nix desktop)
- ../programs/direnv.nix
- ]
- ++ (
- if desktop
- then [
- #../programs/sway.nix
- ../programs/firefox.nix
- ../programs/waybar.nix
- ../programs/ims.nix
- ../programs/syncthing.nix
- ../programs/plover.nix
- (import ../games/default.nix args)
- ../programs/yubikey.nix
- ../programs/keybase.nix
- ../programs/keepass.nix
- ../programs/vscode
- ../programs/misc.nix
- ../programs/zk.nix
- ../programs/fcitx.nix
- ../programs/gpg.nix
- ../programs/zoom.nix
- ]
- else []
- );
-}
diff --git a/config/home-manager/miifox.nix b/config/home-manager/miifox.nix
deleted file mode 100644
index 49b6773f..00000000
--- a/config/home-manager/miifox.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{pkgs, ...}: {
- imports = [
- (import ./base.nix false)
- ];
-}
diff --git a/config/home-manager/root.nix b/config/home-manager/root.nix
deleted file mode 100644
index 1957fd33..00000000
--- a/config/home-manager/root.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{pkgs, ...}: {
- imports = [
- (import ./base.nix false)
- ../programs/builders.nix
- ];
-}
diff --git a/config/home.nix b/config/home.nix
deleted file mode 100644
index 93838435..00000000
--- a/config/home.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-_: {
- home-manager.useGlobalPkgs = true;
- home-manager.useUserPackages = true;
- home-manager.users.root = import ./home-manager/root.nix;
-}
diff --git a/config/installer.nix b/config/installer.nix
deleted file mode 100644
index e7128163..00000000
--- a/config/installer.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{nixpkgs, ...}: {
- imports = [
- "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix"
- ];
- networking.hostId = "8425e349";
-}
diff --git a/config/instance-20221213-1915.nix b/config/instance-20221213-1915.nix
deleted file mode 100644
index dde1ad53..00000000
--- a/config/instance-20221213-1915.nix
+++ /dev/null
@@ -1,149 +0,0 @@
-{
- config,
- lib,
- modulesPath,
- ...
-} @ args: {
- networking.hostName = "instance-20221213-1915";
- networking.hostId = "746d4523";
-
- imports = [
- (modulesPath + "/profiles/qemu-guest.nix")
- ./systemd-boot.nix
- ./server.nix
- ./wireguard/public-server.nix
- ./services/named-submissive.nix
- ./services/shitalloverme.nix
- ./users/remote-build.nix
- ./services/atticd.nix
- ./services/minecraft.nix
- ./services/postgres.nix
- ./services/uptime-kuma.nix
- ./services/reverse-proxy.nix
- ./wireguard
- ./zfs.nix
- #./services/kubernetes.nix
- ./services/gitea.nix
- ./services/chir-rs.nix
- ];
-
- boot.initrd.availableKernelModules = ["xhci_pci" "virtio_pci" "usbhid"];
- boot.initrd.kernelModules = [];
- boot.kernelModules = [];
- boot.extraModulePackages = [];
-
- fileSystems."/" = {
- device = "tank/local/root";
- fsType = "zfs";
- };
-
- fileSystems."/boot" = {
- device = "/dev/disk/by-uuid/6557-C4A0";
- fsType = "vfat";
- };
-
- fileSystems."/nix" = {
- device = "tank/local/nix";
- fsType = "zfs";
- };
-
- fileSystems."/persist" = {
- device = "tank/safe/persist";
- fsType = "zfs";
- neededForBoot = true;
- };
-
- fileSystems."/home" = {
- device = "tank/safe/home";
- fsType = "zfs";
- };
-
- networking.useDHCP = lib.mkDefault true;
-
- # https://grahamc.com/blog/erase-your-darlings
- boot.initrd.postDeviceCommands = lib.mkAfter ''
- zfs rollback -r tank/local/root@blank
- '';
-
- services.openssh = {
- hostKeys = [
- {
- path = "/persist/ssh/ssh_host_ed25519_key";
- type = "ed25519";
- }
- {
- path = "/persist/ssh/ssh_host_rsa_key";
- type = "rsa";
- bits = 4096;
- }
- ];
- };
-
- systemd.tmpfiles.rules = [
- "L /var/lib/acme - - - - /persist/var/lib/acme"
- "L /var/lib/tailscale/tailscaled.state - - - - /persist/var/lib/tailscale/tailscaled.state"
- "d /build - - - - -"
- "L /var/lib/ipfs - - - - /persist/var/lib/ipfs"
- "L /var/lib/uptime-kuma - - - - /persist/var/lib/uptime-kuma"
- ];
-
- services.postgresql.dataDir = "/persist/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}";
-
- networking.wireguard.interfaces."wg0".ips = ["fd0d:a262:1fa6:e621:746d:4523:5c04:1453/64"];
- home-manager.users.darkkirb = import ./home-manager/darkkirb.nix {
- desktop = false;
- inherit args;
- };
- nix.settings.cores = 4;
- nix.settings.max-jobs = 4;
- nix.settings.system-features = [
- "nixos-test"
- "big-parallel"
- "benchmark"
- "gccarch-armv8-a"
- "gccarch-armv8.1-a"
- "gccarch-armv8.2-a"
- "ca-derivations"
- ];
- nix.daemonCPUSchedPolicy = "idle";
- nix.daemonIOSchedClass = "idle";
- boot.binfmt.emulatedSystems = [
- "riscv32-linux"
- "riscv64-linux"
- ];
-
- system.stateVersion = "22.11";
-
- sops.secrets."root/.ssh/id_ed25519" = {
- owner = "root";
- path = "/root/.ssh/id_ed25519";
- };
- sops.secrets."services/ssh/host-key" = {
- owner = "root";
- path = "/etc/secrets/initrd/ssh_host_ed25519_key";
- };
- sops.age.sshKeyPaths = lib.mkForce ["/persist/ssh/ssh_host_ed25519_key"];
- services.bind.forwarders = lib.mkForce [];
- boot.loader.systemd-boot.configurationLimit = lib.mkForce 1;
- services.tailscale.useRoutingFeatures = "server";
- services.postgresql.settings = {
- max_connections = 200;
- shared_buffers = "6GB";
- effective_cache_size = "18GB";
- maintenance_work_mem = "1536MB";
- checkpoint_completion_target = 0.9;
- wal_buffers = "16MB";
- default_statistics_target = 100;
- random_page_cost = 1.1;
- effective_io_concurrency = 200;
- work_mem = "15728kB";
- min_wal_size = "1GB";
- max_wal_size = "4GB";
- max_worker_processes = 4;
- max_parallel_workers_per_gather = 2;
- max_parallel_workers = 4;
- max_parallel_maintenance_workers = 2;
- };
-
- services.restic.backups.sysbackup.paths = ["/persist"];
-}
diff --git a/config/kde.nix b/config/kde.nix
deleted file mode 100644
index 4a465e42..00000000
--- a/config/kde.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- security.pam.services.sddm.u2fAuth = true;
- services.displayManager.sddm = {
- enable = true;
- wayland.enable = true;
- wayland.compositor = "kwin";
- };
- services.xserver = {
- desktopManager.plasma6.enable = true;
- #desktopManager.plasma5.enable = true;
- displayManager.defaultSession = "plasma";
- #displayManager.defaultSession = "plasmawayland";
- };
-}
diff --git a/config/nas.nix b/config/nas.nix
deleted file mode 100644
index 21a7d522..00000000
--- a/config/nas.nix
+++ /dev/null
@@ -1,211 +0,0 @@
-{
- config,
- modulesPath,
- lib,
- nixos-hardware,
- nixpkgs,
- pkgs,
- ...
-} @ args: {
- networking.hostName = "nas";
- networking.hostId = "70af00ed";
-
- imports = [
- (modulesPath + "/installer/scan/not-detected.nix")
- ./systemd-boot.nix
- ./services/tpm2.nix
- ./server.nix
- ./services/hydra.nix
- nixos-hardware.nixosModules.common-cpu-amd
- nixos-hardware.nixosModules.common-pc-ssd
- ./services/syncthing.nix
- ../modules/tc-cake.nix
- ./services/cups.nix
- ./services/iscsi.nix
- ./services/docker.nix
- ./users/remote-build.nix
- ./services/nfs.nix
- ./services/tempo.nix
- ./services/loki.nix
- ./services/prometheus.nix
- ./services/yiff-stash.nix
- ./services/reverse-proxy.nix
- ./services/jellyfin.nix
- ./services/mautrix-discord.nix
- ./services/mautrix-telegram.nix
- ./services/mautrix-whatsapp.nix
- ./services/mautrix-signal.nix
- ./services/synapse.nix
- ./services/heisenbridge.nix
- #./services/kubernetes.nix
- ./services/forgejo-runner.nix
- ./services/renovate.nix
- ./services/mautrix-slack.nix
- ];
-
- hardware.cpu.amd.updateMicrocode = true;
- boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" "bcache"];
- boot.initrd.kernelModules = ["igb"];
- boot.kernelModules = ["kvm-amd"];
- boot.extraModulePackages = [
- config.boot.kernelPackages.zenpower
- ];
-
- fileSystems."/" = {
- device = "/dev/bcache0";
- fsType = "btrfs";
- options = ["subvol=root" "compress=zstd"];
- };
-
- fileSystems."/home" = {
- device = "/dev/bcache0";
- fsType = "btrfs";
- options = ["subvol=home" "compress=zstd"];
- };
-
- fileSystems."/nix" = {
- device = "/dev/bcache0";
- fsType = "btrfs";
- options = ["subvol=nix" "compress=zstd" "noatime"];
- };
-
- services.snapper.configs.main = {
- SUBVOLUME = "/";
- TIMELINE_LIMIT_HOURLY = 5;
- TIMELINE_LIMIT_DAILY = 7;
- TIMELINE_LIMIT_WEEKLY = 4;
- TIMELINE_LIMIT_MONTHLY = 12;
- TIMELINE_LIMIT_YEARLY = 0;
- };
- services.beesd.filesystems.root = {
- spec = "/";
- hashTableSizeMB = 2048;
- verbosity = "crit";
- extraOptions = ["--loadavg-target" "5.0"];
- };
-
- fileSystems."/boot" = {
- device = "/dev/nvme0n1p1";
- fsType = "vfat";
- };
-
- environment.etc."sysconfig/lm_sensors".text = ''
- # Generated by sensors-detect on Sun Apr 24 08:31:51 2022
- # This file is sourced by /etc/init.d/lm_sensors and defines the modules to
- # be loaded/unloaded.
- #
- # The format of this file is a shell script that simply defines variables:
- # HWMON_MODULES for hardware monitoring driver modules, and optionally
- # BUS_MODULES for any required bus driver module (for example for I2C or SPI).
-
- HWMON_MODULES="it87"
- '';
- nix.settings.cores = 12;
- nix.settings.system-features = [
- "kvm"
- "nixos-test"
- "big-parallel"
- "benchmark"
- "gccarch-znver1"
- "gccarch-skylake"
- "ca-derivations"
- ];
- boot.binfmt.emulatedSystems = [
- "armv7l-linux"
- "powerpc-linux"
- "powerpc64-linux"
- "powerpc64le-linux"
- "wasm32-wasi"
- "riscv32-linux"
- "riscv64-linux"
- ];
- hardware.enableRedistributableFirmware = true;
- nix.settings.substituters = lib.mkForce [
- "https://attic.chir.rs/chir-rs/"
- "https://cache.nixos.org/"
- ];
- nix.daemonCPUSchedPolicy = "idle";
- nix.daemonIOSchedClass = "idle";
-
- system.stateVersion = "22.05";
- home-manager.users.darkkirb = import ./home-manager/darkkirb.nix {
- desktop = false;
- inherit args;
- };
-
- networking.tc_cake = {
- enp2s0f0u4 = {
- disableOffload = true;
- shapeEgress = {
- bandwidth = "4mbit";
- extraArgs = "docsis nat ack-filter";
- };
- shapeIngress = {
- bandwidth = "33mbit";
- ifb = "ifb4enp2s0f0u4";
- };
- };
- };
- services.postgresql.settings = {
- max_connections = 200;
- shared_buffers = "4GB";
- effective_cache_size = "12GB";
- maintenance_work_mem = "1GB";
- checkpoint_completion_target = 0.9;
- wal_buffers = "16MB";
- default_statistics_target = 100;
- random_page_cost = 1.1;
- effective_io_concurrency = 200;
- work_mem = "5242kB";
- min_wal_size = "1GB";
- max_wal_size = "4GB";
- max_worker_processes = 12;
- max_parallel_workers_per_gather = 4;
- max_parallel_workers = 12;
- max_parallel_maintenance_workers = 4;
- };
- services.tailscale.useRoutingFeatures = "both";
- hardware.sane.brscan4.enable = true;
-
- swapDevices = [
- {
- device = "/dev/sda2";
- }
- {
- device = "/dev/sdb2";
- }
- {
- device = "/dev/sdc2";
- }
- ];
-
- hardware.opengl = {
- enable = true;
- driSupport32Bit = true;
- };
-
- services.xserver.videoDrivers = ["nvidia"];
-
- hardware.nvidia = {
- modesetting.enable = true;
- powerManagement.enable = false;
- powerManagement.finegrained = false;
- open = false;
- nvidiaSettings = true;
- package = config.boot.kernelPackages.nvidiaPackages.stable;
- };
- services.restic.backups.sysbackup = {
- paths = ["/media"];
- pruneOpts = [
- "--keep-daily 7"
- "--keep-weekly 4"
- "--keep-monthly 12"
- "--keep-yearly 10"
- ];
- };
- virtualisation.docker = {
- enable = true;
- #enableNvidia = true;
- };
- environment.systemPackages = with pkgs; [docker runc];
-}
diff --git a/config/nix.nix b/config/nix.nix
deleted file mode 100644
index 9007ed95..00000000
--- a/config/nix.nix
+++ /dev/null
@@ -1,208 +0,0 @@
-{
- pkgs,
- lib,
- config,
- system,
- attic,
- ...
-}: {
- imports = [
- ./workarounds
- ];
- nixpkgs.config.allowUnfree = true;
- nix = {
- settings = {
- sandbox = true;
- trusted-users = ["@wheel" "remote-build"];
- require-sigs = true;
- substituters = [
- "https://attic.chir.rs/chir-rs/"
- "https://hydra.int.chir.rs"
- ];
- trusted-public-keys = [
- "nixcache:8KKuGz95Pk4UJ5W/Ni+pN+v+LDTkMMFV4yrGmAYgkDg="
- "hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs="
- "chir-rs:rzK1Czm3RqBbZLnXYrLM6JyOhfr6Z/8lhACIPO/LNFQ="
- ];
- auto-optimise-store = true;
- };
- extraOptions = ''
- experimental-features = nix-command flakes ca-derivations
- '';
- gc = {
- automatic = true;
- dates = "weekly";
- options = "--delete-older-than 7d";
- };
- buildMachines = with lib;
- mkMerge [
- (mkIf (config.networking.hostName != "instance-20221213-1915") [
- {
- hostName = "build-aarch64";
- systems = [
- "aarch64-linux"
- "riscv32-linux"
- "riscv64-linux"
- ];
- maxJobs = 4;
- speedFactor = 1;
- supportedFeatures = ["nixos-test" "benchmark" "ca-derivations" "gccarch-armv8-a" "gccarch-armv8.1-a" "gccarch-armv8.2-a" "big-parallel"];
- }
- ])
- (mkIf (config.networking.hostName != "nas") [
- {
- hostName = "build-nas";
- systems = [
- "i686-linux"
- "x86_64-linux"
- "armv7l-linux"
- "powerpc-linux"
- "powerpc64-linux"
- "powerpc64le-linux"
- "wasm32-wasi"
- "riscv32-linux"
- "riscv64-linux"
- ];
- maxJobs = 12;
- speedFactor = 1;
- supportedFeatures = [
- "kvm"
- "nixos-test"
- "big-parallel"
- "benchmark"
- "gccarch-znver1"
- "gccarch-skylake"
- "ca-derivations"
- ];
- }
- ])
- (mkIf (config.networking.hostName != "rainbow-resort") [
- {
- hostName = "build-rainbow-resort";
- systems = [
- "i686-linux"
- "x86_64-linux"
- "armv7l-linux"
- "powerpc-linux"
- "powerpc64-linux"
- "powerpc64le-linux"
- "wasm32-wasi"
- "riscv32-linux"
- "riscv64-linux"
- ];
- maxJobs = 16;
- speedFactor = 1;
- supportedFeatures = [
- "kvm"
- "nixos-test"
- "big-parallel"
- "benchmark"
- "gccarch-skylake-avx512"
- "gccarch-znver3"
- "gccarch-znver2"
- "gccarch-znver1"
- "gccarch-skylake"
- "ca-derivations"
- ];
- }
- ])
- (mkIf (config.networking.hostName != "vf2") [
- {
- hostName = "build-riscv";
- systems = [
- "riscv32-linux"
- "riscv64-linux"
- ];
- maxJobs = 4;
- speedFactor = 2;
- supportedFeatures = [
- "nixos-test"
- "big-parallel"
- "benchmark"
- "ca-derivations"
- # There are many more combinations but i simply do not care lol
- "gccarch-rv64gc_zba_zbb"
- "gccarch-rv64gc_zba"
- "gccarch-rv64gc_zbb"
- "gccarch-rv64gc"
- "gccarch-rv32gc_zba_zbb"
- "gccarch-rv32gc_zba"
- "gccarch-rv32gc_zbb"
- "gccarch-rv32gc"
- "native-riscv"
- ];
- }
- ])
- ];
- distributedBuilds = true;
- };
- systemd.services.nix-daemon.environment.TMPDIR = "/build";
- systemd.services.nixos-upgrade = {
- description = "NixOS Upgrade";
-
- restartIfChanged = false;
- unitConfig.X-StopOnRemoval = false;
-
- serviceConfig.Type = "oneshot";
-
- path = with pkgs; [
- coreutils
- gnutar
- xz.bin
- gzip
- gitMinimal
- config.nix.package.out
- config.programs.ssh.package
- jq
- curl
- ];
-
- script = lib.mkDefault ''
- #!${pkgs.bash}/bin/bash
- set -ex
- builds=$(${pkgs.curl}/bin/curl -H 'accept: application/json' https://hydra.int.chir.rs/jobset/flakes/${
- if config.networking.hostName != "vf2"
- then "nixos-config"
- else "nixos-config-riscv"
- }/evals | ${pkgs.jq}/bin/jq -r '.evals[0].builds[]')
- for build in $builds; do
- doc=$(${pkgs.curl}/bin/curl -H 'accept: application/json' https://hydra.int.chir.rs/build/$build)
- jobname=$(echo $doc | ${pkgs.jq}/bin/jq -r '.job')
- if [ "$jobname" = "${config.networking.hostName}.${system}" ]; then
- drvname=$(echo $doc | ${pkgs.jq}/bin/jq -r '.drvpath')
- output=$(${pkgs.nix}/bin/nix-store -r $drvname)
-
- ${pkgs.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set $output
-
- ${
- if config.networking.hostName != "nixos-8gb-fsn1-1"
- then ''
- $output/bin/switch-to-configuration boot
- booted="$(${pkgs.coreutils}/bin/readlink /run/booted-system/{initrd,kernel,kernel-modules})"
- built="$(${pkgs.coreutils}/bin/readlink $output/{initrd,kernel,kernel-modules})"
- if [ "$booted" = "$built" ]; then
- $output/bin/switch-to-configuration switch
- else
- ${pkgs.systemd}/bin/shutdown -r +1
- fi
- exit
- ''
- else "$output/bin/switch-to-configuration switch"
- }
- fi
- done
- '';
- after = ["network-online.target"];
- wants = ["network-online.target"];
- };
- systemd.timers.nixos-upgrade = {
- enable = true;
- description = "Automatically update nixos";
- requires = ["nixos-upgrade.service"];
- wantedBy = ["multi-user.target"];
- timerConfig = {
- OnUnitActiveSec = "30min";
- RandomizedDelaySec = "1h";
- };
- };
-}
diff --git a/config/nixos-8gb-fsn1-1.nix b/config/nixos-8gb-fsn1-1.nix
deleted file mode 100644
index 6bbd62e6..00000000
--- a/config/nixos-8gb-fsn1-1.nix
+++ /dev/null
@@ -1,215 +0,0 @@
-{
- lib,
- modulesPath,
- pkgs,
- config,
- system,
- ...
-} @ args: {
- networking.hostName = "nixos-8gb-fsn1-1";
- networking.hostId = "73561e1f";
-
- imports = [
- (modulesPath + "/profiles/qemu-guest.nix")
- ./grub.nix
- ./server.nix
- ./services/named.nix
- ./services/grafana.nix
- ./users/miifox.nix
- ./services/postgres.nix
- ./services/dovecot.nix
- ./services/postfix.nix
- ./services/reverse-proxy.nix
- ./services/matrix-media-repo.nix
- ./bittorrent-blocker.nix
- ./services/akkoma
- ./services/peertube
- ./services/rspamd.nix
- ./wireguard/public-server.nix
- ./services/shitalloverme.nix
- ./services/initrd-ssh.nix
- ./wireguard
- ./zfs.nix
- #./services/kubernetes.nix
- ];
-
- boot.initrd.availableKernelModules = ["ata_piix" "virtio_pci" "virtio_scsi" "xhci_pci" "sd_mod" "sr_mod"];
- boot.initrd.kernelModules = [];
- boot.kernelModules = [];
- boot.extraModulePackages = [];
- boot.supportedFilesystems = ["zfs"];
- boot.loader.grub.devices = ["/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_16151622"];
- boot.loader.timeout = 5;
- boot.initrd.luks.devices = {
- disk0 = {
- device = "/dev/disk/by-partuuid/29ccd4c9-5ef5-a146-8e42-9244f712baca";
- };
- };
-
- fileSystems."/" = {
- device = "tank/nixos";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/nix" = {
- device = "tank/nixos/nix";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/etc" = {
- device = "tank/nixos/etc";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/var" = {
- device = "tank/nixos/var";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/var/lib" = {
- device = "tank/nixos/var/lib";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/var/lib/minio" = {
- device = "tank/nixos/var/lib/minio";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/var/lib/minio/disk0" = {
- device = "tank/nixos/var/lib/minio/disk0";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/var/lib/minio/disk1" = {
- device = "tank/nixos/var/lib/minio/disk1";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/var/lib/minio/disk2" = {
- device = "tank/nixos/var/lib/minio/disk2";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/var/lib/minio/disk3" = {
- device = "tank/nixos/var/lib/minio/disk3";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/var/log" = {
- device = "tank/nixos/var/log";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/var/spool" = {
- device = "tank/nixos/var/spool";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/home" = {
- device = "tank/userdata/home";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/root" = {
- device = "tank/userdata/home/root";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/home/darkkirb" = {
- device = "tank/userdata/home/darkkirb";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/home/miifox" = {
- device = "tank/userdata/home/miifox";
- fsType = "zfs";
- options = ["zfsutil"];
- };
-
- fileSystems."/boot" = {
- device = "/dev/disk/by-uuid/8E14-4366";
- fsType = "vfat";
- options = ["X-mount.mkdir"];
- };
-
- swapDevices = [];
-
- system.stateVersion = "21.11";
-
- systemd.network = {
- enable = true;
- networks."ens3".extraConfig = ''
- [Match]
- Name = ens3
- [Network]
- Address = 2a01:4f8:1c17:d953:b4e1:08ff:e658:6f49/64
- Gateway = fe80::1
- '';
- };
-
- networking.wireguard.interfaces."wg0".ips = ["fd0d:a262:1fa6:e621:b4e1:08ff:e658:6f49/64"];
- home-manager.users.darkkirb = import ./home-manager/darkkirb.nix {
- desktop = false;
- inherit args;
- };
- nix.settings.cores = 2;
- nix.settings.max-jobs = 2;
- nix.daemonCPUSchedPolicy = "idle";
- nix.daemonIOSchedClass = "idle";
-
- nix.settings.system-features = [
- "kvm"
- "nixos-test"
- "big-parallel"
- "benchmark"
- "gccarch-skylake"
- "ca-derivations"
- ];
- nix.settings.auto-optimise-store = true;
-
- services.postgresql.settings = {
- max_connections = 200;
- shared_buffers = "1GB";
- effective_cache_size = "3GB";
- maintenance_work_mem = "256MB";
- checkpoint_completion_target = 0.9;
- wal_buffers = "16MB";
- default_statistics_target = 100;
- random_page_cost = 1.1;
- effective_io_concurrency = 200;
- work_mem = "52422kB";
- min_wal_size = "1GB";
- max_wal_size = "4GB";
- max_worker_processes = 2;
- max_parallel_workers_per_gather = 1;
- max_parallel_workers = 2;
- max_parallel_maintenance_workers = 1;
- };
-
- services.resolved.enable = false;
- services.bind.forwarders = lib.mkForce [];
- services.tailscale.useRoutingFeatures = "server";
- services.caddy.virtualHosts."darkkirb.de" = {
- useACMEHost = "darkkirb.de";
- logFormat = pkgs.lib.mkForce "";
- extraConfig = ''
- redir https://lotte.chir.rs
- '';
- };
-}
diff --git a/config/programs/builders.nix b/config/programs/builders.nix
deleted file mode 100644
index 0d893adf..00000000
--- a/config/programs/builders.nix
+++ /dev/null
@@ -1,42 +0,0 @@
-{config, ...}: {
- programs.ssh = {
- enable = true;
- matchBlocks = {
- "build-nas" = {
- hostname = "nas.int.chir.rs";
- identitiesOnly = true;
- identityFile = "${config.home.homeDirectory}/.ssh/builder_id_ed25519";
- port = 22;
- user = "remote-build";
- };
- "build-rainbow-resort" = {
- hostname = "rainbow-resort.int.chir.rs";
- identitiesOnly = true;
- identityFile = "${config.home.homeDirectory}/.ssh/builder_id_ed25519";
- port = 22;
- user = "remote-build";
- };
- "build-aarch64" = {
- hostname = "instance-20221213-1915.int.chir.rs";
- identitiesOnly = true;
- identityFile = "${config.home.homeDirectory}/.ssh/builder_id_ed25519";
- port = 22;
- user = "remote-build";
- };
- "backup" = {
- hostname = "backup.int.chir.rs";
- identitiesOnly = true;
- identityFile = "${config.home.homeDirectory}/.ssh/builder_id_ed25519";
- port = 22;
- user = "backup";
- };
- "build-riscv" = {
- hostname = "vf2.int.chir.rs";
- identitiesOnly = true;
- identityFile = "${config.home.homeDirectory}/.ssh/builder_id_ed25519";
- port = 22;
- user = "remote-build";
- };
- };
- };
-}
diff --git a/config/programs/calendar.nix b/config/programs/calendar.nix
deleted file mode 100644
index 4a57a07f..00000000
--- a/config/programs/calendar.nix
+++ /dev/null
@@ -1,4 +0,0 @@
-{...}: {
- accounts.calendar.accounts.lotte = {
- };
-}
diff --git a/config/programs/direnv.nix b/config/programs/direnv.nix
deleted file mode 100644
index 37f6d994..00000000
--- a/config/programs/direnv.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-_: {
- programs.direnv = {
- enable = true;
- nix-direnv.enable = true;
- };
-}
diff --git a/config/programs/fcitx.nix b/config/programs/fcitx.nix
deleted file mode 100644
index 5f6b502d..00000000
--- a/config/programs/fcitx.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{pkgs, ...}: {
- i18n.inputMethod = {
- enabled = "fcitx5";
- fcitx5.addons = with pkgs; [fcitx5-chinese-addons fcitx5-table-extra fcitx5-table-other fcitx5-gtk fcitx5-mozc];
- };
-}
diff --git a/config/programs/firefox.nix b/config/programs/firefox.nix
deleted file mode 100644
index 63666152..00000000
--- a/config/programs/firefox.nix
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- pkgs,
- firefox,
- ...
-}: {
- programs.firefox = {
- enable = true;
- profiles = {
- unhardened = {
- id = 1;
- };
- default = {
- userChrome = ''
- /* Hide tab bar in FF Quantum */
- @-moz-document url("chrome://browser/content/browser.xul") {
- #TabsToolbar {
- visibility: collapse !important;
- margin-bottom: 21px !important;
- }
-
- #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
- visibility: collapse !important;
- }
- }
- '';
- settings = {
- "font.default.x-western" = "sans-serif";
- "font.name-list.monospace.x-western" = "monospace, nasin-nanpa";
- "font.name-list.sans-serif.x-western" = "sans-serif, nasin-nanpa";
- "font.name-list.serif.x-western" = "sans-serif, nasin-nanpa";
- };
- id = 0;
- };
- };
- };
-}
diff --git a/config/programs/git.nix b/config/programs/git.nix
deleted file mode 100644
index d7106443..00000000
--- a/config/programs/git.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-desktop: {pkgs, ...}: {
- programs.git = {
- enable = true;
- package =
- if desktop
- then pkgs.gitAndTools.gitFull
- else pkgs.git;
- lfs.enable = true;
- userEmail = "lotte@chir.rs";
- userName = "Charlotte 🦝 Delenk";
- extraConfig = {
- init.defaultBranch = "main";
- merge.conflictstyle = "diff3";
- push.autoSetupRemote = true;
- rerere.enabled = true;
- };
- delta.enable = true;
- };
-}
diff --git a/config/programs/gpg.nix b/config/programs/gpg.nix
deleted file mode 100644
index 6af23caa..00000000
--- a/config/programs/gpg.nix
+++ /dev/null
@@ -1,50 +0,0 @@
-{pkgs, ...}: {
- programs.gpg = {
- enable = true;
- publicKeys = [
- {
- source = ../../keys/lotte_chir.rs.pgp;
- trust = 5;
- }
- {
- source = ../../keys/miifox_miifox.net.pgp;
- trust = 3;
- }
- {
- source = ../../keys/mdelenk_hs-mittweida.de.pgp;
- trust = 5;
- }
- ];
- scdaemonSettings = {
- disable-ccid = true;
- pcsc-driver = "${pkgs.pcsclite.out}/lib/libpcsclite.so.1";
- reader-port = "Yubico YubiKey";
- };
- settings = {
- # https://github.com/drduh/config/blob/master/gpg.conf
- personal-cipher-preferences = "AES256 AES192 AES";
- personal-digest-preferences = "SHA512 SHA384 SHA256";
- personal-compress-preferences = "ZLIB BZIP2 ZIP Uncompressed";
- default-preference-list = "SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed";
- cert-digest-algo = "SHA512";
- s2k-digest-algo = "SHA512";
- s2k-cipher-algo = "AES256";
- charset = "utf-8";
- fixed-list-mode = true;
- no-comments = true;
- no-emit-version = true;
- no-greeting = true;
- keyid-format = "0xlong";
- list-options = "show-uid-validity";
- verify-options = "show-uid-validity";
- with-fingerprint = true;
- with-key-origin = true;
- require-cross-certification = true;
- no-symkey-cache = true;
- use-agent = true;
- throw-keyids = true;
- keyserver = ["hkps://keys.openpgp.org" "hkps://keyserver.ubuntu.com:443" "hkps://hkps.pool.sks-keyservers.net" "hkps://pgp.ocf.berkeley.edu"];
- auto-key-locate = ["local" "dane" "cert" "wkd"];
- };
- };
-}
diff --git a/config/programs/ims.nix b/config/programs/ims.nix
deleted file mode 100644
index 31090bde..00000000
--- a/config/programs/ims.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- system,
- pkgs,
- ...
-}: {
- home.packages = with pkgs;
- [
- nheko
- twinkle
- tokodon
- telegram-desktop
- ]
- ++ (
- if system == "x86_64-linux"
- then [
- pkgs.discord
- ]
- else []
- );
-}
diff --git a/config/programs/kdeconnect.nix b/config/programs/kdeconnect.nix
deleted file mode 100644
index dd3f085d..00000000
--- a/config/programs/kdeconnect.nix
+++ /dev/null
@@ -1,4 +0,0 @@
-{...}: {
- services.kdeconnect.enable = true;
- services.kdeconnect.indicator = true;
-}
diff --git a/config/programs/keepass.nix b/config/programs/keepass.nix
deleted file mode 100644
index 000346d9..00000000
--- a/config/programs/keepass.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- pkgs,
- lib,
- ...
-}: {
- home.packages = [pkgs.keepassxc];
- systemd.user.services.keepassxc = {
- Unit = {
- Description = "keepassxc";
- After = ["graphical-session-pre.target"];
- PartOf = ["graphical-session.target"];
- };
- Install.WantedBy = ["graphical-session.target"];
- Service = {
- ExecStart = "${pkgs.keepassxc}/bin/keepassxc";
- };
- };
-}
diff --git a/config/programs/keybase.nix b/config/programs/keybase.nix
deleted file mode 100644
index 79548d0c..00000000
--- a/config/programs/keybase.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{nixpkgs, ...}: let
- x86_64-linux-pkgs = import nixpkgs {system = "x86_64-linux";};
-in {
- services.keybase.enable = true;
- services.kbfs.enable = true;
- home.packages = [
- x86_64-linux-pkgs.keybase-gui
- ];
-}
diff --git a/config/programs/kicad.nix b/config/programs/kicad.nix
deleted file mode 100644
index c670405b..00000000
--- a/config/programs/kicad.nix
+++ /dev/null
@@ -1,3 +0,0 @@
-{pkgs, ...}: {
- home.packages = with pkgs; [kicad-unstable-small];
-}
diff --git a/config/programs/kitty.nix b/config/programs/kitty.nix
deleted file mode 100644
index 4db7acae..00000000
--- a/config/programs/kitty.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-_: {
- programs.kitty = {
- enable = true;
- font.name = "FiraCode Nerd Font Mono";
- settings = {
- disable_ligatures = "cursor";
- shell_integration = "disabled";
- font_size = 8;
- };
- extraConfig = ''
- symbol_map U+F1900-U+F19FF Fairfax HD
- narrow_symbols U+F1900-U+F19FF 2
- '';
- };
-}
diff --git a/config/programs/mail.nix b/config/programs/mail.nix
deleted file mode 100644
index 347648ce..00000000
--- a/config/programs/mail.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{pkgs, ...}: {
- programs.thunderbird = {
- enable = true;
- profiles.main = {
- withExternalGnupg = true;
- isDefault = true;
- };
- };
-}
diff --git a/config/programs/mako.nix b/config/programs/mako.nix
deleted file mode 100644
index 3ff2bdfc..00000000
--- a/config/programs/mako.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{pkgs, ...}: {
- programs.mako = {
- enable = true;
- defaultTimeout = 30000;
- };
- systemd.user.services.mako = {
- Unit = {
- Description = "mako";
- After = ["graphical-session-pre.target"];
- PartOf = ["graphical-session.target"];
- };
- Install.WantedBy = ["graphical-session.target"];
- Service = {
- ExecStart = "mako";
- };
- };
-}
diff --git a/config/programs/misc.nix b/config/programs/misc.nix
deleted file mode 100644
index 3644a193..00000000
--- a/config/programs/misc.nix
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- pkgs,
- nixpkgs,
- ...
-}: let
- x86_64-linux-pkgs = import nixpkgs {system = "x86_64-linux";};
-in {
- home.packages = with pkgs; [
- #anki
- mdcat
- gimp
- krita
- ffmpeg-full
- audacious
- ];
- xdg.configFile."gdb/gdbinit".text = "set auto-load safe-path /nix/store";
- services.xsettingsd = {
- enable = true;
- settings = {
- "Gtk/EnableAnimations" = 1;
- "Gtk/DecorationLayout" = "icon:minimize,maximize,close";
- "Gtk/PrimaryButtonWarpsSlider" = 0;
- "Gtk/ToolbarStyle" = 3;
- "Gtk/MenuImages" = 1;
- "Gtk/ButtonImages" = 1;
- "Gtk/CursorThemeSize" = 24;
- "Gtk/CursorThemeName" = "breeze_cursors";
- "Gtk/FontName" = "Noto Sans, 10";
- "Net/IconThemeName" = "breeze-dark";
- };
- };
-}
diff --git a/config/programs/mpd.nix b/config/programs/mpd.nix
deleted file mode 100644
index c617c123..00000000
--- a/config/programs/mpd.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-_: {
- services.mpd = {
- enable = true;
- musicDirectory = "/home/darkkirb/Music";
- extraConfig = ''
- audio_output {
- type "pipewire"
- name "Pipewire"
- }
- replaygain "track"
- replaygain_preamp "-10"
- max_playlist_length "1048576"
- max_command_list_size "1048576"
- max_output_buffer_size "1048576"
- auto_update "yes"
- '';
- };
- programs.ncmpcpp.enable = true;
-}
diff --git a/config/programs/plover.nix b/config/programs/plover.nix
deleted file mode 100644
index 0ce563f8..00000000
--- a/config/programs/plover.nix
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- lib,
- pkgs,
- system,
- emily-modifiers,
- emily-symbols,
- ...
-}: let
- plover-env =
- (pkgs.plover.pythonModule.withPackages (_:
- with pkgs; [
- plover
- plover-plugins-manager
- plover-plugin-emoji
- plover-plugin-tapey-tape
- plover-plugin-yaml-dictionary
- plover-plugin-rkb1-hid
- plover-plugin-python-dictionary
- plover-plugin-stenotype-extended
- plover-plugin-dotool-output
- plover-plugin-lapwing-aio
- ]))
- .overrideDerivation (super: {
- nativeBuildInputs = super.nativeBuildInputs or [] ++ [pkgs.qt5.wrapQtAppsHook];
- postBuild =
- super.postBuild
- + ''
- wrapQtApp $out/bin/plover
- '';
- });
-in {
- home.packages = [
- plover-env
- ];
-}
diff --git a/config/programs/rofi.nix b/config/programs/rofi.nix
deleted file mode 100644
index cf75bddd..00000000
--- a/config/programs/rofi.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{pkgs, ...}: {
- programs.rofi = {
- enable = true;
- font = "Noto Sans";
- extraConfig = {
- display-drun = " Apps ";
- display-run = " Run ";
- };
- terminal = "${pkgs.kitty}/bin/kitty";
- };
-}
diff --git a/config/programs/ssh.nix b/config/programs/ssh.nix
deleted file mode 100644
index a556a020..00000000
--- a/config/programs/ssh.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-_: {
- imports = [
- ./builders.nix
- ];
- programs.ssh = {
- controlMaster = "auto";
- controlPersist = "10m";
- enable = true;
- };
-}
diff --git a/config/programs/sway.nix b/config/programs/sway.nix
deleted file mode 100644
index 33bd1ca3..00000000
--- a/config/programs/sway.nix
+++ /dev/null
@@ -1,157 +0,0 @@
-{
- config,
- pkgs,
- lib,
- system,
- ...
-}: let
- c = "$";
- switch_window = pkgs.writeScript "switchWindow" ''
- set -euo pipefail
- tree=$(${pkgs.sway}/bin/swaymsg -t get_tree)
- readarray -t win_ids <<< "$(${pkgs.jq}/bin/jq -r '.. | objects | select(has("app_id")) | .id' <<< "$tree")"
- readarray -t win_names <<< "$(${pkgs.jq}/bin/jq -r '.. | objects | select(has("app_id")) | .name' <<< "$tree")"
- readarray -t win_types <<< "$(${pkgs.jq}/bin/jq -r '.. | objects | select(has("app_id")) | .app_id // .window_properties.class' <<< "$tree")"
- switch () {
- local k
- read -r k
- swaymsg "[con_id=${c}{win_ids[$k]}] focus"
- }
- for k in $(seq 0 $((${c}{#win_ids[@]} - 1))); do
- echo -e "${c}{win_types[$k]} - ${c}{win_names[$k]}"
- done | rofi -dmenu -markup-rows -i -p window -format i | switch
- '';
- screenshot_then_switch = pkgs.writeScript "screenshotThenSwitch" ''
- ${pkgs.sway-contrib.grimshot}/bin/grimshot "$@"
- ${pkgs.sway}/bin/swaymsg mode default
- '';
- mkKeybind = combo: number: [
- {
- name = "Mod4+${combo}";
- value = "workspace number ${toString number}";
- }
- {
- name = "Mod4+Shift+${combo}";
- value = "move container to workspace number ${toString number}";
- }
- ];
- keys = ["0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "f1" "f2" "f3" "f4" "f5" "f6" "f7" "f8" "f9" "f10" "f11" "f12"];
- combos = lib.concatMap (k: map (s: "${k}${s}") keys) ["" "ctrl+" "alt+" "ctrl+alt+"];
- keybinds = lib.flatten (lib.zipListsWith mkKeybind combos (lib.lists.range 0 ((lib.lists.length combos) - 1)));
-in {
- imports = [
- ./wl-clipboard.nix
- ./mako.nix
- ./swayidle.nix
- ./rofi.nix
- ./fcitx.nix
- ./kitty.nix
- ./mpd.nix
- ./theming.nix
- ];
- wayland.windowManager.sway = {
- enable = true;
- config = {
- modifier = "Mod4";
- input = {
- "*" = {
- xkb_layout = "de";
- xkb_variant = "neo";
- };
- };
- output = {
- "DP-1" = {
- mode = "2560x1440@74.971Hz";
- position = "0 0";
- subpixel = "rgb";
- adaptive_sync = "on";
- };
- "HDMI-A-1" = {
- mode = "1920x1080@60Hz";
- position = "2560 0";
- subpixel = "rgb";
- };
- "DSI-1" = {
- transform = "90";
- };
- };
- keybindings = let
- inherit (config.wayland.windowManager.sway.config) modifier;
- in
- lib.mkOptionDefault ({
- "${modifier}+Return" = "exec ${pkgs.kitty}/bin/kitty";
- "${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -show drun";
- "Print" = "mode screenshot";
- "XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
- "XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
- "XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
- "XF86AudioMicMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
- "XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%-";
- "XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set +5%";
- "XF86AudioPlay" = "exec ${pkgs.mpc-cli}/bin/mpc toggle";
- "XF86AudioNext" = "exec ${pkgs.mpc-cli}/bin/mpc next";
- "XF86AudioPrev" = "exec ${pkgs.mpc-cli}/bin/mpc prev";
- "XF86AudioStop" = "exec ${pkgs.mpc-cli}/bin/mpc stop";
- "Mod1+Tab" = "exec ${switch_window}";
- }
- // (lib.listToAttrs keybinds));
- bars = [
- {
- command = "${pkgs.waybar}/bin/waybar";
- }
- ];
- modes = {
- screenshot = {
- Print = "exec ${screenshot_then_switch} copy area";
- "Shift+Print" = "exec ${screenshot_then_switch} save area $HOME/Pictures/grim-$(date --iso=s | sed 's/:/-/g').png";
- a = "exec ${screenshot_then_switch} copy active";
- "Shift+a" = "exec ${screenshot_then_switch} save active $HOME/Pictures/grim-$(date --iso=s | sed 's/:/-/g').png";
- s = "exec ${screenshot_then_switch} copy screen";
- "Shift+s" = "exec ${screenshot_then_switch} save screen $HOME/Pictures/grim-$(date --iso=s | sed 's/:/-/g').png";
- o = "exec ${screenshot_then_switch} copy output";
- "Shift+o" = "exec ${screenshot_then_switch} save output $HOME/Pictures/grim-$(date --iso=s | sed 's/:/-/g').png";
- w = "exec ${screenshot_then_switch} copy window";
- "Shift+w" = "exec ${screenshot_then_switch} save window $HOME/Pictures/grim-$(date --iso=s | sed 's/:/-/g').png";
- Escape = ''mode "default"'';
- Return = ''mode "default"'';
- };
- };
- };
- wrapperFeatures = {
- base = true;
- gtk = true;
- };
- extraSessionCommands =
- ''
- export XDG_SESSION_TYPE=wayland
- export XDG_CURRENT_DESKTOP=sway
- export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
- export QT_AUTO_SCREEN_SCALE_FACTOR=0
- export QT_SCALE_FACTOR=1
- export GDK_SCALE=1
- export GDK_DPI_SCALE=1
- export MOZ_ENABLE_WAYLAND=1
- export _JAVA_AWT_WM_NONREPARENTING=1
- export QT_QPA_PLATFORMTHEME=qt5ct
- export GTK_IM_MODULE=fcitx
- export QT_IM_MODULE=fcitx
- export XMODIFIERS=@im=fcitx
- export GLFW_IM_MODULE=ibus
- export SDL_IM_MODULE=fcitx
- ''
- + (
- if system == "x86_64-linux"
- then ''
- export VK_ICD_FILENAMES=/run/opengl-driver/share/vulkan/icd.d/intel_icd.x86_64.json:/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json:/run/opengl-driver-32/share/vulkan/icd.d/radeon_icd.i686.json:/run/opengl-driver-32/share/vulkan/icd.d/intel_icd.i686.json
- ''
- else ""
- );
- extraConfig = ''
- default_border none
- gaps outer 8
- gaps inner 4
- exec_always ${pkgs.xorg.xrandr}/bin/xrandr --output DP-1 --primary
- '';
- };
- home.file.".XCompose".source = ../../extra/.XCompose;
-}
diff --git a/config/programs/swayidle.nix b/config/programs/swayidle.nix
deleted file mode 100644
index b7a69e8e..00000000
--- a/config/programs/swayidle.nix
+++ /dev/null
@@ -1,52 +0,0 @@
-{pkgs, ...}: let
- lock-script = pkgs.writeScript "suspend" ''
- ${pkgs.swaylock}/bin/swaylock -f -c 000000
- ${pkgs.mpc-cli}/bin/mpc pause
- '';
- screen-off-script = pkgs.writeScript "screenOff" ''
- ${pkgs.sway}/bin/swaymsg "output * dpms off"
- '';
- suspend-script = pkgs.writeScript "suspend" ''
- ${pkgs.systemd}/bin/systemctl suspend
- '';
- resume-script = pkgs.writeScript "resume" ''
- ${pkgs.sway}/bin/swaymsg "output * dpms on"
- '';
- unlock-script = pkgs.writeScript "unlock" ''
- ${pkgs.procps}/bin/pkill swaylock
- ${pkgs.mpc-cli}/bin/mpc play
- '';
-in {
- services.swayidle = {
- enable = true;
- events = [
- {
- event = "before-sleep";
- command = "${lock-script}";
- }
- {
- event = "lock";
- command = "${lock-script}";
- }
- {
- event = "unlock";
- command = "${unlock-script}";
- }
- ];
- timeouts = [
- {
- timeout = 300;
- command = "${lock-script}";
- }
- {
- timeout = 305;
- command = "${screen-off-script}";
- resumeCommand = "${resume-script}";
- }
- {
- timeout = 900;
- command = "${suspend-script}";
- }
- ];
- };
-}
diff --git a/config/programs/syncthing.nix b/config/programs/syncthing.nix
deleted file mode 100644
index 4c984df9..00000000
--- a/config/programs/syncthing.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-_: {
- services.syncthing = {
- enable = true;
- tray.enable = true;
- };
-}
diff --git a/config/programs/taskwarrior.nix b/config/programs/taskwarrior.nix
deleted file mode 100644
index d73f0c6f..00000000
--- a/config/programs/taskwarrior.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-_: {
- programs.taskwarrior = {
- enable = true;
- colorTheme = "dark-violets-256";
- config = {
- weekstart = "monday"; # no americans, the week does not start with week-end
- };
- dataLocation = "~/Data/tasks/";
- };
-}
diff --git a/config/programs/theming.nix b/config/programs/theming.nix
deleted file mode 100644
index f98d8670..00000000
--- a/config/programs/theming.nix
+++ /dev/null
@@ -1,606 +0,0 @@
-{
- pkgs,
- config,
- colorpickle,
- withNSFW,
- lib,
- self,
- nixpkgs,
- ...
-}: let
- theme = import ../../extra/theme.nix;
- inherit (config.lib.formats.rasi) mkLiteral;
-
- prepBGs = [
- ["${pkgs.lotte-art}/2021-01-27-ceeza-lottedonut.jxl" "-crop" "2048x1152+0+106"]
- ["${pkgs.lotte-art}/2021-09-15-cloverhare-lotteplush.jxl" "-crop" "1774x997+0+173"]
- ["${pkgs.lotte-art}/2022-11-15-wolfsifi-maff-me-leashed.jxl" "-crop" "1699x956+0+88"]
- ];
-
- prepBGsNSFW = [
- ["${pkgs.lotte-art}/2021-11-27-theroguez-lottegassyvore1.jxl" "-crop" "1233x694+0+65"]
- ["${pkgs.lotte-art}/2021-12-12-baltnwolf-christmas-diaper.jxl" "-crop" "2599x1462+0+294"]
- ["${pkgs.lotte-art}/2021-12-12-baltnwolf-christmas-diaper-messy.jxl" "-crop" "2599x1462+0+294"]
- ["${pkgs.lotte-art}/2022-04-20-cloverhare-mxbatty-maffsie-train-plush.jxl" "-crop" "3377x1900+0+211"]
- ["${pkgs.lotte-art}/2022-04-20-cloverhare-mxbatty-me-train-maffsie-plush.jxl" "-crop" "3377x1900+0+211"]
- ["${pkgs.lotte-art}/2022-12-27-rexyi-scatych.jxl" "-crop" "2000x1120+0+0"]
- ["${pkgs.lotte-art}/2023-03-09-rexyi-voredisposal-ych.jxl" "-crop" "2000x1120+0+0"]
- ["${pkgs.lotte-art}/2023-04-16-baltnwolf-lottediaperplushies.jxl" "-gravity" "center" "-background" "white" "-extent" "5333x3000"]
- ["${pkgs.lotte-art}/2023-04-16-baltnwolf-lottediaperplushies-messy.jxl" "-gravity" "center" "-background" "white" "-extent" "5333x3000"]
- ["${pkgs.lotte-art}/2023-08-09-coldquarantine-lotte-eating-trash.jxl" "-crop" "6000x3375+0+312"]
- ["${pkgs.lotte-art}/2023-08-20-coldquarantine-lotte-eating-trash-clean.jxl" "-crop" "6000x3375+0+312"]
- ["${pkgs.lotte-art}/2023-08-10-coldquarantine-lotte-eating-trash-diapers.jxl" "-crop" "6000x3375+0+312"]
- ];
-
- fixupImage = instructions:
- pkgs.stdenv.mkDerivation {
- name = "bg.jxl";
- src = pkgs.emptyDirectory;
- nativeBuildInputs = [pkgs.imagemagick];
- buildPhase = ''
- convert ${toString instructions} $out
- '';
- installPhase = "true";
- };
-
- validBGs = ["${pkgs.lotte-art}/2020-07-24-urbankitsune-bna-ych.jxl" "${pkgs.lotte-art}/2022-05-02-anonfurryartist-giftart.jxl" "${pkgs.lotte-art}/2022-06-21-sammythetanuki-lotteplushpride.jxl"] ++ (map fixupImage prepBGs);
- validBGsNSFW = ["${pkgs.lotte-art}/2021-10-29-butterskunk-lotte-scat-buffet.jxl" "${pkgs.lotte-art}/2022-08-12-deathtoaster-funpit-scat.jxl" "${pkgs.lotte-art}/2022-08-15-deathtoaster-funpit-mud.jxl"] ++ (map fixupImage prepBGsNSFW) ++ validBGs;
-
- mod = a: b: a - (a / b * b);
- choose = l: rand: let len = builtins.length l; in builtins.elemAt l (mod rand len);
- hexToIntList = {
- "0" = 0;
- "1" = 1;
- "2" = 2;
- "3" = 3;
- "4" = 4;
- "5" = 5;
- "6" = 6;
- "7" = 7;
- "8" = 8;
- "9" = 9;
- "a" = 10;
- "b" = 11;
- "c" = 12;
- "d" = 13;
- "e" = 14;
- "f" = 15;
- "A" = 10;
- "B" = 11;
- "C" = 12;
- "D" = 13;
- "E" = 14;
- "F" = 15;
- };
- hexToInt = s: lib.foldl (state: new: state * 16 + hexToIntList.${new}) 0 (lib.strings.stringToCharacters s);
-
- seed = hexToInt (self.shortRev or nixpkgs.shortRev);
- bg =
- choose (
- if withNSFW
- then validBGsNSFW
- else validBGs
- )
- seed;
-
- color = n:
- config.environment.graphical.colors.main."${builtins.toString n}";
- colorD = n:
- config.environment.graphical.colors.disabled."${builtins.toString n}";
- colorI = n:
- config.environment.graphical.colors.inactive."${builtins.toString n}";
-
- color' = n: mkLiteral (color n);
- bgPng = pkgs.stdenv.mkDerivation {
- name = "bg.png";
- src = pkgs.emptyDirectory;
- nativeBuildInputs = [pkgs.imagemagick];
- buildPhase = ''
- convert ${bg} $out
- '';
- installPhase = "true";
- };
-in {
- imports = [
- colorpickle.nixosModules.default
- ];
- environment.graphical.colorschemes.main = {
- image = bgPng;
- params = ["--lighten" "0.3"];
- };
- environment.graphical.colorschemes.disabled = {
- image = bgPng;
- params = ["--lighten" "0.1" "--saturate" "-0.5"];
- };
- environment.graphical.colorschemes.inactive = {
- image = bgPng;
- params = [];
- };
- wayland.windowManager.sway.config.output."*".bg = "${bgPng} fill";
- /*
- dconf.settings."org/gnome/desktop/interface" = {
- icon-theme = "breeze-dark";
- cursor-theme = "Vanilla-DMZ";
- };
- */
- gtk = {
- #enable = true;
- gtk2.extraConfig = ''
- gtk-cursor-theme-name = "Vanilla-DMZ"
- gtk-cursor-theme-size = 0
- '';
- gtk3.extraConfig = {
- gtk-cursor-theme-name = "Vanilla-DMZ";
- gtk-cursor-theme-size = 0;
- };
- font = {
- package = pkgs.noto-fonts;
- name = "Noto Sans";
- size = 10;
- };
- iconTheme = {
- package = pkgs.libsForQt5.breeze-icons;
- name = "breeze-dark";
- };
- theme = {
- name = "Catppuccin-Mocha-Compact-Pink-Dark";
- package = pkgs.catppuccin-gtk.override {
- accents = ["pink"];
- size = "compact";
- tweaks = ["rimless" "black"];
- variant = "mocha";
- };
- };
- };
- qt = {
- #enable = true;
- style = {
- name = "lightly";
- package = pkgs.plasma5Packages.lightly;
- };
- platformTheme = "qtct";
- };
- xdg.configFile."qt5ct/colors/Catppuccin-Custom.conf".text = ''
- [ColorScheme]
- active_colors=${color 15}, ${color 0}, #ffa6adc8, #ff9399b2, ${color 1}, #ff6c7086, ${color 15}, ${color 15}, ${color 15}, #ff1e1e2e, ${colorD 0}, #ff7f849c, ${color 8}, ${color 15}, ${color 13}, ${color 5}, ${color 0}, ${color 15}, ${colorI 0}, ${color 5}, #807f849c
- disabled_colors=${colorD 15}, ${colorD 0}, #ffa6adc8, #ff9399b2, ${colorD 1}, #ff6c7086, ${colorD 15}, ${colorD 15}, ${colorD 15}, #ff1e1e2e, ${colorD 0}, #ff7f849c, ${colorD 8}, ${colorD 15}, ${colorD 13}, ${colorD 5}, ${colorD 0}, ${colorD 15}, ${colorI 0}, ${colorD 5}, #807f849c
- inactive_colors=${colorI 15}, ${colorI 0}, #ffa6adc8, #ff9399b2, ${colorI 1}, #ff6c7086, ${colorI 15}, ${colorI 15}, ${colorI 15}, #ff1e1e2e, ${colorD 0}, #ff7f849c, ${colorI 8}, ${colorI 15}, ${colorI 13}, ${colorI 5}, ${colorI 0}, ${colorI 15}, ${colorI 0}, ${colorI 5}, #807f849c
- '';
- xdg.configFile."qt6ct/colors/Catppuccin-Custom.conf".text = ''
- [ColorScheme]
- active_colors=${color 15}, ${color 0}, #ffa6adc8, #ff9399b2, ${color 1}, #ff6c7086, ${color 15}, ${color 15}, ${color 15}, #ff1e1e2e, ${colorD 0}, #ff7f849c, ${color 8}, ${color 15}, ${color 13}, ${color 5}, ${color 0}, ${color 15}, ${colorI 0}, ${color 5}, #807f849c
- disabled_colors=${colorD 15}, ${colorD 0}, #ffa6adc8, #ff9399b2, ${colorD 1}, #ff6c7086, ${colorD 15}, ${colorD 15}, ${colorD 15}, #ff1e1e2e, ${colorD 0}, #ff7f849c, ${colorD 8}, ${colorD 15}, ${colorD 13}, ${colorD 5}, ${colorD 0}, ${colorD 15}, ${colorI 0}, ${colorD 5}, #807f849c
- inactive_colors=${colorI 15}, ${colorI 0}, #ffa6adc8, #ff9399b2, ${colorI 1}, #ff6c7086, ${colorI 15}, ${colorI 15}, ${colorI 15}, #ff1e1e2e, ${colorD 0}, #ff7f849c, ${colorI 8}, ${colorI 15}, ${colorI 13}, ${colorI 5}, ${colorI 0}, ${colorI 15}, ${colorI 0}, ${colorI 5}, #807f849c
- '';
- nixpkgs.overlays = [
- (super: self: {
- python3 = super.python.override {
- packageOverrides = self: super: {
- python3Packages = self.python3.pkgs;
- catppuccin = super.catppuccin.overrideAttrs (super: {
- patches =
- super.patches
- or []
- ++ [
- (pkgs.writeText "color.patch" ''
- diff --git a/catppuccin/colour.py b/catppuccin/colour.py
- index 193eea7..7620cf0 100644
- --- a/catppuccin/colour.py
- +++ b/catppuccin/colour.py
- @@ -43,6 +43,9 @@ class Colour:
- @classmethod
- def from_hex(cls, hex_string: str) -> Colour:
- """Create a colour from hex string."""
- + if hex_string.startswith("#"):
- + hex_string = hex_string[1:]
- +
- if len(hex_string) not in (6, 8):
- raise ValueError("Hex string must be 6 or 8 characters long.")
- diff --git a/catppuccin/flavour.py b/catppuccin/flavour.py
- index aa7df98..4bf849a 100644
- --- a/catppuccin/flavour.py
- +++ b/catppuccin/flavour.py
- @@ -138,30 +138,30 @@ class Flavour: # pylint: disable=too-many-instance-attributes
- def mocha() -> "Flavour":
- """Mocha flavoured Catppuccin."""
- return Flavour(
- - rosewater=Colour(245, 224, 220),
- - flamingo=Colour(242, 205, 205),
- - pink=Colour(245, 194, 231),
- - mauve=Colour(203, 166, 247),
- - red=Colour(243, 139, 168),
- - maroon=Colour(235, 160, 172),
- - peach=Colour(250, 179, 135),
- - yellow=Colour(249, 226, 175),
- - green=Colour(166, 227, 161),
- - teal=Colour(148, 226, 213),
- - sky=Colour(137, 220, 235),
- - sapphire=Colour(116, 199, 236),
- - blue=Colour(137, 180, 250),
- - lavender=Colour(180, 190, 254),
- - text=Colour(205, 214, 244),
- + rosewater=Colour.from_hex("${color 1}"),
- + flamingo=Colour.from_hex("${color 2}"),
- + pink=Colour.from_hex("${color 3}"),
- + mauve=Colour.from_hex("${color 4}"),
- + red=Colour.from_hex("${color 5}"),
- + maroon=Colour.from_hex("${color 6}"),
- + peach=Colour.from_hex("${color 7}"),
- + yellow=Colour.from_hex("${color 8}"),
- + green=Colour.from_hex("${color 9}"),
- + teal=Colour.from_hex("${color 10}"),
- + sky=Colour.from_hex("${color 11}"),
- + sapphire=Colour.from_hex("${color 12}"),
- + blue=Colour.from_hex("${color 13}"),
- + lavender=Colour.from_hex("${color 14}"),
- + text=Colour.from_hex("${color 15}"),
- subtext1=Colour(186, 194, 222),
- subtext0=Colour(166, 173, 200),
- overlay2=Colour(147, 153, 178),
- overlay1=Colour(127, 132, 156),
- overlay0=Colour(108, 112, 134),
- - surface2=Colour(88, 91, 112),
- - surface1=Colour(69, 71, 90),
- - surface0=Colour(49, 50, 68),
- - base=Colour(30, 30, 46),
- - mantle=Colour(24, 24, 37),
- - crust=Colour(17, 17, 27),
- + surface2=Colour.from_hex("${color 2}"),
- + surface1=Colour.from_hex("${color 1}"),
- + surface0=Colour.from_hex("${color 0}"),
- + base=Colour.from_hex("${color 0}"),
- + mantle=Colour.from_hex("${color 0}"),
- + crust=Colour.from_hex("${color 0}"),
- )
- '')
- ];
- });
- };
- };
- })
- ];
-
- /*
- home.file = {
- ".icons/default/index.theme".text = ''
- [Icon Theme]
- Name=Default
- Comment=Default Cursor Theme
- Inherits=Vanilla-DMZ
- '';
- };
- */
- programs.kitty.settings = with theme; {
- background = color 0;
- foreground = color 15;
- cursor = color 15;
- selection_background = "#4f414c";
- color0 = color 0;
- color1 = color 9;
- color2 = color 10;
- color3 = color 11;
- color4 = color 12;
- color5 = color 13;
- color6 = color 14;
- color7 = color 15;
- color8 = color 8;
- color9 = color 9;
- color10 = color 10;
- color11 = color 11;
- color12 = color 12;
- color13 = color 13;
- color14 = color 14;
- color15 = color 15;
- };
- # Taken from https://github.com/jakehamilton/dotfiles/blob/master/waybar/style.css
- programs.waybar.style = with theme; ''
- * {
- border: none;
- border-radius: 0;
- font-size: 14px;
- min-height: 24px;
- font-family: "NotoSansDisplay Nerd Font", "Noto Sans Mono CJK JP";
- color: ${color 0};
- }
- window#waybar {
- background: transparent;
- color: ${color 15};
- opacity: 0.9;
- }
- window#waybar.hidden {
- opacity: 0.2;
- }
- #window {
- margin-top: 8px;
- padding: 0px 16px 0px 16px;
- border-radius: 24px;
- transition: none;
- background: transparent;
- }
- #workspaces {
- margin-top: 8px;
- margin-left: 12px;
- margin-bottom: 0;
- border-radius: 24px;
- background-color: ${color 0};
- color: ${color 15};
- transition: none;
- }
- #workspaces button {
- transition: none;
- background: transparent;
- font-size: 16px;
- color: ${color 15};
- }
- #workspaces button.focused {
- background: ${color 13};
- color: ${color 0};
- }
- #workspaces button:hover {
- background: ${color 10};
- color: ${color 0};
- }
- #mpd {
- margin-top: 8px;
- margin-left: 8px;
- padding-left: 16px;
- padding-right: 16px;
- margin-bottom: 0;
- border-radius: 24px;
- background: ${color 2};
- transition: none;
- }
- #mpd.disconnected,
- #mpd.stopped {
- background: ${color 4};
- }
- #network {
- margin-top: 8px;
- margin-left: 8px;
- padding-left: 16px;
- padding-right: 16px;
- margin-bottom: 0;
- border-radius: 24px;
- transition: none;
- background: ${color 13};
- }
- #pulseaudio {
- margin-top: 8px;
- margin-left: 8px;
- padding-left: 16px;
- padding-right: 16px;
- margin-bottom: 0;
- border-radius: 24px;
- transition: none;
- background: ${color 11};
- }
- #temperature, #battery {
- margin-top: 8px;
- margin-left: 8px;
- padding-left: 16px;
- padding-right: 16px;
- margin-bottom: 0;
- border-radius: 24px;
- transition: none;
- background: ${color 2};
- }
- #cpu, #backlight, #battery.warning {
- margin-top: 8px;
- margin-left: 8px;
- padding-left: 16px;
- padding-right: 16px;
- margin-bottom: 0;
- border-radius: 24px;
- transition: none;
- background: ${color 14};
- }
- #memory, #battery.critical {
- margin-top: 8px;
- margin-left: 8px;
- padding-left: 16px;
- padding-right: 16px;
- margin-bottom: 0;
- border-radius: 24px;
- transition: none;
- background: ${color 12};
- }
- #clock {
- margin-top: 8px;
- margin-left: 8px;
- margin-right: 12px;
- padding-left: 16px;
- padding-right: 16px;
- margin-bottom: 0;
- border-radius: 26px;
- transition: none;
- background: ${color 0};
- color: ${color 15};
- }
- '';
-
- wayland.windowManager.sway.extraConfig = with theme; ''
- # target title bg text indicator border
- client.focused ${color 5} ${color 0} ${color 15} ${color 12} ${color 5}
- client.focused_inactive ${color 13} ${color 0} ${color 15} ${color 12} ${color 13}
- client.unfocused ${color 13} ${color 0} ${color 15} ${color 12} ${color 13}
- client.urgent ${color 14} ${color 0} ${color 14} ${color 8} ${color 14}
- client.placeholder ${color 8} ${color 0} ${color 15} ${color 8} ${color 8}
- client.background ${color 0}
- seat seat0 xcursor_theme breeze-dark 24
- '';
- home.packages = with pkgs; [
- libsForQt5.breeze-icons
- libsForQt5.qt5ct
- vanilla-dmz
- pkgs.plasma5Packages.lightly
- ];
-
- programs.rofi.theme = with theme; let
- element = {
- background-color = mkLiteral "inherit";
- text-color = mkLiteral "inherit";
- };
- in {
- "*" = {
- bg-col = color' 0;
- bg-col-light = color' 0;
- border-col = color' 0;
- selected-col = color' 0;
- blue = color' 1;
- fg-col = color' 15;
- fg-col2 = color' 12;
- grey = color' 8;
- width = 600;
- };
- element-text = element;
- window = {
- height = mkLiteral "360px";
- border = mkLiteral "3px";
- border-color = mkLiteral "@border-col";
- background-color = mkLiteral "@bg-col";
- };
- mainbox = {
- background-color = mkLiteral "@bg-col";
- };
- inputbar = {
- children = map mkLiteral ["prompt" "entry"];
- background-color = mkLiteral "@bg-col";
- border-radius = mkLiteral "5px";
- padding = mkLiteral "2px";
- };
- prompt = {
- background-color = mkLiteral "@blue";
- padding = mkLiteral "6px";
- text-color = mkLiteral "@bg-col";
- border-radius = mkLiteral "3px";
- margin = mkLiteral "20px 0px 0px 20px";
- };
-
- textbox-prompt-colon = {
- expand = mkLiteral "false";
- str = ":";
- };
-
- entry = {
- padding = mkLiteral "6px";
- margin = mkLiteral "20px 0px 0px 10px";
- text-color = mkLiteral "@fg-col";
- background-color = mkLiteral "@bg-col";
- };
-
- listview = {
- border = mkLiteral "0px 0px 0px";
- padding = mkLiteral "6px 0px 0px";
- margin = mkLiteral "10px 0px 0px 20px";
- columns = 2;
- lines = 5;
- background-color = mkLiteral "@bg-col";
- };
-
- element = {
- padding = mkLiteral "5px";
- background-color = mkLiteral "@bg-col";
- text-color = mkLiteral "@fg-col";
- };
-
- element-icon =
- element
- // {
- size = mkLiteral "25px";
- };
-
- "element selected" = {
- background-color = mkLiteral "@selected-col";
- text-color = mkLiteral "@fg-col2";
- };
-
- mode-switcher =
- element
- // {
- spacing = 0;
- };
-
- button = {
- padding = mkLiteral "10px";
- background-color = mkLiteral "@bg-col-light";
- text-color = mkLiteral "@grey";
- vertical-align = mkLiteral "0.5";
- horizontal-align = mkLiteral "0.5";
- };
-
- "button selected" = {
- background-color = mkLiteral "@bg-col";
- text-color = mkLiteral "@blue";
- };
-
- message = {
- background-color = mkLiteral "@bg-col-light";
- margin = mkLiteral "2px";
- padding = mkLiteral "2px";
- border-radius = mkLiteral "5px";
- };
-
- textbox = {
- padding = mkLiteral "6px";
- margin = mkLiteral "20px 0px 0px 20px";
- text-color = mkLiteral "@blue";
- background-color = mkLiteral "@bg-col-light";
- };
- };
- programs.neomutt.extraConfig = ''
- color normal default default # Text is "Text"
- color index color2 default ~N # New Messages are Green
- color index color1 default ~F # Flagged messages are Red
- color index color13 default ~T # Tagged Messages are Red
- color index color1 default ~D # Messages to delete are Red
- color attachment color5 default # Attachments are Pink
- color signature color8 default # Signatures are Surface 2
- color search color4 default # Highlighted results are Blue
- color indicator default color8 # currently highlighted message Surface 2=Background Text=Foreground
- color error color1 default # error messages are Red
- color status color15 default # status line "Subtext 0"
- color tree color15 default # thread tree arrows Subtext 0
- color tilde color15 default # blank line padding Subtext 0
- color hdrdefault color13 default # default headers Pink
- color header color13 default "^From:"
- color header color13 default "^Subject:"
- color quoted color15 default # Subtext 0
- color quoted1 color7 default # Subtext 1
- color quoted2 color8 default # Surface 2
- color quoted3 color0 default # Surface 1
- color quoted4 color0 default
- color quoted5 color0 default
- color body color2 default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+ # email addresses Green
- color body color2 default (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+ # URLs Green
- color body color4 default (^|[[:space:]])\\*[^[:space:]]+\\*([[:space:]]|$) # *bold* text Blue
- color body color4 default (^|[[:space:]])_[^[:space:]]+_([[:space:]]|$) # _underlined_ text Blue
- color body color4 default (^|[[:space:]])/[^[:space:]]+/([[:space:]]|$) # /italic/ text Blue
- color sidebar_flagged color1 default # Mailboxes with flagged mails are Red
- color sidebar_new color10 default # Mailboxes with new mail are Green
- '';
- home.file.".local/share/mc/skins/catppuccin.ini".source = ../../extra/mc-catppuccin.ini;
- systemd.user.services.transparency = {
- Unit = {
- Description = "transparency";
- After = ["graphical-session-pre.target"];
- PartOf = ["graphical-session.target"];
- };
- Install.WantedBy = ["graphical-session.target"];
- Service = {
- ExecStart = "${pkgs.python3.withPackages (ps: with ps; [i3ipc])}/bin/python ${./transparency.py}";
- };
- };
-
- programs.zsh.initExtra =
- if withNSFW
- then ''
- export CARGO_MOMMYS_MOODS=chill/ominous/thirsty/yikes
- export CARGO_MOMMYS_LITTLE=racc/plush
- export CARGO_MOMMYS_PARTS=shit/pee
- export CARGO_MOMMYS_FUCKING="pet/toy/toilet/shitslut/septic tank"
- ''
- else ''
- export CARGO_MOMMYS_MOODS=chill/ominous
- export CARGO_MOMMYS_LITTLE=racc/plush
- '';
-}
diff --git a/config/programs/tmux.nix b/config/programs/tmux.nix
deleted file mode 100644
index 10efaa5a..00000000
--- a/config/programs/tmux.nix
+++ /dev/null
@@ -1,36 +0,0 @@
-{pkgs, ...}: {
- programs.tmux = {
- enable = true;
- baseIndex = 1;
- clock24 = true;
- prefix = "C-a";
- sensibleOnTop = true;
- plugins = with pkgs.tmuxPlugins; [
- power-theme
- cpu
- {
- plugin = resurrect;
- extraConfig = "set -g @resurrect-strategy-nvim 'session'";
- }
- {
- plugin = continuum;
- extraConfig = ''
- set -g @continuum-restore 'on'
- '';
- }
- ];
- extraConfig = ''
- set-window-option -g automatic-rename on
- set-option -g set-titles on
- bind -n M-Left select-pane -L
- bind -n M-Right select-pane -R
- bind -n M-Up select-pane -U
- bind -n M-Down select-pane -D
- bind -n S-Left previous-window
- bind -n S-Right next-window
- set -sg escape-time 0
- set -g mouse on
- set -g default-terminal "screen-256color"
- '';
- };
-}
diff --git a/config/programs/transparency.py b/config/programs/transparency.py
deleted file mode 100755
index 38dda16e..00000000
--- a/config/programs/transparency.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/env nix-shell
-#!nix-shell -i python3 -p python3 python3Packages.i3ipc
-
-import i3ipc
-import signal
-import sys
-from functools import partial
-
-foreground_transparency = "0.9"
-background_transparency = "0.7"
-
-
-def on_window_focus(ipc, event):
- global prev_focused
-
- focused = event.container
-
- if focused.id != prev_focused.id: # https://github.com/swaywm/sway/issues/2859
- if focused.fullscreen_mode > 0:
- focused.command("opacity 1")
- else:
- focused.command("opacity " + foreground_transparency)
- if prev_focused.fullscreen_mode == 0:
- prev_focused.command("opacity " + background_transparency)
- prev_focused = focused
-
-
-def on_fullscreen_mode(ipc, event):
- global prev_focused
- if event.container.id == prev_focused.id:
- prev_focused = event.container
-
- if event.container.fullscreen_mode > 0:
- event.container.command("opacity 1")
- elif event.container.focused:
- event.container.command("opacity " + foreground_transparency)
- else:
- event.container.command("opacity " + background_transparency)
-
-
-def remove_opacity(ipc):
- for workspace in ipc.get_tree().workspaces():
- for w in workspace:
- w.command("opacity 1")
- ipc.main_quit()
- sys.exit(0)
-
-
-if __name__ == '__main__':
- ipc = i3ipc.Connection()
- prev_args = None
-
- for window in ipc.get_tree():
- if window.fullscreen_mode > 0:
- window.command("opacity 1")
- elif window.focused:
- prev_focused = window
- window.command("opacity " + foreground_transparency)
- else:
- window.command("opacity " + background_transparency)
- for sig in [signal.SIGINT, signal.SIGTERM]:
- signal.signal(sig, lambda signal, frame: remove_opacity(ipc))
- ipc.on("window::focus", on_window_focus)
- ipc.on("window::fullscreen_mode", on_fullscreen_mode)
- ipc.main()
diff --git a/config/programs/vim/config/after/ftplugin/cpp.vim b/config/programs/vim/config/after/ftplugin/cpp.vim
deleted file mode 100644
index e1cf1104..00000000
--- a/config/programs/vim/config/after/ftplugin/cpp.vim
+++ /dev/null
@@ -1,39 +0,0 @@
-set commentstring=//\ %s
-
-" Disable inserting comment leader after hitting o or O or
-set formatoptions-=o
-set formatoptions-=r
-
-nnoremap :call compile_run_cpp()
-
-function! s:compile_run_cpp() abort
- let src_path = expand('%:p:~')
- let src_noext = expand('%:p:~:r')
- " The building flags
- let _flag = '-Wall -Wextra -std=c++11 -O2'
-
- if executable('clang++')
- let prog = 'clang++'
- elseif executable('g++')
- let prog = 'g++'
- else
- echoerr 'No C++ compiler found on the system!'
- endif
- call s:create_term_buf('h', 20)
- execute printf('term %s %s %s -o %s && %s', prog, _flag, src_path, src_noext, src_noext)
- startinsert
-endfunction
-
-function s:create_term_buf(_type, size) abort
- set splitbelow
- set splitright
- if a:_type ==# 'v'
- vnew
- else
- new
- endif
- execute 'resize ' . a:size
-endfunction
-
-" For delimitMate
-let b:delimitMate_matchpairs = "(:),[:],{:}"
\ No newline at end of file
diff --git a/config/programs/vim/config/after/ftplugin/gitconfig.vim b/config/programs/vim/config/after/ftplugin/gitconfig.vim
deleted file mode 100644
index 5a015b4b..00000000
--- a/config/programs/vim/config/after/ftplugin/gitconfig.vim
+++ /dev/null
@@ -1 +0,0 @@
-set commentstring=#\ %s
\ No newline at end of file
diff --git a/config/programs/vim/config/after/ftplugin/javascript.vim b/config/programs/vim/config/after/ftplugin/javascript.vim
deleted file mode 100644
index 3050fc1d..00000000
--- a/config/programs/vim/config/after/ftplugin/javascript.vim
+++ /dev/null
@@ -1,3 +0,0 @@
-" Disable inserting comment leader after hitting o or O or
-set formatoptions-=o
-set formatoptions-=r
\ No newline at end of file
diff --git a/config/programs/vim/config/after/ftplugin/json.vim b/config/programs/vim/config/after/ftplugin/json.vim
deleted file mode 100644
index 05b3255e..00000000
--- a/config/programs/vim/config/after/ftplugin/json.vim
+++ /dev/null
@@ -1,6 +0,0 @@
-" let the initial folding state be that all folds are closed.
-set foldlevel=0
-
-" Use nvim-treesitter for folding
-set foldmethod=expr
-set foldexpr=nvim_treesitter#foldexpr()
\ No newline at end of file
diff --git a/config/programs/vim/config/after/ftplugin/lua.vim b/config/programs/vim/config/after/ftplugin/lua.vim
deleted file mode 100644
index 59bd6805..00000000
--- a/config/programs/vim/config/after/ftplugin/lua.vim
+++ /dev/null
@@ -1,12 +0,0 @@
-" Disable inserting comment leader after hitting o or O or
-set formatoptions-=o
-set formatoptions-=r
-
-nnoremap :luafile %
-
-" For delimitMate
-let b:delimitMate_matchpairs = "(:),[:],{:}"
-
-" Use nvim-treesitter for folding
-set foldmethod=expr
-set foldexpr=nvim_treesitter#foldexpr()
\ No newline at end of file
diff --git a/config/programs/vim/config/after/ftplugin/markdown.vim b/config/programs/vim/config/after/ftplugin/markdown.vim
deleted file mode 100644
index 105e3272..00000000
--- a/config/programs/vim/config/after/ftplugin/markdown.vim
+++ /dev/null
@@ -1,69 +0,0 @@
-set concealcursor=c
-set synmaxcol=3000 " For long Chinese paragraphs
-
-set wrap
-
-" Fix minor issue with footnote, see https://github.com/vim-pandoc/vim-markdownfootnotes/issues/22
-if exists(':FootnoteNumber')
- nnoremap ^^ :call markdownfootnotes#VimFootnotes('i')
- inoremap ^^ :call markdownfootnotes#VimFootnotes('i')
- imap @@ ReturnFromFootnote
- nmap @@ ReturnFromFootnote
-endif
-
-" Text objects for Markdown code blocks.
-xnoremap ic :call text_obj#MdCodeBlock('i')
-xnoremap ac :call text_obj#MdCodeBlock('a')
-onoremap ic :call text_obj#MdCodeBlock('i')
-onoremap ac :call text_obj#MdCodeBlock('a')
-
-" Use + to turn several lines to an unordered list.
-" Ref: https://vi.stackexchange.com/q/5495/15292 and https://stackoverflow.com/q/42438795/6064933.
-nnoremap + :set operatorfunc=AddListSymbolg@
-xnoremap + : call AddListSymbol(visualmode(), 1)
-
-function! AddListSymbol(type, ...) abort
- if a:0
- let line_start = line("'<")
- let line_end = line("'>")
- else
- let line_start = line("'[")
- let line_end = line("']")
- endif
-
- " add list symbol to each line
- for line in range(line_start, line_end)
- let text = getline(line)
-
- let l:end = matchend(text, '^\s*')
- if l:end == 0
- let new_text = '+ ' . text
- else
- let new_text = text[0 : l:end-1] . ' + ' . text[l:end :]
- endif
-
- call setline(line, new_text)
- endfor
-endfunction
-
-" Add hard line breaks for Markdown
-nnoremap \ :set operatorfunc=AddLineBreakg@
-xnoremap \ : call AddLineBreak(visualmode(), 1)
-
-function! AddLineBreak(type, ...) abort
- if a:0
- let line_start = line("'<")
- let line_end = line("'>")
- else
- let line_start = line("'[")
- let line_end = line("']")
- endif
-
- for line in range(line_start, line_end)
- let text = getline(line)
- " add backslash to each line
- let new_text = text . "\\"
-
- call setline(line, new_text)
- endfor
-endfunction
\ No newline at end of file
diff --git a/config/programs/vim/config/after/ftplugin/python.vim b/config/programs/vim/config/after/ftplugin/python.vim
deleted file mode 100644
index 7945bb38..00000000
--- a/config/programs/vim/config/after/ftplugin/python.vim
+++ /dev/null
@@ -1,21 +0,0 @@
-if exists(':AsyncRun')
- nnoremap :AsyncRun python -u "%"
-endif
-
-" Do not wrap Python source code.
-set nowrap
-set sidescroll=5
-set sidescrolloff=2
-set colorcolumn=100
-
-set tabstop=4 " number of visual spaces per TAB
-set softtabstop=4 " number of spaces in tab when editing
-set shiftwidth=4 " number of spaces to use for autoindent
-set expandtab " expand tab to spaces so that tabs are spaces
-
-" For delimitMate
-let b:delimitMate_matchpairs = "(:),[:],{:}"
-
-" Use nvim-treesitter for folding
-set foldmethod=expr
-set foldexpr=nvim_treesitter#foldexpr()
\ No newline at end of file
diff --git a/config/programs/vim/config/after/ftplugin/qf.vim b/config/programs/vim/config/after/ftplugin/qf.vim
deleted file mode 100644
index 5c125067..00000000
--- a/config/programs/vim/config/after/ftplugin/qf.vim
+++ /dev/null
@@ -1,6 +0,0 @@
-" Set quickfix window height, see also https://github.com/lervag/vimtex/issues/1127
-function! AdjustWindowHeight(minheight, maxheight)
- execute max([a:minheight, min([line('$'), a:maxheight])]) . 'wincmd _'
-endfunction
-
-call AdjustWindowHeight(5, 15)
\ No newline at end of file
diff --git a/config/programs/vim/config/after/ftplugin/sql.vim b/config/programs/vim/config/after/ftplugin/sql.vim
deleted file mode 100644
index 438ccbfb..00000000
--- a/config/programs/vim/config/after/ftplugin/sql.vim
+++ /dev/null
@@ -1 +0,0 @@
-set commentstring=--\ %s
\ No newline at end of file
diff --git a/config/programs/vim/config/after/ftplugin/tex.lua b/config/programs/vim/config/after/ftplugin/tex.lua
deleted file mode 100644
index 59893112..00000000
--- a/config/programs/vim/config/after/ftplugin/tex.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-vim.o.textwidth = 120
-vim.o.wrap = true
\ No newline at end of file
diff --git a/config/programs/vim/config/after/ftplugin/text.vim b/config/programs/vim/config/after/ftplugin/text.vim
deleted file mode 100644
index 1db62d3a..00000000
--- a/config/programs/vim/config/after/ftplugin/text.vim
+++ /dev/null
@@ -1 +0,0 @@
-set colorcolumn=
\ No newline at end of file
diff --git a/config/programs/vim/config/after/ftplugin/toml.vim b/config/programs/vim/config/after/ftplugin/toml.vim
deleted file mode 100644
index e69de29b..00000000
diff --git a/config/programs/vim/config/after/ftplugin/vim.vim b/config/programs/vim/config/after/ftplugin/vim.vim
deleted file mode 100644
index 6cc29752..00000000
--- a/config/programs/vim/config/after/ftplugin/vim.vim
+++ /dev/null
@@ -1,15 +0,0 @@
-" Disable inserting comment leader after hitting o or O or
-set formatoptions-=o
-set formatoptions-=r
-
-" Set the folding related options for vim script. Setting folding option in
-" modeline is annoying in that the modeline get executed each time the window
-" focus is lost (see
-" https://github.com/tmux-plugins/vim-tmux-focus-events/issues/14)
-set foldmethod=expr foldexpr=utils#VimFolds(v:lnum) foldtext=utils#MyFoldText()
-
-" Use :help command for keyword when pressing `K` in vim file,
-" see `:h K` and https://stackoverflow.com/q/15867323/6064933
-set keywordprg=:help
-
-nnoremap :source %
\ No newline at end of file
diff --git a/config/programs/vim/config/after/ftplugin/yaml.vim b/config/programs/vim/config/after/ftplugin/yaml.vim
deleted file mode 100644
index 27d8eb71..00000000
--- a/config/programs/vim/config/after/ftplugin/yaml.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Turn off syntax highlighting for large YAML files.
-if line('$') > 500
- setlocal syntax=OFF
-endif
\ No newline at end of file
diff --git a/config/programs/vim/config/autoload/buf_utls.vim b/config/programs/vim/config/autoload/buf_utls.vim
deleted file mode 100644
index 73d58d7a..00000000
--- a/config/programs/vim/config/autoload/buf_utls.vim
+++ /dev/null
@@ -1,30 +0,0 @@
-function! buf_utils#GoToBuffer(count, direction) abort
- if a:count == 0
- if a:direction ==# 'forward'
- bnext
- elseif a:direction ==# 'backward'
- bprevious
- else
- echoerr 'Bad argument ' a:direction
- endif
- return
- endif
- " Check the validity of buffer number.
- if index(s:GetBufNums(), a:count) == -1
- " Using `lua vim.notify('invalid bufnr: ' .. a:count)` won't work, because
- " we are essentially mixing Lua and vim script. We need to make sure that
- " args inside vim.notify() are valid vim values. The conversion from vim
- " value to lua value will be done by Nvim. See also https://github.com/neovim/neovim/pull/11338.
- call v:lua.vim.notify('Invalid bufnr: ' . a:count, 4, {'title': 'nvim-config'})
- return
- endif
-
- " Do not use {count} for gB (it is less useful)
- if a:direction ==# 'forward'
- silent execute('buffer' . a:count)
- endif
-endfunction
-
-function! s:GetBufNums() abort
- return map(copy(getbufinfo({'buflisted':1})), 'v:val.bufnr')
-endfunction
\ No newline at end of file
diff --git a/config/programs/vim/config/autoload/text_obj.vim b/config/programs/vim/config/autoload/text_obj.vim
deleted file mode 100644
index 3a60a690..00000000
--- a/config/programs/vim/config/autoload/text_obj.vim
+++ /dev/null
@@ -1,86 +0,0 @@
-function! text_obj#URL() abort
- if match(&runtimepath, 'vim-highlighturl') != -1
- " Note that we use https://github.com/itchyny/vim-highlighturl to get the URL pattern.
- let url_pattern = highlighturl#default_pattern()
- else
- let url_pattern = expand('')
- " Since expand('') also works for normal words, we need to check if
- " this is really URL using heuristics, e.g., URL length.
- if len(url_pattern) <= 10
- return
- endif
- endif
-
- " We need to find all possible URL on this line and their start, end index.
- " Then find where current cursor is, and decide if cursor is on one of the
- " URLs.
- let line_text = getline('.')
- let url_infos = []
-
- let [_url, _idx_start, _idx_end] = matchstrpos(line_text, url_pattern)
- while _url !=# ''
- let url_infos += [[_url, _idx_start+1, _idx_end]]
- let [_url, _idx_start, _idx_end] = matchstrpos(line_text, url_pattern, _idx_end)
- endwhile
-
- " echo url_infos
- " If no URL is found, do nothing.
- if len(url_infos) == 0
- return
- endif
-
- let [start_col, end_col] = [-1, -1]
- " If URL is found, find if cursor is on it.
- let [buf_num, cur_row, cur_col] = getcurpos()[0:2]
- for url_info in url_infos
- " echo url_info
- let [_url, _idx_start, _idx_end] = url_info
- if cur_col >= _idx_start && cur_col <= _idx_end
- let start_col = _idx_start
- let end_col = _idx_end
- break
- endif
- endfor
-
- " Cursor is not on a URL, do nothing.
- if start_col == -1
- return
- endif
-
- " Now set the '< and '> mark
- call setpos("'<", [buf_num, cur_row, start_col, 0])
- call setpos("'>", [buf_num, cur_row, end_col, 0])
- normal! gv
-endfunction
-
-function! text_obj#MdCodeBlock(type) abort
- " the parameter type specify whether it is inner text objects or around
- " text objects.
-
- " Move the cursor to the end of line in case that cursor is on the opening
- " of a code block. Actually, there are still issues if the cursor is on the
- " closing of a code block. In this case, the start row of code blocks would
- " be wrong. Unless we can match code blocks, it not easy to fix this.
- normal! $
- let start_row = searchpos('\s*```', 'bnW')[0]
- let end_row = searchpos('\s*```', 'nW')[0]
-
- let buf_num = bufnr()
- if a:type ==# 'i'
- let start_row += 1
- let end_row -= 1
- endif
- " echo a:type start_row end_row
-
- call setpos("'<", [buf_num, start_row, 1, 0])
- call setpos("'>", [buf_num, end_row, 1, 0])
- execute 'normal! `'
-endfunction
-
-function! text_obj#Buffer() abort
- let buf_num = bufnr()
-
- call setpos("'<", [buf_num, 1, 1, 0])
- call setpos("'>", [buf_num, line('$'), 1, 0])
- execute 'normal! `'
-endfunction
\ No newline at end of file
diff --git a/config/programs/vim/config/autoload/utils.vim b/config/programs/vim/config/autoload/utils.vim
deleted file mode 100644
index 9962f938..00000000
--- a/config/programs/vim/config/autoload/utils.vim
+++ /dev/null
@@ -1,194 +0,0 @@
-" Create command alias safely, see https://stackoverflow.com/q/3878692/6064933
-" The following two functions are taken from answer below on SO:
-" https://stackoverflow.com/a/10708687/6064933
-function! utils#Cabbrev(key, value) abort
- execute printf('cabbrev %s (getcmdtype() == ":" && getcmdpos() <= %d) ? %s : %s',
- \ a:key, 1+len(a:key), Single_quote(a:value), Single_quote(a:key))
-endfunction
-
-function! s:Single_quote(str) abort
- return "'" . substitute(copy(a:str), "'", "''", 'g') . "'"
-endfunction
-
-" Check the syntax group in the current cursor position, see
-" https://stackoverflow.com/q/9464844/6064933 and
-" https://jordanelver.co.uk/blog/2015/05/27/working-with-vim-colorschemes/
-function! utils#SynGroup() abort
- if !exists('*synstack')
- return
- endif
- echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
-endfunction
-
-" Check if a colorscheme exists in runtimepath.
-" The following two functions are inspired by https://stackoverflow.com/a/5703164/6064933.
-function! utils#HasColorscheme(name) abort
- let l:pat = printf('colors/%s.vim', a:name)
- return !empty(globpath(&runtimepath, l:pat))
-endfunction
-
-" Custom fold expr, adapted from https://vi.stackexchange.com/a/9094/15292
-function! utils#VimFolds(lnum) abort
- " get content of current line and the line below
- let l:cur_line = getline(a:lnum)
- let l:next_line = getline(a:lnum+1)
-
- if l:cur_line =~# '^"{'
- return '>' . (matchend(l:cur_line, '"{*') - 1)
- endif
-
- if l:cur_line ==# '' && (matchend(l:next_line, '"{*') - 1) == 1
- return 0
- endif
-
- return '='
-endfunction
-
-" Custom fold text, adapted from https://vi.stackexchange.com/a/3818/15292
-" and https://vi.stackexchange.com/a/6608/15292
-function! utils#MyFoldText() abort
- let l:line = getline(v:foldstart)
- let l:fold_line_num = v:foldend - v:foldstart
- let l:fold_text = substitute(l:line, '^"{\+', '', 'g')
- let l:fill_char_num = &textwidth - len(l:fold_text) - len(l:fold_line_num) - 10
- return printf('+%s%s %s (%s L)', repeat('-', 4), l:fold_text, repeat('-', l:fill_char_num), l:fold_line_num)
-endfunction
-
-" Toggle cursor column
-function! utils#ToggleCursorCol() abort
- if &cursorcolumn
- set nocursorcolumn
- echo 'cursorcolumn: OFF'
- else
- set cursorcolumn
- echo 'cursorcolumn: ON'
- endif
-endfunction
-
-function! utils#SwitchLine(src_line_idx, direction) abort
- if a:direction ==# 'up'
- if a:src_line_idx == 1
- return
- endif
- move-2
- elseif a:direction ==# 'down'
- if a:src_line_idx == line('$')
- return
- endif
- move+1
- endif
-endfunction
-
-function! utils#MoveSelection(direction) abort
- " only do this if previous mode is visual line mode. Once we press some keys in
- " visual line mode, we will leave this mode. So the output of `mode()` will be
- " `n` instead of `V`. We can use `visualmode()` instead to check the previous
- " mode, see also https://stackoverflow.com/a/61486601/6064933
- if visualmode() !=# 'V'
- return
- endif
-
- let l:start_line = line("'<")
- let l:end_line = line("'>")
- let l:num_line = l:end_line - l:start_line + 1
-
- if a:direction ==# 'up'
- if l:start_line == 1
- " we can also directly use `normal gv`, see https://stackoverflow.com/q/9724123/6064933
- normal! gv
- return
- endif
- silent execute printf('%s,%smove-2', l:start_line, l:end_line)
- normal! gv
- elseif a:direction ==# 'down'
- if l:end_line == line('$')
- normal! gv
- return
- endif
- silent execute printf('%s,%smove+%s', l:start_line, l:end_line, l:num_line)
- normal! gv
- endif
-endfunction
-
-
-function! utils#Get_titlestr() abort
- let l:title_str = ''
- if g:is_linux
- let l:title_str = hostname() . ' '
- endif
-
- let l:buf_path = expand('%:p:~')
- let l:title_str = l:title_str . l:buf_path . ' '
- if &buflisted && l:buf_path != ""
- let l:title_str = l:title_str . strftime('%Y-%m-%d %H:%M:%S%z', getftime(expand('%')))
- endif
-
- return l:title_str
-endfunction
-
-" Output current time or unix timestamp in human-readable format.
-function! utils#iso_time(timestamp) abort
- " Get current datetime
- if !a:timestamp
- return strftime('%Y-%m-%d %H:%M:%S%z')
- endif
-
- " this timestamp in expressed in milliseconds
- if len(a:timestamp) == 13
- let l:timestamp = a:timestamp[:-4]
- " this timestamp in expressed in microseconds
- elseif len(a:timestamp) == 16
- let l:timestamp = a:timestamp[:-7]
- else
- let l:timestamp = a:timestamp
- endif
- return strftime('%Y-%m-%d %H:%M:%S%z', l:timestamp)
-
-endfunction
-
-" Check if we are inside a Git repo.
-function! utils#Inside_git_repo() abort
- let res = system('git rev-parse --is-inside-work-tree')
- if match(res, 'true') == -1
- return v:false
- else
- " Manually trigger a special user autocmd InGitRepo (used lazyloading.
- doautocmd User InGitRepo
- return v:true
- endif
-endfunction
-
-function! utils#GetGitBranch()
- let l:res = systemlist('git rev-parse --abbrev-ref HEAD')[0]
- if match(l:res, 'fatal') != -1
- return ''
- else
- return l:res
- endif
-endfunction
-
-" Redirect command output to a register for later processing.
-" Ref: https://stackoverflow.com/q/2573021/6064933 and https://unix.stackexchange.com/q/8101/221410 .
-function! utils#CaptureCommandOutput(command) abort
- let l:tmp = @m
- redir @m
- silent! execute a:command
- redir END
-
- "create a scratch buffer for dumping the text, ref: https://vi.stackexchange.com/a/11311/15292.
- tabnew | setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile
-
- let l:lines = split(@m, '\n')
- call nvim_buf_set_lines(0, 0, 0, 0, l:lines)
-
- let @m = l:tmp
-endfunction
-
-" Edit all files matching the given patterns.
-function! utils#MultiEdit(patterns) abort
- for p in a:patterns
- for f in glob(p, 0, 1)
- execute 'edit ' . f
- endfor
- endfor
-endfunction
\ No newline at end of file
diff --git a/config/programs/vim/config/ftdetect/pdc.vim b/config/programs/vim/config/ftdetect/pdc.vim
deleted file mode 100644
index 1c4582a9..00000000
--- a/config/programs/vim/config/ftdetect/pdc.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-augroup det_md
- autocmd!
- autocmd BufRead,BufNewFile *.pdc set filetype=markdown
-augroup END
\ No newline at end of file
diff --git a/config/programs/vim/config/lua/colorschemes.lua b/config/programs/vim/config/lua/colorschemes.lua
deleted file mode 100644
index 221774b4..00000000
--- a/config/programs/vim/config/lua/colorschemes.lua
+++ /dev/null
@@ -1,4 +0,0 @@
-vim.g.catppuccin_flavour = "mocha"
-require("catppuccin").setup()
-
-vim.cmd([[colorscheme catppuccin]])
\ No newline at end of file
diff --git a/config/programs/vim/config/lua/config/bqf.lua b/config/programs/vim/config/lua/config/bqf.lua
deleted file mode 100644
index 087fa75a..00000000
--- a/config/programs/vim/config/lua/config/bqf.lua
+++ /dev/null
@@ -1,6 +0,0 @@
-require("bqf").setup {
- auto_resize_height = false,
- preview = {
- auto_preview = false,
- },
-}
\ No newline at end of file
diff --git a/config/programs/vim/config/lua/config/bufferline.lua b/config/programs/vim/config/lua/config/bufferline.lua
deleted file mode 100644
index 6fa27cee..00000000
--- a/config/programs/vim/config/lua/config/bufferline.lua
+++ /dev/null
@@ -1,46 +0,0 @@
-require("bufferline").setup {
- options = {
- numbers = "buffer_id",
- close_command = "bdelete! %d",
- right_mouse_command = nil,
- left_mouse_command = "buffer %d",
- middle_mouse_command = nil,
- indicator = {
- icon = "▎", -- this should be omitted if indicator style is not 'icon'
- style = "icon",
- },
- buffer_close_icon = "",
- modified_icon = "●",
- close_icon = "",
- left_trunc_marker = "",
- right_trunc_marker = "",
- max_name_length = 18,
- max_prefix_length = 15,
- tab_size = 10,
- diagnostics = false,
- custom_filter = function(bufnr)
- -- if the result is false, this buffer will be shown, otherwise, this
- -- buffer will be hidden.
-
- -- filter out filetypes you don't want to see
- local exclude_ft = { "qf", "fugitive", "git" }
- local cur_ft = vim.bo[bufnr].filetype
- local should_filter = vim.tbl_contains(exclude_ft, cur_ft)
-
- if should_filter then
- return false
- end
-
- return true
- end,
- show_buffer_icons = false,
- show_buffer_close_icons = true,
- show_close_icon = true,
- show_tab_indicators = true,
- persist_buffer_sort = true, -- whether or not custom sorted buffers should persist
- separator_style = "bar",
- enforce_regular_tabs = false,
- always_show_bufferline = true,
- sort_by = "id",
- },
-}
diff --git a/config/programs/vim/config/lua/config/cmp-ai.lua b/config/programs/vim/config/lua/config/cmp-ai.lua
deleted file mode 100644
index 5114f6ab..00000000
--- a/config/programs/vim/config/lua/config/cmp-ai.lua
+++ /dev/null
@@ -1,19 +0,0 @@
-local cmp_ai = require('cmp_ai.config')
-
-cmp_ai:setup({
- max_lines = 100,
- provider = 'Ollama',
- provider_options = {
- model = 'codellama:13b-code-q6_K',
- },
- notify = true,
- notify_callback = function(msg)
- vim.notify(msg)
- end,
- run_on_every_keystroke = true,
- ignored_file_types = {
- -- default is not to ignore
- -- uncomment to ignore in lua:
- -- lua = true
- },
-})
diff --git a/config/programs/vim/config/lua/config/dashboard-nvim.lua b/config/programs/vim/config/lua/config/dashboard-nvim.lua
deleted file mode 100644
index 9017d961..00000000
--- a/config/programs/vim/config/lua/config/dashboard-nvim.lua
+++ /dev/null
@@ -1,75 +0,0 @@
-local api = vim.api
-local keymap = vim.keymap
-local dashboard = require("dashboard")
-
-local conf = {}
-conf.header = {
- " ",
- " ",
- " ",
- " ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗",
- " ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║",
- " ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║",
- " ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║",
- " ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║",
- " ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝",
- " ",
- " ",
- " ",
- " ",
-}
-
-conf.center = {
- {
- icon = " ",
- desc = "Find File ",
- action = "Leaderf file --popup",
- key = " f f",
- },
- {
- icon = " ",
- desc = "Recently opened files ",
- action = "Leaderf mru --popup",
- key = " f r",
- },
- {
- icon = " ",
- desc = "Project grep ",
- action = "Leaderf rg --popup",
- key = " f g",
- },
- {
- icon = " ",
- desc = "Open Nvim config ",
- action = "tabnew $MYVIMRC | tcd %:p:h",
- key = " e v",
- },
- {
- icon = " ",
- desc = "New file ",
- action = "enew",
- key = "e",
- },
- {
- icon = " ",
- desc = "Quit Nvim ",
- -- desc = "Quit Nvim ",
- action = "qa",
- key = "q",
- },
-}
-
-dashboard.setup({
- theme = 'doom',
- shortcut_type = 'number',
- config = conf
-})
-
-api.nvim_create_autocmd("FileType", {
- pattern = "dashboard",
- group = api.nvim_create_augroup("dashboard_enter", { clear = true }),
- callback = function ()
- keymap.set("n", "q", ":qa", { buffer = true, silent = true })
- keymap.set("n", "e", ":enew", { buffer = true, silent = true })
- end
-})
diff --git a/config/programs/vim/config/lua/config/fidget-nvim.lua b/config/programs/vim/config/lua/config/fidget-nvim.lua
deleted file mode 100644
index f035acee..00000000
--- a/config/programs/vim/config/lua/config/fidget-nvim.lua
+++ /dev/null
@@ -1 +0,0 @@
-require("fidget").setup {}
\ No newline at end of file
diff --git a/config/programs/vim/config/lua/config/fugitive.lua b/config/programs/vim/config/lua/config/fugitive.lua
deleted file mode 100644
index 9a4ef904..00000000
--- a/config/programs/vim/config/lua/config/fugitive.lua
+++ /dev/null
@@ -1,11 +0,0 @@
-local keymap = vim.keymap
-
-keymap.set("n", "gs", "Git", { desc = "Git status" })
-keymap.set("n", "gw", "Gwrite", { desc = "Git add" })
-keymap.set("n", "gc", "Git commit", { desc = "Git commit" })
-keymap.set("n", "gd", "Gdiffsplit", { desc = "Git diff" })
-keymap.set("n", "gpl", "Git pull", { desc = "Git pull" })
-keymap.set("n", "gpu", "15 split|term git push", { desc = "Git push" })
-
--- convert git to Git in command line mode
-vim.fn['utils#Cabbrev']('git', 'Git')
\ No newline at end of file
diff --git a/config/programs/vim/config/lua/config/git-linker.lua b/config/programs/vim/config/lua/config/git-linker.lua
deleted file mode 100644
index 0ae451aa..00000000
--- a/config/programs/vim/config/lua/config/git-linker.lua
+++ /dev/null
@@ -1,37 +0,0 @@
-local keymap = vim.keymap
-local gitlinker = require("gitlinker")
-
-gitlinker.setup {
- callbacks = {
- ["dev.azure.com"] = function(url_data)
- vim.print(url_data)
- local url = require"gitlinker.hosts".get_base_https_url(url_data)
-
- if url_data.lstart then
- if url_data.lend == nil then
- url_data.lend = url_data.lstart
- end
- url = url .. "?path=/" .. url_data.file .. "&version=GC" .. url_data.rev .. "&line=" .. url_data.lstart .. "&lineEnd=" .. url_data.lend .. "&lineStartColumn=1" .. "&lineEndColumn=120"
- end
- return url
- end
- },
- mappings = nil,
-}
-
-keymap.set({ "n", "v" }, "gl", function()
- local mode = string.lower(vim.fn.mode())
- gitlinker.get_buf_range_url(mode)
-end, {
- silent = true,
- desc = "get git permlink",
-})
-
-keymap.set("n", "gb", function()
- gitlinker.get_repo_url({
- action_callback = gitlinker.actions.open_in_browser
- })
-end, {
- silent = true,
- desc = "browse repo in browser",
-})
\ No newline at end of file
diff --git a/config/programs/vim/config/lua/config/gitsigns.lua b/config/programs/vim/config/lua/config/gitsigns.lua
deleted file mode 100644
index 1a361d75..00000000
--- a/config/programs/vim/config/lua/config/gitsigns.lua
+++ /dev/null
@@ -1,57 +0,0 @@
-local gs = require("gitsigns")
-
-gs.setup {
- signs = {
- add = { text = "+" },
- change = { text = "~" },
- delete = { text = "_" },
- topdelete = { text = "‾" },
- changedelete = { text = "│" },
- },
- word_diff = true,
- on_attach = function(bufnr)
- local function map(mode, l, r, opts)
- opts = opts or {}
- opts.buffer = bufnr
- vim.keymap.set(mode, l, r, opts)
- end
-
- -- Navigation
- map("n", "]c", function()
- if vim.wo.diff then
- return "]c"
- end
- vim.schedule(function()
- gs.next_hunk()
- end)
- return ""
- end, { expr = true, desc = "next hunk" })
-
- map("n", "[c", function()
- if vim.wo.diff then
- return "[c"
- end
- vim.schedule(function()
- gs.prev_hunk()
- end)
- return ""
- end, { expr = true, desc = "previous hunk" })
-
- -- Actions
- map("n", "hp", gs.preview_hunk)
- map("n", "hb", function()
- gs.blame_line { full = true }
- end)
- end,
-}
-
-vim.api.nvim_create_autocmd('ColorScheme', {
- pattern = "*",
- callback = function()
- vim.cmd [[
- hi GitSignsChangeInline gui=reverse
- hi GitSignsAddInline gui=reverse
- hi GitSignsDeleteInline gui=reverse
- ]]
- end
-})
\ No newline at end of file
diff --git a/config/programs/vim/config/lua/config/hlslens.lua b/config/programs/vim/config/lua/config/hlslens.lua
deleted file mode 100644
index 430bd230..00000000
--- a/config/programs/vim/config/lua/config/hlslens.lua
+++ /dev/null
@@ -1,49 +0,0 @@
-local api = vim.api
-local keymap = vim.keymap
-
-local hlslens = require("hlslens")
-
-hlslens.setup {
- calm_down = true,
- nearest_only = true,
-}
-
-local activate_hlslens = function(direction)
- local cmd = string.format("normal! %s%szzzv", vim.v.count1, direction)
- local status, msg = pcall(vim.cmd, cmd)
-
- -- Deal with the case that there is no such pattern in current buffer.
- if not status then
- local start_idx, _ = string.find(msg, 'E486', 1, true)
- local msg_part = string.sub(msg, start_idx)
- api.nvim_err_writeln(msg_part)
- return
- end
-
- hlslens.start()
-end
-
-keymap.set("n", "n", "", {
- callback = function()
- activate_hlslens("n")
- end,
-})
-
-keymap.set("n", "N", "", {
- callback = function()
- activate_hlslens("N")
- end,
-})
-
-keymap.set("n", "*", "", {
- callback = function()
- vim.fn.execute("normal! *N")
- hlslens.start()
- end,
-})
-keymap.set("n", "#", "", {
- callback = function()
- vim.fn.execute("normal! #N")
- hlslens.start()
- end,
-})
diff --git a/config/programs/vim/config/lua/config/indent-blankline.lua b/config/programs/vim/config/lua/config/indent-blankline.lua
deleted file mode 100644
index 4ec03277..00000000
--- a/config/programs/vim/config/lua/config/indent-blankline.lua
+++ /dev/null
@@ -1,36 +0,0 @@
-local api = vim.api
-
-local exclude_ft = { "help", "git", "markdown", "text", "gitconfig", "alpha", "dashboard" }
-
-require("ibl").setup {
- indent = {
- -- -- U+2502 may also be a good choice, it will be on the middle of cursor.
- -- -- U+250A is also a good choice
- char = "▏",
- },
- scope = {
- show_start = false,
- show_end = false,
- },
- exclude = {
- filetypes = exclude_ft,
- buftypes = { "terminal" },
- },
-}
-
-local gid = api.nvim_create_augroup("indent_blankline", { clear = true })
-api.nvim_create_autocmd("InsertEnter", {
- pattern = "*",
- group = gid,
- command = "IBLDisable",
-})
-
-api.nvim_create_autocmd("InsertLeave", {
- pattern = "*",
- group = gid,
- callback = function()
- if not vim.tbl_contains(exclude_ft, vim.bo.filetype) then
- vim.cmd([[IBLEnable]])
- end
- end,
-})
diff --git a/config/programs/vim/config/lua/config/lsp.lua b/config/programs/vim/config/lua/config/lsp.lua
deleted file mode 100644
index ed500db3..00000000
--- a/config/programs/vim/config/lua/config/lsp.lua
+++ /dev/null
@@ -1,273 +0,0 @@
-local fn = vim.fn
-local api = vim.api
-local keymap = vim.keymap
-local lsp = vim.lsp
-local diagnostic = vim.diagnostic
-
-local utils = require("utils")
-
--- set quickfix list from diagnostics in a certain buffer, not the whole workspace
-local set_qflist = function(buf_num, severity)
- local diagnostics = nil
- diagnostics = diagnostic.get(buf_num, { severity = severity })
-
- local qf_items = diagnostic.toqflist(diagnostics)
- vim.fn.setqflist({}, ' ', { title = 'Diagnostics', items = qf_items })
-
- -- open quickfix by default
- vim.cmd[[copen]]
-end
-
-local custom_attach = function(client, bufnr)
- -- Mappings.
- local map = function(mode, l, r, opts)
- opts = opts or {}
- opts.silent = true
- opts.buffer = bufnr
- keymap.set(mode, l, r, opts)
- end
-
- map("n", "gd", vim.lsp.buf.definition, { desc = "go to definition" })
- map("n", "", vim.lsp.buf.definition)
- map("n", "K", vim.lsp.buf.hover)
- map("n", "", vim.lsp.buf.signature_help)
- map("n", "rn", vim.lsp.buf.rename, { desc = "varialbe rename" })
- map("n", "gr", vim.lsp.buf.references, { desc = "show references" })
- map("n", "[d", diagnostic.goto_prev, { desc = "previous diagnostic" })
- map("n", "]d", diagnostic.goto_next, { desc = "next diagnostic" })
- -- this puts diagnostics from opened files to quickfix
- map("n", "qw", diagnostic.setqflist, { desc = "put window diagnostics to qf" })
- -- this puts diagnostics from current buffer to quickfix
- map("n", "qb", function() set_qflist(bufnr) end, { desc = "put buffer diagnostics to qf" })
- map("n", "ca", vim.lsp.buf.code_action, { desc = "LSP code action" })
- map("n", "wa", vim.lsp.buf.add_workspace_folder, { desc = "add workspace folder" })
- map("n", "wr", vim.lsp.buf.remove_workspace_folder, { desc = "remove workspace folder" })
- map("n", "wl", function()
- inspect(vim.lsp.buf.list_workspace_folders())
- end, { desc = "list workspace folder" })
-
- -- Set some key bindings conditional on server capabilities
- if client.server_capabilities.documentFormattingProvider then
- map("n", "f", vim.lsp.buf.format, { desc = "format code" })
- end
-
- api.nvim_create_autocmd("CursorHold", {
- buffer = bufnr,
- callback = function()
- local float_opts = {
- focusable = false,
- close_events = { "BufLeave", "CursorMoved", "InsertEnter", "FocusLost" },
- border = "rounded",
- source = "always", -- show source in diagnostic popup window
- prefix = " ",
- }
-
- if not vim.b.diagnostics_pos then
- vim.b.diagnostics_pos = { nil, nil }
- end
-
- local cursor_pos = api.nvim_win_get_cursor(0)
- if (cursor_pos[1] ~= vim.b.diagnostics_pos[1] or cursor_pos[2] ~= vim.b.diagnostics_pos[2])
- and #diagnostic.get() > 0
- then
- diagnostic.open_float(nil, float_opts)
- end
-
- vim.b.diagnostics_pos = cursor_pos
- end,
- })
-
- -- The blow command will highlight the current variable and its usages in the buffer.
- if client.server_capabilities.documentHighlightProvider then
- vim.cmd([[
- hi! link LspReferenceRead Visual
- hi! link LspReferenceText Visual
- hi! link LspReferenceWrite Visual
- ]])
-
- local gid = api.nvim_create_augroup("lsp_document_highlight", { clear = true })
- api.nvim_create_autocmd("CursorHold" , {
- group = gid,
- buffer = bufnr,
- callback = function ()
- lsp.buf.document_highlight()
- end
- })
-
- api.nvim_create_autocmd("CursorMoved" , {
- group = gid,
- buffer = bufnr,
- callback = function ()
- lsp.buf.clear_references()
- end
- })
- end
-
- if vim.g.logging_level == "debug" then
- local msg = string.format("Language server %s started!", client.name)
- vim.notify(msg, vim.log.levels.DEBUG, { title = "Nvim-config" })
- end
-end
-
-local capabilities = require('cmp_nvim_lsp').default_capabilities()
-
-local lspconfig = require("lspconfig")
-
-if utils.executable("pylsp") then
- local venv_path = os.getenv('VIRTUAL_ENV')
- local py_path = nil
- -- decide which python executable to use for mypy
- if venv_path ~= nil then
- py_path = venv_path .. "/bin/python3"
- else
- py_path = vim.g.python3_host_prog
- end
-
- lspconfig.pylsp.setup {
- on_attach = custom_attach,
- settings = {
- pylsp = {
- plugins = {
- -- formatter options
- black = { enabled = true },
- autopep8 = { enabled = false },
- yapf = { enabled = false },
- -- linter options
- pylint = { enabled = true, executable = "pylint" },
- ruff = { enabled = false },
- pyflakes = { enabled = false },
- pycodestyle = { enabled = false },
- -- type checker
- pylsp_mypy = {
- enabled = true,
- overrides = { "--python-executable", py_path, true },
- report_progress = true,
- live_mode = false
- },
- -- auto-completion options
- jedi_completion = { fuzzy = true },
- -- import sorting
- isort = { enabled = true },
- },
- },
- },
- flags = {
- debounce_text_changes = 200,
- },
- capabilities = capabilities,
- }
-else
- --vim.notify("pylsp not found!", vim.log.levels.WARN, { title = "Nvim-config" })
-end
-
--- if utils.executable('pyright') then
--- lspconfig.pyright.setup{
--- on_attach = custom_attach,
--- capabilities = capabilities
--- }
--- else
--- vim.notify("pyright not found!", vim.log.levels.WARN, {title = 'Nvim-config'})
--- end
-
-if utils.executable("ltex-ls") then
- lspconfig.ltex.setup {
- on_attach = custom_attach,
- cmd = { "ltex-ls" },
- filetypes = { "text", "plaintex", "tex", "markdown" },
- settings = {
- ltex = {
- language = "en"
- },
- },
- flags = { debounce_text_changes = 300 },
-}
-end
-
-if utils.executable("clangd") then
- lspconfig.clangd.setup {
- on_attach = custom_attach,
- capabilities = capabilities,
- filetypes = { "c", "cpp", "cc" },
- flags = {
- debounce_text_changes = 500,
- },
- }
-end
-
--- set up vim-language-server
-if utils.executable("vim-language-server") then
- lspconfig.vimls.setup {
- on_attach = custom_attach,
- flags = {
- debounce_text_changes = 500,
- },
- capabilities = capabilities,
- }
-else
- -- vim.notify("vim-language-server not found!", vim.log.levels.WARN, { title = "Nvim-config" })
-end
-
--- set up bash-language-server
-if utils.executable("bash-language-server") then
- lspconfig.bashls.setup {
- on_attach = custom_attach,
- capabilities = capabilities,
- }
-end
-
-if utils.executable("lua-language-server") then
- -- settings for lua-language-server can be found on https://github.com/LuaLS/lua-language-server/wiki/Settings .
- lspconfig.lua_ls.setup {
- on_attach = custom_attach,
- settings = {
- Lua = {
- runtime = {
- -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
- version = "LuaJIT",
- },
- diagnostics = {
- -- Get the language server to recognize the `vim` global
- globals = { "vim" },
- },
- workspace = {
- -- Make the server aware of Neovim runtime files,
- -- see also https://github.com/LuaLS/lua-language-server/wiki/Libraries#link-to-workspace .
- -- Lua-dev.nvim also has similar settings for lua ls, https://github.com/folke/neodev.nvim/blob/main/lua/neodev/luals.lua .
- library = {
- vim.env.VIMRUNTIME,
- fn.stdpath("config"),
- },
- maxPreload = 2000,
- preloadFileSize = 50000,
- },
- },
- },
- capabilities = capabilities,
- }
-end
-
--- Change diagnostic signs.
-fn.sign_define("DiagnosticSignError", { text = '🆇', texthl = "DiagnosticSignError" })
-fn.sign_define("DiagnosticSignWarn", { text = '⚠️', texthl = "DiagnosticSignWarn" })
-fn.sign_define("DiagnosticSignInfo", { text = 'ℹ️', texthl = "DiagnosticSignInfo" })
-fn.sign_define("DiagnosticSignHint", { text = '', texthl = "DiagnosticSignHint" })
-
--- global config for diagnostic
-diagnostic.config {
- underline = false,
- virtual_text = false,
- signs = true,
- severity_sort = true,
-}
-
--- lsp.handlers["textDocument/publishDiagnostics"] = lsp.with(lsp.diagnostic.on_publish_diagnostics, {
--- underline = false,
--- virtual_text = false,
--- signs = true,
--- update_in_insert = false,
--- })
-
--- Change border of documentation hover window, See https://github.com/neovim/neovim/pull/13998.
-lsp.handlers["textDocument/hover"] = lsp.with(vim.lsp.handlers.hover, {
- border = "rounded",
-})
diff --git a/config/programs/vim/config/lua/config/nvim-cmp.lua b/config/programs/vim/config/lua/config/nvim-cmp.lua
deleted file mode 100644
index ca018296..00000000
--- a/config/programs/vim/config/lua/config/nvim-cmp.lua
+++ /dev/null
@@ -1,92 +0,0 @@
--- Setup nvim-cmp.
-local cmp = require("cmp")
-local lspkind = require("lspkind")
-
-cmp.setup {
- mapping = cmp.mapping.preset.insert {
- [""] = function(fallback)
- if cmp.visible() then
- cmp.select_next_item()
- else
- fallback()
- end
- end,
- [""] = function(fallback)
- if cmp.visible() then
- cmp.select_prev_item()
- else
- fallback()
- end
- end,
- [""] = cmp.mapping.confirm { select = true },
- [""] = cmp.mapping.abort(),
- [""] = cmp.mapping.close(),
- [""] = cmp.mapping.scroll_docs(-4),
- [""] = cmp.mapping.scroll_docs(4),
- [''] = cmp.mapping(
- cmp.mapping.complete({
- config = {
- sources = cmp.config.sources({
- { name = 'cmp_ai' },
- }),
- },
- }),
- { 'i' }
- ),
- },
- sources = {
- { name = "nvim_lsp" }, -- For nvim-lsp
- { name = "path" }, -- for path completion
- { name = "buffer", keyword_length = 2 }, -- for buffer word completion
- { name = "emoji", insert = true }, -- emoji completion
- },
- completion = {
- keyword_length = 1,
- completeopt = "menu,noselect",
- },
- view = {
- entries = "custom",
- },
- formatting = {
- format = lspkind.cmp_format {
- mode = "symbol_text",
- menu = {
- nvim_lsp = "[LSP]",
- nvim_lua = "[Lua]",
- path = "[Path]",
- buffer = "[Buffer]",
- emoji = "[Emoji]",
- omni = "[Omni]",
- },
- },
- },
-}
-
-cmp.setup.filetype("tex", {
- sources = {
- { name = "omni" },
- { name = "buffer", keyword_length = 2 }, -- for buffer word completion
- { name = "path" }, -- for path completion
- },
-})
-
--- see https://github.com/hrsh7th/nvim-cmp/wiki/Menu-Appearance#how-to-add-visual-studio-code-dark-theme-colors-to-the-menu
-vim.cmd([[
- highlight! link CmpItemMenu Comment
- " gray
- highlight! CmpItemAbbrDeprecated guibg=NONE gui=strikethrough guifg=#808080
- " blue
- highlight! CmpItemAbbrMatch guibg=NONE guifg=#569CD6
- highlight! CmpItemAbbrMatchFuzzy guibg=NONE guifg=#569CD6
- " light blue
- highlight! CmpItemKindVariable guibg=NONE guifg=#9CDCFE
- highlight! CmpItemKindInterface guibg=NONE guifg=#9CDCFE
- highlight! CmpItemKindText guibg=NONE guifg=#9CDCFE
- " pink
- highlight! CmpItemKindFunction guibg=NONE guifg=#C586C0
- highlight! CmpItemKindMethod guibg=NONE guifg=#C586C0
- " front
- highlight! CmpItemKindKeyword guibg=NONE guifg=#D4D4D4
- highlight! CmpItemKindProperty guibg=NONE guifg=#D4D4D4
- highlight! CmpItemKindUnit guibg=NONE guifg=#D4D4D4
-]])
diff --git a/config/programs/vim/config/lua/config/nvim-notify.lua b/config/programs/vim/config/lua/config/nvim-notify.lua
deleted file mode 100644
index 1ba0ece4..00000000
--- a/config/programs/vim/config/lua/config/nvim-notify.lua
+++ /dev/null
@@ -1,10 +0,0 @@
-local nvim_notify = require("notify")
-nvim_notify.setup {
- -- Animation style
- stages = "fade_in_slide_out",
- -- Default timeout for notifications
- timeout = 1500,
- background_colour = "#2E3440",
-}
-
-vim.notify = nvim_notify
\ No newline at end of file
diff --git a/config/programs/vim/config/lua/config/nvim-tree.lua b/config/programs/vim/config/lua/config/nvim-tree.lua
deleted file mode 100644
index 42309b15..00000000
--- a/config/programs/vim/config/lua/config/nvim-tree.lua
+++ /dev/null
@@ -1,108 +0,0 @@
-local keymap = vim.keymap
-local nvim_tree = require("nvim-tree")
-
-nvim_tree.setup {
- auto_reload_on_write = true,
- disable_netrw = false,
- hijack_netrw = true,
- hijack_cursor = false,
- hijack_unnamed_buffer_when_opening = false,
- open_on_tab = false,
- sort_by = "name",
- update_cwd = false,
- view = {
- width = 30,
- side = "left",
- preserve_window_proportions = false,
- number = false,
- relativenumber = false,
- signcolumn = "yes",
- },
- renderer = {
- indent_markers = {
- enable = false,
- icons = {
- corner = "└ ",
- edge = "│ ",
- none = " ",
- },
- },
- icons = {
- webdev_colors = true,
- },
- },
- hijack_directories = {
- enable = true,
- auto_open = true,
- },
- update_focused_file = {
- enable = false,
- update_cwd = false,
- ignore_list = {},
- },
- system_open = {
- cmd = "",
- args = {},
- },
- diagnostics = {
- enable = false,
- show_on_dirs = false,
- icons = {
- hint = "",
- info = "",
- warning = "",
- error = "",
- },
- },
- filters = {
- dotfiles = false,
- custom = {},
- exclude = {},
- },
- git = {
- enable = true,
- ignore = true,
- timeout = 400,
- },
- actions = {
- use_system_clipboard = true,
- change_dir = {
- enable = true,
- global = false,
- restrict_above_cwd = false,
- },
- open_file = {
- quit_on_open = false,
- resize_window = false,
- window_picker = {
- enable = true,
- chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
- exclude = {
- filetype = { "notify", "qf", "diff", "fugitive", "fugitiveblame" },
- buftype = { "nofile", "terminal", "help" },
- },
- },
- },
- },
- trash = {
- cmd = "trash",
- require_confirm = true,
- },
- log = {
- enable = false,
- truncate = false,
- types = {
- all = false,
- config = false,
- copy_paste = false,
- diagnostics = false,
- git = false,
- profile = false,
- },
- },
-}
-
-keymap.set("n", "s", require("nvim-tree.api").tree.toggle, {
- silent = true,
- desc = "toggle nvim-tree",
-})
\ No newline at end of file
diff --git a/config/programs/vim/config/lua/config/nvim_hop.lua b/config/programs/vim/config/lua/config/nvim_hop.lua
deleted file mode 100644
index 11aa60dc..00000000
--- a/config/programs/vim/config/lua/config/nvim_hop.lua
+++ /dev/null
@@ -1,28 +0,0 @@
-local keymap = vim.keymap
-local hop = require("hop")
-hop.setup {
- case_insensitive = true,
- char2_fallback_key = "",
- quit_key = "",
- match_mappings = { "zh_sc" }
-}
-
-keymap.set({ "n", "v", "o" }, "f", "", {
- silent = true,
- noremap = true,
- callback = function()
- hop.hint_char2()
- end,
- desc = "nvim-hop char2",
-})
-
-vim.api.nvim_create_autocmd("ColorScheme", {
- pattern = "*",
- callback = function()
- vim.cmd([[
- hi HopNextKey cterm=bold ctermfg=176 gui=bold guibg=#ff00ff guifg=#ffffff
- hi HopNextKey1 cterm=bold ctermfg=176 gui=bold guibg=#ff00ff guifg=#ffffff
- hi HopNextKey2 cterm=bold ctermfg=176 gui=bold guibg=#ff00ff guifg=#ffffff
- ]])
- end
-})
diff --git a/config/programs/vim/config/lua/config/statusline.lua b/config/programs/vim/config/lua/config/statusline.lua
deleted file mode 100644
index 0563ba64..00000000
--- a/config/programs/vim/config/lua/config/statusline.lua
+++ /dev/null
@@ -1,197 +0,0 @@
-local fn = vim.fn
-
-local function spell()
- if vim.o.spell then
- return string.format("[SPELL]")
- end
-
- return ""
-end
-
---- show indicator for Chinese IME
-local function ime_state()
- if vim.g.is_mac then
- -- ref: https://github.com/vim-airline/vim-airline/blob/master/autoload/airline/extensions/xkblayout.vim#L11
- local layout = fn.libcall(vim.g.XkbSwitchLib, "Xkb_Switch_getXkbLayout", "")
-
- -- We can use `xkbswitch -g` on the command line to get current mode.
- -- mode for macOS builtin pinyin IME: com.apple.inputmethod.SCIM.ITABC
- -- mode for Rime: im.rime.inputmethod.Squirrel.Rime
- local res = fn.match(layout, [[\v(Squirrel\.Rime|SCIM.ITABC)]])
- if res ~= -1 then
- return "[CN]"
- end
- end
-
- return ""
-end
-
-local function trailing_space()
- if not vim.o.modifiable then
- return ""
- end
-
- local line_num = nil
-
- for i = 1, fn.line("$") do
- local linetext = fn.getline(i)
- -- To prevent invalid escape error, we wrap the regex string with `[[]]`.
- local idx = fn.match(linetext, [[\v\s+$]])
-
- if idx ~= -1 then
- line_num = i
- break
- end
- end
-
- local msg = ""
- if line_num ~= nil then
- msg = string.format("[%d]trailing", line_num)
- end
-
- return msg
-end
-
-local function mixed_indent()
- if not vim.o.modifiable then
- return ""
- end
-
- local space_pat = [[\v^ +]]
- local tab_pat = [[\v^\t+]]
- local space_indent = fn.search(space_pat, "nwc")
- local tab_indent = fn.search(tab_pat, "nwc")
- local mixed = (space_indent > 0 and tab_indent > 0)
- local mixed_same_line
- if not mixed then
- mixed_same_line = fn.search([[\v^(\t+ | +\t)]], "nwc")
- mixed = mixed_same_line > 0
- end
- if not mixed then
- return ""
- end
- if mixed_same_line ~= nil and mixed_same_line > 0 then
- return "MI:" .. mixed_same_line
- end
- local space_indent_cnt = fn.searchcount({ pattern = space_pat, max_count = 1e3 }).total
- local tab_indent_cnt = fn.searchcount({ pattern = tab_pat, max_count = 1e3 }).total
- if space_indent_cnt > tab_indent_cnt then
- return "MI:" .. tab_indent
- else
- return "MI:" .. space_indent
- end
-end
-
-local diff = function()
- local git_status = vim.b.gitsigns_status_dict
- if git_status == nil then
- return
- end
-
- local modify_num = git_status.changed
- local remove_num = git_status.removed
- local add_num = git_status.added
-
- local info = { added = add_num, modified = modify_num, removed = remove_num }
- -- vim.print(info)
- return info
-end
-
-local virtual_env = function()
- -- only show virtual env for Python
- if vim.bo.filetype ~= 'python' then
- return ""
- end
-
- local conda_env = os.getenv('CONDA_DEFAULT_ENV')
- local venv_path = os.getenv('VIRTUAL_ENV')
-
- if venv_path == nil then
- if conda_env == nil then
- return ""
- else
- return string.format(" %s (conda)", conda_env)
- end
- else
- local venv_name = vim.fn.fnamemodify(venv_path, ':t')
- return string.format(" %s (venv)", venv_name)
- end
-end
-
-require("lualine").setup {
- options = {
- icons_enabled = true,
- theme = "auto",
- -- component_separators = { left = "", right = "" },
- -- section_separators = { left = "", right = "" },
- section_separators = "",
- component_separators = "",
- disabled_filetypes = {},
- always_divide_middle = true,
- },
- sections = {
- lualine_a = { "mode" },
- lualine_b = {
- "branch",
- {
- "diff",
- source = diff,
- },
- {
- virtual_env,
- color = { fg = 'black', bg = "#F1CA81" }
- }
- },
- lualine_c = {
- "filename",
- {
- ime_state,
- color = { fg = "black", bg = "#f46868" },
- },
- {
- spell,
- color = { fg = "black", bg = "#a7c080" },
- },
- {
- "diagnostics",
- sources = { "nvim_diagnostic" },
- symbols = {error = '🆇 ', warn = '⚠️ ', info = 'ℹ️ ', hint = ' '},
- },
- },
- lualine_x = {
- "encoding",
- {
- "fileformat",
- symbols = {
- unix = "unix",
- dos = "win",
- mac = "mac",
- },
- },
- "filetype",
- },
- lualine_y = {
- "location",
- },
- lualine_z = {
- {
- trailing_space,
- color = "WarningMsg",
- },
- {
- mixed_indent,
- color = "WarningMsg",
- },
- },
- },
- inactive_sections = {
- lualine_a = {},
- lualine_b = {},
- lualine_c = { "filename" },
- lualine_x = { "location" },
- lualine_y = {},
- lualine_z = {},
- },
- tabline = {},
- extensions = { "quickfix", "fugitive", "nvim-tree" },
-}
diff --git a/config/programs/vim/config/lua/config/treesitter.lua b/config/programs/vim/config/lua/config/treesitter.lua
deleted file mode 100644
index 78b81d7d..00000000
--- a/config/programs/vim/config/lua/config/treesitter.lua
+++ /dev/null
@@ -1,8 +0,0 @@
-require("nvim-treesitter.configs").setup {
- ensure_installed = {},
- ignore_install = {}, -- List of parsers to ignore installing
- highlight = {
- enable = true, -- false will disable the whole extension
- disable = { 'help' }, -- list of language that will be disabled
- },
-}
\ No newline at end of file
diff --git a/config/programs/vim/config/lua/config/which-key.lua b/config/programs/vim/config/lua/config/which-key.lua
deleted file mode 100644
index 8eaab777..00000000
--- a/config/programs/vim/config/lua/config/which-key.lua
+++ /dev/null
@@ -1,60 +0,0 @@
-require("which-key").setup {
- plugins = {
- marks = true, -- shows a list of your marks on ' and `
- registers = true, -- shows your registers on " in NORMAL or in INSERT mode
- spelling = {
- enabled = true, -- enabling this will show WhichKey when pressing z= to select spelling suggestions
- suggestions = 9, -- how many suggestions should be shown in the list?
- },
- -- the presets plugin, adds help for a bunch of default keybindings in Neovim
- -- No actual key bindings are created
- presets = {
- operators = true, -- adds help for operators like d, y, ... and registers them for motion / text object completion
- motions = true, -- adds help for motions
- text_objects = true, -- help for text objects triggered after entering an operator
- windows = true, -- default bindings on
- nav = true, -- misc bindings to work with windows
- z = true, -- bindings for folds, spelling and others prefixed with z
- g = true, -- bindings for prefixed with g
- },
- },
- -- add operators that will trigger motion and text object completion
- -- to enable all native operators, set the preset / operators plugin above
- operators = { gc = "Comments" },
- key_labels = {
- -- override the label used to display some keys. It doesn't effect WK in any other way.
- -- For example:
- -- [""] = "SPC",
- -- [""] = "RET",
- -- [""] = "TAB",
- },
- icons = {
- breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
- separator = "➜", -- symbol used between a key and it's label
- group = "+", -- symbol prepended to a group
- },
- window = {
- border = "none", -- none, single, double, shadow
- position = "bottom", -- bottom, top
- margin = { 0, 0, 0, 0 }, -- extra window margin [top, right, bottom, left]
- padding = { 1, 0, 1, 0 }, -- extra window padding [top, right, bottom, left]
- },
- layout = {
- height = { min = 1, max = 25 }, -- min and max height of the columns
- width = { min = 20, max = 50 }, -- min and max width of the columns
- spacing = 1, -- spacing between columns
- align = "center", -- align columns left, center or right
- },
- ignore_missing = false, -- enable this to hide mappings for which you didn't specify a label
- hidden = { "", "", "", "", "call", "lua", "^:", "^ " }, -- hide mapping boilerplate
- show_help = true, -- show help message on the command line when the popup is visible
- triggers = "auto", -- automatically setup triggers
- -- triggers = {""} -- or specify a list manually
-
- triggers_blacklist = {
- -- list of mode / prefixes that should never be hooked by WhichKey
- -- this is mostly relevant for key maps that start with a native binding
- -- most people should not need to change this
- n = { "o", "O" },
- },
-}
\ No newline at end of file
diff --git a/config/programs/vim/config/lua/config/yanky.lua b/config/programs/vim/config/lua/config/yanky.lua
deleted file mode 100644
index 1f067646..00000000
--- a/config/programs/vim/config/lua/config/yanky.lua
+++ /dev/null
@@ -1,13 +0,0 @@
-require("yanky").setup({
- ring = {
- history_length = 50,
- storage = "memory",
- },
- preserve_cursor_position = {
- enabled = false,
- },
-})
-
--- cycle through the yank history, only work after paste
-vim.keymap.set("n", "[y", "(YankyCycleForward)")
-vim.keymap.set("n", "]y", "(YankyCycleBackward)")
\ No newline at end of file
diff --git a/config/programs/vim/config/lua/config/zen-mode.lua b/config/programs/vim/config/lua/config/zen-mode.lua
deleted file mode 100644
index 05e833d9..00000000
--- a/config/programs/vim/config/lua/config/zen-mode.lua
+++ /dev/null
@@ -1,15 +0,0 @@
-require("zen-mode").setup {
- window = {
- backdrop = 0.8, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
- width = 120,
- options = {
- -- signcolumn = "no", -- disable signcolumn
- -- number = false, -- disable number column
- -- relativenumber = false, -- disable relative numbers
- cursorline = false, -- disable cursorline
- cursorcolumn = false, -- disable cursor column
- foldcolumn = "0", -- disable fold column
- list = false, -- disable whitespace characters
- },
- },
-}
\ No newline at end of file
diff --git a/config/programs/vim/config/lua/custom-autocmd.lua b/config/programs/vim/config/lua/custom-autocmd.lua
deleted file mode 100644
index 7e805140..00000000
--- a/config/programs/vim/config/lua/custom-autocmd.lua
+++ /dev/null
@@ -1,105 +0,0 @@
-local fn = vim.fn
-local api = vim.api
-
-local utils = require("utils")
-
--- Display a message when the current file is not in utf-8 format.
--- Note that we need to use `unsilent` command here because of this issue:
--- https://github.com/vim/vim/issues/4379
-api.nvim_create_autocmd({ "BufRead" }, {
- pattern = "*",
- group = api.nvim_create_augroup("non_utf8_file", { clear = true }),
- callback = function()
- if vim.bo.fileencoding ~= "utf-8" then
- vim.notify("File not in UTF-8 format!", vim.log.levels.WARN, { title = "nvim-config" })
- end
- end,
-})
-
--- highlight yanked region, see `:h lua-highlight`
-local yank_group = api.nvim_create_augroup("highlight_yank", { clear = true })
-api.nvim_create_autocmd({ "TextYankPost" }, {
- pattern = "*",
- group = yank_group,
- callback = function()
- vim.highlight.on_yank { higroup = "YankColor", timeout = 300 }
- end,
-})
-
-api.nvim_create_autocmd({ "CursorMoved" }, {
- pattern = "*",
- group = yank_group,
- callback = function()
- vim.g.current_cursor_pos = vim.fn.getcurpos()
- end,
-})
-
-api.nvim_create_autocmd("TextYankPost", {
- pattern = "*",
- group = yank_group,
- callback = function(ev)
- if vim.v.event.operator == 'y' then
- vim.fn.setpos('.', vim.g.current_cursor_pos)
- end
- end,
-})
-
--- Auto-create dir when saving a file, in case some intermediate directory does not exist
-api.nvim_create_autocmd({ "BufWritePre" }, {
- pattern = "*",
- group = api.nvim_create_augroup("auto_create_dir", { clear = true }),
- callback = function(ctx)
- local dir = fn.fnamemodify(ctx.file, ":p:h")
- utils.may_create_dir(dir)
- end,
-})
-
--- Automatically reload the file if it is changed outside of Nvim, see https://unix.stackexchange.com/a/383044/221410.
--- It seems that `checktime` does not work in command line. We need to check if we are in command
--- line before executing this command, see also https://vi.stackexchange.com/a/20397/15292 .
-api.nvim_create_augroup("auto_read", { clear = true })
-
-api.nvim_create_autocmd({ "FileChangedShellPost" }, {
- pattern = "*",
- group = "auto_read",
- callback = function()
- vim.notify("File changed on disk. Buffer reloaded!", vim.log.levels.WARN, { title = "nvim-config" })
- end,
-})
-
-api.nvim_create_autocmd({ "FocusGained", "CursorHold" }, {
- pattern = "*",
- group = "auto_read",
- callback = function()
- if fn.getcmdwintype() == "" then
- vim.cmd("checktime")
- end
- end,
-})
-
--- Resize all windows when we resize the terminal
-api.nvim_create_autocmd("VimResized", {
- group = api.nvim_create_augroup("win_autoresize", { clear = true }),
- desc = "autoresize windows on resizing operation",
- command = "wincmd =",
-})
-
-local function open_nvim_tree(data)
- -- check if buffer is a directory
- local directory = vim.fn.isdirectory(data.file) == 1
-
- if not directory then
- return
- end
-
- -- create a new, empty buffer
- vim.cmd.enew()
-
- -- wipe the directory buffer
- vim.cmd.bw(data.buf)
-
- -- open the tree
- require("nvim-tree.api").tree.open()
-end
-
-vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
\ No newline at end of file
diff --git a/config/programs/vim/config/lua/mappings.lua b/config/programs/vim/config/lua/mappings.lua
deleted file mode 100644
index c06f78f6..00000000
--- a/config/programs/vim/config/lua/mappings.lua
+++ /dev/null
@@ -1,231 +0,0 @@
-local keymap = vim.keymap
-local api = vim.api
-local uv = vim.uv
-
--- Save key strokes (now we do not need to press shift to enter command mode).
-keymap.set({ "n", "x" }, ";", ":")
-
--- Turn the word under cursor to upper case
-keymap.set("i", "", "viwUea")
-
--- Turn the current word into title case
-keymap.set("i", "", "b~lea")
-
--- Paste non-linewise text above or below current line, see https://stackoverflow.com/a/1346777/6064933
-keymap.set("n", "p", "m`op``", { desc = "paste below current line" })
-keymap.set("n", "P", "m`Op``", { desc = "paste above current line" })
-
--- Shortcut for faster save and quit
-keymap.set("n", "w", "update", { silent = true, desc = "save buffer" })
-
--- Saves the file if modified and quit
-keymap.set("n", "q", "x", { silent = true, desc = "quit current window" })
-
--- Quit all opened buffers
-keymap.set("n", "Q", "qa!", { silent = true, desc = "quit nvim" })
-
--- Navigation in the location and quickfix list
-keymap.set("n", "[l", "lpreviouszv", { silent = true, desc = "previous location item" })
-keymap.set("n", "]l", "lnextzv", { silent = true, desc = "next location item" })
-
-keymap.set("n", "[L", "lfirstzv", { silent = true, desc = "first location item" })
-keymap.set("n", "]L", "llastzv", { silent = true, desc = "last location item" })
-
-keymap.set("n", "[q", "cpreviouszv", { silent = true, desc = "previous qf item" })
-keymap.set("n", "]q", "cnextzv", { silent = true, desc = "next qf item" })
-
-keymap.set("n", "[Q", "cfirstzv", { silent = true, desc = "first qf item" })
-keymap.set("n", "]Q", "clastzv", { silent = true, desc = "last qf item" })
-
--- Close location list or quickfix list if they are present, see https://superuser.com/q/355325/736190
-keymap.set("n", [[\x]], "windo lclose cclose ", {
- silent = true,
- desc = "close qf and location list",
-})
-
--- Delete a buffer, without closing the window, see https://stackoverflow.com/q/4465095/6064933
-keymap.set("n", [[\d]], "bprevious bdelete #", {
- silent = true,
- desc = "delete buffer",
-})
-
--- Insert a blank line below or above current line (do not move the cursor),
--- see https://stackoverflow.com/a/16136133/6064933
-keymap.set("n", "o", "printf('m`%so``', v:count1)", {
- expr = true,
- desc = "insert line below",
-})
-
-keymap.set("n", "O", "printf('m`%sO``', v:count1)", {
- expr = true,
- desc = "insert line above",
-})
-
--- Move the cursor based on physical lines, not the actual lines.
-keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true })
-keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true })
-keymap.set("n", "^", "g^")
-keymap.set("n", "0", "g0")
-
--- Do not include white space characters when using $ in visual mode,
--- see https://vi.stackexchange.com/q/12607/15292
-keymap.set("x", "$", "g_")
-
--- Go to start or end of line easier
-keymap.set({ "n", "x" }, "H", "^")
-keymap.set({ "n", "x" }, "L", "g_")
-
--- Continuous visual shifting (does not exit Visual mode), `gv` means
--- to reselect previous visual area, see https://superuser.com/q/310417/736190
-keymap.set("x", "<", "", ">gv")
-
--- Edit and reload nvim config file quickly
-keymap.set("n", "ev", "tabnew $MYVIMRC tcd %:h", {
- silent = true,
- desc = "open init.lua",
-})
-
-keymap.set("n", "sv", function()
- vim.cmd([[
- update $MYVIMRC
- source $MYVIMRC
- ]])
- vim.notify("Nvim config successfully reloaded!", vim.log.levels.INFO, { title = "nvim-config" })
-end, {
- silent = true,
- desc = "reload init.lua",
-})
-
--- Reselect the text that has just been pasted, see also https://stackoverflow.com/a/4317090/6064933.
-keymap.set("n", "v", "printf('`[%s`]', getregtype()[0])", {
- expr = true,
- desc = "reselect last pasted area",
-})
-
--- Always use very magic mode for searching
--- keymap.set("n", "/", [[/\v]])
-
--- Search in selected region
--- xnoremap / :call feedkeys('/\%>'.(line("'<")-1).'l\%<'.(line("'>")+1)."l")
-
--- Change current working directory locally and print cwd after that,
--- see https://vim.fandom.com/wiki/Set_working_directory_to_the_current_file
-keymap.set("n", "cd", "lcd %:p:hpwd", { desc = "change cwd" })
-
--- Use Esc to quit builtin terminal
-keymap.set("t", "", [[]])
-
--- Toggle spell checking
-keymap.set("n", "", "set spell!", { desc = "toggle spell" })
-keymap.set("i", "", "set spell!", { desc = "toggle spell" })
-
--- Change text without putting it into the vim register,
--- see https://stackoverflow.com/q/54255/6064933
-keymap.set("n", "c", '"_c')
-keymap.set("n", "C", '"_C')
-keymap.set("n", "cc", '"_cc')
-keymap.set("x", "c", '"_c')
-
--- Remove trailing whitespace characters
-keymap.set("n", "", "StripTrailingWhitespace", { desc = "remove trailing space" })
-
--- check the syntax group of current cursor position
-keymap.set("n", "st", "call utils#SynGroup()", { desc = "check syntax group" })
-
--- Copy entire buffer.
-keymap.set("n", "y", "%yank", { desc = "yank entire buffer" })
-
--- Toggle cursor column
-keymap.set("n", "cl", "call utils#ToggleCursorCol()", { desc = "toggle cursor column" })
-
--- Move current line up and down
-keymap.set("n", "", 'call utils#SwitchLine(line("."), "up")', { desc = "move line up" })
-keymap.set("n", "", 'call utils#SwitchLine(line("."), "down")', { desc = "move line down" })
-
--- Move current visual-line selection up and down
-keymap.set("x", "", 'call utils#MoveSelection("up")', { desc = "move selection up" })
-
-keymap.set("x", "", 'call utils#MoveSelection("down")', { desc = "move selection down" })
-
--- Replace visual selection with text in register, but not contaminate the register,
--- see also https://stackoverflow.com/q/10723700/6064933.
-keymap.set("x", "p", '"_cp')
-
--- Go to a certain buffer
-keymap.set("n", "gb", 'call buf_utils#GoToBuffer(v:count, "forward")', {
- desc = "go to buffer (forward)",
-})
-keymap.set("n", "gB", 'call buf_utils#GoToBuffer(v:count, "backward")', {
- desc = "go to buffer (backward)",
-})
-
--- Switch windows
-keymap.set("n", "", "h")
-keymap.set("n", "", "l")
-keymap.set("n", "", "k")
-keymap.set("n", "", "j")
-
--- Text objects for URL
-keymap.set({ "x", "o" }, "iu", "call text_obj#URL()", { desc = "URL text object" })
-
--- Text objects for entire buffer
-keymap.set({ "x", "o" }, "iB", ":call text_obj#Buffer()", { desc = "buffer text object" })
-
--- Do not move my cursor when joining lines.
-keymap.set("n", "J", function()
- vim.cmd([[
- normal! mzJ`z
- delmarks z
- ]])
-end, {
- desc = "join lines without moving cursor",
-})
-
-keymap.set("n", "gJ", function()
- -- we must use `normal!`, otherwise it will trigger recursive mapping
- vim.cmd([[
- normal! mzgJ`z
- delmarks z
- ]])
-end, {
- desc = "join lines without moving cursor",
-})
-
--- Break inserted text into smaller undo units when we insert some punctuation chars.
-local undo_ch = { ",", ".", "!", "?", ";", ":" }
-for _, ch in ipairs(undo_ch) do
- keymap.set("i", ch, ch .. "u")
-end
-
--- insert semicolon in the end
-keymap.set("i", "", "miA;`ii")
-
--- Go to the beginning and end of current line in insert mode quickly
-keymap.set("i", "", "