diff --git a/.git-crypt/.gitattributes b/.git-crypt/.gitattributes new file mode 100644 index 0000000..665b10e --- /dev/null +++ b/.git-crypt/.gitattributes @@ -0,0 +1,4 @@ +# Do not edit this file. To specify the files to encrypt, create your own +# .gitattributes file in the directory where your files are. +* !filter !diff +*.gpg binary diff --git a/.git-crypt/keys/default/0/EBD15FF520C7C7204D431FB096CC5C98FEB6588D.gpg b/.git-crypt/keys/default/0/EBD15FF520C7C7204D431FB096CC5C98FEB6588D.gpg new file mode 100644 index 0000000..6c29a14 Binary files /dev/null and b/.git-crypt/keys/default/0/EBD15FF520C7C7204D431FB096CC5C98FEB6588D.gpg differ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..a9fc17b --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +nixos/secrets/** filter=git-crypt diff=git-crypt diff --git a/README.md b/README.md index 66bae0b..3247fae 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,18 @@ # sisyphus -Welcome to my dotfiles repository, named Sisyphus. This repository houses the configurations for my Linux machines, spanning various distributions. Please note that not all configurations may be up-to-date or fully functional. If you decide to use these configurations for your own machines, be prepared for potential issues. Nevertheless, feel free to borrow or draw inspiration from this collection. - -## Organisation - -To maintain clarity and versatility, I've organized my configuration files into distinct subdirectories. The "bare" configuration files, those you typically find in your `~/.config` directory, are located in [stow](./stow). This separation allows for a streamlined approach to managing configurations, while other subdirectories house OS-specific settings. +This repository serves as my dotfiles. It contains the configuration for my Linux machine(s), for multiple distributions. Not everything might be up to date and/or working, so don't expect a working machine if you try to use this configuration for your own machines. However, feel free to steal some parts or be inspired. - [Arch Linux](./arch) (+ [stow](./stow)) -- [NixOS](./nixos) (+ [stow](./stow)) +- [Nixos](./nixos) -## The Sisyphus Analogy +## Analogy -The Sisyphus analogy is a straightforward one. +The analogy is quite simple. -Throughout my journey with Linux, especially during my time as a student, I found myself reinstalling my operating system countless times. Whether it was due to a botched installation, unsatisfactory performance, or simply the desire for a fresh start, I've been there. Things escalated when I began tinkering extensively with machine configurations, often resulting in disk management mishaps. It was clear that I needed to find a way to put an end to these frequent reinstallations, contain my configurations, and maintain system stability. This repository represents my solution to these challenges. +Over the course of getting to know Linux and during my career as a student, I had to reinstall my OS SO so so many times, either because I bricked my previous install, or because things weren't working the way I wanted them to or even because I found the current install to be cluttered. On a particular day, I had installed Arch (that's what I started with back then) over ten times, which is my personal record of most-installed-computers-in-one-day so far. I also managed to speedrun the installation process to 8min30sec for the kernel with an additional 4min30sec for installing Sway (fun fact/did you know?). -I hope that by maintaining this repository, I can minimize the challenges of breaking my laptop and make configurations easily accessible. They are designed to be relatively static and require as little user input as reasonably possible during installation. +Later, this worsened even more when I had way too much fun playing around with the machine configuration. (Managing disks is prone to errors!) I hope my addaction to breaking my laptop will ease with this repo: keeping everything easily accessible, often statically configured, so that it can be installed with as little input as (reasonably) possible. -TL;DR: My journey with Linux was a challenging one, marked by frequent restarts, which is why I chose the name Sisyphus as an analogy from [Greek mythology](https://en.wikipedia.org/wiki/Sisyphus). +TL;DR: Discovering Linux was a tedious process and I had to start over several times, hence the analogy with [Sisyphus, greek mythology](https://en.wikipedia.org/wiki/Sisyphus). -P.S. While the name "Sisyphus" has a deep mythological significance, it also sounds cool and conveniently contains "sys" from "system" in its name. But, let's keep that our little secret, shall we? +*But also because it sounds cool and it has the sys from sytem in the name, don't tell anyone this though.* diff --git a/arch/stow/_scripts/.scripts/cleandependencies.sh b/arch/stow/_scripts/.scripts/cleandependencies.sh new file mode 100755 index 0000000..7fac670 --- /dev/null +++ b/arch/stow/_scripts/.scripts/cleandependencies.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +# Remove unused dependencies that are not explicitly installed +# Usage: [sudo] cleandependencies + +# Retrieve a list of all packages that are not explicitly installed and are not needed by anything else. +# Note that optional dependencies also do not get removed. +# function getList () { +# grep "Name\|Required By\|Optional For\|Install Reason" <<< $(pacman -Qi) | +# tr '\n' ';' | sed "s/$/\n/" | +# sed "s/ */ /g" | +# sed "s/Name/\nName/g" | +# sed "s/\(Name\|Required By\|Optional For\|Install Reason\) : //g" | +# grep "Installed as a dependency for another package" | +# grep "^[^;]*;None;None" | +# cut -f 1 -d ';' +# } ; export -f getList + +current_amount=$(pacman -Qdtq | wc -l) +# Keep looping while there are unusded dependencies. +# Stop when the next amount is the same, probably because the action was canceled. +while [[ ${current_amount} -ne 0 && ${current_amount} -ne ${previous_amount:=0} ]] ; do + previous_amount=${current_amount} + pacman -R $(pacman -Qdtq) + current_amount=$(pacman -Qdtq | wc -l) +done + diff --git a/arch/stow/_scripts/.scripts/dnd.sh b/arch/stow/_scripts/.scripts/dnd.sh new file mode 100755 index 0000000..5037511 --- /dev/null +++ b/arch/stow/_scripts/.scripts/dnd.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +# Script to toggle Do not disturb mode for mako and dunst + +# Permanent memory +saved_state=0 + +# Toggle +if [[ ${saved_state} -eq 0 ]] ; then + ~/.scripts/notify.sh 'Hiding notifications' + sleep 5 + makoctl set-mode do-not-disturb + dunstctl set-paused true +else + makoctl set-mode default + dunstctl set-paused false + ~/.scripts/notify.sh 'Showing notifications' +fi + +# Update status in file +new_state=$(( (${saved_state} + 1) % 2 )) +sed -i "s/^saved_state=.*$/saved_state=${new_state}/" "${0}" + diff --git a/arch/stow/_scripts/.scripts/focus.sh b/arch/stow/_scripts/.scripts/focus.sh new file mode 100755 index 0000000..37f9bcd --- /dev/null +++ b/arch/stow/_scripts/.scripts/focus.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# Script to toggle black background to focus on sway + +# Get instances of swaybg, except for the 'standard' one. +list=$( pgrep swaybg | head -n -1 ) + +if [ -z "${list}" ] ; then + swaybg --mode=solid_color --color=#000000 & + # Give the previous command some time to execute + sleep .1 + swaymsg reload +else + # Clean up if already running + kill $( tr ' ' '\n' <<< ${list} ) +fi + diff --git a/arch/stow/_scripts/.scripts/idle.sh b/arch/stow/_scripts/.scripts/idle.sh new file mode 100755 index 0000000..46ff18a --- /dev/null +++ b/arch/stow/_scripts/.scripts/idle.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# Configuration of swayidle +# Just run the script + +# Kill previous instances to avoid clashing +pkill swayidle + +swayidle -w \ + timeout 600 \ + 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' \ + timeout 1200 \ + 'systemctl suspend' \ + before-sleep 'swaymsg "output * dpms on"; swaylock' + # Screen needs to be turned back on or you will get a black screen after waking up again. + +# timeout 300 \ +# "~/.scripts/wander.sh" \ +# resume 'brightnessctl -r' \ diff --git a/scripts/notify.sh b/arch/stow/_scripts/.scripts/notify.sh similarity index 81% rename from scripts/notify.sh rename to arch/stow/_scripts/.scripts/notify.sh index a9453d5..faa63de 100755 --- a/scripts/notify.sh +++ b/arch/stow/_scripts/.scripts/notify.sh @@ -2,10 +2,8 @@ # Show system status in notification, or your own message # Syntaxis: notify [-vb] [-t ] [-p ] [ <message>] -# Requirements/dependencies: -# - amixer +# Requirements: # - brightnessctl -# - libnotify (notify-send) panic () { >&2 echo "Syntaxis: notify [-vb] [-t <timeout>] [-p <value>] [<title> <message>]" @@ -22,15 +20,15 @@ while getopts ":bvt:p:" options; do ;; v) # Get volume (don't use pamixer because that is way slower) - value=$( amixer sget 'Master' \ - | grep -o '\[[0-9]*%\]' \ - | tr -d '][%' \ - | head -n1 ) + value=$( pactl get-sink-volume @DEFAULT_SINK@ \ + | cut -d '/' -f2 \ + | grep -o '[0-9]*%' \ + | tr -d '%' ) title="Volume: ${value}%" category='sysinfo' # If audio disabled, set value to zero. - if [ "$( amixer sget 'Master' | grep -o '\[\(on\|off\)\]' | head -n1 )" == "[off]" ] ; then + if [ "$( pactl get-sink-mute @DEFAULT_SINK@ )" == "Mute: yes" ] ; then title="Volume: ${value}% (Disabled)" value=0 fi diff --git a/arch/stow/_scripts/.scripts/wander.sh b/arch/stow/_scripts/.scripts/wander.sh new file mode 100755 index 0000000..4325164 --- /dev/null +++ b/arch/stow/_scripts/.scripts/wander.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +# Toggle brightness to 'sleep' or 'awake', since brightnessctl does not support +# percentages of current amount. +# Just run the script + +current=$( brightnessctl get ) +# Doesn't have to be accurate so we can use built-in calculator. +brightnessctl -sq set $(( current / 10 * 3 )) + diff --git a/scripts/sunset.sh b/arch/stow/_scripts/.scripts/wlsunset.sh similarity index 65% rename from scripts/sunset.sh rename to arch/stow/_scripts/.scripts/wlsunset.sh index f185115..84a7d69 100755 --- a/scripts/sunset.sh +++ b/arch/stow/_scripts/.scripts/wlsunset.sh @@ -6,10 +6,10 @@ pid=$(pgrep wlsunset) if [[ -z ${pid} ]] ; then # Start wlsunset right away. - wlsunset -l 50.50 -L 4.00 -t 3000 -T 6500 & + wlsunset -l 50 -L 4 -t 2500 & else # Currently stop wlsunset but restart in an hour. kill ${pid} - notify-send 'Stopping sunset' 'Restarting in an hour' - at now +1 hours -f "${0}" + ~/.scripts/notify.sh 'Stopping sunset' 'Restarting in an hour' + at now +1 hours -f ~/.scripts/wlsunset.sh fi diff --git a/arch/stow/_scripts/git-flake b/arch/stow/_scripts/git-flake new file mode 100755 index 0000000..e6df509 --- /dev/null +++ b/arch/stow/_scripts/git-flake @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# Ignore flake.nix and flake.lock +# For using personal flakes in a project that does not provide and want flakes. +# Syntaxis: git flake + +git add --intent-to-add flake.nix flake.lock +git update-index --assume-unchanged flake.nix diff --git a/arch/stow/bash/.bashrc b/arch/stow/bash/.bashrc new file mode 100644 index 0000000..617dfaf --- /dev/null +++ b/arch/stow/bash/.bashrc @@ -0,0 +1,11 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +alias ls='ls --color=auto' +PS1='[\u@\h \W]\$ ' + +eval $( keychain --eval --quiet ~/.ssh/id_ed25519 ) diff --git a/stow/fuzzel/.config/fuzzel/fuzzel.ini b/arch/stow/fuzzel/.config/fuzzel/fuzzel.ini similarity index 76% rename from stow/fuzzel/.config/fuzzel/fuzzel.ini rename to arch/stow/fuzzel/.config/fuzzel/fuzzel.ini index 078c64d..b4ee0e2 100644 --- a/stow/fuzzel/.config/fuzzel/fuzzel.ini +++ b/arch/stow/fuzzel/.config/fuzzel/fuzzel.ini @@ -4,8 +4,8 @@ font=letter:size=10 dpi-aware=yes -icon-theme=Icosystem -terminal=kitty -e +icon-theme=Win11-black +terminal=alacritty -e output=eDP-1 lines=10 diff --git a/stow/mako/.config/mako/config b/arch/stow/mako/.config/mako/config similarity index 100% rename from stow/mako/.config/mako/config rename to arch/stow/mako/.config/mako/config diff --git a/nixos/.sops.yaml b/nixos/.sops.yaml index 62f72a2..72755e4 100644 --- a/nixos/.sops.yaml +++ b/nixos/.sops.yaml @@ -1,13 +1,10 @@ keys: - - &tdpeuter age1fva6s64s884z0q2w7de024sp69ucvqu0pg9shrhhqsn3ewlpjfpsh6md7y - - - &server_H4G0 age1d4gvqz3anf082ja6xt03hnkzazfum80um9t45m4rerl4n3va2yuqgnsg03 + - &tdpeuter age1q2gqur3t4fu8flsuu2zdnule37vdkh6egpt6a2e3ytx433x8gpvsr4hw6l + - &Tibo-NixDesk age1quvlqpznqkw2r0jhyx6p2hsq3dk93087yha46ugtce6ew9c64pgq4uhcvz creation_rules: - - path_regex: secrets/[^/]+\.(yaml|json|env|ini)$ + - path_regex: secrets/[^/]+\.yaml$ key_groups: - age: - *tdpeuter - - *server_H4G0 - diff --git a/nixos/README.md b/nixos/README.md index 552606d..615cc7a 100644 --- a/nixos/README.md +++ b/nixos/README.md @@ -1,16 +1,3 @@ -# NixOS +# nixos -Nix Flake configuration for my Linux machines running NixOS. - -## Structure - -The directory structure is organized as follows: - -- [`flake.nix`](./flake.nix): Main entrypoint for the configuration. -- [hosts/*hostname*](./hosts): Host-specific configuration by setting options. Each host has its own folder. -- [modules](./modules): Declarations of configuration options. -- [overlays](./overlays): Attribute overrides for Nix Packages. -- [secrets](./secrets): Encrypted files that store sensitive information, such as SSH private keys. -- [users/*username*](./users): User-specific configuration. Users are defined as modules, so they can be enabled or disabled on a host machine. - -[Modules](https://nixos.wiki/wiki/NixOS_modules) are a key component of NixOS. They encapsulate various configuration options, which should make it easy for you to integrate it into your specific configuration. +Nix Flake for my Linux machines running NixOS. diff --git a/nixos/flake.lock b/nixos/flake.lock index 91147eb..9327918 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -2,17 +2,17 @@ "nodes": { "devshell": { "inputs": { - "flake-utils": "flake-utils", "nixpkgs": [ "nixpkgs" - ] + ], + "systems": "systems" }, "locked": { - "lastModified": 1713532798, - "narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=", + "lastModified": 1687173957, + "narHash": "sha256-GOds2bAQcZ94fb9/Nl/aM+r+0wGSi4EKYuZYR8Dw4R8=", "owner": "numtide", "repo": "devshell", - "rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40", + "rev": "2cf83bb31720fcc29a999aee28d6da101173e66a", "type": "github" }, "original": { @@ -22,33 +22,15 @@ } }, "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { "inputs": { "systems": "systems_2" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1687709756, + "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", "type": "github" }, "original": { @@ -64,79 +46,58 @@ ] }, "locked": { - "lastModified": 1716736833, - "narHash": "sha256-rNObca6dm7Qs524O4st8VJH6pZ/Xe1gxl+Rx6mcWYo0=", + "lastModified": 1687647567, + "narHash": "sha256-Ua90LZYJO7/7KW/KK/AqijhIekd+wxPwbVKXuBYzJeQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "a631666f5ec18271e86a5cde998cba68c33d9ac6", + "rev": "6ca1e16eb3016c94b7ac16699e1d4158bd4e39a4", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.05", + "ref": "release-23.05", "repo": "home-manager", "type": "github" } }, - "nix-github-actions": { - "inputs": { - "nixpkgs": [ - "openconnect-sso", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1701208414, - "narHash": "sha256-xrQ0FyhwTZK6BwKhahIkUVZhMNk21IEI1nUcWSONtpo=", - "owner": "nix-community", - "repo": "nix-github-actions", - "rev": "93e39cc1a087d65bcf7a132e75a650c44dd2b734", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nix-github-actions", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1717144377, - "narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=", + "lastModified": 1687729501, + "narHash": "sha256-mTLkMePoHUWvTCf3NuKbeYEea/tsikSIKBWwb9OfRr4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "805a384895c696f802a9bf5bf4720f37385df547", + "rev": "35130d4b4f0b8c50ed2aceb909a538c66c91d4a0", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-24.05", + "ref": "nixos-23.05", "type": "indirect" } }, "nixpkgs-stable": { "locked": { - "lastModified": 1717265169, - "narHash": "sha256-IITcGd6xpNoyq9SZBigCkv4+qMHSqot0RDPR4xsZ2CA=", + "lastModified": 1687031877, + "narHash": "sha256-yMFcVeI+kZ6KD2QBrFPNsvBrLq2Gt//D0baHByMrjFY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3b1b4895b2c5f9f5544d02132896aeb9ceea77bc", + "rev": "e2e2059d19668dab1744301b8b0e821e3aae9c99", "type": "github" }, "original": { "owner": "NixOS", - "ref": "release-23.11", + "ref": "release-23.05", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-unstable": { "locked": { - "lastModified": 1716948383, - "narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=", + "lastModified": 1687681650, + "narHash": "sha256-M2If+gRcfpmaJy/XbfSsRzLlPpoU4nr0NHnKKl50fd8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ad57eef4ef0659193044870c731987a6df5cf56b", + "rev": "1c9db9710cb23d60570ad4d7ab829c2d34403de3", "type": "github" }, "original": { @@ -145,79 +106,13 @@ "type": "indirect" } }, - "openconnect-sso": { - "inputs": { - "flake-utils": [ - "utils" - ], - "nix-github-actions": "nix-github-actions", - "nixpkgs": [ - "nixpkgs" - ], - "poetry2nix": "poetry2nix", - "systems": "systems_3", - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1701455376, - "narHash": "sha256-FMLrMdi6JY7ZfqV5XnNj64jnDcGKznKZLn7O6OMO3u0=", - "owner": "ThinkChaos", - "repo": "openconnect-sso", - "rev": "20c0015c4264c72cc19ac272de0dc534309bd21b", - "type": "github" - }, - "original": { - "owner": "ThinkChaos", - "ref": "fix/nix-flake", - "repo": "openconnect-sso", - "type": "github" - } - }, - "poetry2nix": { - "inputs": { - "flake-utils": [ - "openconnect-sso", - "flake-utils" - ], - "nix-github-actions": [ - "openconnect-sso", - "nix-github-actions" - ], - "nixpkgs": [ - "openconnect-sso", - "nixpkgs" - ], - "systems": [ - "openconnect-sso", - "systems" - ], - "treefmt-nix": [ - "openconnect-sso", - "treefmt-nix" - ] - }, - "locked": { - "lastModified": 1701105783, - "narHash": "sha256-5IOI0xXGbhAkUZNNcPId48V78Q+/JlW0hzlif0zxRmM=", - "owner": "nix-community", - "repo": "poetry2nix", - "rev": "0b2bff39e9bd4e6db3208e09c276ca83a063b370", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "poetry2nix", - "type": "github" - } - }, "root": { "inputs": { "devshell": "devshell", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "home-manager": "home-manager", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", - "openconnect-sso": "openconnect-sso", "sops-nix": "sops-nix", "utils": "utils" } @@ -230,11 +125,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1717297459, - "narHash": "sha256-cZC2f68w5UrJ1f+2NWGV9Gx0dEYmxwomWN2B0lx0QRA=", + "lastModified": 1687398569, + "narHash": "sha256-e/umuIKFcFtZtWeX369Hbdt9r+GQ48moDmlTcyHWL28=", "owner": "Mic92", "repo": "sops-nix", - "rev": "ab2a43b0d21d1d37d4d5726a892f714eaeb4b075", + "rev": "2ff6973350682f8d16371f8c071a304b8067f192", "type": "github" }, "original": { @@ -273,42 +168,6 @@ "type": "github" } }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "openconnect-sso", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1699786194, - "narHash": "sha256-3h3EH1FXQkIeAuzaWB+nK0XK54uSD46pp+dMD3gAcB4=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "e82f32aa7f06bbbd56d7b12186d555223dc399d1", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, "utils": { "inputs": { "flake-utils": [ @@ -316,11 +175,11 @@ ] }, "locked": { - "lastModified": 1715533576, - "narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=", + "lastModified": 1657226504, + "narHash": "sha256-GIYNjuq4mJlFgqKsZ+YrgzWm0IpA4axA3MCrdKYj7gs=", "owner": "gytis-ivaskevicius", "repo": "flake-utils-plus", - "rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f", + "rev": "2bf0f91643c2e5ae38c1b26893ac2927ac9bd82a", "type": "github" }, "original": { diff --git a/nixos/flake.nix b/nixos/flake.nix index cda9173..2440f38 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -2,7 +2,7 @@ description = "System configuration of my machines using flakes"; inputs = { - nixpkgs.url = "nixpkgs/nixos-24.05"; + nixpkgs.url = "nixpkgs/nixos-23.05"; nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; devshell = { @@ -11,16 +11,9 @@ }; flake-utils.url = "github:numtide/flake-utils"; home-manager = { - url = "github:nix-community/home-manager/release-24.05"; + url = "github:nix-community/home-manager/release-23.05"; inputs.nixpkgs.follows = "nixpkgs"; }; - openconnect-sso = { - url = github:ThinkChaos/openconnect-sso/fix/nix-flake; - inputs = { - flake-utils.follows = "utils"; - nixpkgs.follows = "nixpkgs"; - }; - }; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; @@ -33,32 +26,17 @@ outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, - devshell, flake-utils, home-manager, openconnect-sso, sops-nix, utils, + devshell, flake-utils, home-manager, sops-nix, utils, ... }: let system = "x86_64-linux"; - - unfreePackages = pkg: builtins.elem (nixpkgs.lib.getName pkg) [ - "corefonts" - "nvidia-settings" "nvidia-x11" "nvidia-persistenced" - "Oracle_VM_VirtualBox_Extension_Pack" - "spotify" - "steam" "steam-original" "steam-run" - "vista-fonts" - "nvidia-persistenced" # Docker - ]; in utils.lib.mkFlake { inherit self inputs; - channelsConfig.allowUnfreePredicate = unfreePackages; - - sharedOverlays = [ - (import ./overlays/cmdtime) - (import ./overlays/icosystem) - (import ./overlays/letter) - (import ./overlays/spotify) - ]; + channelsConfig = { + allowUnfree = true; + }; hostDefaults = { inherit system; @@ -66,7 +44,6 @@ specialArgs = { pkgs-unstable = import nixpkgs-unstable { inherit system; - config.allowUnfreePredicate = unfreePackages; }; }; @@ -74,7 +51,6 @@ home-manager.nixosModule sops-nix.nixosModules.sops ./modules - ./users ]; }; diff --git a/nixos/hosts/Tibo-NixDesk/default.nix b/nixos/hosts/Tibo-NixDesk/default.nix index 7858bea..4226342 100644 --- a/nixos/hosts/Tibo-NixDesk/default.nix +++ b/nixos/hosts/Tibo-NixDesk/default.nix @@ -1,92 +1,72 @@ { config, pkgs, ... }: { - imports = [ - ./hardware-configuration.nix - ]; + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ../../modules/hardware/nvidia.nix - sisyphus = { - desktop.sway.enable = true; + ../../modules/apps/virtualbox + ../../modules/des/gnome + ]; - hardware = { - nvidia = { - enable = true; - model = "RTX 2060"; - gui-settings = true; - }; - yubikey.enable = true; - }; + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.efi.efiSysMountPoint = "/boot/efi"; - networking = { - networkmanager.enable = true; - openconnect-sso.enable = true; - }; - - nix = { - flakes.enable = true; - gc.onFull.enable = true; - }; - - programs = { - direnv.enable = true; - home-manager.enable = true; - sops.enable = true; - ssh.enable = true; - }; - - services = { - pipewire.enable = true; - printing.enable = true; - openrgb.enable = true; - }; - - users.tdpeuter.enable = true; - - virtualisation = { - docker.enable = true; - virtualbox.enable = true; - }; - }; - - boot = { - loader = { - systemd-boot.enable = true; - efi = { - canTouchEfiVariables = true; - efiSysMountPoint = "/boot/efi"; - }; - }; - }; - - environment.systemPackages = with pkgs; [ - git - vim-full - w3m - wget - zenith-nvidia - ]; - - programs = { - steam.enable = true; - zsh.enable = true; - }; - - hardware.bluetooth.enable = true; - - networking.hostName = "Tibo-NixDesk"; - - services.xserver = { - layout = "us"; - xkbVariant = "altgr-intl"; - }; - - system.stateVersion = "24.05"; + # Enable networking + networking.hostName = "Tibo-NixDesk"; # Define your hostname. + networking.networkmanager.enable = true; + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + # Set your time zone. time.timeZone = "Europe/Brussels"; - i18n.defaultLocale = "en_GB.UTF-8"; - console = { - # font = "Lat2-Terminus16"; - useXkbConfig = true; # use xkbOptions in tty. + # Select internationalisation properties. + i18n.defaultLocale = "en_GB.utf8"; + + # Configure keymap in X11 + services.xserver = { + layout = "us"; + xkbVariant = ""; }; + + # Enable sound with pipewire. + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + #media-session.enable = true; + }; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + # services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + system.stateVersion = "23.05"; } diff --git a/nixos/hosts/Tibo-NixDesk/hardware-configuration.nix b/nixos/hosts/Tibo-NixDesk/hardware-configuration.nix index 4903685..826c7bc 100644 --- a/nixos/hosts/Tibo-NixDesk/hardware-configuration.nix +++ b/nixos/hosts/Tibo-NixDesk/hardware-configuration.nix @@ -4,67 +4,26 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot = { - initrd = { - availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; - kernelModules = [ ]; - }; - kernelModules = [ "kvm-intel" ]; - extraModulePackages = [ ]; - }; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; - fileSystems = { - "/" = { - device = "/dev/disk/by-label/NIX-ROOT"; + fileSystems."/" = + { device = "/dev/disk/by-label/NIXROOT"; fsType = "ext4"; }; - "/boot/efi" = { - device = "/dev/disk/by-label/NIX-BOOT"; + fileSystems."/boot/efi" = + { device = "/dev/disk/by-label/NIXBOOT"; fsType = "vfat"; }; - "/nix" = { - device = "/dev/disk/by-label/NIX-STORE"; - fsType = "ext4"; - options = [ "noatime" ]; - }; - - "/mnt/Nextcloud" = { - device = "/dev/disk/by-label/Nextcloud"; - fsType = "ntfs"; - }; - - # "/home/${config.users.users.tdpeuter.name}/Nextcloud" = { - "/home/tdpeuter/Nextcloud" = { - depends = [ - "/mnt/Nextcloud" - ]; - device = "/mnt/Nextcloud/Nextcloud"; - fsType = "none"; - options = [ - "bind" - ]; - }; - - "/mnt/Games" = { - device = "/dev/disk/by-label/Games"; - fsType = "ntfs"; - options = [ - "uid=tdpeuter" - "gid=users" - "defaults" - ]; - }; - }; - - swapDevices = [ - { device = "/dev/disk/by-label/SWAP"; } - ]; + swapDevices = [ ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/nixos/hosts/Tibo-NixFat/default.nix b/nixos/hosts/Tibo-NixFat/default.nix index 6f0e53c..b6947d1 100644 --- a/nixos/hosts/Tibo-NixFat/default.nix +++ b/nixos/hosts/Tibo-NixFat/default.nix @@ -3,118 +3,107 @@ { imports = [ ./hardware-configuration.nix + ../../modules/hardware/nvidia.nix + + ../../modules/apps/virtualbox + ../../modules/des/gnome ]; - - sisyphus = { - desktop.sway.enable = true; - - hardware = { - eid.enable = true; - nvidia = { - enable = true; - model = "Quadro T2000"; - }; - yubikey.enable = true; + + # Use the systemd-boot EFI boot loader.] + boot.loader = { + systemd-boot.enable = true; + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot/efi"; }; - - networking = { - networkmanager.enable = true; - # openconnect-sso.enable = true; - }; - - nix = { - flakes.enable = true; - gc.onFull.enable = true; - }; - - programs = { - direnv.enable = true; - home-manager.enable = true; - sops.enable = true; - ssh.enable = true; - }; - - services = { - pipewire.enable = true; - tailscale.enable = true; - }; - - users.tdpeuter.enable = true; - - virtualisation = { - docker.enable = true; - virtualbox.enable = true; - }; - }; - - boot = { - # Encryption - initrd = { - # Setup keyfile - secrets."/crypto_keyfile.bin" = null; - - # Enable swap on luks - luks.devices."luks-3825c43c-6cc4-4846-b1cc-02b5938640c9" = { - device = "/dev/disk/by-uuid/3825c43c-6cc4-4846-b1cc-02b5938640c9"; - keyFile = "/crypto_keyfile.bin"; - }; - }; - - # Use the systemd-boot EFI boot loader.] - loader = { - systemd-boot.enable = true; - efi = { - canTouchEfiVariables = true; - efiSysMountPoint = "/boot/efi"; - }; - }; - }; - - environment.systemPackages = with pkgs; [ - git - vim-full - w3m - wget - zenith-nvidia - ]; - - programs = { - zsh.enable = true; - }; - - hardware.bluetooth = { - enable = true; - powerOnBoot = false; }; + # Setup keyfile + boot.initrd.secrets = { + "/crypto_keyfile.bin" = null; + }; + networking.hostName = "Tibo-NixFat"; - - services = { - # Handle the laptop lid switch as follows: - logind = { - lidSwitch = "hybrid-sleep"; - lidSwitchExternalPower = "lock"; - lidSwitchDocked = "ignore"; - }; - - xserver.xkb = { - # Keyboard layout - layout = "us"; - variant = "altgr-intl"; - }; - - # Touchpad - libinput.enable = true; - }; - - system.stateVersion = "24.05"; - + # Pick only one of the below networking options. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + + # Set your time zone. time.timeZone = "Europe/Brussels"; - - # --- Barrier --- - + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Select internationalisation properties. i18n.defaultLocale = "en_GB.UTF-8"; - console = { - useXkbConfig = true; # use xkbOptions in tty. + # console = { + # font = "Lat2-Terminus16"; + # keyMap = "us"; + # useXkbConfig = true; # use xkbOptions in tty. + # }; + + services.xserver = { + # Configure keymap in X11 + layout = "us"; + xkbVariant = ""; }; + + # Enable CUPS to print documents. + # services.printing.enable = true; + + # Enable sound with pipewire. + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + #media-session.enable = true; + }; + + services.logind.lidSwitch = "ignore"; + + # Enable Bluetooth. + hardware.bluetooth.enable = true; + + # Enable touchpad support (enabled default in most desktopManager). + services.xserver.libinput.enable = true; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + # services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # Copy the NixOS configuration file and link it from the resulting system + # (/run/current-system/configuration.nix). This is useful in case you + # accidentally delete configuration.nix. + # system.copySystemConfiguration = true; + + system.stateVersion = "23.05"; } + diff --git a/nixos/hosts/Tibo-NixFat/hardware-configuration.nix b/nixos/hosts/Tibo-NixFat/hardware-configuration.nix index 11384cf..d2ef044 100644 --- a/nixos/hosts/Tibo-NixFat/hardware-configuration.nix +++ b/nixos/hosts/Tibo-NixFat/hardware-configuration.nix @@ -13,29 +13,29 @@ boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = { - device = "/dev/disk/by-label/NIX-ROOT"; - fsType = "ext4"; - }; + fileSystems."/" = + { device = "/dev/disk/by-label/NIXROOT"; + fsType = "ext4"; + }; - boot.initrd.luks.devices."luks-c21cb4a4-f618-43af-bc0c-e8be74fe3b81".device = "/dev/disk/by-uuid/c21cb4a4-f618-43af-bc0c-e8be74fe3b81"; + boot.initrd.luks.devices."luks-7319552e-7148-4a9b-aa56-aa580b0b935a".device = "/dev/disk/by-uuid/7319552e-7148-4a9b-aa56-aa580b0b935a"; - fileSystems."/boot/efi" = { - device = "/dev/disk/by-label/NIX-BOOT"; - fsType = "vfat"; - }; + fileSystems."/boot/efi" = + { device = "/dev/disk/by-label/NIXBOOT"; + fsType = "vfat"; + }; - swapDevices = [ - { device = "/dev/disk/by-label/SWAP"; } - ]; + # swapDevices = + # [ { device = "/dev/disk/by-label/SWAP"; } + # ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp111s0.useDHCP = lib.mkDefault true; + # networking.interfaces.eno2.useDHCP = lib.mkDefault true; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/nixos/hosts/Tibo-NixTest/default.nix b/nixos/hosts/Tibo-NixTest/default.nix index 15022c7..e983ff6 100644 --- a/nixos/hosts/Tibo-NixTest/default.nix +++ b/nixos/hosts/Tibo-NixTest/default.nix @@ -1,14 +1,22 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + { config, pkgs, ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix - - ../../modules/des/plasma ]; - # Bootloader + # Nix Flakes + nix.package = pkgs.nixFlakes; + nix.extraOptions = '' + experimental-features = nix-command flakes + ''; + + # Use the systemd-boot EFI boot loader.] boot.loader = { systemd-boot.enable = true; @@ -18,11 +26,10 @@ }; }; - networking = { - hostName = "Tibo-NixTest"; - # wireless.enable = true; # Enables wireless support via wpa_supplicant. - networkmanager.enable = true; # Easiest to use and most distros use this by default. - }; + networking.hostName = "Tibo-NixTest"; # Define your hostname. + # Pick only one of the below networking options. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. # Set your time zone. time.timeZone = "Europe/Brussels"; @@ -46,6 +53,29 @@ # "caps:escape" # map caps to escape. # }; + + services.xserver = { + # Enable the X11 windowing system. + enable = true; + + # Enable the Plasma 5 Desktop Environment. + displayManager.sddm.enable = true; + displayManager.defaultSession = "plasmawayland"; + + desktopManager.plasma5 = { + enable = true; + excludePackages = with pkgs.libsForQt5; [ + elisa + okular + plasma-browser-integration + khelpcenter + kwalletmanager + oxygen + ]; + }; + + }; + # Enable CUPS to print documents. # services.printing.enable = true; @@ -59,6 +89,44 @@ # Enable touchpad support (enabled default in most desktopManager). services.xserver.libinput.enable = true; + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.tdpeuter = { + description = "Tibo De Peuter"; + isNormalUser = true; + extraGroups = [ "wheel" "networkmanager" ]; + initialPassword = "ChangeMe"; + packages = with pkgs; [ + home-manager + ]; + }; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + firefox + git + mongodb + vim + wget + ]; + + nixpkgs.config = { + allowUnfree = true; + }; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + # services.openssh.enable = true; + # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; @@ -70,7 +138,13 @@ # accidentally delete configuration.nix. # system.copySystemConfiguration = true; - system.stateVersion = "23.05"; + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "22.11"; # Did you read the comment? } diff --git a/nixos/modules/apps/alacritty/default.nix b/nixos/modules/apps/alacritty/default.nix new file mode 100644 index 0000000..dad5f42 --- /dev/null +++ b/nixos/modules/apps/alacritty/default.nix @@ -0,0 +1,15 @@ +{ inputs, lib, config, pkgs, ... }: + +{ + home-manager.users.tdpeuter = { pkgs, ... }: { + home = { + packages = with pkgs; [ + alacritty + ]; + + file = { + ".config/alacritty".source = ../../../../stow/alacritty/.config/alacritty; + }; + }; + }; +} diff --git a/nixos/modules/apps/default.nix b/nixos/modules/apps/default.nix new file mode 100644 index 0000000..ab391da --- /dev/null +++ b/nixos/modules/apps/default.nix @@ -0,0 +1,27 @@ +{ + imports = [ + ./alacritty + ./firefox + ./steam + ./thunderbird + # ./virtualbox + ]; + + home-manager.users.tdpeuter = { pkgs, ... }: { + home.packages = with pkgs; [ + brave + caprine-bin + discord + jellyfin-media-player + libreoffice-fresh + mattermost-desktop + nextcloud-client + obsidian + pinentry_qt + qalculate-gtk + spotify + zathura + zoom-us + ]; + }; +} diff --git a/nixos/modules/apps/firefox/default.nix b/nixos/modules/apps/firefox/default.nix new file mode 100644 index 0000000..058ed81 --- /dev/null +++ b/nixos/modules/apps/firefox/default.nix @@ -0,0 +1,41 @@ +{ inputs, lib, config, pkgs, ... }: + +{ + home-manager.users.tdpeuter.programs.firefox = { + enable = true; + package = pkgs.firefox.override { + cfg = { + enableTridactylNative = true; + }; + extraPolicies = { + DisableFirefoxStudies = true; + DisablePocket = true; + DisableTelemetry = true; + ExtensionSettings = {}; + OfferToSaveLogins = false; + }; + }; + profiles.tdpeuter = { + search = { + default = "DuckDuckGo"; + force = true; + engines = { + "eBay".metaData.hidden = true; + "Nix Packages" = { + urls = [{ + template = "https://search.nixos.org/packages"; + params = [ + { name = "type"; value = "packages"; } + { name = "query"; value = "{searchTerms}"; } + ]; + }]; + + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@np" ]; + }; + }; + }; + }; + }; +} + diff --git a/nixos/modules/apps/steam/default.nix b/nixos/modules/apps/steam/default.nix new file mode 100644 index 0000000..1dc2523 --- /dev/null +++ b/nixos/modules/apps/steam/default.nix @@ -0,0 +1,8 @@ +{ inputs, lib, config, pkgs, ... }: + +{ + programs.steam = { + enable = true; + }; + +} diff --git a/nixos/modules/apps/thunderbird/default.nix b/nixos/modules/apps/thunderbird/default.nix new file mode 100644 index 0000000..b6d8d57 --- /dev/null +++ b/nixos/modules/apps/thunderbird/default.nix @@ -0,0 +1,164 @@ +{ inputs, lib, config, pkgs, ... }: + +let + signatures = { + default = '' + Met vriendelijke groeten + Tibo De Peuter + ''; + UGent = '' + Met vriendelijke groeten + Tibo De Peuter + + Student 2Ba Informatica + ''; + MrFortem = '' + Kind regards + MrFortem Fiducia + ''; + }; +in +{ + home-manager.users.tdpeuter = { + accounts.email.accounts = { + Telenet = { + address = "tibo.depeuter@telenet.be"; + userName = "tibo.depeuter@telenet.be"; + imap = { + host = "imap.telenet.be"; + port = 993; + tls.enable = true; + }; + smtp = { + host = "smtp.telenet.be"; + port = 587; + tls = { + enable = true; + useStartTls = true; + }; + }; + + realName = "Tibo De Peuter"; + signature = { + showSignature = "append"; + text = signatures.default; + }; + + primary = true; + thunderbird = { + enable = true; + settings = id: { + "mail.identity.id_${id}.htmlSigText" = signatures.default; + }; + }; + }; + UGent = { + flavor = "outlook.office365.com"; + address = "tibo.depeuter@ugent.be"; + + realName = "Tibo De Peuter"; + signature = { + showSignature = "append"; + text = signatures.UGent; + }; + + thunderbird = { + enable = true; + settings = id: { + "mail.server.server_${id}.authMethod" = 10; + "mail.smtpserver.smtp_${id}.authMethod" = 10; + "mail.identity.id_${id}.htmlSigText" = signatures.UGent; + }; + }; + }; + Gmail = { + flavor = "gmail.com"; + address = "tibo.depeuter@gmail.com"; + + realName = "Tibo De Peuter"; + signature = { + showSignature = "append"; + text = signatures.default; + }; + thunderbird = { + enable = true; + settings = id: { + "mail.identity.id_${id}.htmlSigText" = signatures.default; + }; + }; + + }; + MrFortem = { + flavor = "gmail.com"; + address = "fortemfiducia@gmail.com"; + + realName = "Fortem Fiducia"; + signature = { + showSignature = "attach"; + text = '' + Kind regards + MrFortem Fiducia + ''; + }; + + thunderbird = { + enable = true; + settings = id: { + "mail.server.server_${id}.directory" = ".thunderbird/tdpeuter/ImapMail/imap.gmail.com-mrfortem"; + "mail.server.server_${id}.directory-rel" = "[ProfD]ImapMail/imap.gmail.com-mrfortem"; + "mail.identity.id_${id}.htmlSigText" = signatures.MrFortem; + }; + }; + }; + }; + + programs = { + thunderbird = { + enable = true; + profiles.tdpeuter = { + isDefault = true; + settings = { + "mailnews.default_sort_order" = 2; # Sort descending + "mailnews.mark_message_read.delay" = true; + "mailnews.start_page.enabled" = false; + "mail.pane_config.dynamic" = 2; # Vertical view + + "calendar.list.sortOrder" = "personal ugent tasks planning zeus"; + + "calendar.registry.personal.cache.enabled" = true; + "calendar.registry.personal.name" = "Personal"; + "calendar.registry.personal.type" = "caldav"; + "calendar.registry.personal.uri" = "https://cloud.depeuter.dev/remote.php/dav/calendars/tdpeuter/personal/"; + "calendar.registry.personal.username" = "tdpeuter"; + + "calendar.registry.ugent.cache.enabled" = true; + "calendar.registry.ugent.color" = "#1E64C8"; + "calendar.registry.ugent.name" = "UGent"; + "calendar.registry.ugent.type" = "caldav"; + "calendar.registry.ugent.uri" = "https://cloud.depeuter.dev/remote.php/dav/calendars/tdpeuter/ugent/"; + "calendar.registry.ugent.username" = "tdpeuter"; + + "calendar.registry.planning.cache.enabled" = true; + "calendar.registry.planning.name" = "Planning"; + "calendar.registry.planning.type" = "caldav"; + "calendar.registry.planning.uri" = "https://cloud.depeuter.dev/remote.php/dav/calendars/tdpeuter/planning/"; + "calendar.registry.planning.username" = "tdpeuter"; + + "calendar.registry.zeus.cache.enabled" = true; + "calendar.registry.zeus.color" = "#FF7F00"; + "calendar.registry.zeus.name" = "ZeusWPI"; + "calendar.registry.zeus.type" = "ics"; + "calendar.registry.zeus.uri" = "https://zeus.ugent.be/ical.ics"; + + "calendar.registry.tasks.cache.enabled" = true; + "calendar.registry.tasks.color" = "#813D9C"; + "calendar.registry.tasks.name" = "Tasks"; + "calendar.registry.tasks.type" = "caldav"; + "calendar.registry.tasks.uri" = "https://cloud.depeuter.dev/remote.php/dav/calendars/tdpeuter/tasks-2/"; + "calendar.registry.tasks.username" = "tdpeuter"; + }; + }; + }; + }; + }; +} diff --git a/nixos/modules/apps/virtualbox/default.nix b/nixos/modules/apps/virtualbox/default.nix new file mode 100644 index 0000000..8766028 --- /dev/null +++ b/nixos/modules/apps/virtualbox/default.nix @@ -0,0 +1,17 @@ +{ + + virtualisation.virtualbox = { + host = { + enable = true; + enableExtensionPack = true; + }; + guest = { + enable = true; + x11 = true; + }; + }; + users.extraGroups.vboxusers.members = [ + "user-with-access-to-virtualbox" + ]; + +} diff --git a/nixos/modules/default.nix b/nixos/modules/default.nix index 4a466b2..6a39c9c 100644 --- a/nixos/modules/default.nix +++ b/nixos/modules/default.nix @@ -1,11 +1,58 @@ +{ inputs, lib, config, pkgs, ... }: + { imports = [ - ./desktop - ./hardware - ./networking - ./nix - ./programs - ./services - ./virtualisation + ./apps + ./shells + ./utils ]; + + # Nix Flakes + nix.package = pkgs.nixFlakes; + nix.extraOptions = '' + experimental-features = nix-command flakes + keep-outputs = true + keep-derivations = true + ''; + + users.users.tdpeuter = { + description = "Tibo De Peuter"; + isNormalUser = true; + extraGroups = [ "networkmanager" "wheel" ]; + initialPassword = "ChangeMe"; + packages = with pkgs; [ + home-manager + ]; + }; + + home-manager.useGlobalPkgs = true; + + home-manager.users.tdpeuter = { pkgs, ... }: { + home = { + username = "tdpeuter"; + homeDirectory = "/home/tdpeuter"; + stateVersion = "23.05"; + + packages = with pkgs; [ + gnupg + + # Fonts + corefonts # Calibri for Uni + ]; + }; + + programs = { + home-manager.enable = true; + gpg.enable = true; + }; + + services = { + gpg-agent = { + enable = true; + pinentryFlavor = "qt"; + }; + + }; + }; + } diff --git a/nixos/modules/des/gnome/default.nix b/nixos/modules/des/gnome/default.nix new file mode 100644 index 0000000..9fc9bee --- /dev/null +++ b/nixos/modules/des/gnome/default.nix @@ -0,0 +1,41 @@ +{ config, lib, pkgs, ... }: + +{ + services.xserver = { + enable = true; + + # Enable the GNOME Desktop Environment. + displayManager.gdm.enable = true; + desktopManager.gnome.enable = true; + + excludePackages = with pkgs; [ + xterm + ]; + }; + + environment.systemPackages = with pkgs; [ + gnomeExtensions.launch-new-instance + ]; + + environment.gnome.excludePackages = (with pkgs; [ + epiphany # Web browser + gnome-console + gnome-photos + gnome-text-editor + gnome-tour + ]) ++ (with pkgs.gnome; [ + geary # Mail client + gedit + gnome-calculator + gnome-calendar + gnome-characters + gnome-clocks + gnome-contacts + gnome-maps + gnome-music + gnome-weather + simple-scan + totem # Movie player + yelp # Help viewer + ]); +} diff --git a/nixos/modules/des/plasma/default.nix b/nixos/modules/des/plasma/default.nix new file mode 100644 index 0000000..55c69bb --- /dev/null +++ b/nixos/modules/des/plasma/default.nix @@ -0,0 +1,32 @@ +{ config, lib, pkgs, ... }: + +{ + services.xserver = { + enable = true; + + displayManager.sddm = { + enable = true; + # https://discourse.nixos.org/t/plasma-wayland-session-not-available-from-sddm/13447/2 + settings.Wayland.SessionDir = "${pkgs.plasma5Packages.plasma-workspace}/share/wayland-sessions"; + }; + + desktopManager.plasma5 = { + enable = true; + useQtScaling = true; + + excludePackages = with pkgs.libsForQt5; [ + elisa + okular + khelpcenter + konsole + print-manager + plasma-systemmonitor + gwenview + ]; + }; + + excludePackages = with pkgs; [ + xterm + ]; + }; +} diff --git a/nixos/modules/des/sway/default.nix b/nixos/modules/des/sway/default.nix new file mode 100644 index 0000000..c485a60 --- /dev/null +++ b/nixos/modules/des/sway/default.nix @@ -0,0 +1,110 @@ +{ config, pkgs, lib, ... }: + +let + # bash script to let dbus know about important env variables and + # propagate them to relevent services run at the end of sway config + # see + # https://github.com/emersion/xdg-desktop-portal-wlr/wiki/"It-doesn't-work"-Troubleshooting-Checklist + # note: this is pretty much the same as /etc/sway/config.d/nixos.conf but also restarts + # some user services to make sure they have the correct environment variables + dbus-sway-environment = pkgs.writeTextFile { + name = "dbus-sway-environment"; + destination = "/bin/dbus-sway-environment"; + executable = true; + + text = '' + dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway + systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr + systemctl --user start pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr + ''; + }; + + # currently, there is some friction between sway and gtk: + # https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland + # the suggested way to set gtk settings is with gsettings + # for gsettings to work, we need to tell it where the schemas are + # using the XDG_DATA_DIR environment variable + # run at the end of sway config + configure-gtk = pkgs.writeTextFile { + name = "configure-gtk"; + destination = "/bin/configure-gtk"; + executable = true; + text = let + schema = pkgs.gsettings-desktop-schemas; + datadir = "${schema}/share/gsettings-schemas/${schema.name}"; + in '' + export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS + gnome_schema=org.gnome.desktop.interface + gsettings set $gnome_schema gtk-theme 'Dracula' + ''; + }; +in +{ + services.xserver = { + enable = true; + + displayManager.lightdm.enable = true; + + excludePackages = with pkgs; [ + xterm + ]; + }; + + security.polkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + pulse.enable = true; + }; + + services.dbus.enable = true; + xdg.portal = { + enable = true; + wlr.enable = true; + extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + }; + + programs.sway = { + enable = true; + wrapperFeatures.gtk = true; + }; + + home-manager.users.tdpeuter = { pkgs, ... }: { + home = { + username = "tdpeuter"; + homeDirectory = "/home/tdpeuter"; + + file = { + ".config/sway".source = ../../../../stow/sway/.config/sway; + ".config/waybar".source = ../../../../stow/waybar/.config/waybar; + ".config/dunst".source = ../../../../stow/dunst/.config/dunst; + # TODO Fix scripts, I don't like it this way + ".scripts".source = ../../../../stow/_scripts/.scripts; + }; + + packages = with pkgs; [ + brightnessctl + dunst + font-awesome + pamixer + pavucontrol + playerctl + swayidle + swaylock-effects + waybar + wmname + ]; +# }; +# +# wayland.windowManager.sway = { +# enable = true; +# package = pkgs.sway-unwrapped; +# config = rec { +# terminal = "alacritty"; +# startup = [ +# {command = "alacritty";} +# ]; +# }; + }; + }; +} diff --git a/nixos/modules/desktop/default.nix b/nixos/modules/desktop/default.nix deleted file mode 100644 index 465f8ca..0000000 --- a/nixos/modules/desktop/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - imports = [ - ./gnome - ./hyprland - ./plasma - ./sway - ]; -} diff --git a/nixos/modules/desktop/gnome/default.nix b/nixos/modules/desktop/gnome/default.nix deleted file mode 100644 index e522780..0000000 --- a/nixos/modules/desktop/gnome/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.desktop.gnome; -in { - options.sisyphus.desktop.gnome.enable = lib.mkEnableOption "GNOME"; - - config = lib.mkIf cfg.enable { - services.xserver = { - enable = true; - - excludePackages = with pkgs; [ - xterm - ]; - - displayManager.gdm.enable = true; - desktopManager.gnome.enable = true; - }; - - # Start a new instance of application instead of going to that window. - environment.systemPackages = with pkgs.gnomeExtensions; [ - launch-new-instance - ]; - - # Do not use these packages - environment.gnome.excludePackages = (with pkgs; [ - baobab - epiphany # Web browser - evince # Document viewer - gnome-connections # Remote desktop client - gnome-console - gnome-photos - gnome-text-editor - gnome-tour - loupe # Image viewer - snapshot # Camera - ]) ++ (with pkgs.gnome; [ - eog # Image viewer - file-roller # Archive manager - geary # Mail client - gedit - gnome-calculator - gnome-calendar - gnome-characters - gnome-clocks - gnome-contacts - gnome-disk-utility - gnome-font-viewer - gnome-logs - gnome-maps - gnome-music - gnome-system-monitor - gnome-weather - simple-scan - totem # Movie player - yelp # Help viewer - ]); - }; -} diff --git a/nixos/modules/desktop/hyprland/default.nix b/nixos/modules/desktop/hyprland/default.nix deleted file mode 100644 index 5209653..0000000 --- a/nixos/modules/desktop/hyprland/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, lib, ... }: - -let - cfg = config.sisyphus.desktop.hyprland; -in { - options.sisyphus.desktop.hyprland.enable = lib.mkEnableOption "Hyprland"; - - config = lib.mkIf cfg.enable { - programs.hyprland = { - enable = true; - xwayland.enable = true; - }; - }; -} - diff --git a/nixos/modules/desktop/plasma/default.nix b/nixos/modules/desktop/plasma/default.nix deleted file mode 100644 index 39e1ab7..0000000 --- a/nixos/modules/desktop/plasma/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ config, lib, pkgs, ... }: - -# This module is not tested at all so it might be broken! - -let - cfg = config.sisyphus.desktop.plasma; -in { - options.sisyphus.desktop.plasma.enable = lib.mkEnableOption "KDE Plasma"; - - config = lib.mkIf cfg.enable { - services.xserver = { - enable = true; - - displayManager = { - defaultSession = "plasmawayland"; - sddm = { - enable = true; - # https://discourse.nixos.org/t/plasma-wayland-session-not-available-from-sddm/13447/2 - settings.Wayland.SessionDir = "${pkgs.plasma5Packages.plasma-workspace}/share/wayland-sessions"; - }; - }; - - desktopManager.plasma5 = { - enable = true; - useQtScaling = true; - }; - - excludePackages = with pkgs; [ - xterm - ]; - }; - - environment.plasma5.excludePackages = with pkgs.libsForQt5; [ - elisa - okular - khelpcenter - konsole - print-manager - plasma-systemmonitor - gwenview - ]; - }; -} diff --git a/nixos/modules/desktop/sway/default.nix b/nixos/modules/desktop/sway/default.nix deleted file mode 100644 index 267fe03..0000000 --- a/nixos/modules/desktop/sway/default.nix +++ /dev/null @@ -1,151 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.desktop.sway; - - # bash script to let dbus know about important env variables and - # propagate them to relevent services run at the end of sway config - # see - # https://github.com/emersion/xdg-desktop-portal-wlr/wiki/"It-doesn't-work"-Troubleshooting-Checklist - # note: this is pretty much the same as /etc/sway/config.d/nixos.conf but also restarts - # some user services to make sure they have the correct environment variables - dbus-sway-environment = pkgs.writeTextFile { - name = "dbus-sway-environment"; - destination = "/bin/dbus-sway-environment"; - executable = true; - - text = '' - dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway - systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr - systemctl --user start pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr - ''; - }; - - # currently, there is some friction between sway and gtk: - # https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland - # the suggested way to set gtk settings is with gsettings - # for gsettings to work, we need to tell it where the schemas are - # using the XDG_DATA_DIR environment variable - # run at the end of sway config - configure-gtk = pkgs.writeTextFile { - name = "configure-gtk"; - destination = "/bin/configure-gtk"; - executable = true; - text = let - schema = pkgs.gsettings-desktop-schemas; - datadir = "${schema}/share/gsettings-schemas/${schema.name}"; - in '' - export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS - gnome_schema=org.gnome.desktop.interface - # gsettings set $gnome_schema gtk-theme 'Dracula' - - # https://github.com/crispyricepc/sway-nvidia/blob/2101a18698151a61266740f1297158119bf660ac/wlroots-env-nvidia.sh - # Hardware cursors not yet working on wlroots - export WLR_NO_HARDWARE_CURSORS=1 - # Set wlroots renderer to Vulkan to avoid flickering - export WLR_RENDERER=vulkan - # General wayland environment variables - export XDG_SESSION_TYPE=wayland - export QT_QPA_PLATFORM=wayland - export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 - # Firefox wayland environment variable - export MOZ_ENABLE_WAYLAND=1 - export MOZ_USE_XINPUT2=1 - # OpenGL Variables - export GBM_BACKEND=nvidia-drm - export __GL_GSYNC_ALLOWED=0 - export __GL_VRR_ALLOWED=0 - export __GLX_VENDOR_LIBRARY_NAME=nvidia - # Xwayland compatibility - export XWAYLAND_NO_GLAMOR=1 - ''; - }; -in { - options.sisyphus.desktop.sway.enable = lib.mkEnableOption "Sway"; - - config = lib.mkIf cfg.enable { - environment.systemPackages = (with pkgs; [ - dbus-sway-environment - configure-gtk - wayland - xdg-utils # Open with default program - glib # gsettings - wl-clipboard - wdisplays # Tool to configure displays - - brightnessctl - dunst - libnotify - playerctl - swaybg - swaylock-effects - waybar - wlsunset - - # TODO Turn into own module/package? - jq - j4-dmenu-desktop - rofi - ]) ++ (with pkgs.sway-contrib; [ - grimshot - ]); - - environment.sessionVariables = { - SCRIPT_DIR = ../../../../scripts; - }; - - fonts.packages = with pkgs; [ - dejavu_fonts - font-awesome - noto-fonts - noto-fonts-cjk - noto-fonts-emoji - source-han-sans - source-han-sans-japanese - source-han-serif-japanese - ]; - - security.polkit.enable = true; - - services = { - atd.enable = true; # Required by sunset.sh - dbus.enable = true; - gnome.gnome-keyring.enable = true; - - pipewire = { - enable = true; - alsa.enable = true; - pulse.enable = true; - }; - - power-profiles-daemon.enable = true; - - xserver = { - displayManager.session = [{ - manage = "window"; - name = "Sway"; - start = '' - ${pkgs.sway}/bin/sway --unsupported-gpu & - waitPID=$! - ''; - }]; - videoDrivers = [ "nouveau" ]; - }; - }; - - xdg.portal = { - enable = true; - wlr.enable = true; - extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; - }; - - programs.sway = { - enable = true; - wrapperFeatures.gtk = true; - }; - - sisyphus.users.wantedGroups = [ - config.users.groups.video.name # Brightnessctl - ]; - }; -} diff --git a/nixos/modules/hardware/default.nix b/nixos/modules/hardware/default.nix deleted file mode 100644 index 2d38b1e..0000000 --- a/nixos/modules/hardware/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - ./eid - ./nvidia - ./yubikey - ]; -} diff --git a/nixos/modules/hardware/eid/default.nix b/nixos/modules/hardware/eid/default.nix deleted file mode 100644 index 5249adf..0000000 --- a/nixos/modules/hardware/eid/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.hardware.eid; -in { - options.sisyphus.hardware.eid.enable = lib.mkEnableOption "Electronic identity card (eID)"; - - config = lib.mkIf cfg.enable { - services.pcscd = { - enable = true; - plugins = [ pkgs.ccid ]; - }; - - environment.systemPackages = with pkgs; [ - eid-mw - ]; - }; -} diff --git a/nixos/modules/hardware/nvidia.nix b/nixos/modules/hardware/nvidia.nix new file mode 100644 index 0000000..1473758 --- /dev/null +++ b/nixos/modules/hardware/nvidia.nix @@ -0,0 +1,33 @@ +{ inputs, lib, config, pkgs, ... }: + +let + nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" '' + export __NV_PRIME_RENDER_OFFLOAD=1 + export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 + export __GLX_VENDOR_LIBRARY_NAME=nvidia + export __VK_LAYER_NV_optimus=NVIDIA_only + exec "$@" + ''; +in +{ + nixpkgs.config.allowUnfree = true; + + services.xserver.videoDrivers = [ "nvidia" ]; + + hardware = { + opengl.enable = true; + nvidia = { + open = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + modesetting.enable = true; + }; + }; + + # Offloading + # environment.systemPackages = [ nvidia-offload ]; + # hardware.nvidia.prime = { + # offload.enable = true; + # intelBusId = "PCI::00:02:0"; + # nvidiaBusId = "PCI:01:00:0"; + # }; +} diff --git a/nixos/modules/hardware/nvidia/default.nix b/nixos/modules/hardware/nvidia/default.nix deleted file mode 100644 index 036cf4c..0000000 --- a/nixos/modules/hardware/nvidia/default.nix +++ /dev/null @@ -1,82 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.hardware.nvidia; - - # The graphics cards for which to do offloading - do-offloading = builtins.elem cfg.model [ "Quadro T2000" ]; - nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" '' - export __NV_PRIME_RENDER_OFFLOAD=1 - export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 - export __GLX_VENDOR_LIBRARY_NAME=nvidia - export __VK_LAYER_NV_optimus=NVIDIA_only - exec "$@" - ''; -in { - options.sisyphus.hardware.nvidia = { - enable = lib.mkEnableOption "NVIDIA GPU support"; - model = lib.mkOption { - type = lib.types.enum [ "" "Quadro T2000" "RTX 2060" ]; - default = ""; - example = "Quadro T2000"; - description = lib.mdDoc "The model of NVIDIA GPU card"; - }; - gui-settings = lib.mkEnableOption "NVIDIA settings menu"; - }; - - config = lib.mkIf cfg.enable { -# boot = { -# extraModprobeConfig = "options nvidia-drm modeset=1"; -# -# initrd.kernelModules = [ -# "nvidia" -# "nvidia_modeset" -# "nvidia_uvm" -# "nvidia_drm" -# ]; -# }; - - hardware = { - opengl = { - enable = true; - driSupport = true; - driSupport32Bit = true; - }; - nvidia = { - open = false; - package = config.boot.kernelPackages.nvidiaPackages.stable; - modesetting.enable = true; - nvidiaSettings = cfg.gui-settings; - powerManagement = { - enable = do-offloading; - finegrained = do-offloading; - }; - - # Avoid flickering - forceFullCompositionPipeline = true; - - prime = lib.mkMerge [ - (lib.mkIf do-offloading { - offload = { - enable = true; - enableOffloadCmd = true; - }; - }) - (lib.mkIf (cfg.model == "Quadro T2000") { - intelBusId = "PCI::00:02:0"; - nvidiaBusId = "PCI:01:00:0"; - }) - (lib.mkIf (cfg.model == "RTX 2060") { - sync.enable = true; - intelBusId = "PCI::00:02:0"; - nvidiaBusId = "PCI:01:00:0"; - }) - ]; - }; - }; - - environment.systemPackages = lib.mkIf do-offloading [ - nvidia-offload - ]; - }; -} diff --git a/nixos/modules/hardware/yubikey/default.nix b/nixos/modules/hardware/yubikey/default.nix deleted file mode 100644 index 708b9c1..0000000 --- a/nixos/modules/hardware/yubikey/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.hardware.yubikey; -in { - options.sisyphus.hardware.yubikey.enable = lib.mkEnableOption "YubiKey support"; - - config = lib.mkIf cfg.enable { - programs = { - gnupg.agent = { - enable = true; - # TODO Necessary? - # enableSSHSupport = true; - # pinentryFlavor = "curses"; - }; - - # yubikey-touch-detector.enable = true; - }; - - # Enable smart card reading - services.pcscd.enable = true; - - environment.systemPackages = with pkgs; [ - yubikey-touch-detector - ]; - - # Send a notification if the YubiKey is waiting for touch. - systemd.user.services.yubikey-touch-detector = { - enable = true; - description = "Detects when your YubiKey is waiting for a touch"; - path = with pkgs; [ yubikey-touch-detector ]; - script = ''exec yubikey-touch-detector --notify''; - environment.YUBIKEY_TOUCH_DETECTOR_LIBNOTIFY = "true"; - }; - }; -} diff --git a/nixos/modules/networking/default.nix b/nixos/modules/networking/default.nix deleted file mode 100644 index 5a46d2c..0000000 --- a/nixos/modules/networking/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./networkmanager - ./openconnect-sso - ]; -} diff --git a/nixos/modules/networking/networkmanager/default.nix b/nixos/modules/networking/networkmanager/default.nix deleted file mode 100644 index 492e724..0000000 --- a/nixos/modules/networking/networkmanager/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.networking.networkmanager; -in { - options.sisyphus.networking.networkmanager.enable = lib.mkEnableOption "NetworkManager"; - - config = lib.mkIf cfg.enable { - networking.networkmanager.enable = true; - - # Prevent slow boot times - systemd.services.NetworkManager-wait-online.enable = false; - }; -} diff --git a/nixos/modules/networking/openconnect-sso/default.nix b/nixos/modules/networking/openconnect-sso/default.nix deleted file mode 100644 index db5b91d..0000000 --- a/nixos/modules/networking/openconnect-sso/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, inputs, lib, pkgs, ... }: - -let - cfg = config.sisyphus.networking.openconnect-sso; -in { - options.sisyphus.networking.openconnect-sso.enable = lib.mkEnableOption "OpenConnect SSO"; - - config = lib.mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - inputs.openconnect-sso.packages.${config.nixpkgs.localSystem.system}.default - ]; - }; -} diff --git a/nixos/modules/nix/default.nix b/nixos/modules/nix/default.nix deleted file mode 100644 index 1c67c6d..0000000 --- a/nixos/modules/nix/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./flakes - ./gc - ]; -} diff --git a/nixos/modules/nix/flakes/default.nix b/nixos/modules/nix/flakes/default.nix deleted file mode 100644 index 3c5d892..0000000 --- a/nixos/modules/nix/flakes/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.nix.flakes; -in { - options.sisyphus.nix.flakes.enable = lib.mkEnableOption "Nix Flakes"; - - config.nix = lib.mkIf cfg.enable { - extraOptions = '' - experimental-features = nix-command flakes - ''; - package = pkgs.nixFlakes; - }; -} diff --git a/nixos/modules/nix/gc/default.nix b/nixos/modules/nix/gc/default.nix deleted file mode 100644 index a28133f..0000000 --- a/nixos/modules/nix/gc/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.nix.gc; -in { - options.sisyphus.nix.gc = { - weekly.enable = lib.mkEnableOption "Scheduled Nix garbage-collection"; - onFull.enable = lib.mkEnableOption "Nix garbage-collection when disk is almost full"; - }; - - config.nix = { - # If the disk has less than 100MiB, free up to 2GiB by garbage-collecting. - extraOptions = lib.mkIf cfg.onFull.enable '' - min-free = ${toString (100 * 1024 * 1024)} - max-free = ${toString (2048 * 1024 * 1024)} - ''; - - # Scheduled garbage-collect - gc = lib.mkIf cfg.weekly.enable { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 30d"; - }; - }; -} diff --git a/nixos/modules/programs/default.nix b/nixos/modules/programs/default.nix deleted file mode 100644 index fd61ea8..0000000 --- a/nixos/modules/programs/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - imports = [ - ./direnv - ./home-manager - ./sops - ./spotify-adblock - ./ssh - ]; -} diff --git a/nixos/modules/programs/direnv/default.nix b/nixos/modules/programs/direnv/default.nix deleted file mode 100644 index ad16c7c..0000000 --- a/nixos/modules/programs/direnv/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.programs.direnv; -in { - options.sisyphus.programs.direnv.enable = lib.mkEnableOption "direnv"; - - config = lib.mkIf cfg.enable { - programs.direnv = { - enable = true; - nix-direnv.enable = true; # Use nix-specific direnv. - }; - - # This is also done by setting programs.direnv.persistDerivations. - # Keep derivations so shells don't break. - nix.extraOptions = '' - keep-outputs = true - keep-derivations = true - ''; - }; -} diff --git a/nixos/modules/programs/home-manager/default.nix b/nixos/modules/programs/home-manager/default.nix deleted file mode 100644 index 65e3bf6..0000000 --- a/nixos/modules/programs/home-manager/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.programs.home-manager; -in { - options.sisyphus.programs.home-manager.enable = lib.mkEnableOption "Home-manager"; - - config = lib.mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - home-manager - ]; - - home-manager.useGlobalPkgs = true; - }; -} diff --git a/nixos/modules/programs/sops/README.md b/nixos/modules/programs/sops/README.md deleted file mode 100644 index 8d7b9d8..0000000 --- a/nixos/modules/programs/sops/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# Adding SSH keys - -To incorporate SSH keys, for instance, to enable authentication with a Git server, follow these steps: - -Step 0: If necessary, generate a keypair, for example using the command: - -```bash -ssh-keygen -t ed25519 -``` - -Please note that setting a password for the keypair is not yet tested. - -Step 1: Create a new file named `yourservice.yaml` within the [secrets](../../../secrets/) directory by executing the following command: - -```bash -sops secrets/yourservice.yaml -``` - -Within this file, create a value that contains your private key. For example: - -```yaml -yourservice: - ssh: | - -----BEGIN OPENSSH PRIVATE KEY----- - <...> - -----END OPENSSH PRIVATE KEY----- -``` - -Step 2: Reference this value in [your sops configuration](../../utils/sops/default.nix) as follows: - -``` -sops.secrets."yourservice/ssh".format = "yaml"; -sops.secrets."yourservice/sss".sopsFile = secrets/youservice.yaml; -``` - -Step 3: Finally, add the SSH key to your SSH configuration so that it is used correctly when connecting to your host. Add the following lines to your SSH configuraton file: - -``` -Host yourservice - IdentityFile /run/secrets/yourservice/ssh -``` diff --git a/nixos/modules/programs/sops/default.nix b/nixos/modules/programs/sops/default.nix deleted file mode 100644 index 443eac9..0000000 --- a/nixos/modules/programs/sops/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.programs.sops; -in { - options.sisyphus.programs.sops.enable = lib.mkEnableOption "Sops"; - - config = lib.mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - sops - ]; - - sops = { - # Add secrets.yml to the Nix Store. - defaultSopsFile = ../../../secrets/secrets.yaml; - age = { - # Automatically import SSH keys as age keys. - sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; - # Use an age key that is expected to already be in the filesystem. - # You will need to place this file manually. - keyFile = "/var/lib/sops-nix/key.txt"; - }; - }; - }; -} diff --git a/nixos/modules/programs/spotify-adblock/default.nix b/nixos/modules/programs/spotify-adblock/default.nix deleted file mode 100644 index fc80856..0000000 --- a/nixos/modules/programs/spotify-adblock/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.programs.spotify-adblock; -in { - options.sisyphus.programs.spotify-adblock.enable = lib.mkEnableOption "Spotify adblock"; - - config = lib.mkIf cfg.enable { - environment.etc."spotify-adblock/config.toml".source = "${pkgs.spotify-adblock}/config.toml"; - }; -} diff --git a/nixos/modules/programs/ssh/default.nix b/nixos/modules/programs/ssh/default.nix deleted file mode 100644 index 13b008c..0000000 --- a/nixos/modules/programs/ssh/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.programs.ssh; -in { - options.sisyphus.programs.ssh.enable = lib.mkEnableOption "SSH"; - - config = lib.mkIf cfg.enable { - programs.ssh = { - enableAskPassword = false; - }; - }; -} diff --git a/nixos/modules/services/default.nix b/nixos/modules/services/default.nix deleted file mode 100644 index 8abb180..0000000 --- a/nixos/modules/services/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - imports = [ - ./monero - ./openrgb - ./openssh - ./pipewire - ./printing - ./tailscale - ]; -} diff --git a/nixos/modules/services/monero/default.nix b/nixos/modules/services/monero/default.nix deleted file mode 100644 index fc49b91..0000000 --- a/nixos/modules/services/monero/default.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.services.monero; -in { - options.sisyphus.services.monero.enable = lib.mkEnableOption "Monero"; - - config = lib.mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - monero-cli - ]; - - services = { - # Choose to run a node or not. - monero.enable = true; - - xmrig = { - enable = true; - settings = { - autosave = true; - background = true; - pause-on-battery = true; - pause-on-active = 60; - donate-level = 5; - cpu = true; - opencl = false; - cuda = true; - pools = [ - { - url = "monerohash.com:9999"; - # url = "127.0.0.1:18081"; # Local node - user = "44FjmmLn1k1GC1AFTLSdWDZ17CHB2h3eRCnfkfTQBucHaKX1AGS5oLERR1FEaHxPQcUNwrbEfsgbY4Y6bYJm6ZrdCYGwg7b"; - keepalive = true; - tls = true; - } - ]; - }; - }; - }; - }; -} diff --git a/nixos/modules/services/openrgb/default.nix b/nixos/modules/services/openrgb/default.nix deleted file mode 100644 index ae4fc51..0000000 --- a/nixos/modules/services/openrgb/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.services.openrgb; -in { - options.sisyphus.services.openrgb.enable = lib.mkEnableOption "OpenRGB"; - - config = lib.mkIf cfg.enable { - services.udev.packages = with pkgs; [ - openrgb - ]; - - boot.kernelModules = [ "i2c-dev" ]; - - hardware.i2c.enable = true; - - services.hardware.openrgb = { - enable = true; - package = pkgs.openrgb-with-all-plugins; - motherboard = "intel"; - }; - }; -} diff --git a/nixos/modules/services/openssh/default.nix b/nixos/modules/services/openssh/default.nix deleted file mode 100644 index f4ba49b..0000000 --- a/nixos/modules/services/openssh/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.services.openssh; -in { - options.sisyphus.services.openssh.enable = lib.mkEnableOption "OpenSSH"; - - config = lib.mkIf cfg.enable { - services.openssh = { - enable = true; - settings = { - PasswordAuthentication = false; - PermitRootLogin = "no"; - }; - }; - }; -} diff --git a/nixos/modules/services/pipewire/default.nix b/nixos/modules/services/pipewire/default.nix deleted file mode 100644 index 09393f0..0000000 --- a/nixos/modules/services/pipewire/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.services.pipewire; -in { - options.sisyphus.services.pipewire.enable = lib.mkEnableOption "Pipewire"; - - config = lib.mkIf cfg.enable { - sound.enable = true; - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; - - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - #media-session.enable = true; - }; - }; -} diff --git a/nixos/modules/services/printing/default.nix b/nixos/modules/services/printing/default.nix deleted file mode 100644 index b7352b3..0000000 --- a/nixos/modules/services/printing/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.services.printing; -in { - options.sisyphus.services.printing.enable = lib.mkEnableOption "Printing"; - - config = lib.mkIf cfg.enable { - services = { - printing.enable = true; - avahi = { - enable = true; - nssmdns = true; - openFirewall = true; - }; - }; - }; -} diff --git a/nixos/modules/services/tailscale/default.nix b/nixos/modules/services/tailscale/default.nix deleted file mode 100644 index 48eceb7..0000000 --- a/nixos/modules/services/tailscale/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, lib, pkgs, pkgs-unstable, ... }: - -let - cfg = config.sisyphus.services.tailscale; -in { - options.sisyphus.services.tailscale.enable = lib.mkEnableOption "Tailscale"; - - config = lib.mkIf cfg.enable { - services.tailscale = { - enable = true; - package = pkgs-unstable.tailscale; - useRoutingFeatures = "client"; - }; - }; -} diff --git a/nixos/modules/shells/default.nix b/nixos/modules/shells/default.nix new file mode 100644 index 0000000..87b90be --- /dev/null +++ b/nixos/modules/shells/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./zsh + ]; +} diff --git a/nixos/modules/shells/zsh/default.nix b/nixos/modules/shells/zsh/default.nix new file mode 100644 index 0000000..0d84ea8 --- /dev/null +++ b/nixos/modules/shells/zsh/default.nix @@ -0,0 +1,70 @@ +{ config, lib, pkgs, ... }: + +{ + programs.zsh.enable = true; + users.users.tdpeuter.shell = pkgs.zsh; + + home-manager.users.tdpeuter = { pkgs, ... }: { + home = { + packages = with pkgs; [ + font-awesome + ]; + + file = { + ".oh-my-zsh".source = ../../../../stow/zsh/.oh-my-zsh; + }; + }; + + programs.zsh = { + enable = true; + enableAutosuggestions = true; + enableSyntaxHighlighting = true; + history = { + expireDuplicatesFirst = true; + extended = true; + }; + initExtra = '' + eval "$(direnv hook zsh)" + ''; + oh-my-zsh = { + enable = true; + custom = "$HOME/.oh-my-zsh"; + plugins = [ + "dirhistory" + "git" + "screen" + ]; + theme = "mrfortem"; + }; + plugins = [ + { + name = "cmdtime"; + src = pkgs.fetchFromGitHub { + owner = "tom-auger"; + repo = "cmdtime"; + rev = "ffc72641dcfa0ee6666ceb1dc712b61be30a1e8b"; + hash = "sha256-v6wCfNoPXDD3sS6yUYE6lre8Ir1yJcLGoAW3O8sUOCg="; + }; + } + ]; + shellAliases = { + cp = "cp -i"; # Confirm before overwriting something + df = "df -h"; + free = "free -m"; + ll = "ls -la"; + np = "nano -w PKGBUILD"; + more = "less"; + hgrep = "history | grep"; + + gs = "git status"; + + update = '' + pushd ~/projects/sisyphus/nixos + nix flake update + sudo nixos-rebuild switch --flake .# --show-trace + popd + ''; + }; + }; + }; +} diff --git a/nixos/modules/utils/default.nix b/nixos/modules/utils/default.nix new file mode 100644 index 0000000..50b298a --- /dev/null +++ b/nixos/modules/utils/default.nix @@ -0,0 +1,43 @@ +{ + imports = [ + ./mpv + ./vifm + ./vim + ./zellij + ]; + + home-manager.users.tdpeuter = { pkgs, ... }: { + home.packages = with pkgs; [ + direnv + duf + git-crypt + lynx + nsxiv + w3m + wget + zenith-nvidia + ]; + + programs = { + direnv = { + enable = true; + nix-direnv.enable = true; + }; + + git = { + enable = true; + userName = "tdpeuter"; + userEmail = "tibo.depeuter@gmail.com"; + extraConfig = { + core.editor = "vim"; + }; + includes = [ + { + path = "~/.gitconfig-ugent"; + condition = "gitdir:~/Nextcloud/Documenten/UGent"; + } + ]; + }; + }; + }; +} diff --git a/nixos/modules/utils/mpv/default.nix b/nixos/modules/utils/mpv/default.nix new file mode 100644 index 0000000..098e7d5 --- /dev/null +++ b/nixos/modules/utils/mpv/default.nix @@ -0,0 +1,11 @@ +{ config, system, lib, pkgs-unstable, ... }: + +{ + home-manager.users.tdpeuter.home = { + packages = with pkgs-unstable; [ + mpv + ]; + + file.".config/mpv".source = ../../../../stow/mpv/.config/mpv; + }; +} diff --git a/nixos/modules/utils/ssh/default.nix b/nixos/modules/utils/ssh/default.nix new file mode 100644 index 0000000..07b2810 --- /dev/null +++ b/nixos/modules/utils/ssh/default.nix @@ -0,0 +1,8 @@ +{ config, lib, pkgs, ... }: + +{ + services.openssh = { + enable = true; + passwordAuthentication = false; + }; +} diff --git a/nixos/modules/utils/vifm/default.nix b/nixos/modules/utils/vifm/default.nix new file mode 100644 index 0000000..61e1da7 --- /dev/null +++ b/nixos/modules/utils/vifm/default.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }: + +{ + + home-manager.users.tdpeuter.home = { + packages = with pkgs; [ + vifm + + chafa # Terminal image previewer + glow # Terminal Markdown renderer + + font-awesome_5 + ]; + + # Put files separately so history still works + file = { + ".config/vifm/colors".source = ../../../../stow/vifm/.config/vifm/colors; + ".config/vifm/scripts".source = ../../../../stow/vifm/.config/vifm/scripts; + ".config/vifm/vifmrc".source = ../../../../stow/vifm/.config/vifm/vifmrc; + }; + }; +} diff --git a/nixos/modules/utils/vim/default.nix b/nixos/modules/utils/vim/default.nix new file mode 100644 index 0000000..338a356 --- /dev/null +++ b/nixos/modules/utils/vim/default.nix @@ -0,0 +1,76 @@ +{ inputs, lib, config, pkgs, ... }: + +{ + home-manager.users.tdpeuter = { pkgs, ... }: { + home.file = { + ".vim".source = ../../../../stow/vim/.vim; + }; + + programs.vim = { + enable = true; + extraConfig = '' + colorscheme catppuccin_mocha_mod + + " Tags + " pacman -S ctags + command! MakeTags !ctags -R . & + " Move to defintion using ^] + " Move to ambigious using g^] + " Move back using ^t + + filetype on + filetype indent on + filetype plugin on + + " File browsing + let g:netrw_browse_split=4 " open in the previous window + let g:netrw_altv=1 " split new windows to the right + let g:netrw_liststyle=3 " treeview + + set autoindent + set conceallevel=2 + set incsearch + set linebreak + set nocompatible + set path+=** + set scrolloff=3 + set showcmd + set showmatch + set smartindent + set smarttab + set title + set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx + set wildmenu + + syntax enable + + if $TERM == 'alacritty' + set ttymouse=sgr " Alacritty specific + endif + if has("autocmd") + au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif + " https://stackoverflow.com/a/37558470/19044747 + augroup remember_folds + autocmd! + autocmd BufWinLeave * silent! mkview + autocmd BufWinEnter * silent! loadview + augroup END + endif + ''; + plugins = with pkgs.vimPlugins; [ + ale + catppuccin-vim + statix + vifm-vim + ]; + settings = { + expandtab = true; + mouse = "a"; + number = true; + relativenumber = true; + shiftwidth = 4; + tabstop = 4; + }; + }; + }; +} diff --git a/nixos/modules/utils/zellij/default.nix b/nixos/modules/utils/zellij/default.nix new file mode 100644 index 0000000..b84eb71 --- /dev/null +++ b/nixos/modules/utils/zellij/default.nix @@ -0,0 +1,16 @@ +{ config, pkgs, lib, ... }: + +{ + home-manager.users.tdpeuter.home = { + packages = with pkgs; [ + zellij + ]; + + file.".config/zellij".source = ../../../../stow/zellij/.config/zellij; + }; + + fonts.fonts = with pkgs; [ + noto-fonts + noto-fonts-cjk + ]; +} diff --git a/nixos/modules/virtualisation/default.nix b/nixos/modules/virtualisation/default.nix deleted file mode 100644 index 5de3dce..0000000 --- a/nixos/modules/virtualisation/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - ./docker - ./qemu - ./virtualbox - ]; -} diff --git a/nixos/modules/virtualisation/docker/default.nix b/nixos/modules/virtualisation/docker/default.nix deleted file mode 100644 index 2218ff3..0000000 --- a/nixos/modules/virtualisation/docker/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.virtualisation.docker; -in { - options.sisyphus.virtualisation.docker.enable = lib.mkEnableOption "Docker"; - - config = lib.mkIf cfg.enable { - virtualisation.docker = { - enable = true; - # Because these are made for development purposes and not for servers - enableOnBoot = false; - }; - - hardware.nvidia-container-toolkit.enable = true; - }; -} diff --git a/nixos/modules/virtualisation/qemu/default.nix b/nixos/modules/virtualisation/qemu/default.nix deleted file mode 100644 index 220e027..0000000 --- a/nixos/modules/virtualisation/qemu/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.virtualisation.qemu; -in { - options.sisyphus.virtualisation.qemu.enable = lib.mkEnableOption "QEMU"; - - config = lib.mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - qemu - ]; - - virtualisation.libvirtd.qemu.runAsRoot = false; - }; -} diff --git a/nixos/modules/virtualisation/virtualbox/default.nix b/nixos/modules/virtualisation/virtualbox/default.nix deleted file mode 100644 index 1116887..0000000 --- a/nixos/modules/virtualisation/virtualbox/default.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.sisyphus.virtualisation.virtualbox; - - # I like to override the virtualbox package because it is frequently - # and rebuilds take quite long. - inherit (pkgs) fetchurl; - version = "7.0.10"; - virtualbox-override = pkgs.virtualbox.overrideAttrs (oldAttrs: { - src = fetchurl { - url = "https://download.virtualbox.org/virtualbox/${version}/VirtualBox-${version}.tar.bz2"; - sha256 = "0b1e6d8b7f87d017c7fae37f80586acff04f799ffc1d51e995954d6415dee371"; - }; - }); -in { - options.sisyphus.virtualisation.virtualbox.enable = lib.mkEnableOption "VirtualBox"; - - config = lib.mkIf cfg.enable { - virtualisation.virtualbox = { - host = { - enable = true; - enableExtensionPack = true; - package = virtualbox-override; - }; - guest = { - enable = true; - clipboard = true; - seamless = true; - }; - }; - - # Define the group - users.groups.vboxusers = {}; - - sisyphus.users.wantedGroups = [ - config.users.groups.vboxusers.name # The group we defined earlier - config.users.groups.dialout.name # Serial Port - ]; - }; -} diff --git a/nixos/overlays/cmdtime/default.nix b/nixos/overlays/cmdtime/default.nix deleted file mode 100644 index 6ff497f..0000000 --- a/nixos/overlays/cmdtime/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -final: prev: { - cmdtime = final.stdenv.mkDerivation { - name = "cmdtime"; - version = "v0.0.0"; - src = final.fetchFromGitHub { - owner = "tom-auger"; - repo = "cmdtime"; - rev = "ffc72641dcfa0ee6666ceb1dc712b61be30a1e8b"; - hash = "sha256-v6wCfNoPXDD3sS6yUYE6lre8Ir1yJcLGoAW3O8sUOCg="; - }; - - installPhase = '' - mkdir -p $out/share/cmdtime - cp $src/cmdtime.plugin.zsh $out/share/cmdtime/cmdtime.plugin.zsh - ''; - }; -} diff --git a/nixos/overlays/default.nix b/nixos/overlays/default.nix deleted file mode 100644 index 545008f..0000000 --- a/nixos/overlays/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -# The following is taken from: https://nixos-and-flakes.thiscute.world/nixpkgs/overlays - -# import all nix files in the current folder, and execute them with args as parameters -# The return value is a list of all execution results, which is the list of overlays - -args: -# execute and import all overlay files in the current directory with the given args -builtins.map - (f: (import (./. + "/${f}") args)) # execute and import the overlay file - (builtins.filter # find all overlay files in the current directory - (f: f != "default.nix") - (builtins.attrNames (builtins.readDir ./.))) diff --git a/nixos/overlays/icosystem/default.nix b/nixos/overlays/icosystem/default.nix deleted file mode 100644 index 0249251..0000000 --- a/nixos/overlays/icosystem/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -final: prev: { - icosystem = final.stdenv.mkDerivation { - name = "icosystem"; - version = "v1.0.0"; - src = final.fetchFromGitea { - domain = "git.depeuter.dev"; - owner = "tdpeuter"; - repo = "icosystem"; - rev = "ca565dc36d"; - hash = "sha256-GJu0APTkrsFH981Y1RBedOnvVJ5Z79w2WPcLkrc8CH0="; - }; - - installPhase = '' - mkdir -p $out/share/icons - cp -R $src $out/share/icons/icosystem - ''; - }; -} diff --git a/nixos/overlays/letter/default.nix b/nixos/overlays/letter/default.nix deleted file mode 100644 index d494bf4..0000000 --- a/nixos/overlays/letter/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -final: prev: { - letter = final.stdenv.mkDerivation { - name = "letter"; - version = "v1.0.0"; - src = final.fetchFromGitea { - domain = "git.depeuter.dev"; - owner = "tdpeuter"; - repo = "letter"; - rev = "v1.0.0"; - hash = "sha256-2HaXZMIYSauqj9Cy7rRzYGyuYLno9AHAXpWsyD+BdtE="; - }; - - installPhase = '' - mkdir -p $out/share/fonts - cp -R $src/ttf $out/share/fonts/letter - ''; - }; -} diff --git a/nixos/overlays/spotify/default.nix b/nixos/overlays/spotify/default.nix deleted file mode 100644 index fc77396..0000000 --- a/nixos/overlays/spotify/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -final: prev: { - spotify-adblock = final.rustPlatform.buildRustPackage rec { - name = "spotify-adblock"; - version = "v1.0.3"; - src = final.fetchFromGitHub { - owner = "abba23"; - repo = "spotify-adblock"; - rev = "5a3281d"; - sha256 = "sha256-UzpHAHpQx2MlmBNKm2turjeVmgp5zXKWm3nZbEo0mYE="; - }; - - cargoHash = "sha256-oHfk68mAIcmOenW7jn71Xpt8hWVDtxyInWhVN2rH+kk="; - - buildInputs = with final; [ - cargo - rustc - ]; - - postPatch = '' - mkdir -p $out - cp $src/config.toml $out/config.toml - ''; - }; -} diff --git a/nixos/secrets/GitHub.yaml b/nixos/secrets/GitHub.yaml deleted file mode 100644 index cfc0a97..0000000 --- a/nixos/secrets/GitHub.yaml +++ /dev/null @@ -1,22 +0,0 @@ -GitHub: - ssh: ENC[AES256_GCM,data:jzRpTgefhZg7Vhm8QvWNsPBko1yw56sM/XehY72lAc7aRz+dx6BGgyYbZiifd7GrGJGUbH6gWfUg8YjgVla6VRsiHCEvSK3bY0ADDwTeSUs+wuybYXQZqhivSCInVtVSNAcp99uI1QwKor289zmxcFtSZEXgU1OCSel/8br+qipAbOkzAKX1v15eigjY4OSQxXL59EuuuHEQ+vjVVv95tDv03jaNAoU9UKr0Atrny/Fn2sQn4Tmec5Q1XdvDErKhSxrAFiACkxXUwPZMHez+BUZrmkksqpzNJjYNIlmsITuOVr7Fyen9wotAwsDf96Fmz5JYLtRX9CAboUgQLdUOKprwX/xgBnFtDTSH1Qr785T1QSAZL6xdE6hNibxZO3vGeeaPC3oGB5g9x5CwTQelMdOUPKdKorCDj226o56cTc/IQxUpsULbeOyi2pMGHiTHbiQBzHpxWyQ/gBktPkF25GOFeaCu3gW+xsspX91jSKudcYdBqWUNmJcdsfHfPxPM4cZtA/sVMyoA+YcehgU7GTu9DAlxDTug/JWo,iv:5shfzmrFFVEuaYmyTkBMAw9BIFFkKz0yl1dyJWxq6Y4=,tag:CX7TBJJXCKuIPSmg9/RpGg==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1fva6s64s884z0q2w7de024sp69ucvqu0pg9shrhhqsn3ewlpjfpsh6md7y - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBYWWFUdnpERVlkK29TQ09k - SnJMVm5rUEV6S0huSzJ2YjFFQ3pNR0pmZWprClZEVDloeDE2ODNkMVVJTUtqaENz - ZzhwTTA4V2xOeW55WGtPZU5FWElQNDAKLS0tIFh5ZWtmZHRBWTAvM3ZwY3pKQ0R6 - aDNUbFlhWWVoOWpjVlV1VTVJejlSMjQK6wCeCRdHY5oyTX6/R1U5AOGJyp0exi1A - dWPUMfkKBBBkrR+G6ougd8o3FwFf+yfb5RhaTxxqjit6p2RyMjR64w== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2023-09-11T10:23:48Z" - mac: ENC[AES256_GCM,data:3XEbhFY1TlXo6bTctV2u4i6QPzXnJC6iU3F/MUARSQl1z4peOB5x8hZfdiV/hVMR8I+83TxDcEAmKDrcaMf89Tqa+OiD//wBekMUfS7AmBRhpv7X5qfarflfnygacFsAMhf/bdiqowYbGSNvlPjueqHJaFZ+3x/wPrt/jAYNlr8=,iv:ciQmY7bE+Je6kMlmxxtQvp+r3e/ZK942tT4TtXhDX2M=,tag:4+7uZlEm5bcRfZC7pp5Y7Q==,type:str] - pgp: [] - unencrypted_suffix: _unencrypted - version: 3.7.3 diff --git a/nixos/secrets/Hugo.yaml b/nixos/secrets/Hugo.yaml deleted file mode 100644 index 6a8d422..0000000 --- a/nixos/secrets/Hugo.yaml +++ /dev/null @@ -1,24 +0,0 @@ -Hugo: - ssh: ENC[AES256_GCM,data:Qi4YEvG64lJqhISMNtuC0mM02TU5KPpzdgs8x2UJwxAxus4+Aa3nIttkbcbKxtobL7ohKcMFGq7bBdj+s4zbctctknHdjiwj1caDoD7+Fm5H0RWLe7yjt5e4IxRywN8cNF59FfINl2tMutuENOzSucjHIXTKSV/ARZzwhcyZkQy//YvlReUSrUNaNkVM1VtjVILOToAXGzQx5w74eX+9JYV9FtZRTbr/spule+UDDtPZaaiFZmFfE5YjULFPaZJo2iUiirKalPodxfIar9eXzoN+bOQbz2Xys1QHNEt2cwWjERruCsojiyA+XeYFreWEWGggSEXizxv7cS5ab1e9XqtWR+u3Gdy/t1/cjoMBVXuLxQ+BwTlAO8NDgRbW0aq8q5yOsPCjShI/N4EVN5qtMUT1+mYZLCiZPPXbLBIiyqIWea/Ru8iIo7+WoF2iDBgshwnw8+uGDFfwlNh3SAwMSQOcGg06+U17PeU56Q/wqID2lEMDgGfHdqObvMlae1q+Qa9cwrp4xDw5S42NlgVaNcovUav5US5kO43r,iv:xvuRv4sqLRGv9npIVjnGV7zDPzIyS58ZKN2T23BmMZs=,tag:iGnBzgRhREEfKjE/ea5Drw==,type:str] - Gitea: - ssh: ENC[AES256_GCM,data:digqDmnEPg/Zn9Xt7+Z/R9lTBs6CeOgHgIhstWxHnvucwshUO7Zu+l80YPyzAck0pO5YIKML8hjAqj30lYqSPRzG1uRpT7likCy15MqyyQ64U+5PGQRNhybo1eYoqVFYd2sYc5xzkve1b8zCDfxj2mbmRYETYSidHZLaDilq6iKtWWSX+mnTXqJ2gIj+J7pfFBOHskWglnrVdj93AOdpG6cmnvzE7ey8SrMt9t0GzmRFAvjP3slio8NTsI97fu3isF0phGoh8q9tGGRnRMDq3E33zzntT3jawtWiib9ZCxuJ8Zhwc1fIF07YfBJ+sZJ7Kau1205NFJtISGbVhVmpD9kQdoFwYQxYJuvPcDYyIYH/K86bYnBmJWRCwbTh7Es7DCCC90VY/yMjRNoYvjupjhuHKGXE8O/Y8weERZ+GuZ8BSxFwU81YK9mcQyw+Z+MdAFsZEhR7cpxRkty2INKxOdX8wJGVw3A1cInwuiBjLiED0ndh39RqJbE8DUQAJgngSbYK52rCadjhs2xf+tPiDatsDMAHU2DpyDcz,iv:Dh9hhr1mp+gXA1eUvsJVb5opbaEtdRMKAd4HQSQlOpc=,tag:k4M96tstNATvyFe6xF2IzQ==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1fva6s64s884z0q2w7de024sp69ucvqu0pg9shrhhqsn3ewlpjfpsh6md7y - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBYWWFUdnpERVlkK29TQ09k - SnJMVm5rUEV6S0huSzJ2YjFFQ3pNR0pmZWprClZEVDloeDE2ODNkMVVJTUtqaENz - ZzhwTTA4V2xOeW55WGtPZU5FWElQNDAKLS0tIFh5ZWtmZHRBWTAvM3ZwY3pKQ0R6 - aDNUbFlhWWVoOWpjVlV1VTVJejlSMjQK6wCeCRdHY5oyTX6/R1U5AOGJyp0exi1A - dWPUMfkKBBBkrR+G6ougd8o3FwFf+yfb5RhaTxxqjit6p2RyMjR64w== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2023-10-05T19:05:15Z" - mac: ENC[AES256_GCM,data:8xMV6RkmXpt2uY07E+59ZXwTwTL6oqo9j5sFOxejwnFU06MGW9t1h/5HFg+GKpp3Jj1LT6a7uuyip6bDGCMEhI054sTv2uDlOIFd4nbHwOh+keEH/FLa8csTq4yyisROsaXUUCtWxraGXz0MQXT8xlQMT7Pn0x43JssmPhOwrRo=,iv:JKNsroIAxvV5V23at/DsDdud5idVn5IEQHrgeFHR3fQ=,tag:XY0hikk4yvqfynPI8q+GBg==,type:str] - pgp: [] - unencrypted_suffix: _unencrypted - version: 3.7.3 diff --git a/nixos/secrets/UGent.yaml b/nixos/secrets/UGent.yaml deleted file mode 100644 index ee6240b..0000000 --- a/nixos/secrets/UGent.yaml +++ /dev/null @@ -1,27 +0,0 @@ -UGent: - GitHub: - ssh: ENC[AES256_GCM,data:J50bZHBhN1AT1mF0YpzAFvC4zYeXiIPLJsb4Bx2oqnwX8XlfL0xta7z9Y5CmLxBIxowpj2sLaAnElO1pbsGl8NCnERYvAAt0tpnF3ndozLKfqGPsBKnnc/s9CrZhcsCtoH23lMlVsYMJfVR3B1/0W1XeU+E/GpzBTaH0jkwpmE9+k/TdtPPqSqHvF47NS9lTDx9puHSFixNhxUE82/7wvKTrkGO6+SJXTELXqFM7IojwIHs9UrL2zIrMMRnSPwAiZ96UI4Cg2S18j610ZzX/aw1qODqL53ZfZ9HKurGxyEN58ehR4UhiGsHiml9Ged9UIHhpX3DtMCrwrZfAzGLDV4DxDGQRT8C/aCgOag5AtYJczivY8wA9CQpiTBBUlomUurjRtiSX4FdvZxZLTmY+DtnE/SblRNsAZUEu6DVcg+HUYgqWu+XgVhWyKCiEbKpw0Crl4O3e8evIZ8H7+o3ydQjSgjbIkNjtYGR6fH/8Hh1HOsdh9CDevhNh0TtD/KP7ahTEIeelm6A9ZaP92Bnga5aafKtjX0RBOv4u,iv:6YE94ihsaUkB9+c48ELvRiY8bgZvS0EoyP+l5AisW8o=,tag:NSMpky7GoxDkybFSCjJm3Q==,type:str] - HPC: - ssh: ENC[AES256_GCM,data:A4ir0yvCgIVJCl4C5fB4+WhJVj6Go9XWfjw1/lOaWr2rP+tVNnjGuv/d47z55Gxose5keYX2wRMet/M2Re18+5ckFTyfT4YkcHtQCyBGbmwYmIzxcaxinNsCuOelEdNnFnYW2ha0aJ8Q5Xjfpec1YqDrCT/Add3qGRzBizQJ1FajbyhxJOKLYvUrYvLZ8+XE8SUndvjQnVig3ArUm2hDFsEMm4ClZ4T+EwcIuWrS8ia7ZoqlQhglEtlSEczE65a6hQAFeXE64YC3s8kWlRGhRqJQXjB5g/UTkOht3Vrw2cNzrz90tR9vhooOEBEI6d8F8RJGkdyUe5zod1eKnE/lwOFhhTbzrGrYzX4oUrDIL+Dx9+R9mQchv9qSau1JtKDvzkYmqVVgTC6wE98gTRSBw78f0MKO27FA3diC/k3t+mwsKVRjcvlTUcbRcFAxjq/U5TbOq5jOgA41dI9KE/+bnJoLRh81m/sq9EqMTp90wDKn+jjCn7lGcGDwtaaTlbLIGIw5u9pcfD4UyvJZamnS96JAhsDUqk+fxb05,iv:jPCdaC7CahKrj3tvzZTs1ZI/3+zuCCqIdXp3vo9l/iY=,tag:DeUdWEZHpsB1AMD2AQuiTg==,type:str] - SubGit: - ssh: ENC[AES256_GCM,data:hJAle4DHJNvX569reclBG5rEdWsjAyV2TtHYMiPfky/dMKJkYgT4+T0doLfUn1O6at77kJGPmwUEvmK819DUuvHtNY7c6angV7iLygJ/ThI1FIFOKH+NxEsI3scoT0VDDybHpgice/fcJL1tMcvE74+dWOnZ2r4pxcMJEFHUPVVWcl9/stJLn78OonsyWpj8PglcnYFOfZ6THIe3lyNBxRp7XEweuwjacthGzOzNu3Z95zcCAnAokFVZ570glJNhjJVNEmPHZkHOcGiGNNM4JNbR11v+dOYtac942t/mmmWwAzbznuu8ZLupYWjdg/f07ftkPAwFwCoXblZ3708Lvf6uOt/CPeWvEII2Haf1Cr5w+U6TAt14zzL73xCSQqwz1TfkcmD+bJplmtcpSP/KX8/BRK7qr6Ec5T9ecbraRB7zDBg0X2x51DSHLrA7UIhpI9JNaOArU5UOVYTWwuzFiGG61elJMcPZ5vWEVrTCocfa4INPo4B2MkFbbsYf6xnY1L3Wc9LQjkff6aCqYnQaXZ/WfPWepf9YvYG1,iv:0Bm1r0FuJJKKmcbTiPL36rb5FaMZfOO7Mx8pXU2FSfg=,tag:0ShoJPJUx37mEAus+mhPmw==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1fva6s64s884z0q2w7de024sp69ucvqu0pg9shrhhqsn3ewlpjfpsh6md7y - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBYWWFUdnpERVlkK29TQ09k - SnJMVm5rUEV6S0huSzJ2YjFFQ3pNR0pmZWprClZEVDloeDE2ODNkMVVJTUtqaENz - ZzhwTTA4V2xOeW55WGtPZU5FWElQNDAKLS0tIFh5ZWtmZHRBWTAvM3ZwY3pKQ0R6 - aDNUbFlhWWVoOWpjVlV1VTVJejlSMjQK6wCeCRdHY5oyTX6/R1U5AOGJyp0exi1A - dWPUMfkKBBBkrR+G6ougd8o3FwFf+yfb5RhaTxxqjit6p2RyMjR64w== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2023-10-10T06:57:11Z" - mac: ENC[AES256_GCM,data:Tvwv2mqceAxi7ic3+95Y6hBMHjqVoCkYnTkEsXOrhumgXpuuB/QQ0ASEf6gbgkCLXGwnUAXsK41bIIJfFgYSk89fHw6AaXfs6a+zL2Mh5zkhMIE2bm68mFK8+/TX/e8SibbEwNZCKOcPqvaO6nK816KCmh3KKCbT9ObaB6CA/KI=,iv:YPKgYAnQ135JXou7q9jVN7b3SKIDwceKcbqiIjkqnTU=,tag:udPrEVu2F+hWkhNoEyjTYg==,type:str] - pgp: [] - unencrypted_suffix: _unencrypted - version: 3.7.3 diff --git a/nixos/secrets/secrets.yaml b/nixos/secrets/secrets.yaml deleted file mode 100644 index 6c8e2ac..0000000 --- a/nixos/secrets/secrets.yaml +++ /dev/null @@ -1,30 +0,0 @@ -hello: ENC[AES256_GCM,data:Qs69AsC8Yz+2RWSMvZp3zw==,iv:9p9bf2MI0HFwPB5qu0nTy3riyE6xUqsdObaXv3vgs3c=,tag:fjwrOPR/2vIeNgPDEVI+LQ==,type:str] -example_key: ENC[AES256_GCM,data:JaknfPEPPtIotkwWpQ==,iv:OQy1S24scW0Ac9omkHg1HSCH6b7cClBMDH1GXZkzUBY=,tag:ItO6EdXKy4zOuZ2DROI+Tg==,type:str] -#ENC[AES256_GCM,data:Pok2Tcvryb59LmHDanq5/Q==,iv:Wl2nAb0X7s3bFeGeVUAHb+FMqrKHSJwwHulhdwhPkuE=,tag:YxicHwyrYLZZ6sFGNvkMMA==,type:comment] -example_array: - - ENC[AES256_GCM,data:ULZ3vixg/k1biadqhw8=,iv:7NMuh30RkiBGpXO/sd5WKzBggNnMZkV8eD16w39utd4=,tag:+ReYo3sQf2rgK0nTXAq1UA==,type:str] - - ENC[AES256_GCM,data:VawE9ClM28rRQPScWAM=,iv:XKiKDFGy6Io5gyp/FHLXIs7CpT41E6KAKHQmuZLRVHE=,tag:FSIdSnI/emPwHk0dQVT/TQ==,type:str] -example_number: ENC[AES256_GCM,data:yd6R8u2Nd5effA==,iv:7NO330iRkYO42a4AjBr5Ebv/nxx5J0/OpWKIqMTqdPQ=,tag:N/RK1+Q+QqnVPCkGPA1/AQ==,type:float] -example_booleans: - - ENC[AES256_GCM,data:Ul7fKA==,iv:U51FhTsWwkbhUWGsO8D+bl2mLdTIfapIB+OGJEOAiRA=,tag:9NJLKp8s2TSKLyXwM8OncA==,type:bool] - - ENC[AES256_GCM,data:LVU1a90=,iv:1X1qV+8iIe1i5hIrqyB3tJew9hsHjJHlATmkEmwRA0Y=,tag:ko/5OwmJH/6HKPsvbkoRpw==,type:bool] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1fva6s64s884z0q2w7de024sp69ucvqu0pg9shrhhqsn3ewlpjfpsh6md7y - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA3ekx1bzluY0ZhYmhnRmhW - b3pzM2RlKzFrREpMK3RNU1MweldNRXJ5NjE4CmNRbnFvbk1EN0V0ZWJiVzFmL3Jt - N1Vpb3NEdXFzdzU4MjN1elp1RWZ5THcKLS0tIDR4cTFJNVFveEdxaEYvZndKbURa - UHpaNENhL3c1K3RXc05hUmdNZVBpT2MKwBj4+Gb7giVJIoPWiwY3tvugEAexXy6Q - YTWgZQZk96r5aF2mBjRCFCc7prj85PsUN/UXOPjPLVAFG3lwS0Eaog== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2023-09-10T20:20:18Z" - mac: ENC[AES256_GCM,data:yfmYEo8pdlG3tu4Fabwde57igIvpt4UuhQqStVlV36rvPnv9dc42+6iduu+heuQ2OAVw0jk6/o6SWJpcms2DReOAMGDOgt+zV3TgJym52YdMcjTNJTo+4loULhvaWyN9ZdPJjSYKEoSgOZi+oMx4BpwreQEaPaYUxcbTqrWCUa8=,iv:Mb81sBxibRxSaC2kgakhy2pyEmW0MDobF+lHF7cny5E=,tag:DCqTWSnf5Gv5YfAGSEC2yw==,type:str] - pgp: [] - unencrypted_suffix: _unencrypted - version: 3.7.3 diff --git a/nixos/secrets/sops/age/keys.txt b/nixos/secrets/sops/age/keys.txt new file mode 100644 index 0000000..b21c58f --- /dev/null +++ b/nixos/secrets/sops/age/keys.txt @@ -0,0 +1,3 @@ +# created: 2023-04-11T14:44:53+02:00 +# public key: age1q2gqur3t4fu8flsuu2zdnule37vdkh6egpt6a2e3ytx433x8gpvsr4hw6l +AGE-SECRET-KEY-10J7MWCWQQY33TVNMQ9AMH4TH5LULSVAZ539P9QG3NA2Z3LTMXAFS2QQ4NG diff --git a/nixos/users/default.nix b/nixos/users/default.nix deleted file mode 100644 index 2c60be9..0000000 --- a/nixos/users/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, lib, ... }: - -{ - imports = [ - ./tdpeuter - ]; - - options.sisyphus.users.wantedGroups = lib.mkOption { - type = lib.types.listOf lib.types.str; - default = [ ]; - example = [ config.users.groups.wheel.name ]; - description = "Groups to which a user should be added"; - }; -} diff --git a/nixos/users/tdpeuter/default.nix b/nixos/users/tdpeuter/default.nix deleted file mode 100644 index 1e11671..0000000 --- a/nixos/users/tdpeuter/default.nix +++ /dev/null @@ -1,174 +0,0 @@ -{ config, lib, pkgs, pkgs-unstable, ... }: - -let - cfg = config.sisyphus.users.tdpeuter; - - user = config.users.users.tdpeuter.name; - installedPkgs = config.environment.systemPackages ++ config.home-manager.users.tdpeuter.home.packages; - - cursor = { - package = pkgs.phinger-cursors; - name = "phinger-cursors"; - size = 24; - }; -in { - imports = [ - ./dotfiles.nix - ./firefox.nix # Enables Firefox without setting options - ./mail.nix # Enables Thunderbird without setting options - ./secrets.nix - ]; - - options.sisyphus.users.tdpeuter.enable = lib.mkEnableOption "user Tibo De Peuter"; - - config = lib.mkIf cfg.enable { - users.users.tdpeuter = { - description = "Tibo De Peuter"; - isNormalUser = true; - extraGroups = config.sisyphus.users.wantedGroups ++ [ - config.users.groups.input.name - config.users.groups.keys.name - config.users.groups.networkmanager.name - config.users.groups.wheel.name - ]; - initialPassword = "ChangeMe"; - shell = pkgs.zsh; - }; - - fonts.packages = with pkgs; [ - corefonts # Calibri for Uni - font-awesome # Dependency of Vifm & zsh config - letter # Personal font - noto-fonts-cjk # Dependency of Zellij config - noto-fonts # Dependency of Zellij config - vistafonts # Microsoft fonts - ]; - - sisyphus = { - programs.spotify-adblock.enable = true; - }; - - home-manager.users.tdpeuter = lib.mkIf config.sisyphus.programs.home-manager.enable { - programs.home-manager.enable = true; - - home = { - username = user; - homeDirectory = "/home/${user}"; - inherit (config.system) stateVersion; - - packages = (with pkgs; [ - cmdtime # Zsh plugin - icosystem # Personal icon theme - spotify-adblock - ]) ++ (with pkgs-unstable; [ - brave - chafa # Terminal image viewer - duf # Df alternative - foot - fzf - glow # Terminal Markdown renderer - jellyfin-media-player - kitty - libreoffice-fresh - logseq - mpv - nextcloud-client - nsxiv # Lightweight image viewer - qalculate-gtk # Calculator - spotify - unzip - vifm # File manager - zathura # PDF viewer - zellij # Tmux + screen alternative - zsh - zsh-autosuggestions - zsh-syntax-highlighting - - # SMB - cifs-utils psmisc - - # Linters and LSPs - statix # Nix - ruff pylint # Python - ]); - - pointerCursor = { - inherit (cursor) package name size; - gtk.enable = true; - x11.enable = true; - }; - }; - - # GNOME ricing - # Browse available settings by running: - # gsettings list-schemas | xargs -I % sh -c 'echo %; gsettings list-keys %' | less - dconf.settings = lib.mkIf config.sisyphus.desktop.gnome.enable { - "org/gnome/desktop/background" = { - picture-uri = "file:///home/tdpeuter/Nextcloud/Afbeeldingen/wallpapers/bg"; - picture-uri-dark = "file:///home/tdpeuter/Nextcloud/Afbeeldingen/wallpapers/bg-dark"; - }; - "org/gnome/desktop/interface" = { - enable-animations = false; - enable-hot-corners = false; - }; - "org/gnome/desktop/notifications" = { - show-in-lock-screen = false; - }; - "org/gnome/desktop/peripherals.touchpad" = { - tap-to-click = true; - }; - "org/gnome/mutter" = { - dynamic-workspaces = true; - workspaces-only-on-primary = false; - }; - "org/gnome/shell/app-switcher" = { - current-workspace-only = true; - }; - }; - - gtk = { - enable = true; - cursorTheme = cursor; - }; - - xdg = { - desktopEntries.spotify = { - name = "Spotify"; - genericName = "Music Player"; - icon = "spotify-client"; - exec = "env LD_PRELOAD=${pkgs.spotify-adblock}/lib/libspotifyadblock.so spotify %U"; - mimeType = [ "x-scheme-handler/spotify" ]; - categories = [ "Audio" "Music" "Player" "AudioVideo" ]; - settings = { - TryExec = "spotify"; - StartupWMClass = "spotify"; - }; - }; - mimeApps = { - enable = true; - - defaultApplications = let - browser = "firefox.desktop"; - image-viewer = "nsxiv.desktop"; - pdf-viewer = "org.pwmt.zathura-pdf-mupdf.desktop"; - in { - "application/pdf" = pdf-viewer; - "application/x-extension-htm" = browser; - "application/x-extension-html" = browser; - "application/x-extension-shtml" = browser; - "application/x-extension-xht" = browser; - "application/x-extension-xhtml" = browser; - "application/xhtml+xml" = browser; - "image/jpeg" = image-viewer; - "image/png" = image-viewer; - "image/webp" = image-viewer; - "text/html" = browser; - "x-scheme-handler/chrome" = browser; - "x-scheme-handler/http" = browser; - "x-scheme-handler/https" = browser; - }; - }; - }; - }; - }; -} diff --git a/nixos/users/tdpeuter/dotfiles.nix b/nixos/users/tdpeuter/dotfiles.nix deleted file mode 100644 index 9766b08..0000000 --- a/nixos/users/tdpeuter/dotfiles.nix +++ /dev/null @@ -1,117 +0,0 @@ -{ config, lib, pkgs, pkgs-unstable, ... }: - -# Does basically the same thing that stow does, but using Nix. - -let - cfg = config.sisyphus.users.tdpeuter; - user = config.users.users.tdpeuter.name; - installedPkgs = config.environment.systemPackages ++ config.home-manager.users.tdpeuter.home.packages; -in { - config = lib.mkIf cfg.enable { - home-manager.users.tdpeuter = lib.mkIf config.sisyphus.programs.home-manager.enable { - home = { - file = lib.mkMerge [ - { - ".config/alacritty" = { - enable = false; - source = ../../../stow/alacritty/.config/alacritty; - }; - ".config/dunst" = { - inherit (config.sisyphus.desktop.sway) enable; - source = ../../../stow/dunst/.config/dunst; - }; - ".config/foot" = { - recursive = true; - source = ../../../stow/foot/.config/foot; - }; - ".config/fuzzel" = { - recursive = true; - source = ../../../stow/fuzzel/.config/fuzzel; - }; - ".config/git" = { - recursive = true; - source = ../../../stow/git/.config/git; - }; - ".config/kitty" = { - enable = false; - recursive = true; - source = ../../../stow/kitty/.config/kitty; - }; - ".config/mako" = { - enable = false; - source = ../../../stow/mako/.config/mako; - }; - ".config/mpv" = { - source = ../../../stow/mpv/.config/mpv; - }; - ".config/OpenRGB" = { - inherit (config.sisyphus.services.openrgb) enable; - recursive = true; - source = ../../../stow/openrgb/.config/OpenRGB; - }; - ".config/sway" = { - inherit (config.sisyphus.desktop.sway) enable; - source = ../../../stow/sway/.config/sway; - }; - ".config/swayidle" = { - inherit (config.sisyphus.desktop.sway) enable; - source = ../../../stow/swayidle/.config/swayidle; - }; - ".config/swaylock" = { - inherit (config.sisyphus.desktop.sway) enable; - source = ../../../stow/swaylock/.config/swaylock; - }; - ".config/vifm" = { - recursive = true; # Fix history and all working - source = ../../../stow/vifm/.config/vifm; - }; - ".config/waybar" = { - inherit (config.sisyphus.desktop.sway) enable; - source = ../../../stow/waybar/.config/waybar; - }; - ".config/zellij" = { - source = ../../../stow/zellij/.config/zellij; - }; - ".oh-my-zsh" = { - enable = config.users.users.tdpeuter.shell == pkgs.zsh; - source = "${pkgs.oh-my-zsh}/share/oh-my-zsh"; - recursive = true; - }; - ".oh-my-zsh/themes/tdpeuter.zsh-theme" = { - enable = config.users.users.tdpeuter.shell == pkgs.zsh; - source = ../../../stow/zsh/.oh-my-zsh/themes/tdpeuter.zsh-theme; - }; - ".ssh/config" = lib.mkIf config.sisyphus.programs.ssh.enable { - inherit (config.sisyphus.programs.ssh) enable; - source = ../../../stow/ssh/.ssh/config; - }; - ".vim" = { - recursive = true; - source = ../../../stow/vim/.vim; - }; - ".vim/autoload/plug.vim" = { - source = "${pkgs.vimPlugins.vim-plug}/plug.vim"; - }; - ".vimrc" = { - source = ../../../stow/vim/.vimrc; - }; - } - (lib.mkIf (config.users.users.tdpeuter.shell == pkgs.zsh) { - ".zshrc" = { - source = ../../../stow/zsh/.zshrc; - }; - ".zsh/plugins/cmdtime/cmdtime.plugin.zsh" = { - source = "${pkgs.cmdtime}/share/cmdtime/cmdtime.plugin.zsh"; - }; - ".zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" = { - source = "${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh"; - }; - ".zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" = { - source = "${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"; - }; - }) - ]; - }; - }; - }; -} diff --git a/nixos/users/tdpeuter/firefox.nix b/nixos/users/tdpeuter/firefox.nix deleted file mode 100644 index 4c4a88c..0000000 --- a/nixos/users/tdpeuter/firefox.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ config, lib, pkgs, pkgs-unstable, ... }: - -let - cfg = config.sisyphus.users.tdpeuter; - user = config.users.users.tdpeuter.name; -in { - config = lib.mkIf cfg.enable { - home-manager.users.tdpeuter.programs.firefox = lib.mkIf config.sisyphus.programs.home-manager.enable { - enable = true; - package = pkgs-unstable.firefox.override { - cfg = { - speechSynthesisSupport = true; # Allow Text-to-speech in e.g. Discord - }; - nativeMessagingHosts = with pkgs; [ - tridactyl-native - ]; - extraPolicies = { - DisableFirefoxStudies = true; - DisablePocket = true; - DisableTelemetry = true; - OfferToSaveLogins = false; - }; - - # Support smart cards - pkcs11Modules = with pkgs-unstable; [ - eid-mw - ]; - }; - - profiles.tdpeuter.search= { - default = "DuckDuckGo"; - force = true; - engines = { - "Bing".metaData.hidden = true; - "eBay".metaData.hidden = true; - "Qwant".metaData.hidden = true; - - "Nix Packages" = { - urls = [{ - template = "https://search.nixos.org/packages"; - params = [ - { name = "type"; value = "packages"; } - { name = "query"; value = "{searchTerms}"; } - ]; - }]; - - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@np" ]; - }; - "GitHub" = { - urls = [{ - template = "https://github.com/search"; - params = [ - { name = "q"; value = "{searchTerms}"; } - { name = "type"; value = "repositories"; } - ]; - }]; - - icon = "${pkgs.icosystem}/share/icons/icosystem/scalable/apps/github-mark.svg"; - definedAliases = [ "@gh" ]; - }; - }; - }; - }; - }; -} diff --git a/nixos/users/tdpeuter/mail.nix b/nixos/users/tdpeuter/mail.nix deleted file mode 100644 index d6b4928..0000000 --- a/nixos/users/tdpeuter/mail.nix +++ /dev/null @@ -1,139 +0,0 @@ -{ config, lib, pkgs, pkgs-unstable, ... }: - -let - cfg = config.sisyphus.users.tdpeuter; - user = config.users.users.tdpeuter.name; - signatures = { - default = '' - Met vriendelijke groeten - Tibo De Peuter - ''; - UGent = '' - Met vriendelijke groeten - Tibo De Peuter - - Student 2Ba/3Ba Informatica - ''; - MrFortem = '' - Kind regards - MrFortem Fiducia - ''; - }; -in { - config = lib.mkIf cfg.enable { - home-manager.users.tdpeuter = lib.mkIf config.sisyphus.programs.home-manager.enable { - accounts.email.accounts = { - Telenet = { - address = "tibo.depeuter@telenet.be"; - userName = "tibo.depeuter@telenet.be"; - imap = { - host = "imap.telenet.be"; - port = 993; - tls.enable = true; - }; - smtp = { - host = "smtp.telenet.be"; - port = 587; - tls = { - enable = true; - useStartTls = true; - }; - }; - - realName = config.users.users.tdpeuter.description; - signature = { - showSignature = "append"; - text = signatures.default; - }; - - primary = true; - thunderbird = { - enable = true; - settings = id: { - "mail.identity.id_${id}.htmlSigText" = signatures.default; - }; - }; - }; - UGent = { - flavor = "outlook.office365.com"; - address = "tibo.depeuter@ugent.be"; - - realName = config.users.users.tdpeuter.description; - signature = { - showSignature = "append"; - text = signatures.UGent; - }; - - thunderbird = { - enable = true; - settings = id: { - "mail.server.server_${id}.authMethod" = 10; - "mail.smtpserver.smtp_${id}.authMethod" = 10; - "mail.identity.id_${id}.htmlSigText" = signatures.UGent; - - # Allow PGP - "mail.identity.id_${id}.openpgp_key_id" = "9B11F5243089DB5B"; # Your 'master' key - "mail.identity.id_${id}.attachPgpKey" = true; - }; - }; - }; - Gmail = { - flavor = "gmail.com"; - address = "tibo.depeuter@gmail.com"; - - realName = config.users.users.tdpeuter.description; - signature = { - showSignature = "append"; - text = signatures.default; - }; - thunderbird = { - enable = true; - settings = id: { - "mail.identity.id_${id}.htmlSigText" = signatures.default; - }; - }; - - }; - MrFortem = { - flavor = "gmail.com"; - address = "fortemfiducia@gmail.com"; - - realName = "Fortem Fiducia"; - signature = { - showSignature = "append"; - text = signatures.MrFortem; - }; - - thunderbird = { - enable = true; - settings = id: { - "mail.server.server_${id}.directory" = ".thunderbird/tdpeuter/ImapMail/imap.gmail.com-mrfortem"; - "mail.server.server_${id}.directory-rel" = "[ProfD]ImapMail/imap.gmail.com-mrfortem"; - "mail.identity.id_${id}.htmlSigText" = signatures.MrFortem; - }; - }; - }; - }; - - programs = { - thunderbird = { - enable = true; - profiles.tdpeuter = { - isDefault = true; - settings = { - # View - "mailnews.default_sort_order" = 2; # Sort descending - "mailnews.mark_message_read.delay" = true; - "mailnews.start_page.enabled" = false; - "mail.pane_config.dynamic" = 2; # Vertical view - - # Encryption - "mail.openpgp.allow_external_gnupg" = true; # Enable YubiKey GPG signing - "mail.e2ee.auto_enable" = true; # Automatically enable encryption when possible. - }; - }; - }; - }; - }; - }; -} diff --git a/nixos/users/tdpeuter/secrets.nix b/nixos/users/tdpeuter/secrets.nix deleted file mode 100644 index f97cdb0..0000000 --- a/nixos/users/tdpeuter/secrets.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ config, lib, pkgs, pkgs-unstable, ... }: - -let - cfg = config.sisyphus.users.tdpeuter; - user = config.users.users.tdpeuter.name; -in { - config = lib.mkIf cfg.enable { - sops.secrets = lib.mkIf config.sisyphus.programs.sops.enable ( - let - Hugo = { - format = "yaml"; - sopsFile = ../../secrets/Hugo.yaml; - owner = user; - }; - UGent = { - format = "yaml"; - sopsFile = ../../secrets/UGent.yaml; - owner = user; - }; - in { - "Hugo/ssh" = Hugo; - "UGent/HPC/ssh" = UGent; - - "GitHub/ssh" = { - format = "yaml"; - sopsFile = ../../secrets/GitHub.yaml; - owner = user; - }; - "Hugo/Gitea/ssh" = Hugo; - "UGent/GitHub/ssh" = UGent; - "UGent/SubGit/ssh" = UGent; - }); - }; -} diff --git a/scripts/do-not-disturb.sh b/scripts/do-not-disturb.sh deleted file mode 100755 index c9c5f21..0000000 --- a/scripts/do-not-disturb.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash -# Script to toggle Do not disturb mode for dunst - -# Get current state -if [ "$( command -v dunstctl )" ]; then - current_state="$( dunstctl is-paused )" -fi - -# Toggle -if [ "${current_state}" == "false" ] ; then - notify-send 'Hiding notifications' - sleep 5 - # makoctl set-mode do-not-disturb - dunstctl set-paused true -else - # makoctl set-mode default - dunstctl set-paused false - notify-send 'Showing notifications' -fi diff --git a/scripts/toggle-light-dark.sh b/scripts/toggle-light-dark.sh deleted file mode 100755 index ec38506..0000000 --- a/scripts/toggle-light-dark.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/usr/bin/env bash -# Toggle light- or dark-mode for your applications -# Usage: toggle [-m light|dark] [-g] - -################# -### Variables ### -################# - -THEME_LIGHT='tdpeuter-light' -THEME_DARK='tdpeuter-dark' -THEME_DEFAULT="${THEME_LIGHT}" - -STATE_DIR="${HOME}/.local/state/sisyphus" -STATE_FILE="${STATE_DIR}/theme" -BG_DIR="${HOME}/Nextcloud/Afbeeldingen/wallpapers" - -declare -A theme_next -theme_next[${THEME_LIGHT}]="${THEME_DARK}" -theme_next[${THEME_DARK}]="${THEME_LIGHT}" - -declare -A gsettings_alt -gsettings_alt[${THEME_LIGHT}]='default' -gsettings_alt[${THEME_DARK}]='prefer-dark' - -declare -A gtk_theme -gtk_theme[${THEME_LIGHT}]='Adwaita' -gtk_theme[${THEME_DARK}]='Adwaita-dark' - -declare -A wallpaper -wallpaper[${THEME_LIGHT}]="bg-light" -wallpaper[${THEME_DARK}]="bg-dark" - -############# -### Logic ### -############# - -# Parse options -while getopts ":m:g" option; do - case "${option}" in - m) - if [ "${OPTARG}" == 'light' ]; then - theme="${THEME_LIGHT}" - elif [ "${OPTARG}" == 'dark' ]; then - theme="${THEME_DARK}" - else - >&2 printf "Error: Invalid mode: '%s'.\nShould be either 'light' or 'dark'\n" "${option}" - exit 1 - fi - ;; - g) - previous_theme="$(cat ${STATE_FILE})" - if [ "${previous_theme}" == "${THEME_LIGHT}" ]; then - class="activated" - percentage=1 - else - percentage=0 - fi - printf '{ "class": "%s", "percentage": %d }' "${class}" "${percentage}" - exit 0 - ;; - *) - >&2 printf "Error: Invalid option: '%s'.\n" "${option}" - exit 1 - ;; - esac -done -shift $(( OPTIND - 1 )) - -# Check if the state file exists -if ! [ -d "$(dirname ${STATE_FILE})" ]; then - mkdir -p "$(dirname ${STATE_FILE})" -fi - -# Choose next theme -previous_theme="$(cat ${STATE_FILE})" -if ! [[ -z "${previous_theme}" || "${theme}" ]]; then - theme="${theme_next[${previous_theme}]}" -fi -echo "${theme:=${THEME_DEFAULT}}" > "${STATE_FILE}" - -###################### -### Set all themes ### -###################### - -# Update terminal colors by sending it OSC sequences. -# Alternatively, you could use theme.sh (https://github.com/lemnos/theme.sh) -# Function below loosely based on theme.sh and https://codeberg.org/dnkl/foot/issues/708 -function update_terminal_colors() { - for pid in $(pgrep zsh); do - if [ "${theme}" == "${THEME_LIGHT}" ]; then - printf "\033]10;#000000\007" >> /proc/${pid}/fd/0 - printf "\033]11;#ffffff\007" >> /proc/${pid}/fd/0 - elif [ "${theme}" == "${THEME_DARK}" ]; then - printf "\033]10;#ffffff\007" >> /proc/${pid}/fd/0 - printf "\033]11;#000000\007" >> /proc/${pid}/fd/0 - fi - done -} - -# Foot -if [ "$(command -v foot)" ] ; then - # Make color theme switch 'permanent'. - echo "include=~/.config/foot/themes/${theme}.ini" > ~/.config/foot/theme.ini & - # We will have to change the terminal colors ourselves. - update_terminal_colors & -fi - -# GNOME (GTK) -if [ "$(command -v gsettings)" ]; then - gsettings set org.gnome.desktop.interface color-scheme "${gsettings_alt[${theme}]}" & - gsettings set org.gnome.desktop.interface gtk-theme "${gtk_theme[${theme}]}" & -fi - -# Kitty -if [ "$(command -v kitty)" ]; then - kitten themes --reload-in all --config-file-name theme.conf "${theme}" & -fi - -# Sway -if [ "$(command -v swaybg)" ]; then - bg_path="${BG_DIR}/${wallpaper[${theme}]}" - /run/current-system/sw/bin/cp "${bg_path}" "${STATE_DIR}/bg" && swaymsg reload & -fi - -# Vifm -if [ "$(command -v vifm)" ]; then - echo "colorscheme ${theme} Default-256 Default" > ~/.config/vifm/theme.conf - # Update all running instances - vifm --remote -c "colorscheme ${theme}" & -fi - -# Vim -if [ "$(command -v vim)" ]; then - echo "colorscheme ${theme}" > ~/.vim/theme.conf - # Update all running instances - for server in $(vim --serverlist); do - vim --servername "${server}" --remote-send "<C-\><C-N>:colorscheme ${theme}<CR>" - done -fi - diff --git a/stow/alacritty/.config/alacritty/alacritty.yml b/stow/alacritty/.config/alacritty/alacritty.yml index dcd08cc..4ea1c1b 100644 --- a/stow/alacritty/.config/alacritty/alacritty.yml +++ b/stow/alacritty/.config/alacritty/alacritty.yml @@ -102,41 +102,41 @@ window: #multiplier: 3 # Font configuration -font: +# font: # Normal (roman) font face - normal: + # normal: # Font family # # Default: # - (macOS) Menlo # - (Linux/BSD) monospace # - (Windows) Consolas - family: Letter + # family: Letter # The `style` can be specified to pick a specific face. - style: Extended + # style: Extended # Bold font face - bold: + # bold: # Font family # # If the bold family is not specified, it will fall back to the # value specified for the normal font. - family: Letter + # family: Letter # The `style` can be specified to pick a specific face. - style: Heavy + # style: Heavy # Italic font face - italic: + # italic: # Font family # # If the italic family is not specified, it will fall back to the # value specified for the normal font. - family: Letter + # family: Letter # The `style` can be specified to pick a specific face. - style: Oblique + # style: Oblique # Bold italic font face #bold_italic: diff --git a/stow/foot/.config/foot/foot.ini b/stow/foot/.config/foot/foot.ini deleted file mode 100644 index 51fdc7e..0000000 --- a/stow/foot/.config/foot/foot.ini +++ /dev/null @@ -1,229 +0,0 @@ -# -*- conf -*- -# ~/.config/foot/foot.ini - -# Include the correct color scheme -include=~/.config/foot/theme.ini - -# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd) -term=xterm-256color -# login-shell=no - -# app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode -# title=foot -# locked-title=no - -font=letter extended:size=10 -# font-bold=<bold variant of regular font> -# font-italic=<italic variant of regular font> -# font-bold-italic=<bold+italic variant of regular font> -# font-size-adjustment=0.5 -# line-height=<font metrics> -# letter-spacing=0 -# horizontal-letter-offset=0 -# vertical-letter-offset=0 -# underline-offset=<font metrics> -# underline-thickness=<font underline thickness> -# box-drawings-uses-font-glyphs=no -dpi-aware=yes - -# initial-window-size-pixels=700x500 # Or, -# initial-window-size-chars=<COLSxROWS> -# initial-window-mode=windowed -pad=10x10 # optionally append 'center' -# resize-delay-ms=100 - -# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body} - -# bold-text-in-bright=no -# word-delimiters=,│`|:"'()[]{}<> -# selection-target=primary -# workers=<number of logical CPUs> -# utmp-helper=/usr/lib/utempter/utempter # When utmp backend is ‘libutempter’ (Linux) -# utmp-helper=/usr/libexec/ulog-helper # When utmp backend is ‘ulog’ (FreeBSD) - -[environment] -# name=value - -[bell] -urgent=yes -notify=yes -visual=yes -# command= -# command-focused=no - -[scrollback] -# lines=1000 -# multiplier=3.0 -# indicator-position=relative -# indicator-format="" - -[url] -# launch=xdg-open ${url} -# label-letters=sadfjklewcmpgh -# osc8-underline=url-mode -# protocols=http, https, ftp, ftps, file, gemini, gopher -# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[] - -[cursor] -# style=block -# color=<inverse foreground/background> -# blink=no -# beam-thickness=1.5 -# underline-thickness=<font underline thickness> - -[mouse] -# hide-when-typing=no -# alternate-scroll-mode=yes - -[touch] -# long-press-delay=400 - -[colors] -alpha=0.8 -# background=242424 -# foreground=ffffff -flash=b00020 -# flash-alpha=0.5 - -## Normal/regular colors (color palette 0-7) -# regular0=242424 # black -# regular1=f62b5a # red -# regular2=47b413 # green -# regular3=e3c401 # yellow -# regular4=24acd4 # blue -# regular5=f2affd # magenta -# regular6=13c299 # cyan -# regular7=e6e6e6 # white - -## Bright colors (color palette 8-15) -# bright0=616161 # bright black -# bright1=ff4d51 # bright red -# bright2=35d450 # bright green -# bright3=e9e836 # bright yellow -# bright4=5dc5f8 # bright blue -# bright5=feabf2 # bright magenta -# bright6=24dfc4 # bright cyan -# bright7=ffffff # bright white - -## dimmed colors (see foot.ini(5) man page) -# dim0=<not set> -# ... -# dim7=<not-set> - -## The remaining 256-color palette -# 16 = <256-color palette #16> -# ... -# 255 = <256-color palette #255> - -## Misc colors -# selection-foreground=<inverse foreground/background> -# selection-background=<inverse foreground/background> -# jump-labels=<regular0> <regular3> # black-on-yellow -# scrollback-indicator=<regular0> <bright4> # black-on-bright-blue -# search-box-no-match=<regular0> <regular1> # black-on-red -# search-box-match=<regular0> <regular3> # black-on-yellow -# urls=<regular3> - -[csd] -preferred=none -# size=26 -# font=<primary font> -# color=<foreground color> -# hide-when-maximized=no -# double-click-to-maximize=yes -# border-width=0 -# border-color=<csd.color> -# button-width=26 -# button-color=<background color> -# button-minimize-color=<regular4> -# button-maximize-color=<regular2> -# button-close-color=<regular1> - -[key-bindings] -# scrollback-up-page=Shift+Page_Up -# scrollback-up-half-page=none -# scrollback-up-line=none -# scrollback-down-page=Shift+Page_Down -# scrollback-down-half-page=none -# scrollback-down-line=none -# scrollback-home=none -# scrollback-end=none -# clipboard-copy=Control+Shift+c XF86Copy -# clipboard-paste=Control+Shift+v XF86Paste -# primary-paste=Shift+Insert -# search-start=Control+Shift+r -# font-increase=Control+plus Control+equal Control+KP_Add -# font-decrease=Control+minus Control+KP_Subtract -# font-reset=Control+0 Control+KP_0 -# spawn-terminal=Control+Shift+n -# minimize=none -# maximize=none -# fullscreen=none -# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none -# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none -# pipe-selected=[xargs -r firefox] none -# show-urls-launch=Control+Shift+o -# show-urls-copy=none -# show-urls-persistent=none -# prompt-prev=Control+Shift+z -# prompt-next=Control+Shift+x -# unicode-input=Control+Shift+u -# noop=none - -[search-bindings] -# cancel=Control+g Control+c Escape -# commit=Return -# find-prev=Control+r -# find-next=Control+s -# cursor-left=Left Control+b -# cursor-left-word=Control+Left Mod1+b -# cursor-right=Right Control+f -# cursor-right-word=Control+Right Mod1+f -# cursor-home=Home Control+a -# cursor-end=End Control+e -# delete-prev=BackSpace -# delete-prev-word=Mod1+BackSpace Control+BackSpace -# delete-next=Delete -# delete-next-word=Mod1+d Control+Delete -# extend-char=Shift+Right -# extend-to-word-boundary=Control+w Control+Shift+Right -# extend-to-next-whitespace=Control+Shift+w -# extend-line-down=Shift+Down -# extend-backward-char=Shift+Left -# extend-backward-to-word-boundary=Control+Shift+Left -# extend-backward-to-next-whitespace=none -# extend-line-up=Shift+Up -# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste -# primary-paste=Shift+Insert -# unicode-input=none -# scrollback-up-page=Shift+Page_Up -# scrollback-up-half-page=none -# scrollback-up-line=none -# scrollback-down-page=Shift+Page_Down -# scrollback-down-half-page=none -# scrollback-down-line=none -# scrollback-home=none -# scrollback-end=none - -[url-bindings] -# cancel=Control+g Control+c Control+d Escape -# toggle-url-visible=t - -[text-bindings] -# \x03=Mod4+c # Map Super+c -> Ctrl+c - -[mouse-bindings] -# scrollback-up-mouse=BTN_BACK -# scrollback-down-mouse=BTN_FORWARD -# selection-override-modifiers=Shift -# primary-paste=BTN_MIDDLE -# select-begin=BTN_LEFT -# select-begin-block=Control+BTN_LEFT -# select-extend=BTN_RIGHT -# select-extend-character-wise=Control+BTN_RIGHT -# select-word=BTN_LEFT-2 -# select-word-whitespace=Control+BTN_LEFT-2 -# select-quote = BTN_LEFT-3 -# select-row=BTN_LEFT-4 - -# vim: ft=dosini diff --git a/stow/foot/.config/foot/themes/tdpeuter-dark.ini b/stow/foot/.config/foot/themes/tdpeuter-dark.ini deleted file mode 100644 index 4ee35d8..0000000 --- a/stow/foot/.config/foot/themes/tdpeuter-dark.ini +++ /dev/null @@ -1,64 +0,0 @@ -[colors] -# alpha=0.8 -background=171717 -foreground=dcdfe4 -# flash=b00020 -# flash-alpha=0.5 - -## Normal/regular colors (color palette 0-7) -regular0=242424 # black -# regular0=21222c -# regular1=f62b5a # red -regular1=c86564 -regular2=47b413 # green -# regular2=b2bc68 -regular3=e3c401 # yellow -# regular3=f7e03f -# regular4=24acd4 # blue -regular4=80a2be -regular5=f2affd # magenta -# color5 #b294bb -# regular6=13c299 # cyan -regular6=8abeb7 -regular7=e6e6e6 # white -# regular7=ffffff - -## Bright colors (color palette 8-15) -# bright0=616161 # bright black -# bright0=6272a4 -# bright1=ff4d51 # bright red -# color9 #C86564 -# bright2=35d450 # bright green -# color10 #B2BC68 -# bright3=e9e836 # bright yellow -# color11 #f7e03f -# bright4=5dc5f8 # bright blue -# color12 #80A2BE -# bright5=feabf2 # bright magenta -# bright5=b294bb -# bright6=24dfc4 # bright cyan -# bright6=8abeb7 -bright7=ffffff # bright white - -## dimmed colors (see foot.ini(5) man page) -# dim0=<not set> -# ... -# dim7=<not-set> - -## The remaining 256-color palette -# 16 = <256-color palette #16> -# ... -# 255 = <256-color palette #255> - -## Misc colors -# selection-foreground=<inverse foreground/background> -# selection-foreground=000000 -# selection-background=<inverse foreground/background> -# selection-background=fffacd -# jump-labels=<regular0> <regular3> # black-on-yellow -# scrollback-indicator=<regular0> <bright4> # black-on-bright-blue -# search-box-no-match=<regular0> <regular1> # black-on-red -# search-box-match=<regular0> <regular3> # black-on-yellow -# urls=<regular3> -urls=0087bd - diff --git a/stow/foot/.config/foot/themes/tdpeuter-light.ini b/stow/foot/.config/foot/themes/tdpeuter-light.ini deleted file mode 100644 index daeebb9..0000000 --- a/stow/foot/.config/foot/themes/tdpeuter-light.ini +++ /dev/null @@ -1,64 +0,0 @@ -[colors] -# alpha=0.8 -background=fafafa -foreground=000000 -# flash=b00020 -# flash-alpha=0.5 - -## Normal/regular colors (color palette 0-7) -# regular0=242424 # black -# color0 #383A42 -# regular1=f62b5a # red -# color1 #E45649 -# regular2=47b413 # green -# color2 #40A14F -# regular3=e3c401 # yellow -# color3 #C18401 -# regular4=24acd4 # blue -regular4=0184bc -# regular5=f2affd # magenta -# color5 #A626A4 -# regular6=13c299 # cyan -# color6 #0997B3 -# regular7=e6e6e6 # white -# color7 #FAFAFA - -## Bright colors (color palette 8-15) -# bright0=616161 # bright black -# color8 #6272a4 -# bright1=ff4d51 # bright red -# color9 #E45649 -# bright2=35d450 # bright green -# color10 #40A14F -# bright3=e9e836 # bright yellow -# color11 #C18401 -# bright4=5dc5f8 # bright blue -# color12 #0184BC -# bright5=feabf2 # bright magenta -# color13 #A626A4 -# bright6=24dfc4 # bright cyan -# color14 #0997B3 -# bright7=ffffff # bright white -# color15 #FAFAFA - -## dimmed colors (see foot.ini(5) man page) -# dim0=<not set> -# ... -# dim7=<not-set> - -## The remaining 256-color palette -# 16 = <256-color palette #16> -# ... -# 255 = <256-color palette #255> - -## Misc colors -# selection-foreground=<inverse foreground/background> -selection-foreground=383a42 -# selection-background=<inverse foreground/background> -selection-background=bfceff -# jump-labels=<regular0> <regular3> # black-on-yellow -# scrollback-indicator=<regular0> <bright4> # black-on-bright-blue -# search-box-no-match=<regular0> <regular1> # black-on-red -# search-box-match=<regular0> <regular3> # black-on-yellow -urls=f0f0f0 - diff --git a/stow/git/.config/git/config b/stow/git/.config/git/config deleted file mode 100644 index d0a80e2..0000000 --- a/stow/git/.config/git/config +++ /dev/null @@ -1,28 +0,0 @@ -[user] - name = "Tibo De Peuter" - email = "tibo@depeuter.dev" - signingkey = "0x9B11F5243089DB5B" - -[color] - ui = true - -[commit] - # Always sign commits - gpgsign = true - -[core] - editor = "vim"; - excludesFile = "~/.config/git/ignore" - -[help] - autocorrect = 15 - -[includeIf "gitdir:~/university/"] # Trailing backslash is necessary! - path = "~/.config/git/university" - -[init] - defaultBranch = "main" - -[safe] - directory = "/home/tdpeuter/university/sshfs" - diff --git a/stow/git/.config/git/ignore b/stow/git/.config/git/ignore deleted file mode 100644 index 4c5f88a..0000000 --- a/stow/git/.config/git/ignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -.*.swp diff --git a/stow/git/.config/git/university b/stow/git/.config/git/university deleted file mode 100644 index 35a9a3a..0000000 --- a/stow/git/.config/git/university +++ /dev/null @@ -1,3 +0,0 @@ -[user] - email = "tibo.depeuter@ugent.be" - diff --git a/stow/kitty/.config/kitty/kitty.conf b/stow/kitty/.config/kitty/kitty.conf deleted file mode 100644 index b201ac2..0000000 --- a/stow/kitty/.config/kitty/kitty.conf +++ /dev/null @@ -1,2365 +0,0 @@ -# vim:fileencoding=utf-8:foldmethod=marker - -include ./theme.conf - -#: Fonts {{{ - -#: kitty has very powerful font management. You can configure -#: individual font faces and even specify special fonts for particular -#: characters. - -font_family Letter Extended -bold_font Letter Semibold Extended -italic_font Letter Extended Oblique -bold_italic_font Letter Semibold Extended Oblique - -#: You can specify different fonts for the bold/italic/bold-italic -#: variants. To get a full list of supported fonts use the `kitty -#: +list-fonts` command. By default they are derived automatically, by -#: the OSes font system. When bold_font or bold_italic_font is set to -#: auto on macOS, the priority of bold fonts is semi-bold, bold, -#: heavy. Setting them manually is useful for font families that have -#: many weight variants like Book, Medium, Thick, etc. For example:: - -#: font_family Operator Mono Book -#: bold_font Operator Mono Medium -#: italic_font Operator Mono Book Italic -#: bold_italic_font Operator Mono Medium Italic - -# font_size 11.0 - -#: Font size (in pts) - -# force_ltr no - -#: kitty does not support BIDI (bidirectional text), however, for RTL -#: scripts, words are automatically displayed in RTL. That is to say, -#: in an RTL script, the words "HELLO WORLD" display in kitty as -#: "WORLD HELLO", and if you try to select a substring of an RTL- -#: shaped string, you will get the character that would be there had -#: the the string been LTR. For example, assuming the Hebrew word -#: ירושלים, selecting the character that on the screen appears to be ם -#: actually writes into the selection buffer the character י. kitty's -#: default behavior is useful in conjunction with a filter to reverse -#: the word order, however, if you wish to manipulate RTL glyphs, it -#: can be very challenging to work with, so this option is provided to -#: turn it off. Furthermore, this option can be used with the command -#: line program GNU FriBidi -#: <https://github.com/fribidi/fribidi#executable> to get BIDI -#: support, because it will force kitty to always treat the text as -#: LTR, which FriBidi expects for terminals. - -# symbol_map - -#: E.g. symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols - -#: Map the specified Unicode codepoints to a particular font. Useful -#: if you need special rendering for some symbols, such as for -#: Powerline. Avoids the need for patched fonts. Each Unicode code -#: point is specified in the form `U+<code point in hexadecimal>`. You -#: can specify multiple code points, separated by commas and ranges -#: separated by hyphens. This option can be specified multiple times. -#: The syntax is:: - -#: symbol_map codepoints Font Family Name - -# narrow_symbols - -#: E.g. narrow_symbols U+E0A0-U+E0A3,U+E0C0-U+E0C7 1 - -#: Usually, for Private Use Unicode characters and some symbol/dingbat -#: characters, if the character is followed by one or more spaces, -#: kitty will use those extra cells to render the character larger, if -#: the character in the font has a wide aspect ratio. Using this -#: option you can force kitty to restrict the specified code points to -#: render in the specified number of cells (defaulting to one cell). -#: This option can be specified multiple times. The syntax is:: - -#: narrow_symbols codepoints [optionally the number of cells] - -disable_ligatures always - -#: Choose how you want to handle multi-character ligatures. The -#: default is to always render them. You can tell kitty to not render -#: them when the cursor is over them by using cursor to make editing -#: easier, or have kitty never render them at all by using always, if -#: you don't like them. The ligature strategy can be set per-window -#: either using the kitty remote control facility or by defining -#: shortcuts for it in kitty.conf, for example:: - -#: map alt+1 disable_ligatures_in active always -#: map alt+2 disable_ligatures_in all never -#: map alt+3 disable_ligatures_in tab cursor - -#: Note that this refers to programming ligatures, typically -#: implemented using the calt OpenType feature. For disabling general -#: ligatures, use the font_features option. - -# font_features - -#: E.g. font_features none - -#: Choose exactly which OpenType features to enable or disable. This -#: is useful as some fonts might have features worthwhile in a -#: terminal. For example, Fira Code includes a discretionary feature, -#: zero, which in that font changes the appearance of the zero (0), to -#: make it more easily distinguishable from Ø. Fira Code also includes -#: other discretionary features known as Stylistic Sets which have the -#: tags ss01 through ss20. - -#: For the exact syntax to use for individual features, see the -#: HarfBuzz documentation <https://harfbuzz.github.io/harfbuzz-hb- -#: common.html#hb-feature-from-string>. - -#: Note that this code is indexed by PostScript name, and not the font -#: family. This allows you to define very precise feature settings; -#: e.g. you can disable a feature in the italic font but not in the -#: regular font. - -#: On Linux, font features are first read from the FontConfig database -#: and then this option is applied, so they can be configured in a -#: single, central place. - -#: To get the PostScript name for a font, use `kitty +list-fonts -#: --psnames`: - -#: .. code-block:: sh - -#: $ kitty +list-fonts --psnames | grep Fira -#: Fira Code -#: Fira Code Bold (FiraCode-Bold) -#: Fira Code Light (FiraCode-Light) -#: Fira Code Medium (FiraCode-Medium) -#: Fira Code Regular (FiraCode-Regular) -#: Fira Code Retina (FiraCode-Retina) - -#: The part in brackets is the PostScript name. - -#: Enable alternate zero and oldstyle numerals:: - -#: font_features FiraCode-Retina +zero +onum - -#: Enable only alternate zero in the bold font:: - -#: font_features FiraCode-Bold +zero - -#: Disable the normal ligatures, but keep the calt feature which (in -#: this font) breaks up monotony:: - -#: font_features TT2020StyleB-Regular -liga +calt - -#: In conjunction with force_ltr, you may want to disable Arabic -#: shaping entirely, and only look at their isolated forms if they -#: show up in a document. You can do this with e.g.:: - -#: font_features UnifontMedium +isol -medi -fina -init - -# modify_font - -#: Modify font characteristics such as the position or thickness of -#: the underline and strikethrough. The modifications can have the -#: suffix px for pixels or % for percentage of original value. No -#: suffix means use pts. For example:: - -#: modify_font underline_position -2 -#: modify_font underline_thickness 150% -#: modify_font strikethrough_position 2px - -#: Additionally, you can modify the size of the cell in which each -#: font glyph is rendered and the baseline at which the glyph is -#: placed in the cell. For example:: - -#: modify_font cell_width 80% -#: modify_font cell_height -2px -#: modify_font baseline 3 - -#: Note that modifying the baseline will automatically adjust the -#: underline and strikethrough positions by the same amount. -#: Increasing the baseline raises glyphs inside the cell and -#: decreasing it lowers them. Decreasing the cell size might cause -#: rendering artifacts, so use with care. - -# box_drawing_scale 0.001, 1, 1.5, 2 - -#: The sizes of the lines used for the box drawing Unicode characters. -#: These values are in pts. They will be scaled by the monitor DPI to -#: arrive at a pixel value. There must be four values corresponding to -#: thin, normal, thick, and very thick lines. - -# undercurl_style thin-sparse - -#: The style with which undercurls are rendered. This option takes the -#: form (thin|thick)-(sparse|dense). Thin and thick control the -#: thickness of the undercurl. Sparse and dense control how often the -#: curl oscillates. With sparse the curl will peak once per character, -#: with dense twice. - -# text_composition_strategy platform - -#: Control how kitty composites text glyphs onto the background color. -#: The default value of platform tries for text rendering as close to -#: "native" for the platform kitty is running on as possible. - -#: A value of legacy uses the old (pre kitty 0.28) strategy for how -#: glyphs are composited. This will make dark text on light -#: backgrounds look thicker and light text on dark backgrounds -#: thinner. It might also make some text appear like the strokes are -#: uneven. - -#: You can fine tune the actual contrast curve used for glyph -#: composition by specifying two space separated numbers for this -#: setting. - -#: The first number is the gamma adjustment, which controls the -#: thickness of dark text on light backgrounds. Increasing the value -#: will make text appear thicker. The default value for this is 1.0 on -#: Linux and 1.7 on macOS. Valid values are 0.01 and above. The result -#: is scaled based on the luminance difference between the background -#: and the foreground. Dark text on light backgrounds receives the -#: full impact of the curve while light text on dark backgrounds is -#: affected very little. - -#: The second number is an additional multiplicative contrast. It is -#: percentage ranging from 0 to 100. The default value is 0 on Linux -#: and 30 on macOS. - -#: If you wish to achieve similar looking thickness in light and dark -#: themes, a good way to experiment is start by setting the value to -#: 1.0 0 and use a dark theme. Then adjust the second parameter until -#: it looks good. Then switch to a light theme and adjust the first -#: parameter until the perceived thickness matches the dark theme. - -#: }}} - -#: Cursor customization {{{ - -# cursor #cccccc - -#: Default cursor color. If set to the special value none the cursor -#: will be rendered with a "reverse video" effect. It's color will be -#: the color of the text in the cell it is over and the text will be -#: rendered with the background color of the cell. Note that if the -#: program running in the terminal sets a cursor color, this takes -#: precedence. Also, the cursor colors are modified if the cell -#: background and foreground colors have very low contrast. - -# cursor_text_color #111111 - -#: The color of text under the cursor. If you want it rendered with -#: the background color of the cell underneath instead, use the -#: special keyword: background. Note that if cursor is set to none -#: then this option is ignored. - -# cursor_shape block - -#: The cursor shape can be one of block, beam, underline. Note that -#: when reloading the config this will be changed only if the cursor -#: shape has not been set by the program running in the terminal. This -#: sets the default cursor shape, applications running in the terminal -#: can override it. In particular, shell integration -#: <https://sw.kovidgoyal.net/kitty/shell-integration/> in kitty sets -#: the cursor shape to beam at shell prompts. You can avoid this by -#: setting shell_integration to no-cursor. - -# cursor_beam_thickness 1.5 - -#: The thickness of the beam cursor (in pts). - -# cursor_underline_thickness 2.0 - -#: The thickness of the underline cursor (in pts). - -# cursor_blink_interval -1 - -#: The interval to blink the cursor (in seconds). Set to zero to -#: disable blinking. Negative values mean use system default. Note -#: that the minimum interval will be limited to repaint_delay. - -# cursor_stop_blinking_after 15.0 - -#: Stop blinking cursor after the specified number of seconds of -#: keyboard inactivity. Set to zero to never stop blinking. - -#: }}} - -#: Scrollback {{{ - -# scrollback_lines 2000 - -#: Number of lines of history to keep in memory for scrolling back. -#: Memory is allocated on demand. Negative numbers are (effectively) -#: infinite scrollback. Note that using very large scrollback is not -#: recommended as it can slow down performance of the terminal and -#: also use large amounts of RAM. Instead, consider using -#: scrollback_pager_history_size. Note that on config reload if this -#: is changed it will only affect newly created windows, not existing -#: ones. - -# scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER - -#: Program with which to view scrollback in a new window. The -#: scrollback buffer is passed as STDIN to this program. If you change -#: it, make sure the program you use can handle ANSI escape sequences -#: for colors and text formatting. INPUT_LINE_NUMBER in the command -#: line above will be replaced by an integer representing which line -#: should be at the top of the screen. Similarly CURSOR_LINE and -#: CURSOR_COLUMN will be replaced by the current cursor position or -#: set to 0 if there is no cursor, for example, when showing the last -#: command output. - -# scrollback_pager_history_size 0 - -#: Separate scrollback history size (in MB), used only for browsing -#: the scrollback buffer with pager. This separate buffer is not -#: available for interactive scrolling but will be piped to the pager -#: program when viewing scrollback buffer in a separate window. The -#: current implementation stores the data in UTF-8, so approximatively -#: 10000 lines per megabyte at 100 chars per line, for pure ASCII, -#: unformatted text. A value of zero or less disables this feature. -#: The maximum allowed size is 4GB. Note that on config reload if this -#: is changed it will only affect newly created windows, not existing -#: ones. - -# scrollback_fill_enlarged_window no - -#: Fill new space with lines from the scrollback buffer after -#: enlarging a window. - -# wheel_scroll_multiplier 5.0 - -#: Multiplier for the number of lines scrolled by the mouse wheel. -#: Note that this is only used for low precision scrolling devices, -#: not for high precision scrolling devices on platforms such as macOS -#: and Wayland. Use negative numbers to change scroll direction. See -#: also wheel_scroll_min_lines. - -# wheel_scroll_min_lines 1 - -#: The minimum number of lines scrolled by the mouse wheel. The scroll -#: multiplier wheel_scroll_multiplier only takes effect after it -#: reaches this number. Note that this is only used for low precision -#: scrolling devices like wheel mice that scroll by very small amounts -#: when using the wheel. With a negative number, the minimum number of -#: lines will always be added. - -touch_scroll_multiplier 2.0 - -#: Multiplier for the number of lines scrolled by a touchpad. Note -#: that this is only used for high precision scrolling devices on -#: platforms such as macOS and Wayland. Use negative numbers to change -#: scroll direction. - -#: }}} - -#: Mouse {{{ - -# mouse_hide_wait 3.0 - -#: Hide mouse cursor after the specified number of seconds of the -#: mouse not being used. Set to zero to disable mouse cursor hiding. -#: Set to a negative value to hide the mouse cursor immediately when -#: typing text. Disabled by default on macOS as getting it to work -#: robustly with the ever-changing sea of bugs that is Cocoa is too -#: much effort. - -url_color #94E2D5 -url_style straight - -#: The color and style for highlighting URLs on mouse-over. url_style -#: can be one of: none, straight, double, curly, dotted, dashed. - -# open_url_with default - -#: The program to open clicked URLs. The special value default with -#: first look for any URL handlers defined via the open_actions -#: <https://sw.kovidgoyal.net/kitty/open_actions/> facility and if non -#: are found, it will use the Operating System's default URL handler -#: (open on macOS and xdg-open on Linux). - -# url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty mailto news sftp ssh - -#: The set of URL prefixes to look for when detecting a URL under the -#: mouse cursor. - -detect_urls yes - -#: Detect URLs under the mouse. Detected URLs are highlighted with an -#: underline and the mouse cursor becomes a hand over them. Even if -#: this option is disabled, URLs are still clickable. - -# url_excluded_characters - -#: Additional characters to be disallowed from URLs, when detecting -#: URLs under the mouse cursor. By default, all characters that are -#: legal in URLs are allowed. Additionally, newlines are allowed (but -#: stripped). This is to accommodate programs such as mutt that add -#: hard line breaks even for continued lines. \n can be added to this -#: option to disable this behavior. Special characters can be -#: specified using backslash escapes, to specify a backslash use a -#: double backslash. - -show_hyperlink_targets yes - -#: When the mouse hovers over a terminal hyperlink, show the actual -#: URL that will be activated when the hyperlink is clicked. - -# copy_on_select no - -#: Copy to clipboard or a private buffer on select. With this set to -#: clipboard, selecting text with the mouse will cause the text to be -#: copied to clipboard. Useful on platforms such as macOS that do not -#: have the concept of primary selection. You can instead specify a -#: name such as a1 to copy to a private kitty buffer. Map a shortcut -#: with the paste_from_buffer action to paste from this private -#: buffer. For example:: - -#: copy_on_select a1 -#: map shift+cmd+v paste_from_buffer a1 - -#: Note that copying to the clipboard is a security risk, as all -#: programs, including websites open in your browser can read the -#: contents of the system clipboard. - -# paste_actions quote-urls-at-prompt - -#: A comma separated list of actions to take when pasting text into -#: the terminal. The supported paste actions are: - -#: quote-urls-at-prompt: -#: If the text being pasted is a URL and the cursor is at a shell prompt, -#: automatically quote the URL (needs shell_integration). -#: confirm: -#: Confirm the paste if bracketed paste mode is not active or there is -#: a large amount of text being pasted. -#: filter: -#: Run the filter_paste() function from the file paste-actions.py in -#: the kitty config directory on the pasted text. The text returned by the -#: function will be actually pasted. - -# strip_trailing_spaces never - -#: Remove spaces at the end of lines when copying to clipboard. A -#: value of smart will do it when using normal selections, but not -#: rectangle selections. A value of always will always do it. - -# select_by_word_characters @-./_~?&=%+# - -#: Characters considered part of a word when double clicking. In -#: addition to these characters any character that is marked as an -#: alphanumeric character in the Unicode database will be matched. - -# select_by_word_characters_forward - -#: Characters considered part of a word when extending the selection -#: forward on double clicking. In addition to these characters any -#: character that is marked as an alphanumeric character in the -#: Unicode database will be matched. - -#: If empty (default) select_by_word_characters will be used for both -#: directions. - -# click_interval -1.0 - -#: The interval between successive clicks to detect double/triple -#: clicks (in seconds). Negative numbers will use the system default -#: instead, if available, or fallback to 0.5. - -# focus_follows_mouse no - -#: Set the active window to the window under the mouse when moving the -#: mouse around. - -# pointer_shape_when_grabbed arrow - -#: The shape of the mouse pointer when the program running in the -#: terminal grabs the mouse. Valid values are: arrow, beam and hand. - -# default_pointer_shape beam - -#: The default shape of the mouse pointer. Valid values are: arrow, -#: beam and hand. - -# pointer_shape_when_dragging beam - -#: The default shape of the mouse pointer when dragging across text. -#: Valid values are: arrow, beam and hand. - -#: Mouse actions {{{ - -#: Mouse buttons can be mapped to perform arbitrary actions. The -#: syntax is: - -#: .. code-block:: none - -#: mouse_map button-name event-type modes action - -#: Where button-name is one of left, middle, right, b1 ... b8 with -#: added keyboard modifiers. For example: ctrl+shift+left refers to -#: holding the Ctrl+Shift keys while clicking with the left mouse -#: button. The value b1 ... b8 can be used to refer to up to eight -#: buttons on a mouse. - -#: event-type is one of press, release, doublepress, triplepress, -#: click, doubleclick. modes indicates whether the action is performed -#: when the mouse is grabbed by the program running in the terminal, -#: or not. The values are grabbed or ungrabbed or a comma separated -#: combination of them. grabbed refers to when the program running in -#: the terminal has requested mouse events. Note that the click and -#: double click events have a delay of click_interval to disambiguate -#: from double and triple presses. - -#: You can run kitty with the kitty --debug-input command line option -#: to see mouse events. See the builtin actions below to get a sense -#: of what is possible. - -#: If you want to unmap an action, map it to no_op. For example, to -#: disable opening of URLs with a plain click:: - -#: mouse_map left click ungrabbed no_op - -#: See all the mappable actions including mouse actions here -#: <https://sw.kovidgoyal.net/kitty/actions/>. - -#: .. note:: -#: Once a selection is started, releasing the button that started it will -#: automatically end it and no release event will be dispatched. - -# clear_all_mouse_actions no - -#: Remove all mouse action definitions up to this point. Useful, for -#: instance, to remove the default mouse actions. - -#: Click the link under the mouse or move the cursor - -# mouse_map left click ungrabbed mouse_handle_click selection link prompt - -#:: First check for a selection and if one exists do nothing. Then -#:: check for a link under the mouse cursor and if one exists, click -#:: it. Finally check if the click happened at the current shell -#:: prompt and if so, move the cursor to the click location. Note -#:: that this requires shell integration -#:: <https://sw.kovidgoyal.net/kitty/shell-integration/> to work. - -#: Click the link under the mouse or move the cursor even when grabbed - -# mouse_map shift+left click grabbed,ungrabbed mouse_handle_click selection link prompt - -#:: Same as above, except that the action is performed even when the -#:: mouse is grabbed by the program running in the terminal. - -#: Click the link under the mouse cursor - -# mouse_map ctrl+shift+left release grabbed,ungrabbed mouse_handle_click link - -#:: Variant with Ctrl+Shift is present because the simple click based -#:: version has an unavoidable delay of click_interval, to -#:: disambiguate clicks from double clicks. - -#: Discard press event for link click - -# mouse_map ctrl+shift+left press grabbed discard_event - -#:: Prevent this press event from being sent to the program that has -#:: grabbed the mouse, as the corresponding release event is used to -#:: open a URL. - -#: Paste from the primary selection - -# mouse_map middle release ungrabbed paste_from_selection - -#: Start selecting text - -# mouse_map left press ungrabbed mouse_selection normal - -#: Start selecting text in a rectangle - -# mouse_map ctrl+alt+left press ungrabbed mouse_selection rectangle - -#: Select a word - -# mouse_map left doublepress ungrabbed mouse_selection word - -#: Select a line - -# mouse_map left triplepress ungrabbed mouse_selection line - -#: Select line from point - -# mouse_map ctrl+alt+left triplepress ungrabbed mouse_selection line_from_point - -#:: Select from the clicked point to the end of the line. - -#: Extend the current selection - -# mouse_map right press ungrabbed mouse_selection extend - -#:: If you want only the end of the selection to be moved instead of -#:: the nearest boundary, use move-end instead of extend. - -#: Paste from the primary selection even when grabbed - -# mouse_map shift+middle release ungrabbed,grabbed paste_selection -# mouse_map shift+middle press grabbed discard_event - -#: Start selecting text even when grabbed - -# mouse_map shift+left press ungrabbed,grabbed mouse_selection normal - -#: Start selecting text in a rectangle even when grabbed - -# mouse_map ctrl+shift+alt+left press ungrabbed,grabbed mouse_selection rectangle - -#: Select a word even when grabbed - -# mouse_map shift+left doublepress ungrabbed,grabbed mouse_selection word - -#: Select a line even when grabbed - -# mouse_map shift+left triplepress ungrabbed,grabbed mouse_selection line - -#: Select line from point even when grabbed - -# mouse_map ctrl+shift+alt+left triplepress ungrabbed,grabbed mouse_selection line_from_point - -#:: Select from the clicked point to the end of the line even when -#:: grabbed. - -#: Extend the current selection even when grabbed - -# mouse_map shift+right press ungrabbed,grabbed mouse_selection extend - -#: Show clicked command output in pager - -# mouse_map ctrl+shift+right press ungrabbed mouse_show_command_output - -#:: Requires shell integration -#:: <https://sw.kovidgoyal.net/kitty/shell-integration/> to work. - -#: }}} - -#: }}} - -#: Performance tuning {{{ - -# repaint_delay 10 - -#: Delay between screen updates (in milliseconds). Decreasing it, -#: increases frames-per-second (FPS) at the cost of more CPU usage. -#: The default value yields ~100 FPS which is more than sufficient for -#: most uses. Note that to actually achieve 100 FPS, you have to -#: either set sync_to_monitor to no or use a monitor with a high -#: refresh rate. Also, to minimize latency when there is pending input -#: to be processed, this option is ignored. - -# input_delay 3 - -#: Delay before input from the program running in the terminal is -#: processed (in milliseconds). Note that decreasing it will increase -#: responsiveness, but also increase CPU usage and might cause flicker -#: in full screen programs that redraw the entire screen on each loop, -#: because kitty is so fast that partial screen updates will be drawn. - -# sync_to_monitor yes - -#: Sync screen updates to the refresh rate of the monitor. This -#: prevents screen tearing -#: <https://en.wikipedia.org/wiki/Screen_tearing> when scrolling. -#: However, it limits the rendering speed to the refresh rate of your -#: monitor. With a very high speed mouse/high keyboard repeat rate, -#: you may notice some slight input latency. If so, set this to no. - -#: }}} - -#: Terminal bell {{{ - -enable_audio_bell no - -#: The audio bell. Useful to disable it in environments that require -#: silence. - -visual_bell_duration 0.1 - -#: The visual bell duration (in seconds). Flash the screen when a bell -#: occurs for the specified number of seconds. Set to zero to disable. - -visual_bell_color #b00020 - -#: The color used by visual bell. Set to none will fall back to -#: selection background color. If you feel that the visual bell is too -#: bright, you can set it to a darker color. - -# window_alert_on_bell yes - -#: Request window attention on bell. Makes the dock icon bounce on -#: macOS or the taskbar flash on linux. - -# bell_on_tab "🔔 " - -#: Some text or a Unicode symbol to show on the tab if a window in the -#: tab that does not have focus has a bell. If you want to use leading -#: or trailing spaces, surround the text with quotes. See -#: tab_title_template for how this is rendered. - -#: For backwards compatibility, values of yes, y and true are -#: converted to the default bell symbol and no, n, false and none are -#: converted to the empty string. - -# command_on_bell none - -#: Program to run when a bell occurs. The environment variable -#: KITTY_CHILD_CMDLINE can be used to get the program running in the -#: window in which the bell occurred. - -# bell_path none - -#: Path to a sound file to play as the bell sound. If set to none, the -#: system default bell sound is used. Must be in a format supported by -#: the operating systems sound API, such as WAV or OGA on Linux -#: (libcanberra) or AIFF, MP3 or WAV on macOS (NSSound) - -# linux_bell_theme __custom - -#: The XDG Sound Theme kitty will use to play the bell sound. Defaults -#: to the custom theme name used by GNOME and Budgie, falling back to -#: the default freedesktop theme if it does not exist. This option may -#: be removed if Linux ever provides desktop-agnostic support for -#: setting system sound themes. - -#: }}} - -#: Window layout {{{ - -# remember_window_size yes -# initial_window_width 640 -# initial_window_height 400 - -#: If enabled, the OS Window size will be remembered so that new -#: instances of kitty will have the same size as the previous -#: instance. If disabled, the OS Window will initially have size -#: configured by initial_window_width/height, in pixels. You can use a -#: suffix of "c" on the width/height values to have them interpreted -#: as number of cells instead of pixels. - -# enabled_layouts * - -#: The enabled window layouts. A comma separated list of layout names. -#: The special value all means all layouts. The first listed layout -#: will be used as the startup layout. Default configuration is all -#: layouts in alphabetical order. For a list of available layouts, see -#: the layouts <https://sw.kovidgoyal.net/kitty/overview/#layouts>. - -# window_resize_step_cells 2 -# window_resize_step_lines 2 - -#: The step size (in units of cell width/cell height) to use when -#: resizing kitty windows in a layout with the shortcut -#: start_resizing_window. The cells value is used for horizontal -#: resizing, and the lines value is used for vertical resizing. - -# window_border_width 0.5pt - -#: The width of window borders. Can be either in pixels (px) or pts -#: (pt). Values in pts will be rounded to the nearest number of pixels -#: based on screen resolution. If not specified, the unit is assumed -#: to be pts. Note that borders are displayed only when more than one -#: window is visible. They are meant to separate multiple windows. - -draw_minimal_borders yes - -#: Draw only the minimum borders needed. This means that only the -#: borders that separate the window from a neighbor are drawn. Note -#: that setting a non-zero window_margin_width overrides this and -#: causes all borders to be drawn. - -# window_margin_width 0 - -#: The window margin (in pts) (blank area outside the border). A -#: single value sets all four sides. Two values set the vertical and -#: horizontal sides. Three values set top, horizontal and bottom. Four -#: values set top, right, bottom and left. - -# single_window_margin_width -1 - -#: The window margin to use when only a single window is visible (in -#: pts). Negative values will cause the value of window_margin_width -#: to be used instead. A single value sets all four sides. Two values -#: set the vertical and horizontal sides. Three values set top, -#: horizontal and bottom. Four values set top, right, bottom and left. - -window_padding_width 5 - -#: The window padding (in pts) (blank area between the text and the -#: window border). A single value sets all four sides. Two values set -#: the vertical and horizontal sides. Three values set top, horizontal -#: and bottom. Four values set top, right, bottom and left. - -# placement_strategy center - -#: When the window size is not an exact multiple of the cell size, the -#: cell area of the terminal window will have some extra padding on -#: the sides. You can control how that padding is distributed with -#: this option. Using a value of center means the cell area will be -#: placed centrally. A value of top-left means the padding will be -#: only at the bottom and right edges. - -# active_border_color #00ff00 - -#: The color for the border of the active window. Set this to none to -#: not draw borders around the active window. - -# inactive_border_color #cccccc - -#: The color for the border of inactive windows. - -# bell_border_color #ff5a00 - -#: The color for the border of inactive windows in which a bell has -#: occurred. - -# inactive_text_alpha 1.0 - -#: Fade the text in inactive windows by the specified amount (a number -#: between zero and one, with zero being fully faded). - -# hide_window_decorations no - -#: Hide the window decorations (title-bar and window borders) with -#: yes. On macOS, titlebar-only can be used to only hide the titlebar. -#: Whether this works and exactly what effect it has depends on the -#: window manager/operating system. Note that the effects of changing -#: this option when reloading config are undefined. - -# window_logo_path none - -#: Path to a logo image. Must be in PNG format. Relative paths are -#: interpreted relative to the kitty config directory. The logo is -#: displayed in a corner of every kitty window. The position is -#: controlled by window_logo_position. Individual windows can be -#: configured to have different logos either using the launch action -#: or the remote control <https://sw.kovidgoyal.net/kitty/remote- -#: control/> facility. - -# window_logo_position bottom-right - -#: Where to position the window logo in the window. The value can be -#: one of: top-left, top, top-right, left, center, right, bottom-left, -#: bottom, bottom-right. - -# window_logo_alpha 0.5 - -#: The amount the logo should be faded into the background. With zero -#: being fully faded and one being fully opaque. - -# resize_debounce_time 0.1 - -#: The time to wait before redrawing the screen when a resize event is -#: received (in seconds). On platforms such as macOS, where the -#: operating system sends events corresponding to the start and end of -#: a resize, this number is ignored. - -# resize_draw_strategy static - -#: Choose how kitty draws a window while a resize is in progress. A -#: value of static means draw the current window contents, mostly -#: unchanged. A value of scale means draw the current window contents -#: scaled. A value of blank means draw a blank window. A value of size -#: means show the window size in cells. - -# resize_in_steps no - -#: Resize the OS window in steps as large as the cells, instead of -#: with the usual pixel accuracy. Combined with initial_window_width -#: and initial_window_height in number of cells, this option can be -#: used to keep the margins as small as possible when resizing the OS -#: window. Note that this does not currently work on Wayland. - -# visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ - -#: The list of characters for visual window selection. For example, -#: for selecting a window to focus on with focus_visible_window. The -#: value should be a series of unique numbers or alphabets, case -#: insensitive, from the set [0-9A-Z]. Specify your preference as a -#: string of characters. - -# confirm_os_window_close -1 - -#: Ask for confirmation when closing an OS window or a tab with at -#: least this number of kitty windows in it by window manager (e.g. -#: clicking the window close button or pressing the operating system -#: shortcut to close windows) or by the close_tab action. A value of -#: zero disables confirmation. This confirmation also applies to -#: requests to quit the entire application (all OS windows, via the -#: quit action). Negative values are converted to positive ones, -#: however, with shell_integration enabled, using negative values -#: means windows sitting at a shell prompt are not counted, only -#: windows where some command is currently running. Note that if you -#: want confirmation when closing individual windows, you can map the -#: close_window_with_confirmation action. - -#: }}} - -#: Tab bar {{{ - -# tab_bar_edge bottom - -#: The edge to show the tab bar on, top or bottom. - -# tab_bar_margin_width 0.0 - -#: The margin to the left and right of the tab bar (in pts). - -# tab_bar_margin_height 0.0 0.0 - -#: The margin above and below the tab bar (in pts). The first number -#: is the margin between the edge of the OS Window and the tab bar. -#: The second number is the margin between the tab bar and the -#: contents of the current tab. - -# tab_bar_style fade - -#: The tab bar style, can be one of: - -#: fade -#: Each tab's edges fade into the background color. (See also tab_fade) -#: slant -#: Tabs look like the tabs in a physical file. -#: separator -#: Tabs are separated by a configurable separator. (See also -#: tab_separator) -#: powerline -#: Tabs are shown as a continuous line with "fancy" separators. -#: (See also tab_powerline_style) -#: custom -#: A user-supplied Python function called draw_tab is loaded from the file -#: tab_bar.py in the kitty config directory. For examples of how to -#: write such a function, see the functions named draw_tab_with_* in -#: kitty's source code: kitty/tab_bar.py. See also -#: this discussion <https://github.com/kovidgoyal/kitty/discussions/4447> -#: for examples from kitty users. -#: hidden -#: The tab bar is hidden. If you use this, you might want to create -#: a mapping for the select_tab action which presents you with a list of -#: tabs and allows for easy switching to a tab. - -# tab_bar_align left - -#: The horizontal alignment of the tab bar, can be one of: left, -#: center, right. - -# tab_bar_min_tabs 2 - -#: The minimum number of tabs that must exist before the tab bar is -#: shown. - -# tab_switch_strategy previous - -#: The algorithm to use when switching to a tab when the current tab -#: is closed. The default of previous will switch to the last used -#: tab. A value of left will switch to the tab to the left of the -#: closed tab. A value of right will switch to the tab to the right of -#: the closed tab. A value of last will switch to the right-most tab. - -# tab_fade 0.25 0.5 0.75 1 - -#: Control how each tab fades into the background when using fade for -#: the tab_bar_style. Each number is an alpha (between zero and one) -#: that controls how much the corresponding cell fades into the -#: background, with zero being no fade and one being full fade. You -#: can change the number of cells used by adding/removing entries to -#: this list. - -# tab_separator " ┇" - -#: The separator between tabs in the tab bar when using separator as -#: the tab_bar_style. - -# tab_powerline_style angled - -#: The powerline separator style between tabs in the tab bar when -#: using powerline as the tab_bar_style, can be one of: angled, -#: slanted, round. - -# tab_activity_symbol none - -#: Some text or a Unicode symbol to show on the tab if a window in the -#: tab that does not have focus has some activity. If you want to use -#: leading or trailing spaces, surround the text with quotes. See -#: tab_title_template for how this is rendered. - -# tab_title_max_length 0 - -#: The maximum number of cells that can be used to render the text in -#: a tab. A value of zero means that no limit is applied. - -# tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}" - -#: A template to render the tab title. The default just renders the -#: title with optional symbols for bell and activity. If you wish to -#: include the tab-index as well, use something like: {index}:{title}. -#: Useful if you have shortcuts mapped for goto_tab N. If you prefer -#: to see the index as a superscript, use {sup.index}. All data -#: available is: - -#: title -#: The current tab title. -#: index -#: The tab index useable with goto_tab N goto_tab shortcuts. -#: layout_name -#: The current layout name. -#: num_windows -#: The number of windows in the tab. -#: num_window_groups -#: The number of window groups (not counting overlay windows) in the tab. -#: tab.active_wd -#: The working directory of the currently active window in the tab -#: (expensive, requires syscall). Use active_oldest_wd to get -#: the directory of the oldest foreground process rather than the newest. -#: tab.active_exe -#: The name of the executable running in the foreground of the currently -#: active window in the tab (expensive, requires syscall). Use -#: active_oldest_exe for the oldest foreground process. -#: max_title_length -#: The maximum title length available. - -#: Note that formatting is done by Python's string formatting -#: machinery, so you can use, for instance, {layout_name[:2].upper()} -#: to show only the first two letters of the layout name, upper-cased. -#: If you want to style the text, you can use styling directives, for -#: example: -#: `{fmt.fg.red}red{fmt.fg.tab}normal{fmt.bg._00FF00}greenbg{fmt.bg.tab}`. -#: Similarly, for bold and italic: -#: `{fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}`. -#: Note that for backward compatibility, if {bell_symbol} or -#: {activity_symbol} are not present in the template, they are -#: prepended to it. - -# active_tab_title_template none - -#: Template to use for active tabs. If not specified falls back to -#: tab_title_template. - -# active_tab_foreground #000 -# active_tab_background #eee -# active_tab_font_style bold-italic -# inactive_tab_foreground #444 -# inactive_tab_background #999 -# inactive_tab_font_style normal - -#: Tab bar colors and styles. - -# tab_bar_background none - -#: Background color for the tab bar. Defaults to using the terminal -#: background color. - -# tab_bar_margin_color none - -#: Color for the tab bar margin area. Defaults to using the terminal -#: background color for margins above and below the tab bar. For side -#: margins the default color is chosen to match the background color -#: of the neighboring tab. - -#: }}} - -#: Color scheme {{{ - -# Dark mode -#foreground #f8f8f8 -#background #171717 - -# Light mode -# background #f8f8f8 -# foreground #171717 - -#: The foreground and background colors. - -background_opacity 0.9 - -#: The opacity of the background. A number between zero and one, where -#: one is opaque and zero is fully transparent. This will only work if -#: supported by the OS (for instance, when using a compositor under -#: X11). Note that it only sets the background color's opacity in -#: cells that have the same background color as the default terminal -#: background, so that things like the status bar in vim, powerline -#: prompts, etc. still look good. But it means that if you use a color -#: theme with a background color in your editor, it will not be -#: rendered as transparent. Instead you should change the default -#: background color in your kitty config and not use a background -#: color in the editor color scheme. Or use the escape codes to set -#: the terminals default colors in a shell script to launch your -#: editor. Be aware that using a value less than 1.0 is a (possibly -#: significant) performance hit. If you want to dynamically change -#: transparency of windows, set dynamic_background_opacity to yes -#: (this is off by default as it has a performance cost). Changing -#: this option when reloading the config will only work if -#: dynamic_background_opacity was enabled in the original config. - -# background_image none - -#: Path to a background image. Must be in PNG format. - -# background_image_layout tiled - -#: Whether to tile, scale or clamp the background image. The value can -#: be one of tiled, mirror-tiled, scaled, clamped or centered. - -# background_image_linear no - -#: When background image is scaled, whether linear interpolation -#: should be used. - -# dynamic_background_opacity no - -#: Allow changing of the background_opacity dynamically, using either -#: keyboard shortcuts (increase_background_opacity and -#: decrease_background_opacity) or the remote control facility. -#: Changing this option by reloading the config is not supported. - -# background_tint 0.0 - -#: How much to tint the background image by the background color. This -#: option makes it easier to read the text. Tinting is done using the -#: current background color for each window. This option applies only -#: if background_opacity is set and transparent windows are supported -#: or background_image is set. - -# background_tint_gaps 1.0 - -#: How much to tint the background image at the window gaps by the -#: background color, after applying background_tint. Since this is -#: multiplicative with background_tint, it can be used to lighten the -#: tint over the window gaps for a *separated* look. - -# dim_opacity 0.75 - -#: How much to dim text that has the DIM/FAINT attribute set. One -#: means no dimming and zero means fully dimmed (i.e. invisible). - -# selection_foreground #000000 -# selection_background #fffacd - -#: The foreground and background colors for text selected with the -#: mouse. Setting both of these to none will cause a "reverse video" -#: effect for selections, where the selection will be the cell text -#: color and the text will become the cell background color. Setting -#: only selection_foreground to none will cause the foreground color -#: to be used unchanged. Note that these colors can be overridden by -#: the program running in the terminal. - -#: The color table {{{ - -#: The 256 terminal colors. There are 8 basic colors, each color has a -#: dull and bright version, for the first 16 colors. You can set the -#: remaining 240 colors as color16 to color255. - -# color0 #000000 -# color8 #767676 -# color8 #21222c -# color0 #6272a4 - -#: black - -# color1 #cc0403 -# color9 #f2201f -# color9 #ff5555 -# color1 #ff6e6e - -#: red - -# color2 #19cb00 -# color10 #23fd00 -# color10 #50fa7b -# color2 #69ff94 - -#: green - -# color3 #cecb00 -# color11 #fffd00 -# color11 #f1fa8c -# color3 #ffffa5 - -#: yellow - -# color4 #0d73cc -# color12 #1a8fff -# color12 #bd93f9 -# color4 #d6acff - -#: blue - -# color5 #cb1ed1 -# color13 #fd28ff -# color13 #ff79c6 -# color5 #ff92df - -#: magenta - -# color6 #0dcdcd -# color14 #14ffff -# color14 #8be9fd -# color6 #a4ffff - -#: cyan - -# color7 #dddddd -# color15 #ffffff - -#: white - -# mark1_foreground black - -#: Color for marks of type 1 - -# mark1_background #98d3cb - -#: Color for marks of type 1 (light steel blue) - -# mark2_foreground black - -#: Color for marks of type 2 - -# mark2_background #f2dcd3 - -#: Color for marks of type 1 (beige) - -# mark3_foreground black - -#: Color for marks of type 3 - -# mark3_background #f274bc - -#: Color for marks of type 3 (violet) - -#: }}} - -#: }}} - -#: Advanced {{{ - -# shell . - -#: The shell program to execute. The default value of . means to use -#: whatever shell is set as the default shell for the current user. -#: Note that on macOS if you change this, you might need to add -#: --login and --interactive to ensure that the shell starts in -#: interactive mode and reads its startup rc files. - -# editor . - -#: The terminal based text editor (such as vim or nano) to use when -#: editing the kitty config file or similar tasks. - -#: The default value of . means to use the environment variables -#: VISUAL and EDITOR in that order. If these variables aren't set, -#: kitty will run your shell ($SHELL -l -i -c env) to see if your -#: shell startup rc files set VISUAL or EDITOR. If that doesn't work, -#: kitty will cycle through various known editors (vim, emacs, etc.) -#: and take the first one that exists on your system. - -# close_on_child_death no - -#: Close the window when the child process (shell) exits. With the -#: default value no, the terminal will remain open when the child -#: exits as long as there are still processes outputting to the -#: terminal (for example disowned or backgrounded processes). When -#: enabled with yes, the window will close as soon as the child -#: process exits. Note that setting it to yes means that any -#: background processes still using the terminal can fail silently -#: because their stdout/stderr/stdin no longer work. - -# remote_control_password - -#: Allow other programs to control kitty using passwords. This option -#: can be specified multiple times to add multiple passwords. If no -#: passwords are present kitty will ask the user for permission if a -#: program tries to use remote control with a password. A password can -#: also *optionally* be associated with a set of allowed remote -#: control actions. For example:: - -#: remote_control_password "my passphrase" get-colors set-colors focus-window focus-tab - -#: Only the specified actions will be allowed when using this -#: password. Glob patterns can be used too, for example:: - -#: remote_control_password "my passphrase" set-tab-* resize-* - -#: To get a list of available actions, run:: - -#: kitty @ --help - -#: A set of actions to be allowed when no password is sent can be -#: specified by using an empty password. For example:: - -#: remote_control_password "" *-colors - -#: Finally, the path to a python module can be specified that provides -#: a function is_cmd_allowed that is used to check every remote -#: control command. For example:: - -#: remote_control_password "my passphrase" my_rc_command_checker.py - -#: Relative paths are resolved from the kitty configuration directory. -#: See rc_custom_auth <https://sw.kovidgoyal.net/kitty/remote- -#: control/#rc-custom-auth> for details. - -# allow_remote_control no - -#: Allow other programs to control kitty. If you turn this on, other -#: programs can control all aspects of kitty, including sending text -#: to kitty windows, opening new windows, closing windows, reading the -#: content of windows, etc. Note that this even works over SSH -#: connections. The default setting of no prevents any form of remote -#: control. The meaning of the various values are: - -#: password -#: Remote control requests received over both the TTY device and the socket -#: are confirmed based on passwords, see remote_control_password. - -#: socket-only -#: Remote control requests received over a socket are accepted -#: unconditionally. Requests received over the TTY are denied. -#: See listen_on. - -#: socket -#: Remote control requests received over a socket are accepted -#: unconditionally. Requests received over the TTY are confirmed based on -#: password. - -#: no -#: Remote control is completely disabled. - -#: yes -#: Remote control requests are always accepted. - -# listen_on none - -#: Listen to the specified UNIX socket for remote control connections. -#: Note that this will apply to all kitty instances. It can be -#: overridden by the kitty --listen-on command line option, which also -#: supports listening on a TCP socket. This option accepts only UNIX -#: sockets, such as unix:${TEMP}/mykitty or unix:@mykitty (on Linux). -#: Environment variables are expanded and relative paths are resolved -#: with respect to the temporary directory. If {kitty_pid} is present, -#: then it is replaced by the PID of the kitty process, otherwise the -#: PID of the kitty process is appended to the value, with a hyphen. -#: See the help for kitty --listen-on for more details. Note that this -#: will be ignored unless allow_remote_control is set to either: yes, -#: socket or socket-only. Changing this option by reloading the config -#: is not supported. - -# env - -#: Specify the environment variables to be set in all child processes. -#: Using the name with an equal sign (e.g. env VAR=) will set it to -#: the empty string. Specifying only the name (e.g. env VAR) will -#: remove the variable from the child process' environment. Note that -#: environment variables are expanded recursively, for example:: - -#: env VAR1=a -#: env VAR2=${HOME}/${VAR1}/b - -#: The value of VAR2 will be <path to home directory>/a/b. - -# watcher - -#: Path to python file which will be loaded for watchers -#: <https://sw.kovidgoyal.net/kitty/launch/#watchers>. Can be -#: specified more than once to load multiple watchers. The watchers -#: will be added to every kitty window. Relative paths are resolved -#: relative to the kitty config directory. Note that reloading the -#: config will only affect windows created after the reload. - -# exe_search_path - -#: Control where kitty finds the programs to run. The default search -#: order is: First search the system wide PATH, then ~/.local/bin and -#: ~/bin. If still not found, the PATH defined in the login shell -#: after sourcing all its startup files is tried. Finally, if present, -#: the PATH specified by the env option is tried. - -#: This option allows you to prepend, append, or remove paths from -#: this search order. It can be specified multiple times for multiple -#: paths. A simple path will be prepended to the search order. A path -#: that starts with the + sign will be append to the search order, -#: after ~/bin above. A path that starts with the - sign will be -#: removed from the entire search order. For example:: - -#: exe_search_path /some/prepended/path -#: exe_search_path +/some/appended/path -#: exe_search_path -/some/excluded/path - -# update_check_interval 24 - -#: The interval to periodically check if an update to kitty is -#: available (in hours). If an update is found, a system notification -#: is displayed informing you of the available update. The default is -#: to check every 24 hours, set to zero to disable. Update checking is -#: only done by the official binary builds. Distro packages or source -#: builds do not do update checking. Changing this option by reloading -#: the config is not supported. - -# startup_session none - -#: Path to a session file to use for all kitty instances. Can be -#: overridden by using the kitty --session =none command line option -#: for individual instances. See sessions -#: <https://sw.kovidgoyal.net/kitty/overview/#sessions> in the kitty -#: documentation for details. Note that relative paths are interpreted -#: with respect to the kitty config directory. Environment variables -#: in the path are expanded. Changing this option by reloading the -#: config is not supported. - -# clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask - -#: Allow programs running in kitty to read and write from the -#: clipboard. You can control exactly which actions are allowed. The -#: possible actions are: write-clipboard, read-clipboard, write- -#: primary, read-primary, read-clipboard-ask, read-primary-ask. The -#: default is to allow writing to the clipboard and primary selection -#: and to ask for permission when a program tries to read from the -#: clipboard. Note that disabling the read confirmation is a security -#: risk as it means that any program, even the ones running on a -#: remote server via SSH can read your clipboard. See also -#: clipboard_max_size. - -# clipboard_max_size 512 - -#: The maximum size (in MB) of data from programs running in kitty -#: that will be stored for writing to the system clipboard. A value of -#: zero means no size limit is applied. See also clipboard_control. - -# file_transfer_confirmation_bypass - -#: The password that can be supplied to the file transfer kitten -#: <https://sw.kovidgoyal.net/kitty/kittens/transfer/> to skip the -#: transfer confirmation prompt. This should only be used when -#: initiating transfers from trusted computers, over trusted networks -#: or encrypted transports, as it allows any programs running on the -#: remote machine to read/write to the local filesystem, without -#: permission. - -# allow_hyperlinks yes - -#: Process hyperlink escape sequences (OSC 8). If disabled OSC 8 -#: escape sequences are ignored. Otherwise they become clickable -#: links, that you can click with the mouse or by using the hints -#: kitten <https://sw.kovidgoyal.net/kitty/kittens/hints/>. The -#: special value of ask means that kitty will ask before opening the -#: link when clicked. - -# shell_integration enabled - -#: Enable shell integration on supported shells. This enables features -#: such as jumping to previous prompts, browsing the output of the -#: previous command in a pager, etc. on supported shells. Set to -#: disabled to turn off shell integration, completely. It is also -#: possible to disable individual features, set to a space separated -#: list of these values: no-rc, no-cursor, no-title, no-cwd, no- -#: prompt-mark, no-complete. See Shell integration -#: <https://sw.kovidgoyal.net/kitty/shell-integration/> for details. - -# allow_cloning ask - -#: Control whether programs running in the terminal can request new -#: windows to be created. The canonical example is clone-in-kitty -#: <https://sw.kovidgoyal.net/kitty/shell-integration/#clone-shell>. -#: By default, kitty will ask for permission for each clone request. -#: Allowing cloning unconditionally gives programs running in the -#: terminal (including over SSH) permission to execute arbitrary code, -#: as the user who is running the terminal, on the computer that the -#: terminal is running on. - -# clone_source_strategies venv,conda,env_var,path - -#: Control what shell code is sourced when running clone-in-kitty in -#: the newly cloned window. The supported strategies are: - -#: venv -#: Source the file $VIRTUAL_ENV/bin/activate. This is used by the -#: Python stdlib venv module and allows cloning venvs automatically. -#: conda -#: Run conda activate $CONDA_DEFAULT_ENV. This supports the virtual -#: environments created by conda. -#: env_var -#: Execute the contents of the environment variable -#: KITTY_CLONE_SOURCE_CODE with eval. -#: path -#: Source the file pointed to by the environment variable -#: KITTY_CLONE_SOURCE_PATH. - -#: This option must be a comma separated list of the above values. -#: This only source the first valid one in the above order. - -# term xterm-kitty - -#: The value of the TERM environment variable to set. Changing this -#: can break many terminal programs, only change it if you know what -#: you are doing, not because you read some advice on "Stack Overflow" -#: to change it. The TERM variable is used by various programs to get -#: information about the capabilities and behavior of the terminal. If -#: you change it, depending on what programs you run, and how -#: different the terminal you are changing it to is, various things -#: from key-presses, to colors, to various advanced features may not -#: work. Changing this option by reloading the config will only affect -#: newly created windows. - -#: }}} - -#: OS specific tweaks {{{ - -wayland_titlebar_color system - -#: The color of the kitty window's titlebar on Wayland systems with -#: client side window decorations such as GNOME. A value of system -#: means to use the default system color, a value of background means -#: to use the background color of the currently active window and -#: finally you can use an arbitrary color, such as #12af59 or red. - -# macos_titlebar_color system - -#: The color of the kitty window's titlebar on macOS. A value of -#: system means to use the default system color, light or dark can -#: also be used to set it explicitly. A value of background means to -#: use the background color of the currently active window and finally -#: you can use an arbitrary color, such as #12af59 or red. WARNING: -#: This option works by using a hack when arbitrary color (or -#: background) is configured, as there is no proper Cocoa API for it. -#: It sets the background color of the entire window and makes the -#: titlebar transparent. As such it is incompatible with -#: background_opacity. If you want to use both, you are probably -#: better off just hiding the titlebar with hide_window_decorations. - -# macos_option_as_alt no - -#: Use the Option key as an Alt key on macOS. With this set to no, -#: kitty will use the macOS native Option+Key to enter Unicode -#: character behavior. This will break any Alt+Key keyboard shortcuts -#: in your terminal programs, but you can use the macOS Unicode input -#: technique. You can use the values: left, right or both to use only -#: the left, right or both Option keys as Alt, instead. Note that -#: kitty itself always treats Option the same as Alt. This means you -#: cannot use this option to configure different kitty shortcuts for -#: Option+Key vs. Alt+Key. Also, any kitty shortcuts using -#: Option/Alt+Key will take priority, so that any such key presses -#: will not be passed to terminal programs running inside kitty. -#: Changing this option by reloading the config is not supported. - -# macos_hide_from_tasks no - -#: Hide the kitty window from running tasks on macOS (⌘+Tab and the -#: Dock). Changing this option by reloading the config is not -#: supported. - -# macos_quit_when_last_window_closed no - -#: Have kitty quit when all the top-level windows are closed on macOS. -#: By default, kitty will stay running, even with no open windows, as -#: is the expected behavior on macOS. - -# macos_window_resizable yes - -#: Disable this if you want kitty top-level OS windows to not be -#: resizable on macOS. Changing this option by reloading the config -#: will only affect newly created OS windows. - -# macos_thicken_font 0 - -#: Draw an extra border around the font with the given width, to -#: increase legibility at small font sizes on macOS. For example, a -#: value of 0.75 will result in rendering that looks similar to sub- -#: pixel antialiasing at common font sizes. Note that in modern kitty, -#: this option is obsolete (although still supported). Consider using -#: text_composition_strategy instead. - -# macos_traditional_fullscreen no - -#: Use the macOS traditional full-screen transition, that is faster, -#: but less pretty. - -# macos_show_window_title_in all - -#: Control where the window title is displayed on macOS. A value of -#: window will show the title of the currently active window at the -#: top of the macOS window. A value of menubar will show the title of -#: the currently active window in the macOS global menu bar, making -#: use of otherwise wasted space. A value of all will show the title -#: in both places, and none hides the title. See -#: macos_menubar_title_max_length for how to control the length of the -#: title in the menu bar. - -# macos_menubar_title_max_length 0 - -#: The maximum number of characters from the window title to show in -#: the macOS global menu bar. Values less than one means that there is -#: no maximum limit. - -# macos_custom_beam_cursor no - -#: Use a custom mouse cursor for macOS that is easier to see on both -#: light and dark backgrounds. Nowadays, the default macOS cursor -#: already comes with a white border. WARNING: this might make your -#: mouse cursor invisible on dual GPU machines. Changing this option -#: by reloading the config is not supported. - -# macos_colorspace srgb - -#: The colorspace in which to interpret terminal colors. The default -#: of srgb will cause colors to match those seen in web browsers. The -#: value of default will use whatever the native colorspace of the -#: display is. The value of displayp3 will use Apple's special -#: snowflake display P3 color space, which will result in over -#: saturated (brighter) colors with some color shift. Reloading -#: configuration will change this value only for newly created OS -#: windows. - -linux_display_server wayland - -#: Choose between Wayland and X11 backends. By default, an appropriate -#: backend based on the system state is chosen automatically. Set it -#: to x11 or wayland to force the choice. Changing this option by -#: reloading the config is not supported. - -#: }}} - -#: Keyboard shortcuts {{{ - -#: Keys are identified simply by their lowercase Unicode characters. -#: For example: a for the A key, [ for the left square bracket key, -#: etc. For functional keys, such as Enter or Escape, the names are -#: present at Functional key definitions -#: <https://sw.kovidgoyal.net/kitty/keyboard-protocol/#functional>. -#: For modifier keys, the names are ctrl (control, ⌃), shift (⇧), alt -#: (opt, option, ⌥), super (cmd, command, ⌘). See also: GLFW mods -#: <https://www.glfw.org/docs/latest/group__mods.html> - -#: On Linux you can also use XKB key names to bind keys that are not -#: supported by GLFW. See XKB keys -#: <https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon- -#: keysyms.h> for a list of key names. The name to use is the part -#: after the XKB_KEY_ prefix. Note that you can only use an XKB key -#: name for keys that are not known as GLFW keys. - -#: Finally, you can use raw system key codes to map keys, again only -#: for keys that are not known as GLFW keys. To see the system key -#: code for a key, start kitty with the kitty --debug-input option, -#: kitty will output some debug text for every key event. In that text -#: look for native_code, the value of that becomes the key name in the -#: shortcut. For example: - -#: .. code-block:: none - -#: on_key_input: glfw key: 0x61 native_code: 0x61 action: PRESS mods: none text: 'a' - -#: Here, the key name for the A key is 0x61 and you can use it with:: - -#: map ctrl+0x61 something - -#: to map Ctrl+A to something. - -#: You can use the special action no_op to unmap a keyboard shortcut -#: that is assigned in the default configuration:: - -#: map kitty_mod+space no_op - -#: If you would like kitty to completely ignore a key event, not even -#: sending it to the program running in the terminal, map it to -#: discard_event:: - -#: map kitty_mod+f1 discard_event - -#: You can combine multiple actions to be triggered by a single -#: shortcut with combine action, using the syntax below:: - -#: map key combine <separator> action1 <separator> action2 <separator> action3 ... - -#: For example:: - -#: map kitty_mod+e combine : new_window : next_layout - -#: This will create a new window and switch to the next available -#: layout. - -#: You can use multi-key shortcuts with the syntax shown below:: - -#: map key1>key2>key3 action - -#: For example:: - -#: map ctrl+f>2 set_font_size 20 - -#: The full list of actions that can be mapped to key presses is -#: available here <https://sw.kovidgoyal.net/kitty/actions/>. - -# kitty_mod ctrl+shift - -#: Special modifier key alias for default shortcuts. You can change -#: the value of this option to alter all default shortcuts that use -#: kitty_mod. - -# clear_all_shortcuts no - -#: Remove all shortcut definitions up to this point. Useful, for -#: instance, to remove the default shortcuts. - -# action_alias - -#: E.g. action_alias launch_tab launch --type=tab --cwd=current - -#: Define action aliases to avoid repeating the same options in -#: multiple mappings. Aliases can be defined for any action and will -#: be expanded recursively. For example, the above alias allows you to -#: create mappings to launch a new tab in the current working -#: directory without duplication:: - -#: map f1 launch_tab vim -#: map f2 launch_tab emacs - -#: Similarly, to alias kitten invocation:: - -#: action_alias hints kitten hints --hints-offset=0 - -# kitten_alias - -#: E.g. kitten_alias hints hints --hints-offset=0 - -#: Like action_alias above, but specifically for kittens. Generally, -#: prefer to use action_alias. This option is a legacy version, -#: present for backwards compatibility. It causes all invocations of -#: the aliased kitten to be substituted. So the example above will -#: cause all invocations of the hints kitten to have the --hints- -#: offset=0 option applied. - -#: Clipboard {{{ - -#: Copy to clipboard - -# map kitty_mod+c copy_to_clipboard -# map cmd+c copy_to_clipboard - -#:: There is also a copy_or_interrupt action that can be optionally -#:: mapped to Ctrl+C. It will copy only if there is a selection and -#:: send an interrupt otherwise. Similarly, -#:: copy_and_clear_or_interrupt will copy and clear the selection or -#:: send an interrupt if there is no selection. - -#: Paste from clipboard - -# map kitty_mod+v paste_from_clipboard -# map cmd+v paste_from_clipboard - -#: Paste from selection - -# map kitty_mod+s paste_from_selection -# map shift+insert paste_from_selection - -#: Pass selection to program - -# map kitty_mod+o pass_selection_to_program - -#:: You can also pass the contents of the current selection to any -#:: program with pass_selection_to_program. By default, the system's -#:: open program is used, but you can specify your own, the selection -#:: will be passed as a command line argument to the program. For -#:: example:: - -#:: map kitty_mod+o pass_selection_to_program firefox - -#:: You can pass the current selection to a terminal program running -#:: in a new kitty window, by using the @selection placeholder:: - -#:: map kitty_mod+y new_window less @selection - -#: }}} - -#: Scrolling {{{ - -#: Scroll line up - -# map kitty_mod+up scroll_line_up -# map kitty_mod+k scroll_line_up -# map opt+cmd+page_up scroll_line_up -# map cmd+up scroll_line_up - -#: Scroll line down - -# map kitty_mod+down scroll_line_down -# map kitty_mod+j scroll_line_down -# map opt+cmd+page_down scroll_line_down -# map cmd+down scroll_line_down - -#: Scroll page up - -# map kitty_mod+page_up scroll_page_up -# map cmd+page_up scroll_page_up - -#: Scroll page down - -# map kitty_mod+page_down scroll_page_down -# map cmd+page_down scroll_page_down - -#: Scroll to top - -# map kitty_mod+home scroll_home -# map cmd+home scroll_home - -#: Scroll to bottom - -# map kitty_mod+end scroll_end -# map cmd+end scroll_end - -#: Scroll to previous shell prompt - -# map kitty_mod+z scroll_to_prompt -1 - -#:: Use a parameter of 0 for scroll_to_prompt to scroll to the last -#:: jumped to or the last clicked position. Requires shell -#:: integration <https://sw.kovidgoyal.net/kitty/shell-integration/> -#:: to work. - -#: Scroll to next shell prompt - -# map kitty_mod+x scroll_to_prompt 1 - -#: Browse scrollback buffer in pager - -# map kitty_mod+h show_scrollback - -#:: You can pipe the contents of the current screen and history -#:: buffer as STDIN to an arbitrary program using launch --stdin- -#:: source. For example, the following opens the scrollback buffer in -#:: less in an overlay window:: - -#:: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R - -#:: For more details on piping screen and buffer contents to external -#:: programs, see launch <https://sw.kovidgoyal.net/kitty/launch/>. - -#: Browse output of the last shell command in pager - -# map kitty_mod+g show_last_command_output - -#:: You can also define additional shortcuts to get the command -#:: output. For example, to get the first command output on screen:: - -#:: map f1 show_first_command_output_on_screen - -#:: To get the command output that was last accessed by a keyboard -#:: action or mouse action:: - -#:: map f1 show_last_visited_command_output - -#:: You can pipe the output of the last command run in the shell -#:: using the launch action. For example, the following opens the -#:: output in less in an overlay window:: - -#:: map f1 launch --stdin-source=@last_cmd_output --stdin-add-formatting --type=overlay less +G -R - -#:: To get the output of the first command on the screen, use -#:: @first_cmd_output_on_screen. To get the output of the last jumped -#:: to command, use @last_visited_cmd_output. - -#:: Requires shell integration -#:: <https://sw.kovidgoyal.net/kitty/shell-integration/> to work. - -#: }}} - -#: Window management {{{ - -#: New window - -# map kitty_mod+enter new_window -# map cmd+enter new_window - -#:: You can open a new kitty window running an arbitrary program, for -#:: example:: - -#:: map kitty_mod+y launch mutt - -#:: You can open a new window with the current working directory set -#:: to the working directory of the current window using:: - -#:: map ctrl+alt+enter launch --cwd=current - -#:: You can open a new window that is allowed to control kitty via -#:: the kitty remote control facility with launch --allow-remote- -#:: control. Any programs running in that window will be allowed to -#:: control kitty. For example:: - -#:: map ctrl+enter launch --allow-remote-control some_program - -#:: You can open a new window next to the currently active window or -#:: as the first window, with:: - -#:: map ctrl+n launch --location=neighbor -#:: map ctrl+f launch --location=first - -#:: For more details, see launch -#:: <https://sw.kovidgoyal.net/kitty/launch/>. - -#: New OS window - -# map kitty_mod+n new_os_window -# map cmd+n new_os_window - -#:: Works like new_window above, except that it opens a top-level OS -#:: window. In particular you can use new_os_window_with_cwd to open -#:: a window with the current working directory. - -#: Close window - -# map kitty_mod+w close_window -# map shift+cmd+d close_window - -#: Next window - -# map kitty_mod+] next_window - -#: Previous window - -# map kitty_mod+[ previous_window - -#: Move window forward - -# map kitty_mod+f move_window_forward - -#: Move window backward - -# map kitty_mod+b move_window_backward - -#: Move window to top - -# map kitty_mod+` move_window_to_top - -#: Start resizing window - -# map kitty_mod+r start_resizing_window -# map cmd+r start_resizing_window - -#: First window - -# map kitty_mod+1 first_window -# map cmd+1 first_window - -#: Second window - -# map kitty_mod+2 second_window -# map cmd+2 second_window - -#: Third window - -# map kitty_mod+3 third_window -# map cmd+3 third_window - -#: Fourth window - -# map kitty_mod+4 fourth_window -# map cmd+4 fourth_window - -#: Fifth window - -# map kitty_mod+5 fifth_window -# map cmd+5 fifth_window - -#: Sixth window - -# map kitty_mod+6 sixth_window -# map cmd+6 sixth_window - -#: Seventh window - -# map kitty_mod+7 seventh_window -# map cmd+7 seventh_window - -#: Eight window - -# map kitty_mod+8 eighth_window -# map cmd+8 eighth_window - -#: Ninth window - -# map kitty_mod+9 ninth_window -# map cmd+9 ninth_window - -#: Tenth window - -# map kitty_mod+0 tenth_window - -#: Visually select and focus window - -# map kitty_mod+f7 focus_visible_window - -#:: Display overlay numbers and alphabets on the window, and switch -#:: the focus to the window when you press the key. When there are -#:: only two windows, the focus will be switched directly without -#:: displaying the overlay. You can change the overlay characters and -#:: their order with option visual_window_select_characters. - -#: Visually swap window with another - -# map kitty_mod+f8 swap_with_window - -#:: Works like focus_visible_window above, but swaps the window. - -#: }}} - -#: Tab management {{{ - -#: Next tab - -# map kitty_mod+right next_tab -# map shift+cmd+] next_tab -# map ctrl+tab next_tab - -#: Previous tab - -# map kitty_mod+left previous_tab -# map shift+cmd+[ previous_tab -# map ctrl+shift+tab previous_tab - -#: New tab - -# map kitty_mod+t new_tab -# map cmd+t new_tab - -#: Close tab - -# map kitty_mod+q close_tab -# map cmd+w close_tab - -#: Close OS window - -# map shift+cmd+w close_os_window - -#: Move tab forward - -# map kitty_mod+. move_tab_forward - -#: Move tab backward - -# map kitty_mod+, move_tab_backward - -#: Set tab title - -# map kitty_mod+alt+t set_tab_title -# map shift+cmd+i set_tab_title - - -#: You can also create shortcuts to go to specific tabs, with 1 being -#: the first tab, 2 the second tab and -1 being the previously active -#: tab, and any number larger than the last tab being the last tab:: - -#: map ctrl+alt+1 goto_tab 1 -#: map ctrl+alt+2 goto_tab 2 - -#: Just as with new_window above, you can also pass the name of -#: arbitrary commands to run when using new_tab and new_tab_with_cwd. -#: Finally, if you want the new tab to open next to the current tab -#: rather than at the end of the tabs list, use:: - -#: map ctrl+t new_tab !neighbor [optional cmd to run] -#: }}} - -#: Layout management {{{ - -#: Next layout - -# map kitty_mod+l next_layout - - -#: You can also create shortcuts to switch to specific layouts:: - -#: map ctrl+alt+t goto_layout tall -#: map ctrl+alt+s goto_layout stack - -#: Similarly, to switch back to the previous layout:: - -#: map ctrl+alt+p last_used_layout - -#: There is also a toggle_layout action that switches to the named -#: layout or back to the previous layout if in the named layout. -#: Useful to temporarily "zoom" the active window by switching to the -#: stack layout:: - -#: map ctrl+alt+z toggle_layout stack -#: }}} - -#: Font sizes {{{ - -#: You can change the font size for all top-level kitty OS windows at -#: a time or only the current one. - -#: Increase font size - -# map kitty_mod+equal change_font_size all +2.0 -# map kitty_mod+plus change_font_size all +2.0 -# map kitty_mod+kp_add change_font_size all +2.0 -# map cmd+plus change_font_size all +2.0 -# map cmd+equal change_font_size all +2.0 -# map shift+cmd+equal change_font_size all +2.0 - -#: Decrease font size - -# map kitty_mod+minus change_font_size all -2.0 -# map kitty_mod+kp_subtract change_font_size all -2.0 -# map cmd+minus change_font_size all -2.0 -# map shift+cmd+minus change_font_size all -2.0 - -#: Reset font size - -# map kitty_mod+backspace change_font_size all 0 -# map cmd+0 change_font_size all 0 - - -#: To setup shortcuts for specific font sizes:: - -#: map kitty_mod+f6 change_font_size all 10.0 - -#: To setup shortcuts to change only the current OS window's font -#: size:: - -#: map kitty_mod+f6 change_font_size current 10.0 -#: }}} - -#: Select and act on visible text {{{ - -#: Use the hints kitten to select text and either pass it to an -#: external program or insert it into the terminal or copy it to the -#: clipboard. - -#: Open URL - -# map kitty_mod+e open_url_with_hints - -#:: Open a currently visible URL using the keyboard. The program used -#:: to open the URL is specified in open_url_with. - -#: Insert selected path - -# map kitty_mod+p>f kitten hints --type path --program - - -#:: Select a path/filename and insert it into the terminal. Useful, -#:: for instance to run git commands on a filename output from a -#:: previous git command. - -#: Open selected path - -# map kitty_mod+p>shift+f kitten hints --type path - -#:: Select a path/filename and open it with the default open program. - -#: Insert selected line - -# map kitty_mod+p>l kitten hints --type line --program - - -#:: Select a line of text and insert it into the terminal. Useful for -#:: the output of things like: `ls -1`. - -#: Insert selected word - -# map kitty_mod+p>w kitten hints --type word --program - - -#:: Select words and insert into terminal. - -#: Insert selected hash - -# map kitty_mod+p>h kitten hints --type hash --program - - -#:: Select something that looks like a hash and insert it into the -#:: terminal. Useful with git, which uses SHA1 hashes to identify -#:: commits. - -#: Open the selected file at the selected line - -# map kitty_mod+p>n kitten hints --type linenum - -#:: Select something that looks like filename:linenum and open it in -#:: vim at the specified line number. - -#: Open the selected hyperlink - -# map kitty_mod+p>y kitten hints --type hyperlink - -#:: Select a hyperlink (i.e. a URL that has been marked as such by -#:: the terminal program, for example, by `ls --hyperlink=auto`). - - -#: The hints kitten has many more modes of operation that you can map -#: to different shortcuts. For a full description see hints kitten -#: <https://sw.kovidgoyal.net/kitty/kittens/hints/>. -#: }}} - -#: Miscellaneous {{{ - -#: Show documentation - -# map kitty_mod+f1 show_kitty_doc overview - -#: Toggle fullscreen - -# map kitty_mod+f11 toggle_fullscreen -# map ctrl+cmd+f toggle_fullscreen - -#: Toggle maximized - -# map kitty_mod+f10 toggle_maximized - -#: Toggle macOS secure keyboard entry - -# map opt+cmd+s toggle_macos_secure_keyboard_entry - -#: Unicode input - -# map kitty_mod+u kitten unicode_input -# map ctrl+cmd+space kitten unicode_input - -#: Edit config file - -# map kitty_mod+f2 edit_config_file -# map cmd+, edit_config_file - -#: Open the kitty command shell - -# map kitty_mod+escape kitty_shell window - -#:: Open the kitty shell in a new window / tab / overlay / os_window -#:: to control kitty using commands. - -#: Increase background opacity - -# map kitty_mod+a>m set_background_opacity +0.1 - -#: Decrease background opacity - -# map kitty_mod+a>l set_background_opacity -0.1 - -#: Make background fully opaque - -# map kitty_mod+a>1 set_background_opacity 1 - -#: Reset background opacity - -# map kitty_mod+a>d set_background_opacity default - -#: Reset the terminal - -# map kitty_mod+delete clear_terminal reset active -# map opt+cmd+r clear_terminal reset active - -#:: You can create shortcuts to clear/reset the terminal. For -#:: example:: - -#:: # Reset the terminal -#:: map f1 clear_terminal reset active -#:: # Clear the terminal screen by erasing all contents -#:: map f1 clear_terminal clear active -#:: # Clear the terminal scrollback by erasing it -#:: map f1 clear_terminal scrollback active -#:: # Scroll the contents of the screen into the scrollback -#:: map f1 clear_terminal scroll active -#:: # Clear everything up to the line with the cursor -#:: map f1 clear_terminal to_cursor active - -#:: If you want to operate on all kitty windows instead of just the -#:: current one, use all instead of active. - -#:: It is also possible to remap Ctrl+L to both scroll the current -#:: screen contents into the scrollback buffer and clear the screen, -#:: instead of just clearing the screen, for example, for ZSH add the -#:: following to ~/.zshrc: - -#:: .. code-block:: zsh - -#:: scroll-and-clear-screen() { -#:: printf '\n%.0s' {1..$LINES} -#:: zle clear-screen -#:: } -#:: zle -N scroll-and-clear-screen -#:: bindkey '^l' scroll-and-clear-screen - -#: Clear up to cursor line - -# map cmd+k clear_terminal to_cursor active - -#: Reload kitty.conf - -# map kitty_mod+f5 load_config_file -# map ctrl+cmd+, load_config_file - -#:: Reload kitty.conf, applying any changes since the last time it -#:: was loaded. Note that a handful of options cannot be dynamically -#:: changed and require a full restart of kitty. Particularly, when -#:: changing shortcuts for actions located on the macOS global menu -#:: bar, a full restart is needed. You can also map a keybinding to -#:: load a different config file, for example:: - -#:: map f5 load_config /path/to/alternative/kitty.conf - -#:: Note that all options from the original kitty.conf are discarded, -#:: in other words the new configuration *replace* the old ones. - -#: Debug kitty configuration - -# map kitty_mod+f6 debug_config -# map opt+cmd+, debug_config - -#:: Show details about exactly what configuration kitty is running -#:: with and its host environment. Useful for debugging issues. - -#: Send arbitrary text on key presses - -#:: E.g. map ctrl+shift+alt+h send_text all Hello World - -#:: You can tell kitty to send arbitrary (UTF-8) encoded text to the -#:: client program when pressing specified shortcut keys. For -#:: example:: - -#:: map ctrl+alt+a send_text all Special text - -#:: This will send "Special text" when you press the Ctrl+Alt+A key -#:: combination. The text to be sent decodes ANSI C escapes -#:: <https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC- -#:: Quoting.html> so you can use escapes like \e to send control -#:: codes or \u21fb to send Unicode characters (or you can just input -#:: the Unicode characters directly as UTF-8 text). You can use -#:: `kitty +kitten show_key` to get the key escape codes you want to -#:: emulate. - -#:: The first argument to send_text is the keyboard modes in which to -#:: activate the shortcut. The possible values are normal, -#:: application, kitty or a comma separated combination of them. The -#:: modes normal and application refer to the DECCKM cursor key mode -#:: for terminals, and kitty refers to the kitty extended keyboard -#:: protocol. The special value all means all of them. - -#:: Some more examples:: - -#:: # Output a word and move the cursor to the start of the line (like typing and pressing Home) -#:: map ctrl+alt+a send_text normal Word\e[H -#:: map ctrl+alt+a send_text application Word\eOH -#:: # Run a command at a shell prompt (like typing the command and pressing Enter) -#:: map ctrl+alt+a send_text normal,application some command with arguments\r - -#: Open kitty Website - -# map shift+cmd+/ open_url https://sw.kovidgoyal.net/kitty/ - -#: Hide macOS kitty application - -# map cmd+h hide_macos_app - -#: Hide macOS other applications - -# map opt+cmd+h hide_macos_other_apps - -#: Minimize macOS window - -# map cmd+m minimize_macos_window - -#: Quit kitty - -# map cmd+q quit - -#: }}} - -#: }}} - diff --git a/stow/kitty/.config/kitty/themes/tdpeuter-dark.conf b/stow/kitty/.config/kitty/themes/tdpeuter-dark.conf deleted file mode 100644 index 74d0bb6..0000000 --- a/stow/kitty/.config/kitty/themes/tdpeuter-dark.conf +++ /dev/null @@ -1,39 +0,0 @@ -foreground #dcdfe4 -background #171717 -selection_foreground #000000 -selection_background #FFFACD -url_color #0087BD - -# black -color0 #21222c -color8 #6272a4 - -# red -color1 #C86564 -color9 #C86564 - -# green -color2 #B2BC68 -color10 #B2BC68 - -# yellow -color3 #f7e03f -color11 #f7e03f - -# blue -color4 #80A2BE -color12 #80A2BE - -# magenta -color5 #b294bb -color13 #b294bb - -# cyan -# color6 #60C7CE -# color14 #60C7CE -color6 #8ABEB7 -color14 #8ABEB7 - -# white -color7 #ffffff -color15 #ffffff diff --git a/stow/kitty/.config/kitty/themes/tdpeuter-light.conf b/stow/kitty/.config/kitty/themes/tdpeuter-light.conf deleted file mode 100644 index b2537b7..0000000 --- a/stow/kitty/.config/kitty/themes/tdpeuter-light.conf +++ /dev/null @@ -1,37 +0,0 @@ -foreground #000000 -background #FAFAFA -selection_foreground #383A42 -selection_background #BFCEFF -url_color #F0F0F0 - -# black -color0 #383A42 -color8 #6272a4 - -# red -color1 #E45649 -color9 #E45649 - -# green -color2 #40A14F -color10 #40A14F - -# yellow -color3 #C18401 -color11 #C18401 - -# blue -color4 #0184BC -color12 #0184BC - -# magenta -color5 #A626A4 -color13 #A626A4 - -# cyan -color6 #0997B3 -color14 #0997B3 - -# white -color7 #FAFAFA -color15 #FAFAFA diff --git a/stow/openrgb/.config/OpenRGB/Default.orp b/stow/openrgb/.config/OpenRGB/Default.orp deleted file mode 100644 index e1de89b..0000000 Binary files a/stow/openrgb/.config/OpenRGB/Default.orp and /dev/null differ diff --git a/stow/openrgb/.config/OpenRGB/OpenRGB.json b/stow/openrgb/.config/OpenRGB/OpenRGB.json deleted file mode 100644 index beb068d..0000000 --- a/stow/openrgb/.config/OpenRGB/OpenRGB.json +++ /dev/null @@ -1,1096 +0,0 @@ -{ - "AutoStart": { - "client": "localhost:6742", - "custom": "", - "enabled": true, - "host": "0.0.0.0", - "port": "6742", - "profile": "Default", - "setclient": false, - "setcustom": false, - "setminimized": false, - "setprofile": true, - "setserver": false, - "setserverhost": false, - "setserverport": false - }, - "Detectors": { - "detectors": { - "AMD Wraith Prism": false, - "ASRock Deskmini Addressable LED Strip": false, - "ASRock Motherboard SMBus Controllers": false, - "ASRock Polychrome SMBus": false, - "ASRock Polychrome USB": false, - "ASUS AREZ Strix RX Vega 56 O8G": false, - "ASUS Aura Addressable": false, - "ASUS Aura Core": false, - "ASUS Aura GPU": false, - "ASUS Aura GPU (ENE)": false, - "ASUS Aura Motherboard": false, - "ASUS Aura SMBus Motherboard": false, - "ASUS Cerberus Mech": false, - "ASUS GTX 1060 Strix": false, - "ASUS GTX 1060 Strix 6G Gaming": false, - "ASUS GTX 1070 Strix Gaming": false, - "ASUS GTX 1070 Strix OC": false, - "ASUS GTX 1080 Strix OC": false, - "ASUS KO RTX 3060 O12G V2 GAMING": false, - "ASUS KO RTX 3060 OC O12G GAMING": false, - "ASUS KO RTX 3060Ti O8G V2 GAMING": false, - "ASUS KO RTX 3070 O8G V2 GAMING": false, - "ASUS ROG AURA Terminal": false, - "ASUS ROG Balteus": false, - "ASUS ROG Balteus Qi": false, - "ASUS ROG Chakram (Wireless)": false, - "ASUS ROG Claymore": false, - "ASUS ROG Falchion (Wired)": false, - "ASUS ROG Falchion (Wireless)": false, - "ASUS ROG GTX 1660 Ti OC 6G": false, - "ASUS ROG Gladius II": false, - "ASUS ROG Gladius II Core": false, - "ASUS ROG Gladius II Origin": false, - "ASUS ROG Gladius II Origin COD": false, - "ASUS ROG Gladius II Origin PNK LTD": false, - "ASUS ROG Gladius II Wireless": false, - "ASUS ROG Gladius III": false, - "ASUS ROG Gladius III Wireless 2.4Ghz": false, - "ASUS ROG Gladius III Wireless Bluetooth": false, - "ASUS ROG Gladius III Wireless USB": false, - "ASUS ROG Keris": false, - "ASUS ROG Keris Wireless 2.4Ghz": false, - "ASUS ROG Keris Wireless Bluetooth": false, - "ASUS ROG Keris Wireless USB": false, - "ASUS ROG PG32UQ": false, - "ASUS ROG Pugio": false, - "ASUS ROG Pugio II (Wired)": false, - "ASUS ROG Pugio II (Wireless)": false, - "ASUS ROG Ryuo AIO": false, - "ASUS ROG STRIX 3060 O12G GAMING": false, - "ASUS ROG STRIX 3060 O12G V2 GAMING": false, - "ASUS ROG STRIX 3060Ti O8G OC": false, - "ASUS ROG STRIX 3060Ti O8G V2": false, - "ASUS ROG STRIX 3070 O8G GAMING": false, - "ASUS ROG STRIX 3070 O8G V2 GAMING": false, - "ASUS ROG STRIX 3070 O8G V2 White": false, - "ASUS ROG STRIX 3070 O8G White": false, - "ASUS ROG STRIX 3070 OC": false, - "ASUS ROG STRIX 3070Ti O8G GAMING": false, - "ASUS ROG STRIX 3080 10G GAMING": false, - "ASUS ROG STRIX 3080 10G V2 GAMING": false, - "ASUS ROG STRIX 3080 O10G GAMING": false, - "ASUS ROG STRIX 3080 O10G V2 GAMING": false, - "ASUS ROG STRIX 3080 O10G V2 WHITE": false, - "ASUS ROG STRIX 3080 O10G WHITE": false, - "ASUS ROG STRIX 3080Ti O12G GAMING": false, - "ASUS ROG STRIX 3090 24G GAMING": false, - "ASUS ROG STRIX 3090 O24G GAMING": false, - "ASUS ROG STRIX 3090 O24G GAMING White OC": false, - "ASUS ROG STRIX LC 3080Ti O12G GAMING": false, - "ASUS ROG STRIX RTX 2060 EVO Gaming 6G": false, - "ASUS ROG STRIX RTX 2060 O6G EVO Gaming": false, - "ASUS ROG STRIX RTX 2060 O6G Gaming": false, - "ASUS ROG STRIX RTX 2060S 8G Gaming": false, - "ASUS ROG STRIX RTX 2060S A8G EVO Gaming": false, - "ASUS ROG STRIX RTX 2060S A8G Gaming": false, - "ASUS ROG STRIX RTX 2060S O8G Gaming": false, - "ASUS ROG STRIX RTX 2070 A8G Gaming": false, - "ASUS ROG STRIX RTX 2070 O8G Gaming": false, - "ASUS ROG STRIX RTX 2070S 8G Gaming": false, - "ASUS ROG STRIX RTX 2070S A8G Gaming": false, - "ASUS ROG STRIX RTX 2070S O8G Gaming": false, - "ASUS ROG STRIX RTX 2080 8G Gaming": false, - "ASUS ROG STRIX RTX 2080 O8G Gaming": false, - "ASUS ROG STRIX RTX 2080 O8G V2 Gaming": false, - "ASUS ROG STRIX RTX 2080 Ti 11G Gaming": false, - "ASUS ROG STRIX RTX 2080 Ti A11G Gaming": false, - "ASUS ROG STRIX RTX 2080 Ti O11G Gaming": false, - "ASUS ROG STRIX RTX 2080S A8G Gaming": false, - "ASUS ROG STRIX RTX 2080S O8G Gaming": false, - "ASUS ROG STRIX RTX 2080S O8G White": false, - "ASUS ROG STRIX RTX 3080 12G": false, - "ASUS ROG STRIX RTX 3080 O12G": false, - "ASUS ROG STRIX RX470 O4G GAMING": false, - "ASUS ROG STRIX RX480 Gaming OC": false, - "ASUS ROG STRIX RX560 Gaming": false, - "ASUS ROG Strix Claw": false, - "ASUS ROG Strix Evolve": false, - "ASUS ROG Strix Flare": false, - "ASUS ROG Strix Flare PNK LTD": false, - "ASUS ROG Strix GTX 1050 O2G Gaming": false, - "ASUS ROG Strix GTX 1050 TI 4G Gaming": false, - "ASUS ROG Strix GTX 1050 TI O4G Gaming": false, - "ASUS ROG Strix GTX 1650S OC 4G": false, - "ASUS ROG Strix GTX 1660S O6G Gaming": false, - "ASUS ROG Strix GTX1070 Ti 8G Gaming": false, - "ASUS ROG Strix GTX1070 Ti A8G Gaming": false, - "ASUS ROG Strix GTX1080 A8G Gaming": false, - "ASUS ROG Strix GTX1080 O8G 11Gbps": false, - "ASUS ROG Strix GTX1080 O8G Gaming": false, - "ASUS ROG Strix GTX1080 Ti 11G Gaming": false, - "ASUS ROG Strix GTX1080 Ti Gaming": false, - "ASUS ROG Strix GTX1080 Ti O11G Gaming": false, - "ASUS ROG Strix Impact": false, - "ASUS ROG Strix Impact II": false, - "ASUS ROG Strix Impact II Electro Punk": false, - "ASUS ROG Strix Impact II Gundam": false, - "ASUS ROG Strix Impact II Moonlight White": false, - "ASUS ROG Strix Impact II Wireless 2.4 Ghz": false, - "ASUS ROG Strix Impact II Wireless USB": false, - "ASUS ROG Strix LC": false, - "ASUS ROG Strix SCAR 15": false, - "ASUS ROG Strix Scope": false, - "ASUS ROG Strix Scope RX": false, - "ASUS ROG Strix Scope TKL": false, - "ASUS ROG Strix Scope TKL PNK LTD": false, - "ASUS ROG Strix XG27AQ": false, - "ASUS ROG Strix XG27AQM": false, - "ASUS ROG Strix XG27W": false, - "ASUS ROG Throne": false, - "ASUS ROG Throne QI": false, - "ASUS ROG Throne QI GUNDAM": false, - "ASUS RX 5600XT Strix O6G Gaming": false, - "ASUS RX 570 Strix O4G Gaming OC": false, - "ASUS RX 5700XT Strix Gaming OC": false, - "ASUS RX 580 Strix Gaming OC": false, - "ASUS RX 580 Strix Gaming TOP": false, - "ASUS RX 6800 TUF Gaming OC": false, - "ASUS TUF 3060 O12G GAMING": false, - "ASUS TUF 3060 O12G V2 GAMING": false, - "ASUS TUF Gaming K3": false, - "ASUS TUF Gaming K7": false, - "ASUS TUF Gaming M3": false, - "ASUS TUF Gaming M5": false, - "ASUS TUF RTX 3060 Ti 8G Gaming OC": false, - "ASUS TUF RTX 3060Ti O8G OC": false, - "ASUS TUF RTX 3070 O8G GAMING": false, - "ASUS TUF RTX 3070 O8G V2 GAMING": false, - "ASUS TUF RTX 3070Ti O8G GAMING": false, - "ASUS TUF RTX 3070Ti O8G V2 GAMING": false, - "ASUS TUF RTX 3080 10G GAMING": false, - "ASUS TUF RTX 3080 O10G OC": false, - "ASUS TUF RTX 3080 O10G V2 GAMING": false, - "ASUS TUF RTX 3080 O12G GAMING": false, - "ASUS TUF RTX 3080Ti 12G GAMING": false, - "ASUS TUF RTX 3080Ti O12G GAMING": false, - "ASUS TUF RTX 3090 O24G": false, - "ASUS TUF RTX 3090 O24G OC": false, - "ASUS TUF RTX 4090 O24G": false, - "ASUS TUF RTX 4090 O24G OC": false, - "ASUS TUF RX 6800XT O16G GAMING": false, - "ASUS TUF RX 6900XT O16G GAMING": false, - "ASUS TUF RX 6900XT T16G GAMING": false, - "ASUS Vega 64 Strix": false, - "ASUS_TUF RX 6700XT O12G GAMING": false, - "Acer Predator Gaming Mouse (Rival 300)": false, - "Alienware AW510K": false, - "Anne Pro 2": false, - "Aorus CPU Coolers": false, - "Asus ROG Chakram (Wired)": false, - "Asus ROG Chakram Core": false, - "BlinkyTape": false, - "Bloody MP 50RS": false, - "Bloody W60 Pro": false, - "Cooler Master ARGB": false, - "Cooler Master ARGB Gen 2 A1": false, - "Cooler Master ARGB Gen 2 A1 V2": false, - "Cooler Master MK570": false, - "Cooler Master MK750": false, - "Cooler Master MM530": false, - "Cooler Master MM711": false, - "Cooler Master MM720": false, - "Cooler Master MM730": false, - "Cooler Master MP750 Large": false, - "Cooler Master MP750 Medium": false, - "Cooler Master MP750 XL": false, - "Cooler Master MasterKeys Pro L": false, - "Cooler Master MasterKeys Pro L White": false, - "Cooler Master MasterKeys Pro S": false, - "Cooler Master RGB": false, - "Cooler Master Radeon 6000 GPU": false, - "Cooler Master Radeon 6900 GPU": false, - "Cooler Master SK630": false, - "Cooler Master SK650": false, - "Cooler Master Small ARGB": false, - "Corsair 1000D Obsidian": false, - "Corsair Commander Core": false, - "Corsair Commander Pro": false, - "Corsair Dominator Platinum": false, - "Corsair Glaive RGB": false, - "Corsair Glaive RGB PRO": true, - "Corsair Harpoon RGB": false, - "Corsair Harpoon RGB PRO": false, - "Corsair Hydro H100i Platinum": false, - "Corsair Hydro H100i Platinum SE": false, - "Corsair Hydro H100i Pro XT": false, - "Corsair Hydro H100i Pro XT v2": false, - "Corsair Hydro H115i Platinum": false, - "Corsair Hydro H115i Pro XT": false, - "Corsair Hydro H150i Pro XT": false, - "Corsair Hydro H60i Pro XT": false, - "Corsair Hydro Series": false, - "Corsair Ironclaw RGB": false, - "Corsair K100": false, - "Corsair K55 RGB": false, - "Corsair K55 RGB PRO": false, - "Corsair K55 RGB PRO XT": false, - "Corsair K57 RGB (Wired)": false, - "Corsair K60 RGB PRO": false, - "Corsair K60 RGB PRO Low Profile": false, - "Corsair K65 LUX RGB": false, - "Corsair K65 Mini": false, - "Corsair K65 RGB": false, - "Corsair K65 RGB RAPIDFIRE": false, - "Corsair K68 RGB": true, - "Corsair K70 LUX": false, - "Corsair K70 LUX RGB": false, - "Corsair K70 RGB": false, - "Corsair K70 RGB MK.2": false, - "Corsair K70 RGB MK.2 Low Profile": false, - "Corsair K70 RGB MK.2 SE": false, - "Corsair K70 RGB RAPIDFIRE": false, - "Corsair K95 RGB": false, - "Corsair K95 RGB PLATINUM": false, - "Corsair K95 RGB PLATINUM XT": false, - "Corsair LS100 Lighting Kit": false, - "Corsair LT100": false, - "Corsair Lighting Node Core": false, - "Corsair Lighting Node Pro": false, - "Corsair M65": false, - "Corsair M65 PRO": false, - "Corsair M65 RGB Elite": false, - "Corsair MM700": false, - "Corsair MM800 RGB Polaris": false, - "Corsair Nightsword": false, - "Corsair SPEC OMEGA RGB": false, - "Corsair ST100 RGB": false, - "Corsair Sabre RGB": false, - "Corsair Scimitar Elite RGB": false, - "Corsair Scimitar PRO RGB": false, - "Corsair Scimitar RGB": false, - "Corsair Strafe": false, - "Corsair Strafe MK.2": false, - "Corsair Strafe Red": false, - "Corsair Vengeance": false, - "Corsair Vengeance Pro": false, - "Cougar 700K EVO Gaming Keyboard": false, - "Cougar Revenger ST": false, - "Creative SoundBlasterX G6": false, - "Crucial": false, - "Dark Project KD3B V2": false, - "Das Keyboard Q4 RGB": false, - "Das Keyboard Q5 RGB": false, - "Debug Controllers": false, - "Dell G Series LED Controller": false, - "Ducky One 2 RGB TKL": false, - "Ducky Shine 7/Ducky One 2 RGB": false, - "Dygma Raise": false, - "E1.31": false, - "EK Loop Connect": false, - "ENE SMBus DRAM": false, - "EVGA GP102 GPU": false, - "EVGA GPU": false, - "EVGA GeForce RTX 2070 SUPER FTW3 Ultra": false, - "EVGA GeForce RTX 2070 SUPER FTW3 Ultra+": false, - "EVGA GeForce RTX 2070 SUPER XC Ultra": false, - "EVGA GeForce RTX 2070 SUPER XC Ultra+": false, - "EVGA GeForce RTX 2070 XC Gaming": false, - "EVGA GeForce RTX 2070 XC OC": false, - "EVGA GeForce RTX 2080 Black": false, - "EVGA GeForce RTX 2080 SUPER FTW3 Hybrid OC": false, - "EVGA GeForce RTX 2080 SUPER FTW3 Ultra": false, - "EVGA GeForce RTX 2080 SUPER FTW3 Ultra Hydro Copper": false, - "EVGA GeForce RTX 2080 SUPER XC Gaming": false, - "EVGA GeForce RTX 2080 SUPER XC Ultra": false, - "EVGA GeForce RTX 2080 XC Black": false, - "EVGA GeForce RTX 2080 XC Gaming": false, - "EVGA GeForce RTX 2080 XC Ultra Gaming": false, - "EVGA GeForce RTX 2080Ti Black": false, - "EVGA GeForce RTX 2080Ti FTW3 Ultra": false, - "EVGA GeForce RTX 2080Ti XC HYBRID GAMING": false, - "EVGA GeForce RTX 2080Ti XC HYDRO COPPER": false, - "EVGA GeForce RTX 2080Ti XC Ultra": false, - "EVGA GeForce RTX 3060TI FTW3 Gaming": false, - "EVGA GeForce RTX 3060TI FTW3 Ultra": false, - "EVGA GeForce RTX 3060TI FTW3 Ultra LHR": false, - "EVGA GeForce RTX 3070 Black Gaming": false, - "EVGA GeForce RTX 3070 FTW3 Ultra": false, - "EVGA GeForce RTX 3070 FTW3 Ultra LHR": false, - "EVGA GeForce RTX 3070 XC3 Gaming": false, - "EVGA GeForce RTX 3070 XC3 Ultra": false, - "EVGA GeForce RTX 3070 XC3 Ultra LHR": false, - "EVGA GeForce RTX 3070Ti FTW3 Ultra": false, - "EVGA GeForce RTX 3070Ti FTW3 Ultra v2": false, - "EVGA GeForce RTX 3070Ti XC3 Gaming": false, - "EVGA GeForce RTX 3070Ti XC3 Ultra": false, - "EVGA GeForce RTX 3070Ti XC3 Ultra v2": false, - "EVGA GeForce RTX 3080 FTW3 Gaming": false, - "EVGA GeForce RTX 3080 FTW3 Ultra": false, - "EVGA GeForce RTX 3080 FTW3 Ultra 12GB": false, - "EVGA GeForce RTX 3080 FTW3 Ultra Hybrid": false, - "EVGA GeForce RTX 3080 FTW3 Ultra Hybrid Gaming LHR": false, - "EVGA GeForce RTX 3080 FTW3 Ultra Hybrid LHR": false, - "EVGA GeForce RTX 3080 FTW3 Ultra Hydro Copper": false, - "EVGA GeForce RTX 3080 FTW3 Ultra Hydro Copper 12G": false, - "EVGA GeForce RTX 3080 FTW3 Ultra LHR": false, - "EVGA GeForce RTX 3080 FTW3 Ultra v2 LHR": false, - "EVGA GeForce RTX 3080 XC3 Black": false, - "EVGA GeForce RTX 3080 XC3 Black LHR": false, - "EVGA GeForce RTX 3080 XC3 Gaming": false, - "EVGA GeForce RTX 3080 XC3 Gaming LHR": false, - "EVGA GeForce RTX 3080 XC3 Ultra": false, - "EVGA GeForce RTX 3080 XC3 Ultra Hybrid": false, - "EVGA GeForce RTX 3080 XC3 Ultra Hybrid LHR": false, - "EVGA GeForce RTX 3080 XC3 Ultra Hydro Copper": false, - "EVGA GeForce RTX 3080 XC3 Ultra LHR": false, - "EVGA GeForce RTX 3080Ti FTW3 Ultra": false, - "EVGA GeForce RTX 3080Ti FTW3 Ultra Hybrid": false, - "EVGA GeForce RTX 3080Ti FTW3 Ultra Hydro Copper": false, - "EVGA GeForce RTX 3080Ti XC3 Gaming": false, - "EVGA GeForce RTX 3080Ti XC3 Gaming Hybrid": false, - "EVGA GeForce RTX 3080Ti XC3 Gaming Hydro Copper": false, - "EVGA GeForce RTX 3080Ti XC3 Ultra Gaming": false, - "EVGA GeForce RTX 3090 FTW3 Ultra": false, - "EVGA GeForce RTX 3090 FTW3 Ultra Hybrid": false, - "EVGA GeForce RTX 3090 FTW3 Ultra Hydro Copper": false, - "EVGA GeForce RTX 3090 FTW3 Ultra v2": false, - "EVGA GeForce RTX 3090 FTW3 Ultra v3": false, - "EVGA GeForce RTX 3090 K|NGP|N Hybrid": false, - "EVGA GeForce RTX 3090 K|NGP|N Hydro Copper": false, - "EVGA GeForce RTX 3090 XC3 Black": false, - "EVGA GeForce RTX 3090 XC3 Gaming": false, - "EVGA GeForce RTX 3090 XC3 Ultra": false, - "EVGA GeForce RTX 3090 XC3 Ultra Hybrid": false, - "EVGA GeForce RTX 3090 XC3 Ultra Hydro Copper": false, - "EVGA GeForce RTX 3090Ti FTW3 Gaming": false, - "EVGA GeForce RTX 3090Ti FTW3 Ultra Gaming": false, - "EVGA Pascal GPU": false, - "EVGA X20 Gaming Mouse": false, - "EVGA X20 USB Receiver": false, - "EVGA Z15 Keyboard": false, - "EVGA Z20 Keyboard": false, - "EVision Keyboard 0C45:5004": false, - "EVision Keyboard 0C45:5104": false, - "EVision Keyboard 0C45:5204": false, - "EVision Keyboard 0C45:652F": false, - "EVision Keyboard 0C45:7698": false, - "EVision Keyboard 0C45:8520": false, - "EVision Keyboard 320F:502A": false, - "ElgatoKeyLight": false, - "Espurna": false, - "Everest GT-100 RGB": false, - "FL ESPORTS F11": false, - "FanBus": false, - "Faustus": false, - "GALAX RTX 2070 Super EX Gamer Black": false, - "GaiZhongGai 17 PRO": false, - "GaiZhongGai 17+4+Touch PRO": false, - "GaiZhongGai 20 PRO": false, - "GaiZhongGai 68+4 PRO": false, - "Gainward GPU": false, - "Gainward GTX 1080 Phoenix": false, - "Gainward GTX 1080 Ti Phoenix": false, - "Gainward RTX 2070 Super Phantom": false, - "Gainward RTX 2080 Phoenix GS": false, - "Gainward RTX 3070 Phoenix": false, - "Gainward RTX 3080 Ti Phoenix": false, - "Galax GPU": false, - "Genesis Thor 300": false, - "Gigabyte AORUS RTX2060 SUPER 8G V1": false, - "Gigabyte AORUS RTX2070 SUPER 8G": false, - "Gigabyte AORUS RTX2070 XTREME 8G": false, - "Gigabyte AORUS RTX2080 8G": false, - "Gigabyte AORUS RTX2080 SUPER 8G": false, - "Gigabyte AORUS RTX2080 SUPER 8G Rev 1.0": false, - "Gigabyte AORUS RTX2080 SUPER Waterforce WB 8G": false, - "Gigabyte AORUS RTX2080 Ti XTREME 11G": false, - "Gigabyte AORUS RTX2080 XTREME 8G": false, - "Gigabyte AORUS RTX3060 ELITE 12G": false, - "Gigabyte AORUS RTX3060 Ti ELITE 8G LHR": false, - "Gigabyte AORUS RTX3070 Ti MASTER 8G": false, - "Gigabyte AORUS RTX3080 Ti XTREME WATERFORCE 12G": false, - "Gigabyte AORUS RTX3080 XTREME WATERFORCE 10G Rev 2.0": false, - "Gigabyte AORUS RTX3080 XTREME WATERFORCE WB 10G": false, - "Gigabyte AORUS RTX3090 XTREME WATERFORCE 24G": false, - "Gigabyte AORUS RTX3090 XTREME WATERFORCE WB 24G": false, - "Gigabyte GTX1050 Ti G1 Gaming": false, - "Gigabyte GTX1050 Ti G1 Gaming (rev A1)": false, - "Gigabyte GTX1060 G1 Gaming 6G": false, - "Gigabyte GTX1060 G1 Gaming 6G OC": false, - "Gigabyte GTX1060 Xtreme Gaming V1": false, - "Gigabyte GTX1060 Xtreme Gaming v2": false, - "Gigabyte GTX1070 G1 Gaming 8G V1": false, - "Gigabyte GTX1070 Ti 8G Gaming": false, - "Gigabyte GTX1070 Xtreme Gaming": false, - "Gigabyte GTX1080 G1 Gaming": false, - "Gigabyte GTX1080 Ti 11G": false, - "Gigabyte GTX1080 Ti Gaming OC 11G": false, - "Gigabyte GTX1080 Ti Gaming OC BLACK 11G": false, - "Gigabyte GTX1080 Ti Xtreme Edition": false, - "Gigabyte GTX1080 Ti Xtreme Waterforce Edition": false, - "Gigabyte GTX1650 Gaming OC": false, - "Gigabyte GTX1660 Gaming OC 6G": false, - "Gigabyte GTX1660 SUPER Gaming OC": false, - "Gigabyte RGB": false, - "Gigabyte RGB Fusion": false, - "Gigabyte RGB Fusion 2 DRAM": false, - "Gigabyte RGB Fusion 2 SMBus": false, - "Gigabyte RGB Fusion 2 USB": false, - "Gigabyte RGB Fusion GPU": false, - "Gigabyte RGB Fusion2 GPU": false, - "Gigabyte RTX2060 Gaming OC": false, - "Gigabyte RTX2060 Gaming OC PRO": false, - "Gigabyte RTX2060 Gaming OC PRO V2": false, - "Gigabyte RTX2060 Gaming OC PRO White": false, - "Gigabyte RTX2060 SUPER Gaming": false, - "Gigabyte RTX2060 SUPER Gaming OC": false, - "Gigabyte RTX2060 SUPER Gaming OC 3X 8G V2": false, - "Gigabyte RTX2060 SUPER Gaming OC 3X White 8G": false, - "Gigabyte RTX2070 Gaming OC 8G": false, - "Gigabyte RTX2070 Windforce 8G": false, - "Gigabyte RTX2070S Gaming OC": false, - "Gigabyte RTX2070S Gaming OC 3X": false, - "Gigabyte RTX2070S Gaming OC 3X White": false, - "Gigabyte RTX2080 Gaming OC 8G": false, - "Gigabyte RTX2080 Ti GAMING OC 11G": false, - "Gigabyte RTX2080S Gaming OC 8G": false, - "Gigabyte RTX3050 Gaming OC 8G": false, - "Gigabyte RTX3060 EAGLE 12G LHR V2": false, - "Gigabyte RTX3060 EAGLE OC 12G": false, - "Gigabyte RTX3060 EAGLE OC 12G V2": false, - "Gigabyte RTX3060 Gaming OC 12G": false, - "Gigabyte RTX3060 Gaming OC 12G (rev. 2.0)": false, - "Gigabyte RTX3060 Ti EAGLE OC 8G": false, - "Gigabyte RTX3060 Ti EAGLE OC 8G V2.0 LHR": false, - "Gigabyte RTX3060 Ti GAMING OC LHR 8G": false, - "Gigabyte RTX3060 Ti GAMING OC PRO 8G": false, - "Gigabyte RTX3060 Ti Gaming OC PRO 8G LHR": false, - "Gigabyte RTX3060 Ti Vision OC 8G": false, - "Gigabyte RTX3060 Vision OC 12G": false, - "Gigabyte RTX3060 Vision OC 12G LHR": false, - "Gigabyte RTX3060 Vision OC 12G v3.0": false, - "Gigabyte RTX3070 Eagle OC 8G": false, - "Gigabyte RTX3070 Gaming OC 8G": false, - "Gigabyte RTX3070 Gaming OC 8G v3.0 LHR": false, - "Gigabyte RTX3070 MASTER 8G": false, - "Gigabyte RTX3070 MASTER 8G LHR": false, - "Gigabyte RTX3070 Ti EAGLE 8G": false, - "Gigabyte RTX3070 Ti Gaming OC 8G": false, - "Gigabyte RTX3070 Ti Vision OC 8G": false, - "Gigabyte RTX3070 Vision 8G": false, - "Gigabyte RTX3070 Vision 8G V2.0 LHR": false, - "Gigabyte RTX3080 Gaming OC 10G": false, - "Gigabyte RTX3080 Gaming OC 12G": false, - "Gigabyte RTX3080 Ti EAGLE 12G": false, - "Gigabyte RTX3080 Ti Gaming OC 12G": false, - "Gigabyte RTX3080 Ti Vision OC 12G": false, - "Gigabyte RTX3080 Vision OC 10G": false, - "Gigabyte RTX3080 Vision OC 10G (REV 2.0)": false, - "Gigabyte RTX3090 Gaming OC 24G": false, - "Glorious Model D / D-": false, - "Glorious Model D / D- Wireless": false, - "Glorious Model O / O-": false, - "Glorious Model O / O- Wireless": false, - "HP Omen 30L": false, - "Holtek Mousemat": false, - "Holtek USB Gaming Mouse": false, - "HyperX Alloy Elite 2": false, - "HyperX Alloy Elite 2 (HP)": false, - "HyperX Alloy Elite RGB": false, - "HyperX Alloy FPS RGB": false, - "HyperX Alloy Origins": false, - "HyperX Alloy Origins 60": false, - "HyperX Alloy Origins Core": false, - "HyperX DRAM": false, - "HyperX Fury Ultra": false, - "HyperX Pulsefire Core": false, - "HyperX Pulsefire Dart (Wired)": false, - "HyperX Pulsefire Dart (Wireless)": false, - "HyperX Pulsefire FPS Pro": false, - "HyperX Pulsefire Haste": false, - "HyperX Pulsefire Mat": false, - "HyperX Pulsefire Raid": false, - "HyperX Pulsefire Surge": false, - "Intel Arc A770 Limited Edition": false, - "KFA2 RTX 2070 EX": false, - "KFA2 RTX 2080 EX OC": false, - "KFA2 RTX 2080 Super EX OC": false, - "KFA2 RTX 2080 TI EX OC": false, - "Keychron Gaming Keyboard 1": false, - "LED Strip": false, - "LIFX": false, - "Lenovo Legion 7 gen 5": false, - "Lenovo Legion 7 gen 6": false, - "Lenovo Legion 7S gen 5": false, - "Lenovo Legion 7S gen 6": false, - "Lenovo Legion Y740": false, - "Lian Li O11 Dynamic - Razer Edition": false, - "Lian Li Uni Hub": false, - "Lian Li Uni Hub - AL": false, - "Linux LED": false, - "Logitech G Pro (HERO) Gaming Mouse": false, - "Logitech G Pro Gaming Mouse": false, - "Logitech G Pro RGB Mechanical Gaming Keyboard": false, - "Logitech G Pro Wireless Gaming Mouse": false, - "Logitech G Pro Wireless Gaming Mouse (wired)": false, - "Logitech G203 Lightsync": false, - "Logitech G203 Prodigy": false, - "Logitech G213": false, - "Logitech G303 Daedalus Apex": false, - "Logitech G403 Hero": false, - "Logitech G403 Prodigy Gaming Mouse": false, - "Logitech G403 Wireless Gaming Mouse": false, - "Logitech G403 Wireless Gaming Mouse (wired)": false, - "Logitech G502 Hero Gaming Mouse": false, - "Logitech G502 Proteus Spectrum Gaming Mouse": false, - "Logitech G502 Wireless Gaming Mouse": false, - "Logitech G502 Wireless Gaming Mouse (wired)": false, - "Logitech G512": false, - "Logitech G512 RGB": false, - "Logitech G560 Lightsync Speaker": false, - "Logitech G610 Orion": false, - "Logitech G703 Hero Wireless Gaming Mouse": false, - "Logitech G703 Hero Wireless Gaming Mouse (wired)": false, - "Logitech G703 Wireless Gaming Mouse": false, - "Logitech G703 Wireless Gaming Mouse (wired)": false, - "Logitech G733 Gaming Headset": false, - "Logitech G810 Orion Spectrum": false, - "Logitech G813 RGB Mechanical Gaming Keyboard": false, - "Logitech G815 RGB Mechanical Gaming Keyboard": false, - "Logitech G900 Wireless Gaming Mouse": false, - "Logitech G900 Wireless Gaming Mouse (wired)": false, - "Logitech G903 Hero Wireless Gaming Mouse": false, - "Logitech G903 Hero Wireless Gaming Mouse (wired)": false, - "Logitech G903 Wireless Gaming Mouse": false, - "Logitech G903 Wireless Gaming Mouse (wired)": false, - "Logitech G910 Orion Spark": false, - "Logitech G910 Orion Spectrum": false, - "Logitech G915 Wireless RGB Mechanical Gaming Keyboard": false, - "Logitech G915 Wireless RGB Mechanical Gaming Keyboard (Wired)": false, - "Logitech G915TKL Wireless RGB Mechanical Gaming Keyboard": false, - "Logitech G915TKL Wireless RGB Mechanical Gaming Keyboard (Wired)": false, - "Logitech G933 Lightsync Headset": false, - "Logitech G935 Gaming Headset": false, - "Logitech Powerplay Mat": false, - "Logitech X56 Rhino Hotas Joystick": false, - "Logitech X56 Rhino Hotas Throttle": false, - "MSI 3-Zone Laptop": false, - "MSI GPU": false, - "MSI GeForce GTX 1070 Gaming X": false, - "MSI GeForce GTX 1660 Gaming X 6G": false, - "MSI GeForce GTX 1660 Super Gaming 6G": false, - "MSI GeForce GTX 1660 Super Gaming X 6G": false, - "MSI GeForce GTX 1660Ti Gaming 6G": false, - "MSI GeForce GTX 1660Ti Gaming X 6G": false, - "MSI GeForce RTX 2060 Gaming Z 6G": false, - "MSI GeForce RTX 2060 Super ARMOR OC": false, - "MSI GeForce RTX 2060 Super Gaming X": false, - "MSI GeForce RTX 2070 ARMOR": false, - "MSI GeForce RTX 2070 ARMOR OC": false, - "MSI GeForce RTX 2070 Gaming": false, - "MSI GeForce RTX 2070 Gaming Z": false, - "MSI GeForce RTX 2070 SUPER ARMOR OC": false, - "MSI GeForce RTX 2070 Super Gaming": false, - "MSI GeForce RTX 2070 Super Gaming Trio": false, - "MSI GeForce RTX 2070 Super Gaming X": false, - "MSI GeForce RTX 2070 Super Gaming X Trio": false, - "MSI GeForce RTX 2070 Super Gaming Z Trio": false, - "MSI GeForce RTX 2080 Duke 8G OC": false, - "MSI GeForce RTX 2080 Gaming Trio": false, - "MSI GeForce RTX 2080 Gaming X Trio": false, - "MSI GeForce RTX 2080 Sea Hawk EK X": false, - "MSI GeForce RTX 2080 Super Gaming X Trio": false, - "MSI GeForce RTX 2080Ti 11G Gaming X Trio": false, - "MSI GeForce RTX 2080Ti Gaming X Trio": false, - "MSI GeForce RTX 2080Ti Gaming Z Trio": false, - "MSI GeForce RTX 2080Ti Sea Hawk EK X": false, - "MSI GeForce RTX 3060 12G Gaming X Trio LHR": false, - "MSI GeForce RTX 3060 12GB Gaming X Trio": false, - "MSI GeForce RTX 3060 Gaming X 12G": false, - "MSI GeForce RTX 3060 Gaming X 12G (GA104)": false, - "MSI GeForce RTX 3060 Gaming X 12G LHR": false, - "MSI GeForce RTX 3060 Ti 8GB Gaming X LHR": false, - "MSI GeForce RTX 3060 Ti 8GB Gaming X Trio": false, - "MSI GeForce RTX 3060 Ti 8GB Gaming X Trio LHR": false, - "MSI GeForce RTX 3070 8GB Gaming Trio": false, - "MSI GeForce RTX 3070 8GB Gaming X Trio": false, - "MSI GeForce RTX 3070 8GB Suprim X": false, - "MSI GeForce RTX 3070 8GB Suprim X LHR": false, - "MSI GeForce RTX 3070 Ti 8GB Gaming X Trio": false, - "MSI GeForce RTX 3070 Ti Suprim X 8G": false, - "MSI GeForce RTX 3080 10GB Gaming X Trio": false, - "MSI GeForce RTX 3080 10GB Gaming Z Trio": false, - "MSI GeForce RTX 3080 10GB Gaming Z Trio LHR": false, - "MSI GeForce RTX 3080 12GB Gaming Z Trio LHR": false, - "MSI GeForce RTX 3080 Suprim X 10G": false, - "MSI GeForce RTX 3080 Suprim X 10G LHR": false, - "MSI GeForce RTX 3080 Suprim X 12G LHR": false, - "MSI GeForce RTX 3080 Ti Gaming X Trio 12G": false, - "MSI GeForce RTX 3080 Ti Suprim X 12G": false, - "MSI GeForce RTX 3090 24GB Gaming X Trio": false, - "MSI GeForce RTX 3090 Suprim X 24G": false, - "MSI GeForce RTX 3090 Ti Gaming X Trio 24G": false, - "MSI GeForce RTX 3090 Ti Suprim X 24G": false, - "MSI Mystic Light MS_1562": false, - "MSI Mystic Light MS_1563": false, - "MSI Mystic Light MS_1564": false, - "MSI Mystic Light MS_1720": false, - "MSI Mystic Light MS_7B12": false, - "MSI Mystic Light MS_7B16": false, - "MSI Mystic Light MS_7B17": false, - "MSI Mystic Light MS_7B18": false, - "MSI Mystic Light MS_7B50": false, - "MSI Mystic Light MS_7B85": false, - "MSI Mystic Light MS_7B93": false, - "MSI Mystic Light MS_7C34": false, - "MSI Mystic Light MS_7C35": false, - "MSI Mystic Light MS_7C36": false, - "MSI Mystic Light MS_7C37": false, - "MSI Mystic Light MS_7C56": false, - "MSI Mystic Light MS_7C59": false, - "MSI Mystic Light MS_7C60": false, - "MSI Mystic Light MS_7C67": false, - "MSI Mystic Light MS_7C71": false, - "MSI Mystic Light MS_7C73": false, - "MSI Mystic Light MS_7C75": false, - "MSI Mystic Light MS_7C76": false, - "MSI Mystic Light MS_7C77": false, - "MSI Mystic Light MS_7C79": false, - "MSI Mystic Light MS_7C80": false, - "MSI Mystic Light MS_7C81": false, - "MSI Mystic Light MS_7C83": false, - "MSI Mystic Light MS_7C84": false, - "MSI Mystic Light MS_7C86": false, - "MSI Mystic Light MS_7C90": false, - "MSI Mystic Light MS_7C91": false, - "MSI Mystic Light MS_7C92": false, - "MSI Mystic Light MS_7C94": false, - "MSI Mystic Light MS_7C95": false, - "MSI Mystic Light MS_7C98": false, - "MSI Mystic Light MS_7D06": false, - "MSI Mystic Light MS_7D07": false, - "MSI Mystic Light MS_7D08": false, - "MSI Mystic Light MS_7D09": false, - "MSI Mystic Light MS_7D13": false, - "MSI Mystic Light MS_7D15": false, - "MSI Mystic Light MS_7D17": false, - "MSI Mystic Light MS_7D18": false, - "MSI Mystic Light MS_7D19": false, - "MSI Mystic Light MS_7D20": false, - "MSI Mystic Light MS_7D25": false, - "MSI Mystic Light MS_7D27": false, - "MSI Mystic Light MS_7D28": false, - "MSI Mystic Light MS_7D29": false, - "MSI Mystic Light MS_7D30": false, - "MSI Mystic Light MS_7D31": false, - "MSI Mystic Light MS_7D32": false, - "MSI Mystic Light MS_7D36": false, - "MSI Mystic Light MS_7D38": false, - "MSI Mystic Light MS_7D41": false, - "MSI Mystic Light MS_7D42": false, - "MSI Mystic Light MS_7D43": false, - "MSI Mystic Light MS_7D50": false, - "MSI Mystic Light MS_7D51": false, - "MSI Mystic Light MS_7D52": false, - "MSI Mystic Light MS_7D53": false, - "MSI Mystic Light MS_7D54": false, - "MSI Mystic Light MS_7D59": false, - "MSI Mystic Light MS_7D69": false, - "MSI Mystic Light MS_7D77": false, - "MSI Mystic Light MS_7D91": false, - "MSI Mystic Light MS_7E06": false, - "MSI Optix controller": false, - "MSI Radeon RX 6600 XT Gaming X": false, - "MSI Radeon RX 6700 XT Gaming X": false, - "MSI Radeon RX 6800 Gaming X Trio": false, - "MSI Radeon RX 6800 XT Gaming X Trio": false, - "MSI Radeon RX 6800 XT Gaming Z Trio": false, - "MSI Radeon RX 6900 XT Gaming X Trio": false, - "MSI Radeon RX 6900 XT Gaming Z Trio": false, - "MSI Radeon RX 6950 XT Gaming X Trio": false, - "MSI Vigor GK30 controller": false, - "MSI-RGB": false, - "N5312A USB Optical Mouse": false, - "NVIDIA RTX2060S": false, - "NVIDIA RTX2080S": false, - "NZXT Hue 2": false, - "NZXT Hue 2 Ambient": false, - "NZXT Hue 2 Motherboard": false, - "NZXT Hue+": false, - "NZXT Kraken M2": false, - "NZXT Kraken X2": false, - "NZXT Kraken X3": false, - "NZXT RGB & Fan Controller": false, - "NZXT Smart Device V2": false, - "Nanoleaf": false, - "Np93 ALPHA - Gaming Mouse": false, - "Nvidia ESA - Dell XPS 730x": false, - "OpenRazer": false, - "PNY GPU": false, - "PNY XLR8 OC EDITION RTX 2060": false, - "PNY XLR8 Revel EPIC-X RTX 3080": false, - "PNY XLR8 Revel EPIC-X RTX 3090": false, - "Palit 3060": false, - "Palit 3060 LHR": false, - "Palit 3060TI LHR": false, - "Palit 3060Ti": false, - "Palit 3070": false, - "Palit 3070 LHR": false, - "Palit 3070Ti": false, - "Palit 3070Ti GamingPro": false, - "Palit 3080": false, - "Palit 3080 LHR": false, - "Palit 3080Ti": false, - "Palit 3080Ti Gamerock": false, - "Palit 3090": false, - "Palit GeForce RTX 3060 Ti Dual": false, - "Patriot Viper": false, - "Patriot Viper Steel": false, - "Philips Hue": false, - "Philips Wiz": false, - "Razer Abyssus Elite D.Va Edition": false, - "Razer Abyssus Essential": false, - "Razer Base Station Chroma": false, - "Razer Base Station V2 Chroma": false, - "Razer Basilisk": false, - "Razer Basilisk Essential": false, - "Razer Basilisk Ultimate (Wired)": false, - "Razer Basilisk Ultimate (Wireless)": false, - "Razer Basilisk V2": false, - "Razer Basilisk V3": false, - "Razer Blackwidow 2019": false, - "Razer Blackwidow Chroma": false, - "Razer Blackwidow Chroma Tournament Edition": false, - "Razer Blackwidow Chroma V2": false, - "Razer Blackwidow Elite": false, - "Razer Blackwidow Overwatch": false, - "Razer Blackwidow V3": false, - "Razer Blackwidow V3 Mini (Wired)": false, - "Razer Blackwidow V3 Mini (Wireless)": false, - "Razer Blackwidow V3 Pro (Wired)": false, - "Razer Blackwidow V3 Pro (Wireless)": false, - "Razer Blackwidow V3 TKL": false, - "Razer Blackwidow X Chroma": false, - "Razer Blackwidow X Chroma Tournament Edition": false, - "Razer Blade (2016)": false, - "Razer Blade (Late 2016)": false, - "Razer Blade 14 (2021)": false, - "Razer Blade 15 (2018 Advanced)": false, - "Razer Blade 15 (2018 Base)": false, - "Razer Blade 15 (2018 Mercury)": false, - "Razer Blade 15 (2019 Advanced)": false, - "Razer Blade 15 (2019 Base)": false, - "Razer Blade 15 (2019 Mercury)": false, - "Razer Blade 15 (2019 Studio)": false, - "Razer Blade 15 (2020 Advanced)": false, - "Razer Blade 15 (2020 Base)": false, - "Razer Blade 15 (2021 Advanced)": false, - "Razer Blade 15 (2021 Base)": false, - "Razer Blade 15 (Late 2020)": false, - "Razer Blade Pro (2016)": false, - "Razer Blade Pro (2017 FullHD)": false, - "Razer Blade Pro (2017)": false, - "Razer Blade Pro (2019)": false, - "Razer Blade Pro (Late 2019)": false, - "Razer Blade Pro 17 (2020)": false, - "Razer Blade Pro 17 (2021)": false, - "Razer Blade Stealth (2016)": false, - "Razer Blade Stealth (2017)": false, - "Razer Blade Stealth (2019)": false, - "Razer Blade Stealth (2020)": false, - "Razer Blade Stealth (Late 2016)": false, - "Razer Blade Stealth (Late 2017)": false, - "Razer Blade Stealth (Late 2019)": false, - "Razer Blade Stealth (Late 2020)": false, - "Razer Book 13 (2020)": false, - "Razer Charging Pad Chroma": false, - "Razer Chroma Addressable RGB Controller": false, - "Razer Chroma HDK": false, - "Razer Chroma Mug Holder": false, - "Razer Chroma PC Case Lighting Kit": false, - "Razer Core": false, - "Razer Core X": false, - "Razer Cynosa Chroma": false, - "Razer Cynosa Chroma V2": false, - "Razer Cynosa Lite": false, - "Razer Deathadder Chroma": false, - "Razer Deathadder Elite": false, - "Razer Deathadder Essential": false, - "Razer Deathadder Essential V2": false, - "Razer Deathadder Essential White Edition": false, - "Razer Deathadder V2": false, - "Razer Deathadder V2 Mini": false, - "Razer Deathadder V2 Pro (Wired)": false, - "Razer Deathadder V2 Pro (Wireless)": false, - "Razer Deathstalker Chroma": false, - "Razer Diamondback": false, - "Razer Firefly": false, - "Razer Firefly Hyperflux": false, - "Razer Firefly V2": false, - "Razer Goliathus": false, - "Razer Goliathus Extended": false, - "Razer Huntsman": false, - "Razer Huntsman Elite": false, - "Razer Huntsman Mini": false, - "Razer Huntsman Tournament Edition": false, - "Razer Huntsman V2": false, - "Razer Huntsman V2 Analog": false, - "Razer Huntsman V2 TKL": false, - "Razer Kraken 7.1": false, - "Razer Kraken 7.1 Chroma": false, - "Razer Kraken 7.1 V2": false, - "Razer Kraken Kitty Black Edition": false, - "Razer Kraken Kitty Edition": false, - "Razer Kraken Ultimate": false, - "Razer Lancehead 2017 (Wired)": false, - "Razer Lancehead 2017 (Wireless)": false, - "Razer Lancehead 2019 (Wired)": false, - "Razer Lancehead 2019 (Wireless)": false, - "Razer Lancehead Tournament Edition": false, - "Razer Laptop Stand Chroma": false, - "Razer Laptop Stand Chroma V2": false, - "Razer Mamba 2012 (Wired)": false, - "Razer Mamba 2012 (Wireless)": false, - "Razer Mamba 2015 (Wired)": false, - "Razer Mamba 2015 (Wireless)": false, - "Razer Mamba 2018 (Wired)": false, - "Razer Mamba 2018 (Wireless)": false, - "Razer Mamba Elite": false, - "Razer Mamba Tournament Edition": false, - "Razer Mouse Bungee V3 Chroma": false, - "Razer Mouse Dock Chroma": false, - "Razer Naga Chroma": false, - "Razer Naga Classic": false, - "Razer Naga Epic Chroma": false, - "Razer Naga Hex V2": false, - "Razer Naga Left Handed": false, - "Razer Naga Pro (Wired)": false, - "Razer Naga Pro (Wireless)": false, - "Razer Naga Trinity": false, - "Razer Nommo Chroma": false, - "Razer Nommo Pro": false, - "Razer Orbweaver Chroma": false, - "Razer Ornata Chroma": false, - "Razer Ornata Chroma V2": false, - "Razer Ornata V3": false, - "Razer Seiren Emote": false, - "Razer Strider Chroma": false, - "Razer Tartarus Chroma": false, - "Razer Tartarus Pro": false, - "Razer Tartarus V2": false, - "Razer Tiamat 7.1 V2": false, - "Razer Viper": false, - "Razer Viper 8kHz": false, - "Razer Viper Mini": false, - "Razer Viper Ultimate (Wired)": false, - "Razer Viper Ultimate (Wireless)": false, - "Red Square Keyrox TKL": false, - "Redragon M602 Griffin": false, - "Redragon M711 Cobra": false, - "Redragon M715 Dagger": false, - "Redragon M716 Inquisitor": false, - "Redragon M908 Impact": false, - "Roccat Burst Core": false, - "Roccat Burst Pro": false, - "Roccat Horde Aimo": false, - "Roccat Kone Aimo": false, - "Roccat Kone Aimo 16K": false, - "Roccat Vulcan 120 Aimo": false, - "Roccat Vulcan 120-Series Aimo": false, - "SRGBmods Pico LED Controller": false, - "Sapphire GPU": false, - "Sapphire RX 470/480 Nitro+": false, - "Sapphire RX 5500 XT Nitro+": false, - "Sapphire RX 570/580/590 Nitro+": false, - "Sapphire RX 5700 (XT) Nitro+": false, - "Sapphire RX 5700 XT Nitro+": false, - "Sapphire RX 580 Nitro+ (2048SP)": false, - "Sapphire RX 6600 XT Nitro+": false, - "Sapphire RX 6700 XT Nitro+": false, - "Sapphire RX 6800 Nitro+": false, - "Sapphire RX 6800 XT Nitro+ SE": false, - "Sapphire RX 6800 XT/6900 XT Nitro+": false, - "Sapphire RX 6900 XT Nitro+ SE": false, - "Sapphire RX 6900 XT Toxic": false, - "Sapphire RX 6900 XT Toxic Limited Edition": false, - "Sapphire RX 6950 XT Nitro+": false, - "Sapphire RX Vega 56/64 Nitro+": false, - "Sinowealth Keyboard": false, - "Sony DualSense": false, - "Sony DualShock 4": false, - "SteelSeries Aerox 3 Wired": false, - "SteelSeries Aerox 9 Wired": false, - "SteelSeries Apex (OG)/Apex Fnatic": false, - "SteelSeries Apex 3": false, - "SteelSeries Apex 3 TKL": false, - "SteelSeries Apex 350": false, - "SteelSeries Apex 5": false, - "SteelSeries Apex 7": false, - "SteelSeries Apex 7 TKL": false, - "SteelSeries Apex M750": false, - "SteelSeries Apex Pro": false, - "SteelSeries Apex Pro TKL": false, - "SteelSeries Arctis 5": false, - "SteelSeries QCK Prism Cloth 3XL": false, - "SteelSeries QCK Prism Cloth 4XL": false, - "SteelSeries QCK Prism Cloth Medium": false, - "SteelSeries QCK Prism Cloth XL": false, - "SteelSeries QCK Prism Cloth XL CS:GO Neon Rider Ed.": false, - "SteelSeries QCK Prism Cloth XL Destiny Ed.": false, - "SteelSeries Rival 100": false, - "SteelSeries Rival 100 DotA 2 Edition": false, - "SteelSeries Rival 105": false, - "SteelSeries Rival 106": false, - "SteelSeries Rival 110": false, - "SteelSeries Rival 3": false, - "SteelSeries Rival 3 (Old Firmware)": false, - "SteelSeries Rival 300": false, - "SteelSeries Rival 300 Black Ops Edition": false, - "SteelSeries Rival 300 CS:GO Fade Edition": false, - "SteelSeries Rival 300 CS:GO Fade Edition (stm32)": false, - "SteelSeries Rival 300 CS:GO Hyperbeast Edition": false, - "SteelSeries Rival 300 Dota 2 Edition": false, - "SteelSeries Rival 300 HP Omen Edition": false, - "SteelSeries Rival 310": false, - "SteelSeries Rival 310 CS:GO Howl Edition": false, - "SteelSeries Rival 310 PUBG Edition": false, - "SteelSeries Rival 600": false, - "SteelSeries Rival 600 Dota 2 Edition": false, - "SteelSeries Rival 650": false, - "SteelSeries Rival 650 Wireless": false, - "SteelSeries Rival 700": false, - "SteelSeries Rival 710": false, - "SteelSeries Sensei 310": false, - "SteelSeries Sensei TEN": false, - "SteelSeries Sensei TEN CS:GO Neon Rider Edition": false, - "SteelSeries Siberia 350": false, - "Strimer L Connect": false, - "Tecknet M008": false, - "Thermaltake Poseidon Z RGB": false, - "Thermaltake Riing (PID 0x1FA5)": false, - "Thermaltake Riing (PID 0x1FA6)": false, - "Thermaltake Riing (PID 0x1FA7)": false, - "Thermaltake Riing (PID 0x1FA8)": false, - "Thermaltake Riing (PID 0x1FA9)": false, - "Thermaltake Riing (PID 0x1FAA)": false, - "Thermaltake Riing (PID 0x1FAB)": false, - "Thermaltake Riing (PID 0x1FAC)": false, - "Thermaltake Riing (PID 0x1FAD)": false, - "Thermaltake Riing (PID 0x1FAE)": false, - "Thermaltake Riing (PID 0x1FAF)": false, - "Thermaltake Riing (PID 0x1FB0)": false, - "Thermaltake Riing (PID 0x1FB1)": false, - "Thermaltake Riing (PID 0x1FB2)": false, - "Thermaltake Riing (PID 0x1FB3)": false, - "Thermaltake Riing (PID 0x1FB4)": false, - "Thermaltake Riing (PID 0x1FB5)": false, - "Thermaltake Riing Quad (PID 0x2260)": false, - "Thermaltake Riing Quad (PID 0x2261)": false, - "Thermaltake Riing Quad (PID 0x2262)": false, - "Thermaltake Riing Quad (PID 0x2263)": false, - "Thermaltake Riing Quad (PID 0x2264)": false, - "Thermaltake Riing Quad (PID 0x2265)": false, - "Thermaltake Riing Quad (PID 0x2266)": false, - "Thermaltake Riing Quad (PID 0x2267)": false, - "Thermaltake Riing Quad (PID 0x2268)": false, - "Thermaltake Riing Quad (PID 0x2269)": false, - "Thermaltake Riing Quad (PID 0x226A)": false, - "Thermaltake Riing Quad (PID 0x226B)": false, - "Thermaltake Riing Quad (PID 0x226C)": false, - "Thermaltake Riing Quad (PID 0x226D)": false, - "Thermaltake Riing Quad (PID 0x226E)": false, - "Thermaltake Riing Quad (PID 0x226F)": false, - "Thermaltake Riing Quad (PID 0x2270)": false, - "ThingM blink(1) mk2": false, - "Trust GXT 114": false, - "Trust GXT 180": false, - "ViewSonic Monitor XG270QG": false, - "Wooting ONE Keyboard": false, - "Wooting One (Classic)": false, - "Wooting One (Legacy)": false, - "Wooting One (None)": false, - "Wooting One (Xbox)": false, - "Wooting TWO Keyboard": false, - "Wooting TWO Keyboard HE": false, - "Wooting TWO Keyboard LE": false, - "Wooting Two (Classic)": false, - "Wooting Two (Legacy)": false, - "Wooting Two (None)": false, - "Wooting Two (Xbox)": false, - "Wooting Two 60HE (Classic)": false, - "Wooting Two 60HE (None)": false, - "Wooting Two 60HE (Xbox)": false, - "Wooting Two HE (Classic)": false, - "Wooting Two HE (None)": false, - "Wooting Two HE (Xbox)": false, - "Wooting Two LE (Classic)": false, - "Wooting Two LE (None)": false, - "Wooting Two LE (Xbox)": false, - "XPG Spectrix S40G": false, - "Yeelight": false, - "ZET Blade Optical": false, - "ZET Fury Pro": false, - "ZET GAMING Edge Air Elit": false, - "ZET GAMING Edge Air Elit (Wireless)": false, - "ZET GAMING Edge Air Pro": false, - "ZET GAMING Edge Air Pro (Wireless)": false, - "Zalman Z Sync": false, - "iGame GeForce RTX 3060 Ultra W OC 12G L-V": false, - "iGame GeForce RTX 3070 Advanced OC-V": false, - "iGame GeForce RTX 3070 Ti Advanced OC-V": false - } - }, - "Gigabyte RGB Fusion 2 SMBus": { - "SupportedDevices": [ - "B450 AORUS ELITE", - "B450 AORUS ELITE V2", - "B450 AORUS M", - "B450 AORUS PRO WIFI-CF", - "B450 AORUS PRO-CF", - "B450 AORUS PRO-CF4", - "B450 I AORUS PRO WIFI-CF", - "B450M DS3H-CF", - "X399 AORUS XTREME-CF", - "X399 DESIGNARE EX-CF", - "X470 AORUS GAMING 5 WIFI", - "X470 AORUS GAMING 7 WIFI-CF", - "X470 AORUS GAMING 7 WIFI-50-CF", - "X470 AORUS ULTRA GAMING", - "X470 AORUS ULTRA GAMING-CF", - "Z370 AORUS Gaming 5-CF" - ] - }, - "Plugins": { - "plugins": [ - { - "description": "Provides a variety of custom effects", - "enabled": true, - "name": "OpenRGB Effects Plugin" - }, - { - "description": "Sync colors with hardware measures", - "enabled": true, - "name": "Hardware Sync" - } - ] - }, - "Theme": { - "theme": "auto" - }, - "UserInterface": { - "exit_profile": { - "profile_name": "Default", - "set_on_exit": true - }, - "geometry": { - "height": 0, - "load_geometry": false, - "save_on_exit": false, - "width": 0, - "x": 0, - "y": 0 - }, - "greyscale_tray_icon": false, - "language": "default", - "minimize_on_close": false - } -} \ No newline at end of file diff --git a/stow/ssh/.ssh/config b/stow/ssh/.ssh/config deleted file mode 100644 index 74bb449..0000000 --- a/stow/ssh/.ssh/config +++ /dev/null @@ -1,38 +0,0 @@ -Host Hugo - User admin - HostName 192.168.0.11 - IdentitiesOnly yes - IdentityFile /run/secrets/Hugo/ssh - -Host HPC - User vsc44995 - HostName login.hpc.ugent.be - IdentitiesOnly yes - IdentityFile /run/secrets/UGent/HPC/ssh - -# Git authentication -Host git.depeuter.dev - User git - HostName git.depeuter.dev - IdentitiesOnly yes - IdentityFile /run/secrets/Hugo/Gitea/ssh - -Host github.com - User git - HostName github.com - IdentitiesOnly yes - IdentityFile /run/secrets/GitHub/ssh - -Host github.ugent.be - User git - HostName github.ugent.be - IdentitiesOnly yes - IdentityFile /run/secrets/UGent/GitHub/ssh - -Host subgit.ugent.be - User git - HostName subgit.ugent.be - IdentitiesOnly yes - IdentityFile /run/secrets/UGent/SubGit/ssh - CanonicalizeHostname yes # Ignore capitalization - diff --git a/stow/sway/.config/sway/autostart.sh b/stow/sway/.config/sway/autostart.sh new file mode 100755 index 0000000..dfea59b --- /dev/null +++ b/stow/sway/.config/sway/autostart.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +# +# ~/.config/sway/autostart.sh +# List of applications to autostart +# + +function execute () { + setsid --fork $SHELL -c "${1}" &> /dev/null +} + +# Idle script +execute "~/.scripts/idle.sh" + +# Gamma and brightness +execute "clight" + +# Notification manager +execute "dunst -verbosity crit" + +# Fix [Slow launch for some GTK apps](https://github.com/swaywm/sway/issues/5732) +dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK + +# Fix JetBrain IDE's showing properly +wmname LG3 + + +sleep 3 +# --- Everything that requires tray to be active --- + +# Nextcloud client +execute "nextcloud --background" + +# Activity watch server & client +execute "aw-qt" + diff --git a/stow/sway/.config/sway/commands b/stow/sway/.config/sway/commands new file mode 100644 index 0000000..4c3c621 --- /dev/null +++ b/stow/sway/.config/sway/commands @@ -0,0 +1,178 @@ +# +# ~/.config/sway/commands +# Keybinds for sway +# + +# Variables +set { + $alt Mod1 + $flag Mod4 + $term alacritty + $notify ~/.scripts/notify.sh +} + +# Focus +bindsym { + $flag+h focus left + $flag+j focus down + $flag+k focus up + $flag+l focus right + + $flag+Left focus left + $flag+Down focus down + $flag+Up focus up + $flag+Right focus right + + $flag+semicolon focus mode_toggle + $flag+p focus parent +} + +# Move windows +bindsym { + $flag+Shift+h move left + $flag+Shift+j move down + $flag+Shift+k move up + $flag+Shift+l move right + + $flag+Shift+Left move left + $flag+Shift+Down move down + $flag+Shift+Up move up + $flag+Shift+Right move right + + $flag+Next move scratchpad + $flag+KP_Next move scratchpad + $flag+Prior scratchpad show + $flag+KP_Prior scratchpad show +} + +# Layouts +bindsym { + $flag+w layout toggle split + $flag+x layout tabbed + $flag+c split h + $flag+v split v + + $flag+f floating enable, border normal 1 + $flag+Shift+f floating disable, border pixel 1 + + $alt+Next border pixel 1 # Show window title + $alt+KP_Next border pixel 1 + $alt+Prior border normal 1 # Hide window title + $alt+KP_Prior border normal 1 + + $flag+s sticky toggle +} + +# Workspaces +set { + $ws1 "1:1" + $ws2 "2:2" + $ws3 "3:3" + $ws4 "4:4" + $ws5 "5:5" + $ws6 "6:6" + $ws7 "7:7" + $ws8 "8:8" + $ws9 "9:9" + $ws10 "10:10" + $ws11 "11:Soc" + $ws12 "12:Ent" +} + +bindsym { + $flag+1 workspace $ws1 + $flag+2 workspace $ws2 + $flag+3 workspace $ws3 + $flag+4 workspace $ws4 + $flag+5 workspace $ws5 + $flag+6 workspace $ws6 + $flag+7 workspace $ws7 + $flag+8 workspace $ws8 + $flag+9 workspace $ws9 + $flag+0 workspace $ws10 + $flag+minus workspace $ws11 + $flag+equal workspace $ws12 + + $flag+Shift+1 move container to workspace $ws1, workspace $ws1 + $flag+Shift+2 move container to workspace $ws2, workspace $ws2 + $flag+Shift+3 move container to workspace $ws3, workspace $ws3 + $flag+Shift+4 move container to workspace $ws4, workspace $ws4 + $flag+Shift+5 move container to workspace $ws5, workspace $ws5 + $flag+Shift+6 move container to workspace $ws6, workspace $ws6 + $flag+Shift+7 move container to workspace $ws7, workspace $ws7 + $flag+Shift+8 move container to workspace $ws8, workspace $ws8 + $flag+Shift+9 move container to workspace $ws9, workspace $ws9 + $flag+Shift+0 move container to workspace $ws10, workspace $ws10 + $flag+Shift+minus move container to workspace $ws11, workspace $ws11 + $flag+Shift+equal move container to workspace $ws12, workspace $ws12 + + $flag+Control+j focus output 'eDP-1' + $flag+Control+h workspace prev_on_output + $flag+Control+l workspace next_on_output + $flag+Control+k focus output 'HDMI-A-1' + + $flag+Control+Down focus output 'eDP-1' + $flag+Control+Left workspace prev_on_output + $flag+Control+Right workspace next_on_output + $flag+Control+Up focus output 'HDMI-A-1' + + $flag+Control+Shift+j \ + move container to output 'eDP-1', focus output 'eDP-1' + $flag+Control+Shift+h \ + move container to workspace prev_on_output, workspace prev_on_output + $flag+Control+Shift+l \ + move container to workspace next_on_output, workspace next_on_output + $flag+Control+Shift+k \ + move container to output 'HDMI-A-1', focus output 'HDMI-A-1' + + $flag+Control+Shift+Down \ + move container to output 'eDP-1', focus output 'eDP-1' + $flag+Control+Shift+Left \ + move container to workspace prev_on_output, workspace prev_on_output + $flag+Control+Shift+Right \ + move container to workspace next_on_output, workspace next_on_output + $flag+Control+Shift+Up \ + move container to output 'HDMI-A-1', focus output 'HDMI-A-1' +} + +# System +bindsym --locked { +# Brightness + XF86MonBrightnessDown exec brightnessctl -e s 5%- && $notify -b + XF86MonBrightnessUp exec brightnessctl -e s +5% && $notify -b + +# Volume control (Pulsemixer is slow!) + XF86AudioRaiseVolume exec pamixer -i 2 --set-limit 100 && $notify -v + XF86AudioLowerVolume exec pamixer -d 2 && $notify -v + XF86AudioMute exec pamixer -t && $notify -v + XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle + +# Media control + F7 exec playerctl play-pause + Shift+XF86AudioLowerVolume exec playerctl previous + Shift+XF86AudioRaiseVolume exec playerctl next +} + +# Special commands +set $fzf ~/.scripts/fzf-jump +bindsym { + # Reload sway + $alt+Shift+r reload + # Dialog to exit sway + $alt+Shift+e exec swaynag -t warning -m 'Do you really want to exit sway?' \ + -B 'Yes, exit sway' 'swaymsg exit' + + $flag+q kill # Kill focused window + $flag+Return exec $term -e bash -c "zellij attach || zellij" # Start a terminal + $flag+Delete exec swaylock # Lockscreen + + # Start application launcher + $alt+space exec $term --title 'FZF-Jump' -e $fzf/launcher.sh + # Window switcher + $alt+Tab exec $term --title 'FZF-Jump' -e $fzf/standalone.sh $fzf/modules/windows.sh $fzf/modules/workspaces.sh + + # File explorer + $flag+e exec $term -e vifm + # Internet explorer + $flag+i exec firefox +} diff --git a/stow/sway/.config/sway/config b/stow/sway/.config/sway/config index 922a75b..14915b2 100644 --- a/stow/sway/.config/sway/config +++ b/stow/sway/.config/sway/config @@ -1,65 +1,54 @@ # -# ~/.config/sway/config +# .config/sway/config +# Personal config for sway +# Requires noto-fonts-cjk # -# Variables -set { - $alt Mod1 - $flag Mod4 - - $left h - $down j - $up k - $right l - - $scrollUp button4 - $scrollDown button5 - - # $term kitty || alacritty || foot - $term foot - $menu j4-dmenu-desktop --dmenu="rofi -dmenu -i" --no-generic --usage-log="/home/tdpeuter/.local/state/dmenu.log" --term=$term - # TODO Find better location and better way to reference this. - $window_switcher /home/tdpeuter/projects/fzf-jump/new.sh - $lock swaylock -f -} - +# Import other config files include { - input-output - keybinds + commands modes style } -# Focus -focus_follows_mouse no -floating_modifier $flag normal - -# Window rules -for_window { - [window_role="About"] floating enable - [window_role="bubble"] floating enable - [window_role="Organizer"] floating enable - [window_role="page-info"] floating enable - [window_role="pop-up"] floating enable - [window_role="Preferences"] floating enable - [window_role="splash"] floating enable - [window_role="task_dialog"] floating enable - [window_role="task_dialog"] floating enable - [window_role="toolbox"] floating enable - [window_role="webconsole"] floating enable - [window_type="dialog"] floating enable - [window_type="menu"] floating enable - - [app_id="qalculate-gtk"] floating enable, border pixel 1 +input type:touchpad { + natural_scroll enabled + scroll_factor 0.6 + middle_emulation enabled + tap enabled } -exec dbus-sway-environment -exec configure-gtk -exec dbus-update-activation-environment --systemd DISPLAY XAUTHORITY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP=sway +seat seat0 hide_cursor when-typing enable -exec wlsunset -l 50.50 -L 4.00 -t 3000 -T 6500 -exec gnome-keyring-daemon --start --components=secrets # Secrets -exec dunst --verbosity crit # Notification manager -exec swayidle -w +# Output +output * { + bg "~/Pictures/wallpapers/bg.*" fill +} + +output 'Dell Inc. DELL P2214H 29C2937M4YTL' { + # Vertical monitor + transform 270 +} + +output 'Samsung Electric Company SAMSUNG 0x00000001' { + # Zoom in because long distance + scale 2 +} + +# Focus +focus_follows_mouse no +floating_modifier Mod4 normal + +# Window rules +for_window [window_role="pop-up"] floating enable +for_window [window_role="task_dialog"] floating enable +for_window [window_role="splash"] floating enable + +for_window [class="Qalculate"] floating enable +for_window [class="Caprine"] floating enable, border normal 2 +for_window [title="^FZF-Jump$"] floating enable, border pixel 0, resize set 600 350 + +for_window [class="^Betterbird$"] move container to workspace "11:Soc" + +exec "~/.config/sway/autostart.sh" -exec nextcloud --background diff --git a/stow/sway/.config/sway/input-output b/stow/sway/.config/sway/input-output deleted file mode 100644 index 9c23892..0000000 --- a/stow/sway/.config/sway/input-output +++ /dev/null @@ -1,20 +0,0 @@ -input type:keyboard { - xkb_layout "us" - xkb_variant "altgr-intl" -} - -input type:touchpad { - natural_scroll enabled - scroll_factor 0.8 - middle_emulation enabled - tap enabled -} - -output * { - bg "${HOME}/.local/state/sisyphus/bg" fill -} - -# Vertical display -output "Dell Inc. DELL P2214H 29C2937M4YTL" { - transform 270 -} diff --git a/stow/sway/.config/sway/keybinds b/stow/sway/.config/sway/keybinds deleted file mode 100644 index 7a75d3f..0000000 --- a/stow/sway/.config/sway/keybinds +++ /dev/null @@ -1,238 +0,0 @@ -set $notify ~/projects/sisyphus/scripts/notify.sh - -# Focus -bindsym { - $flag+$up focus up - $flag+$right focus right - $flag+$down focus down - $flag+$left focus left - - $flag+Up focus up - $flag+Right focus right - $flag+Down focus down - $flag+Left focus left - - $flag+p focus parent - $flag+space focus mode_toggle -} - -# Move windows -bindsym { - $flag+Shift+$up move up - $flag+Shift+$right move right - $flag+Shift+$down move down - $flag+Shift+$left move left - - $flag+Shift+Up move up - $flag+Shift+Right move right - $flag+Shift+Down move down - $flag+Shift+Left move left - - $flag+Next move scratchpad - $flag+KP_Next move scratchpad - $flag+Prior scratchpad show - $flag+KP_Prior scratchpad show -} - -# Layouts -bindsym { - $flag+z layout toggle split - $flag+x layout tabbed - $flag+c split h - $flag+v split v - - $flag+f floating enable, border normal 1 - $flag+Shift+f floating disable, border pixel 1 - - $flag+s sticky toggle - $flag+F11 fullscreen - - $alt+Next border pixel 1 # Show window title - $alt+KP_Next border pixel 1 - $alt+Prior border normal 1 # Hide window title - $alt+KP_Prior border normal 1 -} - -# Workspaces -set { - $ws1 "1:1" - $ws2 "2:2" - $ws3 "3:3" - $ws4 "4:4" - $ws5 "5:5" - $ws6 "6:6" - $ws7 "7:7" - $ws8 "8:8" - $ws9 "9:9" - $ws10 "10:10" - $ws11 "11:Soc" - $ws12 "12:Ent" -} - -bindsym { - # Focus a specific workspace - $flag+1 workspace $ws1 - $flag+2 workspace $ws2 - $flag+3 workspace $ws3 - $flag+4 workspace $ws4 - $flag+5 workspace $ws5 - $flag+6 workspace $ws6 - $flag+7 workspace $ws7 - $flag+8 workspace $ws8 - $flag+9 workspace $ws9 - $flag+0 workspace $ws10 - $flag+minus workspace $ws11 - $flag+equal workspace $ws12 - - # Move window to a specific workspace - $flag+Shift+1 move container to workspace $ws1, workspace $ws1 - $flag+Shift+2 move container to workspace $ws2, workspace $ws2 - $flag+Shift+3 move container to workspace $ws3, workspace $ws3 - $flag+Shift+4 move container to workspace $ws4, workspace $ws4 - $flag+Shift+5 move container to workspace $ws5, workspace $ws5 - $flag+Shift+6 move container to workspace $ws6, workspace $ws6 - $flag+Shift+7 move container to workspace $ws7, workspace $ws7 - $flag+Shift+8 move container to workspace $ws8, workspace $ws8 - $flag+Shift+9 move container to workspace $ws9, workspace $ws9 - $flag+Shift+0 move container to workspace $ws10, workspace $ws10 - $flag+Shift+minus move container to workspace $ws11, workspace $ws11 - $flag+Shift+equal move container to workspace $ws12, workspace $ws12 - - # Go through workspaces in order - $flag+Control+$left workspace prev_on_output - $flag+Control+$right workspace next_on_output - - $flag+Control+Left workspace prev_on_output - $flag+Control+Right workspace next_on_output - - $flag+Control+Shift+$left move container to workspace prev_on_output, workspace prev_on_output - $flag+Control+Shift+$right move container to workspace next_on_output, workspace next_on_output - - $flag+Control+Shift+Left move container to workspace prev_on_output, workspace prev_on_output - $flag+Control+Shift+Right move container to workspace next_on_output, workspace next_on_output - - # Also GNOME-like keybinds - $flag+$alt+$left workspace prev_on_output - $flag+$alt+$right workspace next_on_output - - $flag+$alt+Left workspace prev_on_output - $flag+$alt+Right workspace next_on_output - - $flag+$alt+Shift+$left move container to workspace prev_on_output, workspace prev_on_output - $flag+$alt+Shift+$right move container to workspace next_on_output, workspace next_on_output - - $flag+$alt+Shift+Left move container to workspace prev_on_output, workspace prev_on_output - $flag+$alt+Shift+Right move container to workspace next_on_output, workspace next_on_output - - # Use your mouse to scroll between workspaces - --whole-window $flag+$scrollUp workspace prev_on_output - --whole-window $flag+$scrollDown workspace next_on_output -} - -bindgesture { - swipe:3:right workspace prev_on_output - swipe:3:left workspace next_on_output -} - -# Outputs -bindsym { - # Use "left" and "up" at the same time to mimic "previous" - # Use "right" and "down" at the same time to mimic "next" - # Though this does not work when using multiple screens, it's an intermediary solution until Sway supports "output next/previous" - $flag+Control+$up focus output left, focus output up - $flag+Control+$down focus output right, focus output down - - $flag+Control+Up focus output left, focus output up - $flag+Control+Down focus output right, focus output down - - $flag+$alt+$up focus output left, focus output up - $flag+$alt+$down focus output right, focus output down - - $flag+$alt+Up focus output left, focus output up - $flag+$alt+Down focus output right, focus output down - - $flag+Control+Shift+$up move container to output left, focus output left \ - move container to output up, focus output up - $flag+Control+Shift+$down move container to output right, focus output right \ - move container to output down, focus output down - - $flag+Control+Shift+Up move container to output left, focus output left \ - move container to output up, focus output up - $flag+Control+Shift+Down move container to output right, focus output right \ - move container to output down, focus output down - - $flag+$alt+Shift+$up move container to output left, focus output left \ - move container to output up, focus output up - $flag+$alt+Shift+$down move container to output right, focus output right \ - move container to output down, focus output down - - $flag+$alt+Shift+Up move container to output left, focus output left \ - move container to output up, focus output up - $flag+$alt+Shift+Down move container to output right, focus output right \ - move container to output down, focus output down -} - -# System -bindsym --locked { - # Brightness - XF86MonBrightnessDown exec brightnessctl -e s 5%- && $notify -b - XF86MonBrightnessUp exec brightnessctl -e s +5% && $notify -b - - # Audio - XF86AudioRaiseVolume exec wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 2%+ && $notify -v - XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%- && $notify -v - XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && $notify -v - XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle - - # Media - XF86AudioPlay exec playerctl play-pause - XF86AudioPrev exec playerctl previous - XF86AudioNext exec playerctl next - - Shift+XF86AudioMute exec playerctl play-pause - Shift+XF86AudioLowerVolume exec playerctl previous - Shift+XF86AudioRaiseVolume exec playerctl next - - # Other special keys - XF86Calculator exec qalculate-gtk -} - -bindgesture hold:3 exec playerctl play-pause - -# Shortcuts -bindsym { - # Reload sway - $alt+Shift+r reload - # Dialog to exit sway - $alt+Shift+e exec swaynag -t warning \ - -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' \ - -B 'Yes, exit sway' 'swaymsg exit' - - # Kill focused window - $flag+q kill - # Start a terminal - $flag+Return exec $term - $alt+space exec $menu - $alt+Tab focus prev - $flag+Tab exec $window_switcher - - --whole-window $alt+$scrollUp focus prev - --whole-window $alt+$scrollDown focus next - - # Lock the screen - $flag+Delete exec $lock - - # File explorer - $flag+e exec $term -e vifm - # Internet browser - $flag+i exec firefox -} - -bindgesture { - # Also show the bar, hide when finished - swipe:3:up bar hidden_state show, exec "$window_switcher; swaymsg bar hidden_state hide" - swipe:4:up exec "$menu; swaymsg bar hidden_state hide" - - # Cancel and hide bar - swipe:down exec pkill rofi, bar hidden_state hide -} diff --git a/stow/sway/.config/sway/modes b/stow/sway/.config/sway/modes index 6a80baa..237932b 100644 --- a/stow/sway/.config/sway/modes +++ b/stow/sway/.config/sway/modes @@ -1,91 +1,93 @@ -# +# # ~/.config/sway/modes -# +# Modes for sway +# -set $default "default" +set { + $alt Mod1 + $flag Mod4 +} # Resizing -set $resize "Resize" -bindsym $flag+r mode $resize -mode $resize bindsym { - $right resize grow width 10 px or 10 ppt - $up resize grow height 10 px or 10 ppt - $left resize shrink width 10 px or 10 ppt - $down resize shrink height 10 px or 10 ppt +bindsym $flag+r mode "resize" +mode "resize" bindsym { + l resize grow width 10 px or 10 ppt + k resize grow height 10 px or 10 ppt + h resize shrink width 10 px or 10 ppt + j resize shrink height 10 px or 10 ppt - Right resize grow width 10 px or 10 ppt - Up resize grow height 10 px or 10 ppt - Left resize shrink width 10 px or 10 ppt - Down resize shrink height 10 px or 10 ppt + Shift+l resize grow width 50 px or 50 ppt + Shift+k resize grow height 50 px or 50 ppt + Shift+h resize shrink width 50 px or 50 ppt + Shift+j resize shrink height 50 px or 50 ppt - Shift+$right resize grow width 50 px or 50 ppt - Shift+$up resize grow height 50 px or 50 ppt - Shift+$left resize shrink width 50 px or 50 ppt - Shift+$down resize shrink height 50 px or 50 ppt + Right resize grow width 10 px or 10 ppt + Up resize grow height 10 px or 10 ppt + Left resize shrink width 10 px or 10 ppt + Down resize shrink height 10 px or 10 ppt - Shift+Right resize grow width 50 px or 50 ppt - Shift+Up resize grow height 50 px or 50 ppt - Shift+Left resize shrink width 50 px or 50 ppt - Shift+Down resize shrink height 50 px or 50 ppt + Shift+Right resize grow width 50 px or 50 ppt + Shift+Up resize grow height 50 px or 50 ppt + Shift+Left resize shrink width 50 px or 50 ppt + Shift+Down resize shrink height 50 px or 50 ppt - $flag+$right move right - $flag+$up move up - $flag+$left move left - $flag+$down move down + $flag+h move left + $flag+j move down + $flag+k move up + $flag+l move right - $flag+Right move right - $flag+Up move up - $flag+Left move left - $flag+Down move down + $flag+Left move left + $flag+Down move down + $flag+Up move up + $flag+Right move right - Return mode $default - Escape mode $default - $flag+r mode $default + Return mode "default" + Escape mode "default" + $flag+r mode "default" } # System actions -set $mode_system "System (l)ock, (s)leep, (h)ibernate, (r)eboot, (Shift+s)hutdown" -bindsym Control+$alt+Delete mode $mode_system -mode $mode_system bindsym { - l mode $default, exec $lock - s mode $default, exec $lock, exec systemctl suspend - h mode $default, exec $lock, exec systemctl hibernate - r mode $default, exec systemctl reboot - Shift+s mode $default, exec systemctl poweroff -i +set $mode_system System (l)ock, (s)leep, (h)ibernate, (r)eboot, (Shift+s)hutdown +bindsym Control+$alt+Delete mode "$mode_system" +mode "$mode_system" bindsym { + l exec swaylock, mode "default" + s exec systemctl suspend, mode "default" + h exec systemctl hibernate, mode "default" + r exec systemctl reboot, mode "default" + Shift+s exec systemctl poweroff -i, mode "default" - Return mode $default - Escape mode $default - Control+$alt+Delete mode $default + Return mode "default" + Escape mode "default" + Control+$alt+Delete mode "default" } # Screenshots -set $mode_screenshot "Screenshot of (a)rea, current (w)indow, (s)creen - Shift to save" -set $save_format ~/Nextcloud/Afbeeldingen/Screenshots/$(date +%F-%H-%M-%S).png -bindsym Print mode $mode_screenshot -mode $mode_screenshot bindsym { - a exec grimshot copy area, mode $default - w exec grimshot --notify copy active, mode $default - s exec grimshot --notify copy screen, mode $default +set $mode_screenshot Screenshot of (a)rea, current (w)indow, (s)creen - Shift to save +set $save_format ~/Pictures/Screenshots/$(date +%F-%H-%M-%S).png +bindsym Print mode "$mode_screenshot" +mode "$mode_screenshot" bindsym { + a exec grimshot copy area, mode "default" + w exec grimshot --notify copy active, mode "default" + s exec grimshot --notify copy screen, mode "default" - Shift+a exec grimshot --notify save area $save_format, mode $default - Shift+w exec grimshot --notify save active $save_format, mode $default - Shift+s exec grimshot --notify save screen $save_format, mode $default - Print exec grimshot --notify save screen $save_format, mode $default + Print exec grimshot --notify save screen $save_format mode "default" # Super fast screens! + Shift+a exec grimshot --notify save area $save_format, mode "default" + Shift+w exec grimshot --notify save active $save_format, mode "default" + Shift+s exec grimshot --notify save screen $save_format, mode "default" - Return mode $default - Escape mode $default + Return mode "default" + Escape mode "default" } -set $mode_preferences "Toggle (d)ark mode, (s)unset, (n)otification" -bindsym $alt+end mode $mode_preferences -bindsym $alt+KP_End mode $mode_preferences -mode $mode_preferences bindsym { - d exec "${SCRIPT_DIR}/toggle-light-dark.sh", mode $default - s exec "${SCRIPT_DIR}/sunset.sh", mode $default - n exec "${SCRIPT_DIR}/do-not-disturb.sh", mode $default +# Some preferences +set $mode_preferences Toggle (s)unset, (n)otifications, (f)ocus +bindsym $alt+end mode "$mode_preferences" +mode "$mode_preferences" bindsym { + s exec "~/.scripts/wlsunset.sh", mode "default" + n exec "~/.scripts/dnd.sh", mode "default" + f exec "~/.scripts/focus.sh", mode "default" - Return mode $default - Escape mode $default - $alt+end mode $default - $alt+KP_End mode $default + Return mode "default" + Escape mode "default" + $alt+end mode "default" } diff --git a/stow/sway/.config/sway/style b/stow/sway/.config/sway/style index 7377b3b..d1668ac 100644 --- a/stow/sway/.config/sway/style +++ b/stow/sway/.config/sway/style @@ -3,29 +3,25 @@ # Styling for sway # -# Decrease the height of the window title bar. -font pango:monospace 0.1 +# Decrease the height of the window bar thing. +font pango:monospace 1 bar { - swaybar_command waybar + swaybar_command /usr/bin/waybar mode hide } default_border pixel 1 default_floating_border normal 1 -hide_edge_borders smart +hide_edge_borders both smart_borders on -# Mimic no titles by setting the text color to background color +# Mimic no titles # border backgr. text indic. child_border -client.focused #00897b #00897b #00897b #00897b #00897b -client.focused_inactive #a6a6a6 #a6a6a6 #a6a6a6 #a6a6a6 #a6a6a6 -client.unfocused #a6a6a6 #a6a6a6 #a6a6a6 #a6a6a6 #a6a6a6 +client.focused #000000 #00897b #00897b #00897b #000000 +client.focused_inactive #000000 #222222 #222222 #222222 #000000 +client.unfocused #000000 #222222 #222222 #222222 #000000 client.urgent #ff0000 #ff0000 #ff0000 #ff0000 #ff0000 -# Configure GTK exec gsettings set org.gnome.desktop.interface icon-theme 'IcoSystem' -exec gsettings set org.gnome.desktop.interface cursor-theme 'phinger-cursor' exec gsettings set org.gnome.desktop.interface gtk-theme 'Nordic' - -seat seat0 xcursor_theme phinger-cursors 24 diff --git a/stow/swayidle/.config/swayidle/config b/stow/swayidle/.config/swayidle/config deleted file mode 100644 index d676df0..0000000 --- a/stow/swayidle/.config/swayidle/config +++ /dev/null @@ -1,6 +0,0 @@ -timeout 60 'brightnessctl -sq set $(( $(brightnessctl get) / 10 * 3 + 1 ))' resume 'brightnessctl -qr' -timeout 120 'swaylock -f; swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' -timeout 240 'systemctl suspend' - -before-sleep 'playerctl pause' -before-sleep 'swaymsg "output * dpms on"; swaylock -f --grace 0' # Avoid being able to unlock immediately without password diff --git a/stow/vifm/.config/vifm/colors/tdpeuter-dark.vifm b/stow/vifm/.config/vifm/colors/Personal.vifm similarity index 92% rename from stow/vifm/.config/vifm/colors/tdpeuter-dark.vifm rename to stow/vifm/.config/vifm/colors/Personal.vifm index cf92123..abf323b 100644 --- a/stow/vifm/.config/vifm/colors/tdpeuter-dark.vifm +++ b/stow/vifm/.config/vifm/colors/Personal.vifm @@ -34,6 +34,3 @@ highlight Win ctermfg=12 ctermbg=-1 cterm=none highlight Border ctermfg=-1 ctermbg=-1 cterm=none - -highlight CmdLine ctermfg=7 ctermbg=0 cterm=none - diff --git a/stow/vifm/.config/vifm/colors/tdpeuter-light.vifm b/stow/vifm/.config/vifm/colors/tdpeuter-light.vifm deleted file mode 100644 index a27559f..0000000 --- a/stow/vifm/.config/vifm/colors/tdpeuter-light.vifm +++ /dev/null @@ -1,38 +0,0 @@ -" -" ~/.config/vifm/colors/Personal.vifm -" - -" The standard ncurses colors are: -" Default = -1 = None, can be used for transparency or default color -" Black = 0 -" Red = 1 -" Green = 2 -" Yellow = 3 -" Blue = 4 -" Magenta = 5 -" Cyan = 6 -" White = 7 - -" Light versions of colors are also available (set bold attribute): -" LightBlack -" LightRed -" LightGreen -" LightYellow -" LightBlue -" LightMagenta -" LightCyan -" LightWhite - -" Available attributes (some of them can be combined): -" bold -" underline -" reverse or inverse -" standout -" none - -" Make background and vertical borders transparent. -highlight Win ctermfg=12 ctermbg=-1 cterm=none - -highlight Border ctermfg=-1 ctermbg=-1 cterm=none - -highlight CmdLine ctermfg=7 ctermbg=12 cterm=none diff --git a/stow/vifm/.config/vifm/scripts/favicons.vifm b/stow/vifm/.config/vifm/scripts/favicons.vifm index 4c0f6dd..fdd4ce5 100644 --- a/stow/vifm/.config/vifm/scripts/favicons.vifm +++ b/stow/vifm/.config/vifm/scripts/favicons.vifm @@ -48,7 +48,6 @@ set classify+=' ::*.fish,,*.sh,,*.bash::' set classify+=' ::*.ejs,,*.slim,,*.xml::' set classify+='C ::*.c++,,*.cpp,,*.cxx,,*.h,,*.cc,,*.c::' set classify+=' ::*.coffee::' -set classify+=' ::*.nix::' " Unsorted and unconverted set classify+='λ ::*.ml,,*.mli::' diff --git a/stow/vifm/.config/vifm/vifmrc b/stow/vifm/.config/vifm/vifmrc index f280482..b4b588a 100644 --- a/stow/vifm/.config/vifm/vifmrc +++ b/stow/vifm/.config/vifm/vifmrc @@ -2,8 +2,6 @@ " ~/.config/vifm/vifmrc " -source ~/.config/vifm/theme.conf - " vim: filetype=vifm : " Sample configuration file for vifm (last updated: 31 August, 2021) " You can edit this file by hand. @@ -78,6 +76,10 @@ set vimhelp set norunexec +" List of color schemes to try (picks the first one supported by the terminal) + +colorscheme Personal Default-256 Default + " Format for displaying time in file list. For example: " TIME_STAMP_FORMAT=%m/%d-%H:%M " See man date or man strftime for details. @@ -257,8 +259,7 @@ filextype {*.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm},<image/*> \ shotwell, \ gwenview &, fileviewer {*.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm},<image/*> - \ kitten icat %f, - \ chafa %f, + \ chafa, \ identify %f, " OpenRaster diff --git a/stow/vim/.vim/autoload/plug.vim b/stow/vim/.vim/autoload/plug.vim new file mode 100644 index 0000000..652caa8 --- /dev/null +++ b/stow/vim/.vim/autoload/plug.vim @@ -0,0 +1,2812 @@ +" vim-plug: Vim plugin manager +" ============================ +" +" Download plug.vim and put it in ~/.vim/autoload +" +" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ +" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim +" +" Edit your .vimrc +" +" call plug#begin('~/.vim/plugged') +" +" " Make sure you use single quotes +" +" " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align +" Plug 'junegunn/vim-easy-align' +" +" " Any valid git URL is allowed +" Plug 'https://github.com/junegunn/vim-github-dashboard.git' +" +" " Multiple Plug commands can be written in a single line using | separators +" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' +" +" " On-demand loading +" Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } +" Plug 'tpope/vim-fireplace', { 'for': 'clojure' } +" +" " Using a non-default branch +" Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' } +" +" " Using a tagged release; wildcard allowed (requires git 1.9.2 or above) +" Plug 'fatih/vim-go', { 'tag': '*' } +" +" " Plugin options +" Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' } +" +" " Plugin outside ~/.vim/plugged with post-update hook +" Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +" +" " Unmanaged plugin (manually installed and updated) +" Plug '~/my-prototype-plugin' +" +" " Initialize plugin system +" call plug#end() +" +" Then reload .vimrc and :PlugInstall to install plugins. +" +" Plug options: +" +"| Option | Description | +"| ----------------------- | ------------------------------------------------ | +"| `branch`/`tag`/`commit` | Branch/tag/commit of the repository to use | +"| `rtp` | Subdirectory that contains Vim plugin | +"| `dir` | Custom directory for the plugin | +"| `as` | Use different name for the plugin | +"| `do` | Post-update hook (string or funcref) | +"| `on` | On-demand loading: Commands or `<Plug>`-mappings | +"| `for` | On-demand loading: File types | +"| `frozen` | Do not update unless explicitly specified | +" +" More information: https://github.com/junegunn/vim-plug +" +" +" Copyright (c) 2017 Junegunn Choi +" +" MIT License +" +" Permission is hereby granted, free of charge, to any person obtaining +" a copy of this software and associated documentation files (the +" "Software"), to deal in the Software without restriction, including +" without limitation the rights to use, copy, modify, merge, publish, +" distribute, sublicense, and/or sell copies of the Software, and to +" permit persons to whom the Software is furnished to do so, subject to +" the following conditions: +" +" The above copyright notice and this permission notice shall be +" included in all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +if exists('g:loaded_plug') + finish +endif +let g:loaded_plug = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let s:plug_src = 'https://github.com/junegunn/vim-plug.git' +let s:plug_tab = get(s:, 'plug_tab', -1) +let s:plug_buf = get(s:, 'plug_buf', -1) +let s:mac_gui = has('gui_macvim') && has('gui_running') +let s:is_win = has('win32') +let s:nvim = has('nvim-0.2') || (has('nvim') && exists('*jobwait') && !s:is_win) +let s:vim8 = has('patch-8.0.0039') && exists('*job_start') +if s:is_win && &shellslash + set noshellslash + let s:me = resolve(expand('<sfile>:p')) + set shellslash +else + let s:me = resolve(expand('<sfile>:p')) +endif +let s:base_spec = { 'branch': '', 'frozen': 0 } +let s:TYPE = { +\ 'string': type(''), +\ 'list': type([]), +\ 'dict': type({}), +\ 'funcref': type(function('call')) +\ } +let s:loaded = get(s:, 'loaded', {}) +let s:triggers = get(s:, 'triggers', {}) + +function! s:is_powershell(shell) + return a:shell =~# 'powershell\(\.exe\)\?$' || a:shell =~# 'pwsh\(\.exe\)\?$' +endfunction + +function! s:isabsolute(dir) abort + return a:dir =~# '^/' || (has('win32') && a:dir =~? '^\%(\\\|[A-Z]:\)') +endfunction + +function! s:git_dir(dir) abort + let gitdir = s:trim(a:dir) . '/.git' + if isdirectory(gitdir) + return gitdir + endif + if !filereadable(gitdir) + return '' + endif + let gitdir = matchstr(get(readfile(gitdir), 0, ''), '^gitdir: \zs.*') + if len(gitdir) && !s:isabsolute(gitdir) + let gitdir = a:dir . '/' . gitdir + endif + return isdirectory(gitdir) ? gitdir : '' +endfunction + +function! s:git_origin_url(dir) abort + let gitdir = s:git_dir(a:dir) + let config = gitdir . '/config' + if empty(gitdir) || !filereadable(config) + return '' + endif + return matchstr(join(readfile(config)), '\[remote "origin"\].\{-}url\s*=\s*\zs\S*\ze') +endfunction + +function! s:git_revision(dir) abort + let gitdir = s:git_dir(a:dir) + let head = gitdir . '/HEAD' + if empty(gitdir) || !filereadable(head) + return '' + endif + + let line = get(readfile(head), 0, '') + let ref = matchstr(line, '^ref: \zs.*') + if empty(ref) + return line + endif + + if filereadable(gitdir . '/' . ref) + return get(readfile(gitdir . '/' . ref), 0, '') + endif + + if filereadable(gitdir . '/packed-refs') + for line in readfile(gitdir . '/packed-refs') + if line =~# ' ' . ref + return matchstr(line, '^[0-9a-f]*') + endif + endfor + endif + + return '' +endfunction + +function! s:git_local_branch(dir) abort + let gitdir = s:git_dir(a:dir) + let head = gitdir . '/HEAD' + if empty(gitdir) || !filereadable(head) + return '' + endif + let branch = matchstr(get(readfile(head), 0, ''), '^ref: refs/heads/\zs.*') + return len(branch) ? branch : 'HEAD' +endfunction + +function! s:git_origin_branch(spec) + if len(a:spec.branch) + return a:spec.branch + endif + + " The file may not be present if this is a local repository + let gitdir = s:git_dir(a:spec.dir) + let origin_head = gitdir.'/refs/remotes/origin/HEAD' + if len(gitdir) && filereadable(origin_head) + return matchstr(get(readfile(origin_head), 0, ''), + \ '^ref: refs/remotes/origin/\zs.*') + endif + + " The command may not return the name of a branch in detached HEAD state + let result = s:lines(s:system('git symbolic-ref --short HEAD', a:spec.dir)) + return v:shell_error ? '' : result[-1] +endfunction + +if s:is_win + function! s:plug_call(fn, ...) + let shellslash = &shellslash + try + set noshellslash + return call(a:fn, a:000) + finally + let &shellslash = shellslash + endtry + endfunction +else + function! s:plug_call(fn, ...) + return call(a:fn, a:000) + endfunction +endif + +function! s:plug_getcwd() + return s:plug_call('getcwd') +endfunction + +function! s:plug_fnamemodify(fname, mods) + return s:plug_call('fnamemodify', a:fname, a:mods) +endfunction + +function! s:plug_expand(fmt) + return s:plug_call('expand', a:fmt, 1) +endfunction + +function! s:plug_tempname() + return s:plug_call('tempname') +endfunction + +function! plug#begin(...) + if a:0 > 0 + let s:plug_home_org = a:1 + let home = s:path(s:plug_fnamemodify(s:plug_expand(a:1), ':p')) + elseif exists('g:plug_home') + let home = s:path(g:plug_home) + elseif has('nvim') + let home = stdpath('data') . '/plugged' + elseif !empty(&rtp) + let home = s:path(split(&rtp, ',')[0]) . '/plugged' + else + return s:err('Unable to determine plug home. Try calling plug#begin() with a path argument.') + endif + if s:plug_fnamemodify(home, ':t') ==# 'plugin' && s:plug_fnamemodify(home, ':h') ==# s:first_rtp + return s:err('Invalid plug home. '.home.' is a standard Vim runtime path and is not allowed.') + endif + + let g:plug_home = home + let g:plugs = {} + let g:plugs_order = [] + let s:triggers = {} + + call s:define_commands() + return 1 +endfunction + +function! s:define_commands() + command! -nargs=+ -bar Plug call plug#(<args>) + if !executable('git') + return s:err('`git` executable not found. Most commands will not be available. To suppress this message, prepend `silent!` to `call plug#begin(...)`.') + endif + if has('win32') + \ && &shellslash + \ && (&shell =~# 'cmd\(\.exe\)\?$' || s:is_powershell(&shell)) + return s:err('vim-plug does not support shell, ' . &shell . ', when shellslash is set.') + endif + if !has('nvim') + \ && (has('win32') || has('win32unix')) + \ && !has('multi_byte') + return s:err('Vim needs +multi_byte feature on Windows to run shell commands. Enable +iconv for best results.') + endif + command! -nargs=* -bar -bang -complete=customlist,s:names PlugInstall call s:install(<bang>0, [<f-args>]) + command! -nargs=* -bar -bang -complete=customlist,s:names PlugUpdate call s:update(<bang>0, [<f-args>]) + command! -nargs=0 -bar -bang PlugClean call s:clean(<bang>0) + command! -nargs=0 -bar PlugUpgrade if s:upgrade() | execute 'source' s:esc(s:me) | endif + command! -nargs=0 -bar PlugStatus call s:status() + command! -nargs=0 -bar PlugDiff call s:diff() + command! -nargs=? -bar -bang -complete=file PlugSnapshot call s:snapshot(<bang>0, <f-args>) +endfunction + +function! s:to_a(v) + return type(a:v) == s:TYPE.list ? a:v : [a:v] +endfunction + +function! s:to_s(v) + return type(a:v) == s:TYPE.string ? a:v : join(a:v, "\n") . "\n" +endfunction + +function! s:glob(from, pattern) + return s:lines(globpath(a:from, a:pattern)) +endfunction + +function! s:source(from, ...) + let found = 0 + for pattern in a:000 + for vim in s:glob(a:from, pattern) + execute 'source' s:esc(vim) + let found = 1 + endfor + endfor + return found +endfunction + +function! s:assoc(dict, key, val) + let a:dict[a:key] = add(get(a:dict, a:key, []), a:val) +endfunction + +function! s:ask(message, ...) + call inputsave() + echohl WarningMsg + let answer = input(a:message.(a:0 ? ' (y/N/a) ' : ' (y/N) ')) + echohl None + call inputrestore() + echo "\r" + return (a:0 && answer =~? '^a') ? 2 : (answer =~? '^y') ? 1 : 0 +endfunction + +function! s:ask_no_interrupt(...) + try + return call('s:ask', a:000) + catch + return 0 + endtry +endfunction + +function! s:lazy(plug, opt) + return has_key(a:plug, a:opt) && + \ (empty(s:to_a(a:plug[a:opt])) || + \ !isdirectory(a:plug.dir) || + \ len(s:glob(s:rtp(a:plug), 'plugin')) || + \ len(s:glob(s:rtp(a:plug), 'after/plugin'))) +endfunction + +function! plug#end() + if !exists('g:plugs') + return s:err('plug#end() called without calling plug#begin() first') + endif + + if exists('#PlugLOD') + augroup PlugLOD + autocmd! + augroup END + augroup! PlugLOD + endif + let lod = { 'ft': {}, 'map': {}, 'cmd': {} } + + if get(g:, 'did_load_filetypes', 0) + filetype off + endif + for name in g:plugs_order + if !has_key(g:plugs, name) + continue + endif + let plug = g:plugs[name] + if get(s:loaded, name, 0) || !s:lazy(plug, 'on') && !s:lazy(plug, 'for') + let s:loaded[name] = 1 + continue + endif + + if has_key(plug, 'on') + let s:triggers[name] = { 'map': [], 'cmd': [] } + for cmd in s:to_a(plug.on) + if cmd =~? '^<Plug>.\+' + if empty(mapcheck(cmd)) && empty(mapcheck(cmd, 'i')) + call s:assoc(lod.map, cmd, name) + endif + call add(s:triggers[name].map, cmd) + elseif cmd =~# '^[A-Z]' + let cmd = substitute(cmd, '!*$', '', '') + if exists(':'.cmd) != 2 + call s:assoc(lod.cmd, cmd, name) + endif + call add(s:triggers[name].cmd, cmd) + else + call s:err('Invalid `on` option: '.cmd. + \ '. Should start with an uppercase letter or `<Plug>`.') + endif + endfor + endif + + if has_key(plug, 'for') + let types = s:to_a(plug.for) + if !empty(types) + augroup filetypedetect + call s:source(s:rtp(plug), 'ftdetect/**/*.vim', 'after/ftdetect/**/*.vim') + augroup END + endif + for type in types + call s:assoc(lod.ft, type, name) + endfor + endif + endfor + + for [cmd, names] in items(lod.cmd) + execute printf( + \ 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "<bang>", <line1>, <line2>, <q-args>, %s)', + \ cmd, string(cmd), string(names)) + endfor + + for [map, names] in items(lod.map) + for [mode, map_prefix, key_prefix] in + \ [['i', '<C-\><C-O>', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']] + execute printf( + \ '%snoremap <silent> %s %s:<C-U>call <SID>lod_map(%s, %s, %s, "%s")<CR>', + \ mode, map, map_prefix, string(map), string(names), mode != 'i', key_prefix) + endfor + endfor + + for [ft, names] in items(lod.ft) + augroup PlugLOD + execute printf('autocmd FileType %s call <SID>lod_ft(%s, %s)', + \ ft, string(ft), string(names)) + augroup END + endfor + + call s:reorg_rtp() + filetype plugin indent on + if has('vim_starting') + if has('syntax') && !exists('g:syntax_on') + syntax enable + end + else + call s:reload_plugins() + endif +endfunction + +function! s:loaded_names() + return filter(copy(g:plugs_order), 'get(s:loaded, v:val, 0)') +endfunction + +function! s:load_plugin(spec) + call s:source(s:rtp(a:spec), 'plugin/**/*.vim', 'after/plugin/**/*.vim') +endfunction + +function! s:reload_plugins() + for name in s:loaded_names() + call s:load_plugin(g:plugs[name]) + endfor +endfunction + +function! s:trim(str) + return substitute(a:str, '[\/]\+$', '', '') +endfunction + +function! s:version_requirement(val, min) + for idx in range(0, len(a:min) - 1) + let v = get(a:val, idx, 0) + if v < a:min[idx] | return 0 + elseif v > a:min[idx] | return 1 + endif + endfor + return 1 +endfunction + +function! s:git_version_requirement(...) + if !exists('s:git_version') + let s:git_version = map(split(split(s:system(['git', '--version']))[2], '\.'), 'str2nr(v:val)') + endif + return s:version_requirement(s:git_version, a:000) +endfunction + +function! s:progress_opt(base) + return a:base && !s:is_win && + \ s:git_version_requirement(1, 7, 1) ? '--progress' : '' +endfunction + +function! s:rtp(spec) + return s:path(a:spec.dir . get(a:spec, 'rtp', '')) +endfunction + +if s:is_win + function! s:path(path) + return s:trim(substitute(a:path, '/', '\', 'g')) + endfunction + + function! s:dirpath(path) + return s:path(a:path) . '\' + endfunction + + function! s:is_local_plug(repo) + return a:repo =~? '^[a-z]:\|^[%~]' + endfunction + + " Copied from fzf + function! s:wrap_cmds(cmds) + let cmds = [ + \ '@echo off', + \ 'setlocal enabledelayedexpansion'] + \ + (type(a:cmds) == type([]) ? a:cmds : [a:cmds]) + \ + ['endlocal'] + if has('iconv') + if !exists('s:codepage') + let s:codepage = libcallnr('kernel32.dll', 'GetACP', 0) + endif + return map(cmds, printf('iconv(v:val."\r", "%s", "cp%d")', &encoding, s:codepage)) + endif + return map(cmds, 'v:val."\r"') + endfunction + + function! s:batchfile(cmd) + let batchfile = s:plug_tempname().'.bat' + call writefile(s:wrap_cmds(a:cmd), batchfile) + let cmd = plug#shellescape(batchfile, {'shell': &shell, 'script': 0}) + if s:is_powershell(&shell) + let cmd = '& ' . cmd + endif + return [batchfile, cmd] + endfunction +else + function! s:path(path) + return s:trim(a:path) + endfunction + + function! s:dirpath(path) + return substitute(a:path, '[/\\]*$', '/', '') + endfunction + + function! s:is_local_plug(repo) + return a:repo[0] =~ '[/$~]' + endfunction +endif + +function! s:err(msg) + echohl ErrorMsg + echom '[vim-plug] '.a:msg + echohl None +endfunction + +function! s:warn(cmd, msg) + echohl WarningMsg + execute a:cmd 'a:msg' + echohl None +endfunction + +function! s:esc(path) + return escape(a:path, ' ') +endfunction + +function! s:escrtp(path) + return escape(a:path, ' ,') +endfunction + +function! s:remove_rtp() + for name in s:loaded_names() + let rtp = s:rtp(g:plugs[name]) + execute 'set rtp-='.s:escrtp(rtp) + let after = globpath(rtp, 'after') + if isdirectory(after) + execute 'set rtp-='.s:escrtp(after) + endif + endfor +endfunction + +function! s:reorg_rtp() + if !empty(s:first_rtp) + execute 'set rtp-='.s:first_rtp + execute 'set rtp-='.s:last_rtp + endif + + " &rtp is modified from outside + if exists('s:prtp') && s:prtp !=# &rtp + call s:remove_rtp() + unlet! s:middle + endif + + let s:middle = get(s:, 'middle', &rtp) + let rtps = map(s:loaded_names(), 's:rtp(g:plugs[v:val])') + let afters = filter(map(copy(rtps), 'globpath(v:val, "after")'), '!empty(v:val)') + let rtp = join(map(rtps, 'escape(v:val, ",")'), ',') + \ . ','.s:middle.',' + \ . join(map(afters, 'escape(v:val, ",")'), ',') + let &rtp = substitute(substitute(rtp, ',,*', ',', 'g'), '^,\|,$', '', 'g') + let s:prtp = &rtp + + if !empty(s:first_rtp) + execute 'set rtp^='.s:first_rtp + execute 'set rtp+='.s:last_rtp + endif +endfunction + +function! s:doautocmd(...) + if exists('#'.join(a:000, '#')) + execute 'doautocmd' ((v:version > 703 || has('patch442')) ? '<nomodeline>' : '') join(a:000) + endif +endfunction + +function! s:dobufread(names) + for name in a:names + let path = s:rtp(g:plugs[name]) + for dir in ['ftdetect', 'ftplugin', 'after/ftdetect', 'after/ftplugin'] + if len(finddir(dir, path)) + if exists('#BufRead') + doautocmd BufRead + endif + return + endif + endfor + endfor +endfunction + +function! plug#load(...) + if a:0 == 0 + return s:err('Argument missing: plugin name(s) required') + endif + if !exists('g:plugs') + return s:err('plug#begin was not called') + endif + let names = a:0 == 1 && type(a:1) == s:TYPE.list ? a:1 : a:000 + let unknowns = filter(copy(names), '!has_key(g:plugs, v:val)') + if !empty(unknowns) + let s = len(unknowns) > 1 ? 's' : '' + return s:err(printf('Unknown plugin%s: %s', s, join(unknowns, ', '))) + end + let unloaded = filter(copy(names), '!get(s:loaded, v:val, 0)') + if !empty(unloaded) + for name in unloaded + call s:lod([name], ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + endfor + call s:dobufread(unloaded) + return 1 + end + return 0 +endfunction + +function! s:remove_triggers(name) + if !has_key(s:triggers, a:name) + return + endif + for cmd in s:triggers[a:name].cmd + execute 'silent! delc' cmd + endfor + for map in s:triggers[a:name].map + execute 'silent! unmap' map + execute 'silent! iunmap' map + endfor + call remove(s:triggers, a:name) +endfunction + +function! s:lod(names, types, ...) + for name in a:names + call s:remove_triggers(name) + let s:loaded[name] = 1 + endfor + call s:reorg_rtp() + + for name in a:names + let rtp = s:rtp(g:plugs[name]) + for dir in a:types + call s:source(rtp, dir.'/**/*.vim') + endfor + if a:0 + if !s:source(rtp, a:1) && !empty(s:glob(rtp, a:2)) + execute 'runtime' a:1 + endif + call s:source(rtp, a:2) + endif + call s:doautocmd('User', name) + endfor +endfunction + +function! s:lod_ft(pat, names) + let syn = 'syntax/'.a:pat.'.vim' + call s:lod(a:names, ['plugin', 'after/plugin'], syn, 'after/'.syn) + execute 'autocmd! PlugLOD FileType' a:pat + call s:doautocmd('filetypeplugin', 'FileType') + call s:doautocmd('filetypeindent', 'FileType') +endfunction + +function! s:lod_cmd(cmd, bang, l1, l2, args, names) + call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + call s:dobufread(a:names) + execute printf('%s%s%s %s', (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args) +endfunction + +function! s:lod_map(map, names, with_prefix, prefix) + call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) + call s:dobufread(a:names) + let extra = '' + while 1 + let c = getchar(0) + if c == 0 + break + endif + let extra .= nr2char(c) + endwhile + + if a:with_prefix + let prefix = v:count ? v:count : '' + let prefix .= '"'.v:register.a:prefix + if mode(1) == 'no' + if v:operator == 'c' + let prefix = "\<esc>" . prefix + endif + let prefix .= v:operator + endif + call feedkeys(prefix, 'n') + endif + call feedkeys(substitute(a:map, '^<Plug>', "\<Plug>", '') . extra) +endfunction + +function! plug#(repo, ...) + if a:0 > 1 + return s:err('Invalid number of arguments (1..2)') + endif + + try + let repo = s:trim(a:repo) + let opts = a:0 == 1 ? s:parse_options(a:1) : s:base_spec + let name = get(opts, 'as', s:plug_fnamemodify(repo, ':t:s?\.git$??')) + let spec = extend(s:infer_properties(name, repo), opts) + if !has_key(g:plugs, name) + call add(g:plugs_order, name) + endif + let g:plugs[name] = spec + let s:loaded[name] = get(s:loaded, name, 0) + catch + return s:err(repo . ' ' . v:exception) + endtry +endfunction + +function! s:parse_options(arg) + let opts = copy(s:base_spec) + let type = type(a:arg) + let opt_errfmt = 'Invalid argument for "%s" option of :Plug (expected: %s)' + if type == s:TYPE.string + if empty(a:arg) + throw printf(opt_errfmt, 'tag', 'string') + endif + let opts.tag = a:arg + elseif type == s:TYPE.dict + for opt in ['branch', 'tag', 'commit', 'rtp', 'dir', 'as'] + if has_key(a:arg, opt) + \ && (type(a:arg[opt]) != s:TYPE.string || empty(a:arg[opt])) + throw printf(opt_errfmt, opt, 'string') + endif + endfor + for opt in ['on', 'for'] + if has_key(a:arg, opt) + \ && type(a:arg[opt]) != s:TYPE.list + \ && (type(a:arg[opt]) != s:TYPE.string || empty(a:arg[opt])) + throw printf(opt_errfmt, opt, 'string or list') + endif + endfor + if has_key(a:arg, 'do') + \ && type(a:arg.do) != s:TYPE.funcref + \ && (type(a:arg.do) != s:TYPE.string || empty(a:arg.do)) + throw printf(opt_errfmt, 'do', 'string or funcref') + endif + call extend(opts, a:arg) + if has_key(opts, 'dir') + let opts.dir = s:dirpath(s:plug_expand(opts.dir)) + endif + else + throw 'Invalid argument type (expected: string or dictionary)' + endif + return opts +endfunction + +function! s:infer_properties(name, repo) + let repo = a:repo + if s:is_local_plug(repo) + return { 'dir': s:dirpath(s:plug_expand(repo)) } + else + if repo =~ ':' + let uri = repo + else + if repo !~ '/' + throw printf('Invalid argument: %s (implicit `vim-scripts'' expansion is deprecated)', repo) + endif + let fmt = get(g:, 'plug_url_format', 'https://git::@github.com/%s.git') + let uri = printf(fmt, repo) + endif + return { 'dir': s:dirpath(g:plug_home.'/'.a:name), 'uri': uri } + endif +endfunction + +function! s:install(force, names) + call s:update_impl(0, a:force, a:names) +endfunction + +function! s:update(force, names) + call s:update_impl(1, a:force, a:names) +endfunction + +function! plug#helptags() + if !exists('g:plugs') + return s:err('plug#begin was not called') + endif + for spec in values(g:plugs) + let docd = join([s:rtp(spec), 'doc'], '/') + if isdirectory(docd) + silent! execute 'helptags' s:esc(docd) + endif + endfor + return 1 +endfunction + +function! s:syntax() + syntax clear + syntax region plug1 start=/\%1l/ end=/\%2l/ contains=plugNumber + syntax region plug2 start=/\%2l/ end=/\%3l/ contains=plugBracket,plugX + syn match plugNumber /[0-9]\+[0-9.]*/ contained + syn match plugBracket /[[\]]/ contained + syn match plugX /x/ contained + syn match plugDash /^-\{1}\ / + syn match plugPlus /^+/ + syn match plugStar /^*/ + syn match plugMessage /\(^- \)\@<=.*/ + syn match plugName /\(^- \)\@<=[^ ]*:/ + syn match plugSha /\%(: \)\@<=[0-9a-f]\{4,}$/ + syn match plugTag /(tag: [^)]\+)/ + syn match plugInstall /\(^+ \)\@<=[^:]*/ + syn match plugUpdate /\(^* \)\@<=[^:]*/ + syn match plugCommit /^ \X*[0-9a-f]\{7,9} .*/ contains=plugRelDate,plugEdge,plugTag + syn match plugEdge /^ \X\+$/ + syn match plugEdge /^ \X*/ contained nextgroup=plugSha + syn match plugSha /[0-9a-f]\{7,9}/ contained + syn match plugRelDate /([^)]*)$/ contained + syn match plugNotLoaded /(not loaded)$/ + syn match plugError /^x.*/ + syn region plugDeleted start=/^\~ .*/ end=/^\ze\S/ + syn match plugH2 /^.*:\n-\+$/ + syn match plugH2 /^-\{2,}/ + syn keyword Function PlugInstall PlugStatus PlugUpdate PlugClean + hi def link plug1 Title + hi def link plug2 Repeat + hi def link plugH2 Type + hi def link plugX Exception + hi def link plugBracket Structure + hi def link plugNumber Number + + hi def link plugDash Special + hi def link plugPlus Constant + hi def link plugStar Boolean + + hi def link plugMessage Function + hi def link plugName Label + hi def link plugInstall Function + hi def link plugUpdate Type + + hi def link plugError Error + hi def link plugDeleted Ignore + hi def link plugRelDate Comment + hi def link plugEdge PreProc + hi def link plugSha Identifier + hi def link plugTag Constant + + hi def link plugNotLoaded Comment +endfunction + +function! s:lpad(str, len) + return a:str . repeat(' ', a:len - len(a:str)) +endfunction + +function! s:lines(msg) + return split(a:msg, "[\r\n]") +endfunction + +function! s:lastline(msg) + return get(s:lines(a:msg), -1, '') +endfunction + +function! s:new_window() + execute get(g:, 'plug_window', 'vertical topleft new') +endfunction + +function! s:plug_window_exists() + let buflist = tabpagebuflist(s:plug_tab) + return !empty(buflist) && index(buflist, s:plug_buf) >= 0 +endfunction + +function! s:switch_in() + if !s:plug_window_exists() + return 0 + endif + + if winbufnr(0) != s:plug_buf + let s:pos = [tabpagenr(), winnr(), winsaveview()] + execute 'normal!' s:plug_tab.'gt' + let winnr = bufwinnr(s:plug_buf) + execute winnr.'wincmd w' + call add(s:pos, winsaveview()) + else + let s:pos = [winsaveview()] + endif + + setlocal modifiable + return 1 +endfunction + +function! s:switch_out(...) + call winrestview(s:pos[-1]) + setlocal nomodifiable + if a:0 > 0 + execute a:1 + endif + + if len(s:pos) > 1 + execute 'normal!' s:pos[0].'gt' + execute s:pos[1] 'wincmd w' + call winrestview(s:pos[2]) + endif +endfunction + +function! s:finish_bindings() + nnoremap <silent> <buffer> R :call <SID>retry()<cr> + nnoremap <silent> <buffer> D :PlugDiff<cr> + nnoremap <silent> <buffer> S :PlugStatus<cr> + nnoremap <silent> <buffer> U :call <SID>status_update()<cr> + xnoremap <silent> <buffer> U :call <SID>status_update()<cr> + nnoremap <silent> <buffer> ]] :silent! call <SID>section('')<cr> + nnoremap <silent> <buffer> [[ :silent! call <SID>section('b')<cr> +endfunction + +function! s:prepare(...) + if empty(s:plug_getcwd()) + throw 'Invalid current working directory. Cannot proceed.' + endif + + for evar in ['$GIT_DIR', '$GIT_WORK_TREE'] + if exists(evar) + throw evar.' detected. Cannot proceed.' + endif + endfor + + call s:job_abort() + if s:switch_in() + if b:plug_preview == 1 + pc + endif + enew + else + call s:new_window() + endif + + nnoremap <silent> <buffer> q :call <SID>close_pane()<cr> + if a:0 == 0 + call s:finish_bindings() + endif + let b:plug_preview = -1 + let s:plug_tab = tabpagenr() + let s:plug_buf = winbufnr(0) + call s:assign_name() + + for k in ['<cr>', 'L', 'o', 'X', 'd', 'dd'] + execute 'silent! unmap <buffer>' k + endfor + setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline modifiable nospell + if exists('+colorcolumn') + setlocal colorcolumn= + endif + setf vim-plug + if exists('g:syntax_on') + call s:syntax() + endif +endfunction + +function! s:close_pane() + if b:plug_preview == 1 + pc + let b:plug_preview = -1 + else + bd + endif +endfunction + +function! s:assign_name() + " Assign buffer name + let prefix = '[Plugins]' + let name = prefix + let idx = 2 + while bufexists(name) + let name = printf('%s (%s)', prefix, idx) + let idx = idx + 1 + endwhile + silent! execute 'f' fnameescape(name) +endfunction + +function! s:chsh(swap) + let prev = [&shell, &shellcmdflag, &shellredir] + if !s:is_win + set shell=sh + endif + if a:swap + if s:is_powershell(&shell) + let &shellredir = '2>&1 | Out-File -Encoding UTF8 %s' + elseif &shell =~# 'sh' || &shell =~# 'cmd\(\.exe\)\?$' + set shellredir=>%s\ 2>&1 + endif + endif + return prev +endfunction + +function! s:bang(cmd, ...) + let batchfile = '' + try + let [sh, shellcmdflag, shrd] = s:chsh(a:0) + " FIXME: Escaping is incomplete. We could use shellescape with eval, + " but it won't work on Windows. + let cmd = a:0 ? s:with_cd(a:cmd, a:1) : a:cmd + if s:is_win + let [batchfile, cmd] = s:batchfile(cmd) + endif + let g:_plug_bang = (s:is_win && has('gui_running') ? 'silent ' : '').'!'.escape(cmd, '#!%') + execute "normal! :execute g:_plug_bang\<cr>\<cr>" + finally + unlet g:_plug_bang + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win && filereadable(batchfile) + call delete(batchfile) + endif + endtry + return v:shell_error ? 'Exit status: ' . v:shell_error : '' +endfunction + +function! s:regress_bar() + let bar = substitute(getline(2)[1:-2], '.*\zs=', 'x', '') + call s:progress_bar(2, bar, len(bar)) +endfunction + +function! s:is_updated(dir) + return !empty(s:system_chomp(['git', 'log', '--pretty=format:%h', 'HEAD...HEAD@{1}'], a:dir)) +endfunction + +function! s:do(pull, force, todo) + for [name, spec] in items(a:todo) + if !isdirectory(spec.dir) + continue + endif + let installed = has_key(s:update.new, name) + let updated = installed ? 0 : + \ (a:pull && index(s:update.errors, name) < 0 && s:is_updated(spec.dir)) + if a:force || installed || updated + execute 'cd' s:esc(spec.dir) + call append(3, '- Post-update hook for '. name .' ... ') + let error = '' + let type = type(spec.do) + if type == s:TYPE.string + if spec.do[0] == ':' + if !get(s:loaded, name, 0) + let s:loaded[name] = 1 + call s:reorg_rtp() + endif + call s:load_plugin(spec) + try + execute spec.do[1:] + catch + let error = v:exception + endtry + if !s:plug_window_exists() + cd - + throw 'Warning: vim-plug was terminated by the post-update hook of '.name + endif + else + let error = s:bang(spec.do) + endif + elseif type == s:TYPE.funcref + try + call s:load_plugin(spec) + let status = installed ? 'installed' : (updated ? 'updated' : 'unchanged') + call spec.do({ 'name': name, 'status': status, 'force': a:force }) + catch + let error = v:exception + endtry + else + let error = 'Invalid hook type' + endif + call s:switch_in() + call setline(4, empty(error) ? (getline(4) . 'OK') + \ : ('x' . getline(4)[1:] . error)) + if !empty(error) + call add(s:update.errors, name) + call s:regress_bar() + endif + cd - + endif + endfor +endfunction + +function! s:hash_match(a, b) + return stridx(a:a, a:b) == 0 || stridx(a:b, a:a) == 0 +endfunction + +function! s:checkout(spec) + let sha = a:spec.commit + let output = s:git_revision(a:spec.dir) + if !empty(output) && !s:hash_match(sha, s:lines(output)[0]) + let credential_helper = s:git_version_requirement(2) ? '-c credential.helper= ' : '' + let output = s:system( + \ 'git '.credential_helper.'fetch --depth 999999 && git checkout '.plug#shellescape(sha).' --', a:spec.dir) + endif + return output +endfunction + +function! s:finish(pull) + let new_frozen = len(filter(keys(s:update.new), 'g:plugs[v:val].frozen')) + if new_frozen + let s = new_frozen > 1 ? 's' : '' + call append(3, printf('- Installed %d frozen plugin%s', new_frozen, s)) + endif + call append(3, '- Finishing ... ') | 4 + redraw + call plug#helptags() + call plug#end() + call setline(4, getline(4) . 'Done!') + redraw + let msgs = [] + if !empty(s:update.errors) + call add(msgs, "Press 'R' to retry.") + endif + if a:pull && len(s:update.new) < len(filter(getline(5, '$'), + \ "v:val =~ '^- ' && v:val !~# 'Already up.to.date'")) + call add(msgs, "Press 'D' to see the updated changes.") + endif + echo join(msgs, ' ') + call s:finish_bindings() +endfunction + +function! s:retry() + if empty(s:update.errors) + return + endif + echo + call s:update_impl(s:update.pull, s:update.force, + \ extend(copy(s:update.errors), [s:update.threads])) +endfunction + +function! s:is_managed(name) + return has_key(g:plugs[a:name], 'uri') +endfunction + +function! s:names(...) + return sort(filter(keys(g:plugs), 'stridx(v:val, a:1) == 0 && s:is_managed(v:val)')) +endfunction + +function! s:check_ruby() + silent! ruby require 'thread'; VIM::command("let g:plug_ruby = '#{RUBY_VERSION}'") + if !exists('g:plug_ruby') + redraw! + return s:warn('echom', 'Warning: Ruby interface is broken') + endif + let ruby_version = split(g:plug_ruby, '\.') + unlet g:plug_ruby + return s:version_requirement(ruby_version, [1, 8, 7]) +endfunction + +function! s:update_impl(pull, force, args) abort + let sync = index(a:args, '--sync') >= 0 || has('vim_starting') + let args = filter(copy(a:args), 'v:val != "--sync"') + let threads = (len(args) > 0 && args[-1] =~ '^[1-9][0-9]*$') ? + \ remove(args, -1) : get(g:, 'plug_threads', 16) + + let managed = filter(copy(g:plugs), 's:is_managed(v:key)') + let todo = empty(args) ? filter(managed, '!v:val.frozen || !isdirectory(v:val.dir)') : + \ filter(managed, 'index(args, v:key) >= 0') + + if empty(todo) + return s:warn('echo', 'No plugin to '. (a:pull ? 'update' : 'install')) + endif + + if !s:is_win && s:git_version_requirement(2, 3) + let s:git_terminal_prompt = exists('$GIT_TERMINAL_PROMPT') ? $GIT_TERMINAL_PROMPT : '' + let $GIT_TERMINAL_PROMPT = 0 + for plug in values(todo) + let plug.uri = substitute(plug.uri, + \ '^https://git::@github\.com', 'https://github.com', '') + endfor + endif + + if !isdirectory(g:plug_home) + try + call mkdir(g:plug_home, 'p') + catch + return s:err(printf('Invalid plug directory: %s. '. + \ 'Try to call plug#begin with a valid directory', g:plug_home)) + endtry + endif + + if has('nvim') && !exists('*jobwait') && threads > 1 + call s:warn('echom', '[vim-plug] Update Neovim for parallel installer') + endif + + let use_job = s:nvim || s:vim8 + let python = (has('python') || has('python3')) && !use_job + let ruby = has('ruby') && !use_job && (v:version >= 703 || v:version == 702 && has('patch374')) && !(s:is_win && has('gui_running')) && threads > 1 && s:check_ruby() + + let s:update = { + \ 'start': reltime(), + \ 'all': todo, + \ 'todo': copy(todo), + \ 'errors': [], + \ 'pull': a:pull, + \ 'force': a:force, + \ 'new': {}, + \ 'threads': (python || ruby || use_job) ? min([len(todo), threads]) : 1, + \ 'bar': '', + \ 'fin': 0 + \ } + + call s:prepare(1) + call append(0, ['', '']) + normal! 2G + silent! redraw + + " Set remote name, overriding a possible user git config's clone.defaultRemoteName + let s:clone_opt = ['--origin', 'origin'] + if get(g:, 'plug_shallow', 1) + call extend(s:clone_opt, ['--depth', '1']) + if s:git_version_requirement(1, 7, 10) + call add(s:clone_opt, '--no-single-branch') + endif + endif + + if has('win32unix') || has('wsl') + call extend(s:clone_opt, ['-c', 'core.eol=lf', '-c', 'core.autocrlf=input']) + endif + + let s:submodule_opt = s:git_version_requirement(2, 8) ? ' --jobs='.threads : '' + + " Python version requirement (>= 2.7) + if python && !has('python3') && !ruby && !use_job && s:update.threads > 1 + redir => pyv + silent python import platform; print platform.python_version() + redir END + let python = s:version_requirement( + \ map(split(split(pyv)[0], '\.'), 'str2nr(v:val)'), [2, 6]) + endif + + if (python || ruby) && s:update.threads > 1 + try + let imd = &imd + if s:mac_gui + set noimd + endif + if ruby + call s:update_ruby() + else + call s:update_python() + endif + catch + let lines = getline(4, '$') + let printed = {} + silent! 4,$d _ + for line in lines + let name = s:extract_name(line, '.', '') + if empty(name) || !has_key(printed, name) + call append('$', line) + if !empty(name) + let printed[name] = 1 + if line[0] == 'x' && index(s:update.errors, name) < 0 + call add(s:update.errors, name) + end + endif + endif + endfor + finally + let &imd = imd + call s:update_finish() + endtry + else + call s:update_vim() + while use_job && sync + sleep 100m + if s:update.fin + break + endif + endwhile + endif +endfunction + +function! s:log4(name, msg) + call setline(4, printf('- %s (%s)', a:msg, a:name)) + redraw +endfunction + +function! s:update_finish() + if exists('s:git_terminal_prompt') + let $GIT_TERMINAL_PROMPT = s:git_terminal_prompt + endif + if s:switch_in() + call append(3, '- Updating ...') | 4 + for [name, spec] in items(filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && (s:update.force || s:update.pull || has_key(s:update.new, v:key))')) + let [pos, _] = s:logpos(name) + if !pos + continue + endif + if has_key(spec, 'commit') + call s:log4(name, 'Checking out '.spec.commit) + let out = s:checkout(spec) + elseif has_key(spec, 'tag') + let tag = spec.tag + if tag =~ '\*' + let tags = s:lines(s:system('git tag --list '.plug#shellescape(tag).' --sort -version:refname 2>&1', spec.dir)) + if !v:shell_error && !empty(tags) + let tag = tags[0] + call s:log4(name, printf('Latest tag for %s -> %s', spec.tag, tag)) + call append(3, '') + endif + endif + call s:log4(name, 'Checking out '.tag) + let out = s:system('git checkout -q '.plug#shellescape(tag).' -- 2>&1', spec.dir) + else + let branch = s:git_origin_branch(spec) + call s:log4(name, 'Merging origin/'.s:esc(branch)) + let out = s:system('git checkout -q '.plug#shellescape(branch).' -- 2>&1' + \. (has_key(s:update.new, name) ? '' : ('&& git merge --ff-only '.plug#shellescape('origin/'.branch).' 2>&1')), spec.dir) + endif + if !v:shell_error && filereadable(spec.dir.'/.gitmodules') && + \ (s:update.force || has_key(s:update.new, name) || s:is_updated(spec.dir)) + call s:log4(name, 'Updating submodules. This may take a while.') + let out .= s:bang('git submodule update --init --recursive'.s:submodule_opt.' 2>&1', spec.dir) + endif + let msg = s:format_message(v:shell_error ? 'x': '-', name, out) + if v:shell_error + call add(s:update.errors, name) + call s:regress_bar() + silent execute pos 'd _' + call append(4, msg) | 4 + elseif !empty(out) + call setline(pos, msg[0]) + endif + redraw + endfor + silent 4 d _ + try + call s:do(s:update.pull, s:update.force, filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && has_key(v:val, "do")')) + catch + call s:warn('echom', v:exception) + call s:warn('echo', '') + return + endtry + call s:finish(s:update.pull) + call setline(1, 'Updated. Elapsed time: ' . split(reltimestr(reltime(s:update.start)))[0] . ' sec.') + call s:switch_out('normal! gg') + endif +endfunction + +function! s:job_abort() + if (!s:nvim && !s:vim8) || !exists('s:jobs') + return + endif + + for [name, j] in items(s:jobs) + if s:nvim + silent! call jobstop(j.jobid) + elseif s:vim8 + silent! call job_stop(j.jobid) + endif + if j.new + call s:rm_rf(g:plugs[name].dir) + endif + endfor + let s:jobs = {} +endfunction + +function! s:last_non_empty_line(lines) + let len = len(a:lines) + for idx in range(len) + let line = a:lines[len-idx-1] + if !empty(line) + return line + endif + endfor + return '' +endfunction + +function! s:job_out_cb(self, data) abort + let self = a:self + let data = remove(self.lines, -1) . a:data + let lines = map(split(data, "\n", 1), 'split(v:val, "\r", 1)[-1]') + call extend(self.lines, lines) + " To reduce the number of buffer updates + let self.tick = get(self, 'tick', -1) + 1 + if !self.running || self.tick % len(s:jobs) == 0 + let bullet = self.running ? (self.new ? '+' : '*') : (self.error ? 'x' : '-') + let result = self.error ? join(self.lines, "\n") : s:last_non_empty_line(self.lines) + call s:log(bullet, self.name, result) + endif +endfunction + +function! s:job_exit_cb(self, data) abort + let a:self.running = 0 + let a:self.error = a:data != 0 + call s:reap(a:self.name) + call s:tick() +endfunction + +function! s:job_cb(fn, job, ch, data) + if !s:plug_window_exists() " plug window closed + return s:job_abort() + endif + call call(a:fn, [a:job, a:data]) +endfunction + +function! s:nvim_cb(job_id, data, event) dict abort + return (a:event == 'stdout' || a:event == 'stderr') ? + \ s:job_cb('s:job_out_cb', self, 0, join(a:data, "\n")) : + \ s:job_cb('s:job_exit_cb', self, 0, a:data) +endfunction + +function! s:spawn(name, cmd, opts) + let job = { 'name': a:name, 'running': 1, 'error': 0, 'lines': [''], + \ 'new': get(a:opts, 'new', 0) } + let s:jobs[a:name] = job + + if s:nvim + if has_key(a:opts, 'dir') + let job.cwd = a:opts.dir + endif + let argv = a:cmd + call extend(job, { + \ 'on_stdout': function('s:nvim_cb'), + \ 'on_stderr': function('s:nvim_cb'), + \ 'on_exit': function('s:nvim_cb'), + \ }) + let jid = s:plug_call('jobstart', argv, job) + if jid > 0 + let job.jobid = jid + else + let job.running = 0 + let job.error = 1 + let job.lines = [jid < 0 ? argv[0].' is not executable' : + \ 'Invalid arguments (or job table is full)'] + endif + elseif s:vim8 + let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"script": 0})')) + if has_key(a:opts, 'dir') + let cmd = s:with_cd(cmd, a:opts.dir, 0) + endif + let argv = s:is_win ? ['cmd', '/s', '/c', '"'.cmd.'"'] : ['sh', '-c', cmd] + let jid = job_start(s:is_win ? join(argv, ' ') : argv, { + \ 'out_cb': function('s:job_cb', ['s:job_out_cb', job]), + \ 'err_cb': function('s:job_cb', ['s:job_out_cb', job]), + \ 'exit_cb': function('s:job_cb', ['s:job_exit_cb', job]), + \ 'err_mode': 'raw', + \ 'out_mode': 'raw' + \}) + if job_status(jid) == 'run' + let job.jobid = jid + else + let job.running = 0 + let job.error = 1 + let job.lines = ['Failed to start job'] + endif + else + let job.lines = s:lines(call('s:system', has_key(a:opts, 'dir') ? [a:cmd, a:opts.dir] : [a:cmd])) + let job.error = v:shell_error != 0 + let job.running = 0 + endif +endfunction + +function! s:reap(name) + let job = s:jobs[a:name] + if job.error + call add(s:update.errors, a:name) + elseif get(job, 'new', 0) + let s:update.new[a:name] = 1 + endif + let s:update.bar .= job.error ? 'x' : '=' + + let bullet = job.error ? 'x' : '-' + let result = job.error ? join(job.lines, "\n") : s:last_non_empty_line(job.lines) + call s:log(bullet, a:name, empty(result) ? 'OK' : result) + call s:bar() + + call remove(s:jobs, a:name) +endfunction + +function! s:bar() + if s:switch_in() + let total = len(s:update.all) + call setline(1, (s:update.pull ? 'Updating' : 'Installing'). + \ ' plugins ('.len(s:update.bar).'/'.total.')') + call s:progress_bar(2, s:update.bar, total) + call s:switch_out() + endif +endfunction + +function! s:logpos(name) + let max = line('$') + for i in range(4, max > 4 ? max : 4) + if getline(i) =~# '^[-+x*] '.a:name.':' + for j in range(i + 1, max > 5 ? max : 5) + if getline(j) !~ '^ ' + return [i, j - 1] + endif + endfor + return [i, i] + endif + endfor + return [0, 0] +endfunction + +function! s:log(bullet, name, lines) + if s:switch_in() + let [b, e] = s:logpos(a:name) + if b > 0 + silent execute printf('%d,%d d _', b, e) + if b > winheight('.') + let b = 4 + endif + else + let b = 4 + endif + " FIXME For some reason, nomodifiable is set after :d in vim8 + setlocal modifiable + call append(b - 1, s:format_message(a:bullet, a:name, a:lines)) + call s:switch_out() + endif +endfunction + +function! s:update_vim() + let s:jobs = {} + + call s:bar() + call s:tick() +endfunction + +function! s:tick() + let pull = s:update.pull + let prog = s:progress_opt(s:nvim || s:vim8) +while 1 " Without TCO, Vim stack is bound to explode + if empty(s:update.todo) + if empty(s:jobs) && !s:update.fin + call s:update_finish() + let s:update.fin = 1 + endif + return + endif + + let name = keys(s:update.todo)[0] + let spec = remove(s:update.todo, name) + let new = empty(globpath(spec.dir, '.git', 1)) + + call s:log(new ? '+' : '*', name, pull ? 'Updating ...' : 'Installing ...') + redraw + + let has_tag = has_key(spec, 'tag') + if !new + let [error, _] = s:git_validate(spec, 0) + if empty(error) + if pull + let cmd = s:git_version_requirement(2) ? ['git', '-c', 'credential.helper=', 'fetch'] : ['git', 'fetch'] + if has_tag && !empty(globpath(spec.dir, '.git/shallow')) + call extend(cmd, ['--depth', '99999999']) + endif + if !empty(prog) + call add(cmd, prog) + endif + call s:spawn(name, cmd, { 'dir': spec.dir }) + else + let s:jobs[name] = { 'running': 0, 'lines': ['Already installed'], 'error': 0 } + endif + else + let s:jobs[name] = { 'running': 0, 'lines': s:lines(error), 'error': 1 } + endif + else + let cmd = ['git', 'clone'] + if !has_tag + call extend(cmd, s:clone_opt) + endif + if !empty(prog) + call add(cmd, prog) + endif + call s:spawn(name, extend(cmd, [spec.uri, s:trim(spec.dir)]), { 'new': 1 }) + endif + + if !s:jobs[name].running + call s:reap(name) + endif + if len(s:jobs) >= s:update.threads + break + endif +endwhile +endfunction + +function! s:update_python() +let py_exe = has('python') ? 'python' : 'python3' +execute py_exe "<< EOF" +import datetime +import functools +import os +try: + import queue +except ImportError: + import Queue as queue +import random +import re +import shutil +import signal +import subprocess +import tempfile +import threading as thr +import time +import traceback +import vim + +G_NVIM = vim.eval("has('nvim')") == '1' +G_PULL = vim.eval('s:update.pull') == '1' +G_RETRIES = int(vim.eval('get(g:, "plug_retries", 2)')) + 1 +G_TIMEOUT = int(vim.eval('get(g:, "plug_timeout", 60)')) +G_CLONE_OPT = ' '.join(vim.eval('s:clone_opt')) +G_PROGRESS = vim.eval('s:progress_opt(1)') +G_LOG_PROB = 1.0 / int(vim.eval('s:update.threads')) +G_STOP = thr.Event() +G_IS_WIN = vim.eval('s:is_win') == '1' + +class PlugError(Exception): + def __init__(self, msg): + self.msg = msg +class CmdTimedOut(PlugError): + pass +class CmdFailed(PlugError): + pass +class InvalidURI(PlugError): + pass +class Action(object): + INSTALL, UPDATE, ERROR, DONE = ['+', '*', 'x', '-'] + +class Buffer(object): + def __init__(self, lock, num_plugs, is_pull): + self.bar = '' + self.event = 'Updating' if is_pull else 'Installing' + self.lock = lock + self.maxy = int(vim.eval('winheight(".")')) + self.num_plugs = num_plugs + + def __where(self, name): + """ Find first line with name in current buffer. Return line num. """ + found, lnum = False, 0 + matcher = re.compile('^[-+x*] {0}:'.format(name)) + for line in vim.current.buffer: + if matcher.search(line) is not None: + found = True + break + lnum += 1 + + if not found: + lnum = -1 + return lnum + + def header(self): + curbuf = vim.current.buffer + curbuf[0] = self.event + ' plugins ({0}/{1})'.format(len(self.bar), self.num_plugs) + + num_spaces = self.num_plugs - len(self.bar) + curbuf[1] = '[{0}{1}]'.format(self.bar, num_spaces * ' ') + + with self.lock: + vim.command('normal! 2G') + vim.command('redraw') + + def write(self, action, name, lines): + first, rest = lines[0], lines[1:] + msg = ['{0} {1}{2}{3}'.format(action, name, ': ' if first else '', first)] + msg.extend([' ' + line for line in rest]) + + try: + if action == Action.ERROR: + self.bar += 'x' + vim.command("call add(s:update.errors, '{0}')".format(name)) + elif action == Action.DONE: + self.bar += '=' + + curbuf = vim.current.buffer + lnum = self.__where(name) + if lnum != -1: # Found matching line num + del curbuf[lnum] + if lnum > self.maxy and action in set([Action.INSTALL, Action.UPDATE]): + lnum = 3 + else: + lnum = 3 + curbuf.append(msg, lnum) + + self.header() + except vim.error: + pass + +class Command(object): + CD = 'cd /d' if G_IS_WIN else 'cd' + + def __init__(self, cmd, cmd_dir=None, timeout=60, cb=None, clean=None): + self.cmd = cmd + if cmd_dir: + self.cmd = '{0} {1} && {2}'.format(Command.CD, cmd_dir, self.cmd) + self.timeout = timeout + self.callback = cb if cb else (lambda msg: None) + self.clean = clean if clean else (lambda: None) + self.proc = None + + @property + def alive(self): + """ Returns true only if command still running. """ + return self.proc and self.proc.poll() is None + + def execute(self, ntries=3): + """ Execute the command with ntries if CmdTimedOut. + Returns the output of the command if no Exception. + """ + attempt, finished, limit = 0, False, self.timeout + + while not finished: + try: + attempt += 1 + result = self.try_command() + finished = True + return result + except CmdTimedOut: + if attempt != ntries: + self.notify_retry() + self.timeout += limit + else: + raise + + def notify_retry(self): + """ Retry required for command, notify user. """ + for count in range(3, 0, -1): + if G_STOP.is_set(): + raise KeyboardInterrupt + msg = 'Timeout. Will retry in {0} second{1} ...'.format( + count, 's' if count != 1 else '') + self.callback([msg]) + time.sleep(1) + self.callback(['Retrying ...']) + + def try_command(self): + """ Execute a cmd & poll for callback. Returns list of output. + Raises CmdFailed -> return code for Popen isn't 0 + Raises CmdTimedOut -> command exceeded timeout without new output + """ + first_line = True + + try: + tfile = tempfile.NamedTemporaryFile(mode='w+b') + preexec_fn = not G_IS_WIN and os.setsid or None + self.proc = subprocess.Popen(self.cmd, stdout=tfile, + stderr=subprocess.STDOUT, + stdin=subprocess.PIPE, shell=True, + preexec_fn=preexec_fn) + thrd = thr.Thread(target=(lambda proc: proc.wait()), args=(self.proc,)) + thrd.start() + + thread_not_started = True + while thread_not_started: + try: + thrd.join(0.1) + thread_not_started = False + except RuntimeError: + pass + + while self.alive: + if G_STOP.is_set(): + raise KeyboardInterrupt + + if first_line or random.random() < G_LOG_PROB: + first_line = False + line = '' if G_IS_WIN else nonblock_read(tfile.name) + if line: + self.callback([line]) + + time_diff = time.time() - os.path.getmtime(tfile.name) + if time_diff > self.timeout: + raise CmdTimedOut(['Timeout!']) + + thrd.join(0.5) + + tfile.seek(0) + result = [line.decode('utf-8', 'replace').rstrip() for line in tfile] + + if self.proc.returncode != 0: + raise CmdFailed([''] + result) + + return result + except: + self.terminate() + raise + + def terminate(self): + """ Terminate process and cleanup. """ + if self.alive: + if G_IS_WIN: + os.kill(self.proc.pid, signal.SIGINT) + else: + os.killpg(self.proc.pid, signal.SIGTERM) + self.clean() + +class Plugin(object): + def __init__(self, name, args, buf_q, lock): + self.name = name + self.args = args + self.buf_q = buf_q + self.lock = lock + self.tag = args.get('tag', 0) + + def manage(self): + try: + if os.path.exists(self.args['dir']): + self.update() + else: + self.install() + with self.lock: + thread_vim_command("let s:update.new['{0}'] = 1".format(self.name)) + except PlugError as exc: + self.write(Action.ERROR, self.name, exc.msg) + except KeyboardInterrupt: + G_STOP.set() + self.write(Action.ERROR, self.name, ['Interrupted!']) + except: + # Any exception except those above print stack trace + msg = 'Trace:\n{0}'.format(traceback.format_exc().rstrip()) + self.write(Action.ERROR, self.name, msg.split('\n')) + raise + + def install(self): + target = self.args['dir'] + if target[-1] == '\\': + target = target[0:-1] + + def clean(target): + def _clean(): + try: + shutil.rmtree(target) + except OSError: + pass + return _clean + + self.write(Action.INSTALL, self.name, ['Installing ...']) + callback = functools.partial(self.write, Action.INSTALL, self.name) + cmd = 'git clone {0} {1} {2} {3} 2>&1'.format( + '' if self.tag else G_CLONE_OPT, G_PROGRESS, self.args['uri'], + esc(target)) + com = Command(cmd, None, G_TIMEOUT, callback, clean(target)) + result = com.execute(G_RETRIES) + self.write(Action.DONE, self.name, result[-1:]) + + def repo_uri(self): + cmd = 'git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url' + command = Command(cmd, self.args['dir'], G_TIMEOUT,) + result = command.execute(G_RETRIES) + return result[-1] + + def update(self): + actual_uri = self.repo_uri() + expect_uri = self.args['uri'] + regex = re.compile(r'^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$') + ma = regex.match(actual_uri) + mb = regex.match(expect_uri) + if ma is None or mb is None or ma.groups() != mb.groups(): + msg = ['', + 'Invalid URI: {0}'.format(actual_uri), + 'Expected {0}'.format(expect_uri), + 'PlugClean required.'] + raise InvalidURI(msg) + + if G_PULL: + self.write(Action.UPDATE, self.name, ['Updating ...']) + callback = functools.partial(self.write, Action.UPDATE, self.name) + fetch_opt = '--depth 99999999' if self.tag and os.path.isfile(os.path.join(self.args['dir'], '.git/shallow')) else '' + cmd = 'git fetch {0} {1} 2>&1'.format(fetch_opt, G_PROGRESS) + com = Command(cmd, self.args['dir'], G_TIMEOUT, callback) + result = com.execute(G_RETRIES) + self.write(Action.DONE, self.name, result[-1:]) + else: + self.write(Action.DONE, self.name, ['Already installed']) + + def write(self, action, name, msg): + self.buf_q.put((action, name, msg)) + +class PlugThread(thr.Thread): + def __init__(self, tname, args): + super(PlugThread, self).__init__() + self.tname = tname + self.args = args + + def run(self): + thr.current_thread().name = self.tname + buf_q, work_q, lock = self.args + + try: + while not G_STOP.is_set(): + name, args = work_q.get_nowait() + plug = Plugin(name, args, buf_q, lock) + plug.manage() + work_q.task_done() + except queue.Empty: + pass + +class RefreshThread(thr.Thread): + def __init__(self, lock): + super(RefreshThread, self).__init__() + self.lock = lock + self.running = True + + def run(self): + while self.running: + with self.lock: + thread_vim_command('noautocmd normal! a') + time.sleep(0.33) + + def stop(self): + self.running = False + +if G_NVIM: + def thread_vim_command(cmd): + vim.session.threadsafe_call(lambda: vim.command(cmd)) +else: + def thread_vim_command(cmd): + vim.command(cmd) + +def esc(name): + return '"' + name.replace('"', '\"') + '"' + +def nonblock_read(fname): + """ Read a file with nonblock flag. Return the last line. """ + fread = os.open(fname, os.O_RDONLY | os.O_NONBLOCK) + buf = os.read(fread, 100000).decode('utf-8', 'replace') + os.close(fread) + + line = buf.rstrip('\r\n') + left = max(line.rfind('\r'), line.rfind('\n')) + if left != -1: + left += 1 + line = line[left:] + + return line + +def main(): + thr.current_thread().name = 'main' + nthreads = int(vim.eval('s:update.threads')) + plugs = vim.eval('s:update.todo') + mac_gui = vim.eval('s:mac_gui') == '1' + + lock = thr.Lock() + buf = Buffer(lock, len(plugs), G_PULL) + buf_q, work_q = queue.Queue(), queue.Queue() + for work in plugs.items(): + work_q.put(work) + + start_cnt = thr.active_count() + for num in range(nthreads): + tname = 'PlugT-{0:02}'.format(num) + thread = PlugThread(tname, (buf_q, work_q, lock)) + thread.start() + if mac_gui: + rthread = RefreshThread(lock) + rthread.start() + + while not buf_q.empty() or thr.active_count() != start_cnt: + try: + action, name, msg = buf_q.get(True, 0.25) + buf.write(action, name, ['OK'] if not msg else msg) + buf_q.task_done() + except queue.Empty: + pass + except KeyboardInterrupt: + G_STOP.set() + + if mac_gui: + rthread.stop() + rthread.join() + +main() +EOF +endfunction + +function! s:update_ruby() + ruby << EOF + module PlugStream + SEP = ["\r", "\n", nil] + def get_line + buffer = '' + loop do + char = readchar rescue return + if SEP.include? char.chr + buffer << $/ + break + else + buffer << char + end + end + buffer + end + end unless defined?(PlugStream) + + def esc arg + %["#{arg.gsub('"', '\"')}"] + end + + def killall pid + pids = [pid] + if /mswin|mingw|bccwin/ =~ RUBY_PLATFORM + pids.each { |pid| Process.kill 'INT', pid.to_i rescue nil } + else + unless `which pgrep 2> /dev/null`.empty? + children = pids + until children.empty? + children = children.map { |pid| + `pgrep -P #{pid}`.lines.map { |l| l.chomp } + }.flatten + pids += children + end + end + pids.each { |pid| Process.kill 'TERM', pid.to_i rescue nil } + end + end + + def compare_git_uri a, b + regex = %r{^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$} + regex.match(a).to_a.drop(1) == regex.match(b).to_a.drop(1) + end + + require 'thread' + require 'fileutils' + require 'timeout' + running = true + iswin = VIM::evaluate('s:is_win').to_i == 1 + pull = VIM::evaluate('s:update.pull').to_i == 1 + base = VIM::evaluate('g:plug_home') + all = VIM::evaluate('s:update.todo') + limit = VIM::evaluate('get(g:, "plug_timeout", 60)') + tries = VIM::evaluate('get(g:, "plug_retries", 2)') + 1 + nthr = VIM::evaluate('s:update.threads').to_i + maxy = VIM::evaluate('winheight(".")').to_i + vim7 = VIM::evaluate('v:version').to_i <= 703 && RUBY_PLATFORM =~ /darwin/ + cd = iswin ? 'cd /d' : 'cd' + tot = VIM::evaluate('len(s:update.todo)') || 0 + bar = '' + skip = 'Already installed' + mtx = Mutex.new + take1 = proc { mtx.synchronize { running && all.shift } } + logh = proc { + cnt = bar.length + $curbuf[1] = "#{pull ? 'Updating' : 'Installing'} plugins (#{cnt}/#{tot})" + $curbuf[2] = '[' + bar.ljust(tot) + ']' + VIM::command('normal! 2G') + VIM::command('redraw') + } + where = proc { |name| (1..($curbuf.length)).find { |l| $curbuf[l] =~ /^[-+x*] #{name}:/ } } + log = proc { |name, result, type| + mtx.synchronize do + ing = ![true, false].include?(type) + bar += type ? '=' : 'x' unless ing + b = case type + when :install then '+' when :update then '*' + when true, nil then '-' else + VIM::command("call add(s:update.errors, '#{name}')") + 'x' + end + result = + if type || type.nil? + ["#{b} #{name}: #{result.lines.to_a.last || 'OK'}"] + elsif result =~ /^Interrupted|^Timeout/ + ["#{b} #{name}: #{result}"] + else + ["#{b} #{name}"] + result.lines.map { |l| " " << l } + end + if lnum = where.call(name) + $curbuf.delete lnum + lnum = 4 if ing && lnum > maxy + end + result.each_with_index do |line, offset| + $curbuf.append((lnum || 4) - 1 + offset, line.gsub(/\e\[./, '').chomp) + end + logh.call + end + } + bt = proc { |cmd, name, type, cleanup| + tried = timeout = 0 + begin + tried += 1 + timeout += limit + fd = nil + data = '' + if iswin + Timeout::timeout(timeout) do + tmp = VIM::evaluate('tempname()') + system("(#{cmd}) > #{tmp}") + data = File.read(tmp).chomp + File.unlink tmp rescue nil + end + else + fd = IO.popen(cmd).extend(PlugStream) + first_line = true + log_prob = 1.0 / nthr + while line = Timeout::timeout(timeout) { fd.get_line } + data << line + log.call name, line.chomp, type if name && (first_line || rand < log_prob) + first_line = false + end + fd.close + end + [$? == 0, data.chomp] + rescue Timeout::Error, Interrupt => e + if fd && !fd.closed? + killall fd.pid + fd.close + end + cleanup.call if cleanup + if e.is_a?(Timeout::Error) && tried < tries + 3.downto(1) do |countdown| + s = countdown > 1 ? 's' : '' + log.call name, "Timeout. Will retry in #{countdown} second#{s} ...", type + sleep 1 + end + log.call name, 'Retrying ...', type + retry + end + [false, e.is_a?(Interrupt) ? "Interrupted!" : "Timeout!"] + end + } + main = Thread.current + threads = [] + watcher = Thread.new { + if vim7 + while VIM::evaluate('getchar(1)') + sleep 0.1 + end + else + require 'io/console' # >= Ruby 1.9 + nil until IO.console.getch == 3.chr + end + mtx.synchronize do + running = false + threads.each { |t| t.raise Interrupt } unless vim7 + end + threads.each { |t| t.join rescue nil } + main.kill + } + refresh = Thread.new { + while true + mtx.synchronize do + break unless running + VIM::command('noautocmd normal! a') + end + sleep 0.2 + end + } if VIM::evaluate('s:mac_gui') == 1 + + clone_opt = VIM::evaluate('s:clone_opt').join(' ') + progress = VIM::evaluate('s:progress_opt(1)') + nthr.times do + mtx.synchronize do + threads << Thread.new { + while pair = take1.call + name = pair.first + dir, uri, tag = pair.last.values_at *%w[dir uri tag] + exists = File.directory? dir + ok, result = + if exists + chdir = "#{cd} #{iswin ? dir : esc(dir)}" + ret, data = bt.call "#{chdir} && git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url", nil, nil, nil + current_uri = data.lines.to_a.last + if !ret + if data =~ /^Interrupted|^Timeout/ + [false, data] + else + [false, [data.chomp, "PlugClean required."].join($/)] + end + elsif !compare_git_uri(current_uri, uri) + [false, ["Invalid URI: #{current_uri}", + "Expected: #{uri}", + "PlugClean required."].join($/)] + else + if pull + log.call name, 'Updating ...', :update + fetch_opt = (tag && File.exist?(File.join(dir, '.git/shallow'))) ? '--depth 99999999' : '' + bt.call "#{chdir} && git fetch #{fetch_opt} #{progress} 2>&1", name, :update, nil + else + [true, skip] + end + end + else + d = esc dir.sub(%r{[\\/]+$}, '') + log.call name, 'Installing ...', :install + bt.call "git clone #{clone_opt unless tag} #{progress} #{uri} #{d} 2>&1", name, :install, proc { + FileUtils.rm_rf dir + } + end + mtx.synchronize { VIM::command("let s:update.new['#{name}'] = 1") } if !exists && ok + log.call name, result, ok + end + } if running + end + end + threads.each { |t| t.join rescue nil } + logh.call + refresh.kill if refresh + watcher.kill +EOF +endfunction + +function! s:shellesc_cmd(arg, script) + let escaped = substitute('"'.a:arg.'"', '[&|<>()@^!"]', '^&', 'g') + return substitute(escaped, '%', (a:script ? '%' : '^') . '&', 'g') +endfunction + +function! s:shellesc_ps1(arg) + return "'".substitute(escape(a:arg, '\"'), "'", "''", 'g')."'" +endfunction + +function! s:shellesc_sh(arg) + return "'".substitute(a:arg, "'", "'\\\\''", 'g')."'" +endfunction + +" Escape the shell argument based on the shell. +" Vim and Neovim's shellescape() are insufficient. +" 1. shellslash determines whether to use single/double quotes. +" Double-quote escaping is fragile for cmd.exe. +" 2. It does not work for powershell. +" 3. It does not work for *sh shells if the command is executed +" via cmd.exe (ie. cmd.exe /c sh -c command command_args) +" 4. It does not support batchfile syntax. +" +" Accepts an optional dictionary with the following keys: +" - shell: same as Vim/Neovim 'shell' option. +" If unset, fallback to 'cmd.exe' on Windows or 'sh'. +" - script: If truthy and shell is cmd.exe, escape for batchfile syntax. +function! plug#shellescape(arg, ...) + if a:arg =~# '^[A-Za-z0-9_/:.-]\+$' + return a:arg + endif + let opts = a:0 > 0 && type(a:1) == s:TYPE.dict ? a:1 : {} + let shell = get(opts, 'shell', s:is_win ? 'cmd.exe' : 'sh') + let script = get(opts, 'script', 1) + if shell =~# 'cmd\(\.exe\)\?$' + return s:shellesc_cmd(a:arg, script) + elseif s:is_powershell(shell) + return s:shellesc_ps1(a:arg) + endif + return s:shellesc_sh(a:arg) +endfunction + +function! s:glob_dir(path) + return map(filter(s:glob(a:path, '**'), 'isdirectory(v:val)'), 's:dirpath(v:val)') +endfunction + +function! s:progress_bar(line, bar, total) + call setline(a:line, '[' . s:lpad(a:bar, a:total) . ']') +endfunction + +function! s:compare_git_uri(a, b) + " See `git help clone' + " https:// [user@] github.com[:port] / junegunn/vim-plug [.git] + " [git@] github.com[:port] : junegunn/vim-plug [.git] + " file:// / junegunn/vim-plug [/] + " / junegunn/vim-plug [/] + let pat = '^\%(\w\+://\)\='.'\%([^@/]*@\)\='.'\([^:/]*\%(:[0-9]*\)\=\)'.'[:/]'.'\(.\{-}\)'.'\%(\.git\)\=/\?$' + let ma = matchlist(a:a, pat) + let mb = matchlist(a:b, pat) + return ma[1:2] ==# mb[1:2] +endfunction + +function! s:format_message(bullet, name, message) + if a:bullet != 'x' + return [printf('%s %s: %s', a:bullet, a:name, s:lastline(a:message))] + else + let lines = map(s:lines(a:message), '" ".v:val') + return extend([printf('x %s:', a:name)], lines) + endif +endfunction + +function! s:with_cd(cmd, dir, ...) + let script = a:0 > 0 ? a:1 : 1 + return printf('cd%s %s && %s', s:is_win ? ' /d' : '', plug#shellescape(a:dir, {'script': script}), a:cmd) +endfunction + +function! s:system(cmd, ...) + let batchfile = '' + try + let [sh, shellcmdflag, shrd] = s:chsh(1) + if type(a:cmd) == s:TYPE.list + " Neovim's system() supports list argument to bypass the shell + " but it cannot set the working directory for the command. + " Assume that the command does not rely on the shell. + if has('nvim') && a:0 == 0 + return system(a:cmd) + endif + let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"shell": &shell, "script": 0})')) + if s:is_powershell(&shell) + let cmd = '& ' . cmd + endif + else + let cmd = a:cmd + endif + if a:0 > 0 + let cmd = s:with_cd(cmd, a:1, type(a:cmd) != s:TYPE.list) + endif + if s:is_win && type(a:cmd) != s:TYPE.list + let [batchfile, cmd] = s:batchfile(cmd) + endif + return system(cmd) + finally + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win && filereadable(batchfile) + call delete(batchfile) + endif + endtry +endfunction + +function! s:system_chomp(...) + let ret = call('s:system', a:000) + return v:shell_error ? '' : substitute(ret, '\n$', '', '') +endfunction + +function! s:git_validate(spec, check_branch) + let err = '' + if isdirectory(a:spec.dir) + let result = [s:git_local_branch(a:spec.dir), s:git_origin_url(a:spec.dir)] + let remote = result[-1] + if empty(remote) + let err = join([remote, 'PlugClean required.'], "\n") + elseif !s:compare_git_uri(remote, a:spec.uri) + let err = join(['Invalid URI: '.remote, + \ 'Expected: '.a:spec.uri, + \ 'PlugClean required.'], "\n") + elseif a:check_branch && has_key(a:spec, 'commit') + let sha = s:git_revision(a:spec.dir) + if empty(sha) + let err = join(add(result, 'PlugClean required.'), "\n") + elseif !s:hash_match(sha, a:spec.commit) + let err = join([printf('Invalid HEAD (expected: %s, actual: %s)', + \ a:spec.commit[:6], sha[:6]), + \ 'PlugUpdate required.'], "\n") + endif + elseif a:check_branch + let current_branch = result[0] + " Check tag + let origin_branch = s:git_origin_branch(a:spec) + if has_key(a:spec, 'tag') + let tag = s:system_chomp('git describe --exact-match --tags HEAD 2>&1', a:spec.dir) + if a:spec.tag !=# tag && a:spec.tag !~ '\*' + let err = printf('Invalid tag: %s (expected: %s). Try PlugUpdate.', + \ (empty(tag) ? 'N/A' : tag), a:spec.tag) + endif + " Check branch + elseif origin_branch !=# current_branch + let err = printf('Invalid branch: %s (expected: %s). Try PlugUpdate.', + \ current_branch, origin_branch) + endif + if empty(err) + let [ahead, behind] = split(s:lastline(s:system([ + \ 'git', 'rev-list', '--count', '--left-right', + \ printf('HEAD...origin/%s', origin_branch) + \ ], a:spec.dir)), '\t') + if !v:shell_error && ahead + if behind + " Only mention PlugClean if diverged, otherwise it's likely to be + " pushable (and probably not that messed up). + let err = printf( + \ "Diverged from origin/%s (%d commit(s) ahead and %d commit(s) behind!\n" + \ .'Backup local changes and run PlugClean and PlugUpdate to reinstall it.', origin_branch, ahead, behind) + else + let err = printf("Ahead of origin/%s by %d commit(s).\n" + \ .'Cannot update until local changes are pushed.', + \ origin_branch, ahead) + endif + endif + endif + endif + else + let err = 'Not found' + endif + return [err, err =~# 'PlugClean'] +endfunction + +function! s:rm_rf(dir) + if isdirectory(a:dir) + return s:system(s:is_win + \ ? 'rmdir /S /Q '.plug#shellescape(a:dir) + \ : ['rm', '-rf', a:dir]) + endif +endfunction + +function! s:clean(force) + call s:prepare() + call append(0, 'Searching for invalid plugins in '.g:plug_home) + call append(1, '') + + " List of valid directories + let dirs = [] + let errs = {} + let [cnt, total] = [0, len(g:plugs)] + for [name, spec] in items(g:plugs) + if !s:is_managed(name) + call add(dirs, spec.dir) + else + let [err, clean] = s:git_validate(spec, 1) + if clean + let errs[spec.dir] = s:lines(err)[0] + else + call add(dirs, spec.dir) + endif + endif + let cnt += 1 + call s:progress_bar(2, repeat('=', cnt), total) + normal! 2G + redraw + endfor + + let allowed = {} + for dir in dirs + let allowed[s:dirpath(s:plug_fnamemodify(dir, ':h:h'))] = 1 + let allowed[dir] = 1 + for child in s:glob_dir(dir) + let allowed[child] = 1 + endfor + endfor + + let todo = [] + let found = sort(s:glob_dir(g:plug_home)) + while !empty(found) + let f = remove(found, 0) + if !has_key(allowed, f) && isdirectory(f) + call add(todo, f) + call append(line('$'), '- ' . f) + if has_key(errs, f) + call append(line('$'), ' ' . errs[f]) + endif + let found = filter(found, 'stridx(v:val, f) != 0') + end + endwhile + + 4 + redraw + if empty(todo) + call append(line('$'), 'Already clean.') + else + let s:clean_count = 0 + call append(3, ['Directories to delete:', '']) + redraw! + if a:force || s:ask_no_interrupt('Delete all directories?') + call s:delete([6, line('$')], 1) + else + call setline(4, 'Cancelled.') + nnoremap <silent> <buffer> d :set opfunc=<sid>delete_op<cr>g@ + nmap <silent> <buffer> dd d_ + xnoremap <silent> <buffer> d :<c-u>call <sid>delete_op(visualmode(), 1)<cr> + echo 'Delete the lines (d{motion}) to delete the corresponding directories' + endif + endif + 4 + setlocal nomodifiable +endfunction + +function! s:delete_op(type, ...) + call s:delete(a:0 ? [line("'<"), line("'>")] : [line("'["), line("']")], 0) +endfunction + +function! s:delete(range, force) + let [l1, l2] = a:range + let force = a:force + let err_count = 0 + while l1 <= l2 + let line = getline(l1) + if line =~ '^- ' && isdirectory(line[2:]) + execute l1 + redraw! + let answer = force ? 1 : s:ask('Delete '.line[2:].'?', 1) + let force = force || answer > 1 + if answer + let err = s:rm_rf(line[2:]) + setlocal modifiable + if empty(err) + call setline(l1, '~'.line[1:]) + let s:clean_count += 1 + else + delete _ + call append(l1 - 1, s:format_message('x', line[1:], err)) + let l2 += len(s:lines(err)) + let err_count += 1 + endif + let msg = printf('Removed %d directories.', s:clean_count) + if err_count > 0 + let msg .= printf(' Failed to remove %d directories.', err_count) + endif + call setline(4, msg) + setlocal nomodifiable + endif + endif + let l1 += 1 + endwhile +endfunction + +function! s:upgrade() + echo 'Downloading the latest version of vim-plug' + redraw + let tmp = s:plug_tempname() + let new = tmp . '/plug.vim' + + try + let out = s:system(['git', 'clone', '--depth', '1', s:plug_src, tmp]) + if v:shell_error + return s:err('Error upgrading vim-plug: '. out) + endif + + if readfile(s:me) ==# readfile(new) + echo 'vim-plug is already up-to-date' + return 0 + else + call rename(s:me, s:me . '.old') + call rename(new, s:me) + unlet g:loaded_plug + echo 'vim-plug has been upgraded' + return 1 + endif + finally + silent! call s:rm_rf(tmp) + endtry +endfunction + +function! s:upgrade_specs() + for spec in values(g:plugs) + let spec.frozen = get(spec, 'frozen', 0) + endfor +endfunction + +function! s:status() + call s:prepare() + call append(0, 'Checking plugins') + call append(1, '') + + let ecnt = 0 + let unloaded = 0 + let [cnt, total] = [0, len(g:plugs)] + for [name, spec] in items(g:plugs) + let is_dir = isdirectory(spec.dir) + if has_key(spec, 'uri') + if is_dir + let [err, _] = s:git_validate(spec, 1) + let [valid, msg] = [empty(err), empty(err) ? 'OK' : err] + else + let [valid, msg] = [0, 'Not found. Try PlugInstall.'] + endif + else + if is_dir + let [valid, msg] = [1, 'OK'] + else + let [valid, msg] = [0, 'Not found.'] + endif + endif + let cnt += 1 + let ecnt += !valid + " `s:loaded` entry can be missing if PlugUpgraded + if is_dir && get(s:loaded, name, -1) == 0 + let unloaded = 1 + let msg .= ' (not loaded)' + endif + call s:progress_bar(2, repeat('=', cnt), total) + call append(3, s:format_message(valid ? '-' : 'x', name, msg)) + normal! 2G + redraw + endfor + call setline(1, 'Finished. '.ecnt.' error(s).') + normal! gg + setlocal nomodifiable + if unloaded + echo "Press 'L' on each line to load plugin, or 'U' to update" + nnoremap <silent> <buffer> L :call <SID>status_load(line('.'))<cr> + xnoremap <silent> <buffer> L :call <SID>status_load(line('.'))<cr> + end +endfunction + +function! s:extract_name(str, prefix, suffix) + return matchstr(a:str, '^'.a:prefix.' \zs[^:]\+\ze:.*'.a:suffix.'$') +endfunction + +function! s:status_load(lnum) + let line = getline(a:lnum) + let name = s:extract_name(line, '-', '(not loaded)') + if !empty(name) + call plug#load(name) + setlocal modifiable + call setline(a:lnum, substitute(line, ' (not loaded)$', '', '')) + setlocal nomodifiable + endif +endfunction + +function! s:status_update() range + let lines = getline(a:firstline, a:lastline) + let names = filter(map(lines, 's:extract_name(v:val, "[x-]", "")'), '!empty(v:val)') + if !empty(names) + echo + execute 'PlugUpdate' join(names) + endif +endfunction + +function! s:is_preview_window_open() + silent! wincmd P + if &previewwindow + wincmd p + return 1 + endif +endfunction + +function! s:find_name(lnum) + for lnum in reverse(range(1, a:lnum)) + let line = getline(lnum) + if empty(line) + return '' + endif + let name = s:extract_name(line, '-', '') + if !empty(name) + return name + endif + endfor + return '' +endfunction + +function! s:preview_commit() + if b:plug_preview < 0 + let b:plug_preview = !s:is_preview_window_open() + endif + + let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}') + if empty(sha) + let name = matchstr(getline('.'), '^- \zs[^:]*\ze:$') + if empty(name) + return + endif + let title = 'HEAD@{1}..' + let command = 'git diff --no-color HEAD@{1}' + else + let title = sha + let command = 'git show --no-color --pretty=medium '.sha + let name = s:find_name(line('.')) + endif + + if empty(name) || !has_key(g:plugs, name) || !isdirectory(g:plugs[name].dir) + return + endif + + if exists('g:plug_pwindow') && !s:is_preview_window_open() + execute g:plug_pwindow + execute 'e' title + else + execute 'pedit' title + wincmd P + endif + setlocal previewwindow filetype=git buftype=nofile bufhidden=wipe nobuflisted modifiable + let batchfile = '' + try + let [sh, shellcmdflag, shrd] = s:chsh(1) + let cmd = 'cd '.plug#shellescape(g:plugs[name].dir).' && '.command + if s:is_win + let [batchfile, cmd] = s:batchfile(cmd) + endif + execute 'silent %!' cmd + finally + let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] + if s:is_win && filereadable(batchfile) + call delete(batchfile) + endif + endtry + setlocal nomodifiable + nnoremap <silent> <buffer> q :q<cr> + wincmd p +endfunction + +function! s:section(flags) + call search('\(^[x-] \)\@<=[^:]\+:', a:flags) +endfunction + +function! s:format_git_log(line) + let indent = ' ' + let tokens = split(a:line, nr2char(1)) + if len(tokens) != 5 + return indent.substitute(a:line, '\s*$', '', '') + endif + let [graph, sha, refs, subject, date] = tokens + let tag = matchstr(refs, 'tag: [^,)]\+') + let tag = empty(tag) ? ' ' : ' ('.tag.') ' + return printf('%s%s%s%s%s (%s)', indent, graph, sha, tag, subject, date) +endfunction + +function! s:append_ul(lnum, text) + call append(a:lnum, ['', a:text, repeat('-', len(a:text))]) +endfunction + +function! s:diff() + call s:prepare() + call append(0, ['Collecting changes ...', '']) + let cnts = [0, 0] + let bar = '' + let total = filter(copy(g:plugs), 's:is_managed(v:key) && isdirectory(v:val.dir)') + call s:progress_bar(2, bar, len(total)) + for origin in [1, 0] + let plugs = reverse(sort(items(filter(copy(total), (origin ? '' : '!').'(has_key(v:val, "commit") || has_key(v:val, "tag"))')))) + if empty(plugs) + continue + endif + call s:append_ul(2, origin ? 'Pending updates:' : 'Last update:') + for [k, v] in plugs + let branch = s:git_origin_branch(v) + if len(branch) + let range = origin ? '..origin/'.branch : 'HEAD@{1}..' + let cmd = ['git', 'log', '--graph', '--color=never'] + if s:git_version_requirement(2, 10, 0) + call add(cmd, '--no-show-signature') + endif + call extend(cmd, ['--pretty=format:%x01%h%x01%d%x01%s%x01%cr', range]) + if has_key(v, 'rtp') + call extend(cmd, ['--', v.rtp]) + endif + let diff = s:system_chomp(cmd, v.dir) + if !empty(diff) + let ref = has_key(v, 'tag') ? (' (tag: '.v.tag.')') : has_key(v, 'commit') ? (' '.v.commit) : '' + call append(5, extend(['', '- '.k.':'.ref], map(s:lines(diff), 's:format_git_log(v:val)'))) + let cnts[origin] += 1 + endif + endif + let bar .= '=' + call s:progress_bar(2, bar, len(total)) + normal! 2G + redraw + endfor + if !cnts[origin] + call append(5, ['', 'N/A']) + endif + endfor + call setline(1, printf('%d plugin(s) updated.', cnts[0]) + \ . (cnts[1] ? printf(' %d plugin(s) have pending updates.', cnts[1]) : '')) + + if cnts[0] || cnts[1] + nnoremap <silent> <buffer> <plug>(plug-preview) :silent! call <SID>preview_commit()<cr> + if empty(maparg("\<cr>", 'n')) + nmap <buffer> <cr> <plug>(plug-preview) + endif + if empty(maparg('o', 'n')) + nmap <buffer> o <plug>(plug-preview) + endif + endif + if cnts[0] + nnoremap <silent> <buffer> X :call <SID>revert()<cr> + echo "Press 'X' on each block to revert the update" + endif + normal! gg + setlocal nomodifiable +endfunction + +function! s:revert() + if search('^Pending updates', 'bnW') + return + endif + + let name = s:find_name(line('.')) + if empty(name) || !has_key(g:plugs, name) || + \ input(printf('Revert the update of %s? (y/N) ', name)) !~? '^y' + return + endif + + call s:system('git reset --hard HEAD@{1} && git checkout '.plug#shellescape(g:plugs[name].branch).' --', g:plugs[name].dir) + setlocal modifiable + normal! "_dap + setlocal nomodifiable + echo 'Reverted' +endfunction + +function! s:snapshot(force, ...) abort + call s:prepare() + setf vim + call append(0, ['" Generated by vim-plug', + \ '" '.strftime("%c"), + \ '" :source this file in vim to restore the snapshot', + \ '" or execute: vim -S snapshot.vim', + \ '', '', 'PlugUpdate!']) + 1 + let anchor = line('$') - 3 + let names = sort(keys(filter(copy(g:plugs), + \'has_key(v:val, "uri") && isdirectory(v:val.dir)'))) + for name in reverse(names) + let sha = has_key(g:plugs[name], 'commit') ? g:plugs[name].commit : s:git_revision(g:plugs[name].dir) + if !empty(sha) + call append(anchor, printf("silent! let g:plugs['%s'].commit = '%s'", name, sha)) + redraw + endif + endfor + + if a:0 > 0 + let fn = s:plug_expand(a:1) + if filereadable(fn) && !(a:force || s:ask(a:1.' already exists. Overwrite?')) + return + endif + call writefile(getline(1, '$'), fn) + echo 'Saved as '.a:1 + silent execute 'e' s:esc(fn) + setf vim + endif +endfunction + +function! s:split_rtp() + return split(&rtp, '\\\@<!,') +endfunction + +let s:first_rtp = s:escrtp(get(s:split_rtp(), 0, '')) +let s:last_rtp = s:escrtp(get(s:split_rtp(), -1, '')) + +if exists('g:plugs') + let g:plugs_order = get(g:, 'plugs_order', keys(g:plugs)) + call s:upgrade_specs() + call s:define_commands() +endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/stow/vim/.vim/colors/tdpeuter-dark.vim b/stow/vim/.vim/colors/catppuccin_mocha_mod.vim similarity index 99% rename from stow/vim/.vim/colors/tdpeuter-dark.vim rename to stow/vim/.vim/colors/catppuccin_mocha_mod.vim index 25c5705..0282179 100644 --- a/stow/vim/.vim/colors/tdpeuter-dark.vim +++ b/stow/vim/.vim/colors/catppuccin_mocha_mod.vim @@ -1,4 +1,4 @@ -" Name: tdpeuter-dark.vim +" Name: catppuccin_mocha.vim set background=dark hi clear @@ -7,8 +7,7 @@ if exists('syntax on') syntax reset endif -let g:colors_name="tdpeuter-dark" -let colors_name="tdpeuter-dark" +let g:colors_name='catppuccin_mocha_mod' set t_Co=256 set cursorline diff --git a/stow/vim/.vim/colors/tdpeuter-light.vim b/stow/vim/.vim/colors/tdpeuter-light.vim deleted file mode 100644 index 609cfac..0000000 --- a/stow/vim/.vim/colors/tdpeuter-light.vim +++ /dev/null @@ -1,218 +0,0 @@ -" Name: tdpeuter-light.vim - -set background=light -highlight clear -syntax reset - -let g:colors_name="tdpeuter-light" -let colors_name="tdpeuter-light" - -let s:black = { "gui": "#383a42", "cterm": "237" } -let s:red = { "gui": "#e45649", "cterm": "167" } -let s:green = { "gui": "#50a14f", "cterm": "71" } -let s:yellow = { "gui": "#c18401", "cterm": "136" } -let s:blue = { "gui": "#0184bc", "cterm": "31" } -let s:purple = { "gui": "#a626a4", "cterm": "127" } -let s:cyan = { "gui": "#0997b3", "cterm": "31" } -let s:white = { "gui": "#fafafa", "cterm": "231" } - -let s:fg = s:black -let s:bg = s:white - -let s:comment_fg = { "gui": "#a0a1a7", "cterm": "247" } -let s:gutter_bg = { "gui": "#fafafa", "cterm": "231" } -let s:gutter_fg = { "gui": "#d4d4d4", "cterm": "252" } -let s:non_text = { "gui": "#e5e5e5", "cterm": "252" } - -let s:cursor_line = { "gui": "#f0f0f0", "cterm": "255" } -let s:color_col = { "gui": "#f0f0f0", "cterm": "255" } - -let s:selection = { "gui": "#bfceff", "cterm": "153" } -let s:vertsplit = { "gui": "#f0f0f0", "cterm": "255" } - - -function! s:h(group, fg, bg, attr) - if type(a:fg) == type({}) - exec "hi " . a:group . " guifg=" . a:fg.gui . " ctermfg=" . a:fg.cterm - else - exec "hi " . a:group . " guifg=NONE cterm=NONE" - endif - if type(a:bg) == type({}) - exec "hi " . a:group . " guibg=" . a:bg.gui . " ctermbg=" . a:bg.cterm - else - exec "hi " . a:group . " guibg=NONE ctermbg=NONE" - endif - if a:attr != "" - exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr - else - exec "hi " . a:group . " gui=NONE cterm=NONE" - endif -endfun - - -" User interface colors { -" call s:h("Normal", s:fg, s:bg, "") -" Transparent background -hi Normal guisp=NONE guifg=#383a42 guibg=#1E1E2E ctermfg=237 ctermbg=None gui=NONE cterm=NONE - -call s:h("Cursor", s:bg, s:blue, "") -call s:h("CursorColumn", "", s:cursor_line, "") -call s:h("CursorLine", "", s:cursor_line, "") - -" call s:h("LineNr", s:gutter_fg, s:gutter_bg, "") -" Transparent column -hi LineNr guisp=NONE guifg=#d4d4d4 guibg=#fafafa ctermfg=252 ctermbg=NONE gui=NONE -call s:h("CursorLineNr", s:fg, "", "") - -call s:h("DiffAdd", s:green, "", "") -call s:h("DiffChange", s:yellow, "", "") -call s:h("DiffDelete", s:red, "", "") -call s:h("DiffText", s:blue, "", "") - -call s:h("IncSearch", s:bg, s:yellow, "") -call s:h("Search", s:bg, s:yellow, "") - -call s:h("ErrorMsg", s:fg, "", "") -call s:h("ModeMsg", s:fg, "", "") -call s:h("MoreMsg", s:fg, "", "") -call s:h("WarningMsg", s:red, "", "") -call s:h("Question", s:purple, "", "") - -call s:h("Pmenu", s:fg, s:cursor_line, "") -call s:h("PmenuSel", s:bg, s:blue, "") -call s:h("PmenuSbar", "", s:cursor_line, "") -call s:h("PmenuThumb", "", s:comment_fg, "") - -call s:h("SpellBad", s:red, "", "") -call s:h("SpellCap", s:yellow, "", "") -call s:h("SpellLocal", s:yellow, "", "") -call s:h("SpellRare", s:yellow, "", "") - -call s:h("StatusLine", s:blue, s:cursor_line, "") -call s:h("StatusLineNC", s:comment_fg, s:cursor_line, "") -call s:h("TabLine", s:comment_fg, s:cursor_line, "") -call s:h("TabLineFill", s:comment_fg, s:cursor_line, "") -call s:h("TabLineSel", s:fg, s:bg, "") - -call s:h("Visual", "", s:selection, "") -call s:h("VisualNOS", "", s:selection, "") - -call s:h("ColorColumn", "", s:color_col, "") -call s:h("Conceal", s:fg, "", "") -call s:h("Directory", s:blue, "", "") -call s:h("VertSplit", s:vertsplit, s:vertsplit, "") -call s:h("Folded", s:fg, "", "") -call s:h("FoldColumn", s:fg, "", "") -call s:h("SignColumn", s:fg, "", "") - -call s:h("MatchParen", s:blue, "", "underline") -call s:h("SpecialKey", s:fg, "", "") -call s:h("Title", s:green, "", "") -call s:h("WildMenu", s:fg, "", "") -" } - - -" Syntax colors { -" Whitespace is defined in Neovim, not Vim. -" See :help hl-Whitespace and :help hl-SpecialKey -call s:h("Whitespace", s:non_text, "", "") -call s:h("NonText", s:non_text, "", "") -call s:h("Comment", s:comment_fg, "", "italic") -call s:h("Constant", s:cyan, "", "") -call s:h("String", s:green, "", "") -call s:h("Character", s:green, "", "") -call s:h("Number", s:yellow, "", "") -call s:h("Boolean", s:yellow, "", "") -call s:h("Float", s:yellow, "", "") - -call s:h("Identifier", s:red, "", "") -call s:h("Function", s:blue, "", "") -call s:h("Statement", s:purple, "", "") - -call s:h("Conditional", s:purple, "", "") -call s:h("Repeat", s:purple, "", "") -call s:h("Label", s:purple, "", "") -call s:h("Operator", s:fg, "", "") -call s:h("Keyword", s:red, "", "") -call s:h("Exception", s:purple, "", "") - -call s:h("PreProc", s:yellow, "", "") -call s:h("Include", s:purple, "", "") -call s:h("Define", s:purple, "", "") -call s:h("Macro", s:purple, "", "") -call s:h("PreCondit", s:yellow, "", "") - -call s:h("Type", s:yellow, "", "") -call s:h("StorageClass", s:yellow, "", "") -call s:h("Structure", s:yellow, "", "") -call s:h("Typedef", s:yellow, "", "") - -call s:h("Special", s:blue, "", "") -call s:h("SpecialChar", s:fg, "", "") -call s:h("Tag", s:fg, "", "") -call s:h("Delimiter", s:fg, "", "") -call s:h("SpecialComment", s:fg, "", "") -call s:h("Debug", s:fg, "", "") -call s:h("Underlined", s:fg, "", "") -call s:h("Ignore", s:fg, "", "") -call s:h("Error", s:red, s:gutter_bg, "") -call s:h("Todo", s:purple, "", "") -" } - - -" Plugins { -" GitGutter -call s:h("GitGutterAdd", s:green, s:gutter_bg, "") -call s:h("GitGutterDelete", s:red, s:gutter_bg, "") -call s:h("GitGutterChange", s:yellow, s:gutter_bg, "") -call s:h("GitGutterChangeDelete", s:red, s:gutter_bg, "") -" Fugitive -call s:h("diffAdded", s:green, "", "") -call s:h("diffRemoved", s:red, "", "") -" } - - -" Git { -call s:h("gitcommitComment", s:comment_fg, "", "") -call s:h("gitcommitUnmerged", s:red, "", "") -call s:h("gitcommitOnBranch", s:fg, "", "") -call s:h("gitcommitBranch", s:purple, "", "") -call s:h("gitcommitDiscardedType", s:red, "", "") -call s:h("gitcommitSelectedType", s:green, "", "") -call s:h("gitcommitHeader", s:fg, "", "") -call s:h("gitcommitUntrackedFile", s:cyan, "", "") -call s:h("gitcommitDiscardedFile", s:red, "", "") -call s:h("gitcommitSelectedFile", s:green, "", "") -call s:h("gitcommitUnmergedFile", s:yellow, "", "") -call s:h("gitcommitFile", s:fg, "", "") -hi link gitcommitNoBranch gitcommitBranch -hi link gitcommitUntracked gitcommitComment -hi link gitcommitDiscarded gitcommitComment -hi link gitcommitSelected gitcommitComment -hi link gitcommitDiscardedArrow gitcommitDiscardedFile -hi link gitcommitSelectedArrow gitcommitSelectedFile -hi link gitcommitUnmergedArrow gitcommitUnmergedFile -" } - -" Fix colors in neovim terminal buffers { - if has('nvim') - let g:terminal_color_0 = s:black.gui - let g:terminal_color_1 = s:red.gui - let g:terminal_color_2 = s:green.gui - let g:terminal_color_3 = s:yellow.gui - let g:terminal_color_4 = s:blue.gui - let g:terminal_color_5 = s:purple.gui - let g:terminal_color_6 = s:cyan.gui - let g:terminal_color_7 = s:white.gui - let g:terminal_color_8 = s:black.gui - let g:terminal_color_9 = s:red.gui - let g:terminal_color_10 = s:green.gui - let g:terminal_color_11 = s:yellow.gui - let g:terminal_color_12 = s:blue.gui - let g:terminal_color_13 = s:purple.gui - let g:terminal_color_14 = s:cyan.gui - let g:terminal_color_15 = s:white.gui - let g:terminal_color_background = s:bg.gui - let g:terminal_color_foreground = s:fg.gui - endif -" } diff --git a/stow/vim/.vim/source/python b/stow/vim/.vim/source/python deleted file mode 100644 index fc00b9e..0000000 --- a/stow/vim/.vim/source/python +++ /dev/null @@ -1,87 +0,0 @@ -" vimrc file for following the coding standards specified in PEP 7 & 8. -" -" To use this file, source it in your own personal .vimrc file (``source -" <filename>``) or, if you don't have a .vimrc file, you can just symlink to it -" (``ln -s <this file> ~/.vimrc``). All options are protected by autocmds -" (read below for an explanation of the command) so blind sourcing of this file -" is safe and will not affect your settings for non-Python or non-C files. -" -" -" All setting are protected by 'au' ('autocmd') statements. Only files ending -" in .py or .pyw will trigger the Python settings while files ending in *.c or -" *.h will trigger the C settings. This makes the file "safe" in terms of only -" adjusting settings for Python and C files. -" -" Only basic settings needed to enforce the style guidelines are set. -" Some suggested options are listed but commented out at the end of this file. - -" Number of spaces that a pre-existing tab is equal to. -" For the amount of space used for a new tab use shiftwidth. -au BufRead,BufNewFile *py,*pyw,*.c,*.h set tabstop=8 - -" What to use for an indent. -" This will affect Ctrl-T and 'autoindent'. -" Python: 4 spaces -" C: tabs (pre-existing files) or 4 spaces (new files) -au BufRead,BufNewFile *.py,*pyw set shiftwidth=4 -au BufRead,BufNewFile *.py,*.pyw set expandtab -fu Select_c_style() - if search('^\t', 'n', 150) - set shiftwidth=8 - set noexpandtab - el - set shiftwidth=4 - set expandtab - en -endf -au BufRead,BufNewFile *.c,*.h call Select_c_style() -au BufRead,BufNewFile Makefile* set noexpandtab - -" Use the below highlight group when displaying bad whitespace is desired. -highlight BadWhitespace ctermbg=red guibg=red - -" Display tabs at the beginning of a line in Python mode as bad. -au BufRead,BufNewFile *.py,*.pyw match BadWhitespace /^\t\+/ -" Make trailing whitespace be flagged as bad. -au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ - -" Wrap text after a certain number of characters -" Python: 79 -" C: 79 -au BufRead,BufNewFile *.py,*.pyw,*.c,*.h set textwidth=79 - -" Turn off settings in 'formatoptions' relating to comment formatting. -" - c : do not automatically insert the comment leader when wrapping based on -" 'textwidth' -" - o : do not insert the comment leader when using 'o' or 'O' from command mode -" - r : do not insert the comment leader when hitting <Enter> in insert mode -" Python: not needed -" C: prevents insertion of '*' at the beginning of every line in a comment -au BufRead,BufNewFile *.c,*.h set formatoptions-=c formatoptions-=o formatoptions-=r - -" Use UNIX (\n) line endings. -" Only used for new files so as to not force existing files to change their -" line endings. -" Python: yes -" C: yes -au BufNewFile *.py,*.pyw,*.c,*.h set fileformat=unix - - -" ---------------------------------------------------------------------------- -" The following section contains suggested settings. While in no way required -" to meet coding standards, they are helpful. - -" Set the default file encoding to UTF-8: ``set encoding=utf-8`` - -" Puts a marker at the beginning of the file to differentiate between UTF and -" UCS encoding (WARNING: can trick shells into thinking a text file is actually -" a binary file when executing the text file): ``set bomb`` - -" For full syntax highlighting: -"``let python_highlight_all=1`` -"``syntax on`` - -" Automatically indent based on file type: ``filetype indent on`` -" Keep indentation level from previous line: ``set autoindent`` - -" Folding based on indentation: ``set foldmethod=indent`` diff --git a/stow/vim/.vimrc b/stow/vim/.vimrc index 5995924..2fa7992 100644 --- a/stow/vim/.vimrc +++ b/stow/vim/.vimrc @@ -2,37 +2,88 @@ " ~/.vimrc " -source ~/.vim/theme.conf -source ~/.vim/source/python - -set autoindent -set conceallevel=2 +filetype on +filetype plugin on +filetype indent on set expandtab -set incsearch -set linebreak -set mouse=a -set nocompatible -set number -set omnifunc=ale#completion#OmniFunc -set path+=** -set relativenumber -set scrolloff=3 -set shiftwidth=4 -set showcmd -set showmatch -set smartindent set smarttab -set tabstop=4 +set smartindent +set incsearch +set showmatch set title set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx -"" Show suggestions on another line instead of inplace -set wildmenu - syntax enable -filetype on -filetype indent on -filetype plugin on +" -- + +set scrolloff=3 +set showcmd + +set autoindent +set linebreak +set shiftwidth=4 +set tabstop=4 + +set number +set relativenumber + +set conceallevel=2 + +" Add mouse support +set mouse=a +if $TERM == 'alacritty' + set ttymouse=sgr " Alacritty specific +endif + +" PLUGINS --------------------------------------------------------------- {{{ + +call plug#begin('~/.vim/plugged') + +Plug 'dense-analysis/ale' +Plug 'https://github.com/vifm/vifm.vim.git' +Plug 'catppuccin/vim', { 'as': 'catppuccin' } + +call plug#end() + +" }}} + +colorscheme catppuccin_mocha_mod + +" AUTOMATIC STUFF ------------------------------------------------------- {{{ + +if has("autocmd") + + au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif + + " https://stackoverflow.com/a/37558470/19044747 + augroup remember_folds + autocmd! + autocmd BufWinLeave * silent! mkview + autocmd BufWinEnter * silent! loadview + augroup END + +endif + +" }}} + +" TALK ------------------------------------------------------------------ {{{ +" https://youtu.be/XA2WjJbmmoM ---------------------------------------------- + +set nocompatible + +" Finding files using :find <name> +set path+=** +" Also use :b to select files in buffer + +" Show suggestions on another line instead of inplace +set wildmenu + +" Tags +" pacman -S ctags +command! MakeTags !ctags -R . & +" Move to defintion using ^] +" Move to ambigious using g^] +" Move back using ^t " File browsing let g:netrw_browse_split=4 " open in the previous window @@ -45,44 +96,4 @@ let g:netrw_liststyle=3 " treeview " ^p previous " ^x^f filename completion -if $TERM == 'alacritty' - set ttymouse=sgr " Alacritty specific -endif -if $TERM == 'xterm-kitty' - " Fix <HOME> and <END> not working - set term=xterm-256color -endif - -" Automatically start vim in a server - enable colorscheme switching -call remote_startserver("VIM") - -" AUTO ------------------------------------------------------------------ {{{ - -if has("autocmd") - au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif - - " https://stackoverflow.com/a/37558470/19044747 - augroup remember_folds - autocmd! - autocmd BufWinLeave * silent! mkview - autocmd BufWinEnter * silent! loadview - augroup END -endif - " }}} - -" PLUGINS --------------------------------------------------------------- {{{ - -call plug#begin('~/.vim/plugins') - -Plug 'catppuccin/vim', { 'as': 'catppuccin' } -Plug 'dense-analysis/ale' -Plug 'NerdyPepper/statix' -Plug 'prabirshrestha/vim-lsp' -Plug 'sheerun/vim-polyglot' -Plug 'vifm/vifm.vim' - -call plug#end() - -" }}} - diff --git a/stow/waybar/.config/waybar/config b/stow/waybar/.config/waybar/config index 0040220..a8198f5 100644 --- a/stow/waybar/.config/waybar/config +++ b/stow/waybar/.config/waybar/config @@ -3,14 +3,15 @@ // [{ + "name": "toggle", "mode": "hide", - "ipc": true, + "ipc": true, "position": "top", - "height": 25, - "spacing": 4, + "height": 25, + "spacing": 4, "margin": "-25px 0 0 0", // Show this bar on top of the other one, seemingly the "same" one. "custom/sep": { @@ -27,16 +28,18 @@ }, { + "name": "keep", "position": "top", "height": 25, - "modules-left": ["sway/mode", "keyboard-state"], - "modules-center": ["clock"], - "modules-right": ["privacy"], + "modules-left": ["sway/mode", "custom/browser"], + "modules-center": ["sway/window"], + "modules-right": ["clock"], "include": [ // Import modules (!) "~/.config/waybar/modules.json" ], + }] diff --git a/stow/waybar/.config/waybar/default.json b/stow/waybar/.config/waybar/default.json index 5a0a753..d045a28 100644 --- a/stow/waybar/.config/waybar/default.json +++ b/stow/waybar/.config/waybar/default.json @@ -1,12 +1,13 @@ + { - "modules-left": [ + "modules-left": [ "idle_inhibitor", - "mpris" + "custom/media" ], "modules-center": [ "sway/workspaces" ], - "modules-right": [ + "modules-right": [ "disk", "memory", "cpu", diff --git a/stow/waybar/.config/waybar/left.json b/stow/waybar/.config/waybar/left.json index b267c82..d8948f0 100644 --- a/stow/waybar/.config/waybar/left.json +++ b/stow/waybar/.config/waybar/left.json @@ -1,17 +1,18 @@ { - "modules-left": [ + "modules-left": [ "sway/workspaces", - "custom/scratchpad-indicator", - "mpris", - "group/system", + "idle_inhibitor", + "custom/media" ], - "modules-right": [ - "group/hardware", + "modules-right": [ + "memory", + "cpu", + "temperature", "custom/sep", - "bluetooth", - "network", - "pulseaudio", - "battery", + "bluetooth", + "network", + "pulseaudio", + "battery", "custom/sep", "tray" ] diff --git a/stow/waybar/.config/waybar/mediaplayer.py b/stow/waybar/.config/waybar/mediaplayer.py new file mode 100755 index 0000000..d0d8bbb --- /dev/null +++ b/stow/waybar/.config/waybar/mediaplayer.py @@ -0,0 +1,131 @@ +#!/usr/bin/env python3 +# From: +# https://github.com/Alexays/Waybar/blob/master/resources/custom_modules/mediaplayer.py + +import argparse +import logging +import sys +import signal +import gi +import json +gi.require_version('Playerctl', '2.0') +from gi.repository import Playerctl, GLib + +logger = logging.getLogger(__name__) + + +def write_output(text, player): + logger.info('Writing output') + + output = {'text': text, + 'class': 'custom-' + player.props.player_name, + 'alt': player.props.player_name} + + sys.stdout.write(json.dumps(output) + '\n') + sys.stdout.flush() + + +def on_play(player, status, manager): + logger.info('Received new playback status') + on_metadata(player, player.props.metadata, manager) + + +def on_metadata(player, metadata, manager): + logger.info('Received new metadata') + track_info = '' + + if player.props.player_name == 'spotify' and \ + 'mpris:trackid' in metadata.keys() and \ + ':ad:' in player.props.metadata['mpris:trackid']: + track_info = 'AD PLAYING' + elif player.get_artist() != '' and player.get_title() != '': + track_info = '{artist} - {title}'.format(artist=player.get_artist(), + title=player.get_title()) + else: + track_info = player.get_title() + + if player.props.status != 'Playing' and track_info: + track_info = ' ' + track_info + write_output(track_info, player) + + +def on_player_appeared(manager, player, selected_player=None): + if player is not None and (selected_player is None or player.name == selected_player): + init_player(manager, player) + else: + logger.debug("New player appeared, but it's not the selected player, skipping") + + +def on_player_vanished(manager, player): + logger.info('Player has vanished') + sys.stdout.write('\n') + sys.stdout.flush() + + +def init_player(manager, name): + logger.debug('Initialize player: {player}'.format(player=name.name)) + player = Playerctl.Player.new_from_name(name) + player.connect('playback-status', on_play, manager) + player.connect('metadata', on_metadata, manager) + manager.manage_player(player) + on_metadata(player, player.props.metadata, manager) + + +def signal_handler(sig, frame): + logger.debug('Received signal to stop, exiting') + sys.stdout.write('\n') + sys.stdout.flush() + # loop.quit() + sys.exit(0) + + +def parse_arguments(): + parser = argparse.ArgumentParser() + + # Increase verbosity with every occurrence of -v + parser.add_argument('-v', '--verbose', action='count', default=0) + + # Define for which player we're listening + parser.add_argument('--player') + + return parser.parse_args() + + +def main(): + arguments = parse_arguments() + + # Initialize logging + logging.basicConfig(stream=sys.stderr, level=logging.DEBUG, + format='%(name)s %(levelname)s %(message)s') + + # Logging is set by default to WARN and higher. + # With every occurrence of -v it's lowered by one + logger.setLevel(max((3 - arguments.verbose) * 10, 0)) + + # Log the sent command line arguments + logger.debug('Arguments received {}'.format(vars(arguments))) + + manager = Playerctl.PlayerManager() + loop = GLib.MainLoop() + + manager.connect('name-appeared', lambda *args: on_player_appeared(*args, arguments.player)) + manager.connect('player-vanished', on_player_vanished) + + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + signal.signal(signal.SIGPIPE, signal.SIG_DFL) + + for player in manager.props.player_names: + if arguments.player is not None and arguments.player != player.name: + logger.debug('{player} is not the filtered player, skipping it' + .format(player=player.name) + ) + continue + + init_player(manager, player) + + loop.run() + + +if __name__ == '__main__': + main() diff --git a/stow/waybar/.config/waybar/modules.json b/stow/waybar/.config/waybar/modules.json index 4edc818..3bd3ba4 100644 --- a/stow/waybar/.config/waybar/modules.json +++ b/stow/waybar/.config/waybar/modules.json @@ -1,32 +1,34 @@ { - "battery": { - "format": "{capacity}% {icon}", - "format-alt": "{time} {icon}", - "format-charging": "{capacity}% \uf0e7 {icon}", - "format-icons": ["\uf244", "\uf243", "\uf242", "\uf241", "\uf240"], - "format-plugged": "{capacity}% \ue55c", - "states": { - "warning": 30, - "critical": 15 - } - }, - "disk": { + "battery": { + "format": "{capacity}% {icon}", + "format-alt": "{time} {icon}", + "format-charging": "{capacity}% \uf0e7 {icon}", + "format-icons": ["\uf244", "\uf243", "\uf242", "\uf241", "\uf240"], + "format-plugged": "{capacity}% \ue55c", + "states": { + "warning": 30, + "critical": 15 + } + }, + + + "disk": { "interval": 30, "format": "{percentage_used}% \uf0a0", - "on-click": "kitty -e duf /", + "on-click": "alacritty -e ncdu /", "path": "/", "tooltip-format": "{used} used out of {total} on {path} ({percentage_free}% or {free} free)" }, + "bluetooth": { "format-disabled": "<big>\uf294</big>", "format-off": "\uf294", "format-on": "<big>\uf294</big>", "format-connected": "<big>\uf294</big>c", "max-length": 10.3, - "on-click": "bluetoothctl power $( bluetoothctl show | sed -n 's/\\s*Powered: \\(yes\\|no\\)/\\1/p' | sed 's/yes/off/;s/no/on/' )", - "on-click-right": "kitty -e bluetoothctl", + "on-click": "alacritty --title 'FZF-Jump' -e ~/.scripts/fzf-jump/standalone.sh ~/.scripts/fzf-jump/modules/bluetooth.sh", "tooltip-format": "{status}", "tooltip-format-on": "{status}, no devices connected", "tooltip-format-connected": "{status} ({num_connections}):\n{device_enumerate}", @@ -34,188 +36,76 @@ "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}" }, + "clock": { - "format": "{:%H:%M}", - "format-alt": "{:%d/%m/%Y %H:%M}", - "timezone": "Europe/Brussels", - "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>" - }, + "format": "{:%H:%M}", + "format-alt": "{:%d/%m/%Y %H:%M}", + // "timezone": "Europe/Brussels", + "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>" + }, + "custom/browser": { "format": "\uf120", - "on-click": "dmenu_run", + "on-click": "alacritty -t 'FZF-Jump' -e ~/.scripts/fzf-jump/launcher.sh", "tooltip-format": "Launch an application" }, - "custom/light-dark-toggle": { - "on-click": "bash ${SCRIPT_DIR}/toggle-light-dark.sh", - "tooltip-format": "Toggle between light and dark mode", - "format": "\uf042 ", - "tooltip": true - }, - "custom/night-light-toggle": { - "on-click": "bash ${SCRIPT_DIR}/sunset.sh", - "tooltip-format": "Toggle night-light on or off", - "format": "\uf0eb ", - "tooltip": true, - "tooltip-format": "Toggle night-light on or off", - }, - - "custom/scratchpad-indicator": { - "interval": 3, - "return-type": "json", - "exec": "swaymsg -t get_tree | jq --unbuffered --compact-output '(recurse(.nodes[]) | select(.name == \"__i3_scratch\") | .focus) as $scratch_ids | [.. | (.nodes? + .floating_nodes?) // empty | .[] | select(.id |IN($scratch_ids[]))] as $scratch_nodes | if ($scratch_nodes|length) > 0 then { text: \"\\($scratch_nodes | length)\", tooltip: $scratch_nodes | map(\"\\(.app_id // .window_properties.class) (\\(.id)): \\(.name)\") | join(\"\\n\") } else empty end'", - "format": "{} \uf2d2", - "on-click": "exec swaymsg 'scratchpad show'", - "on-click-right": "exec swaymsg 'move scratchpad'" - }, - - "custom/system-lock": { - "format": "\uf09c", - "tooltip": true, - "tooltip-format": "Lock device", - "on-click": "swaylock -f" - }, - - "custom/system-sleep": { - "format": "\uf186", - "tooltip": true, - "tooltip-format": "Put device to sleep", - "on-click": "swaylock -f; systemctl suspend" - }, - - "custom/system-hibernate": { - "format": "\uf2dc", - "tooltip": true, - "tooltip-format": "Hibernate device", - "on-click": "swaylock -f; systemctl hibernate" - }, - - "custom/system-reboot": { - "format": "\uf0e2", - "tooltip": true, - "tooltip-format": "Reboot device", - "on-click": "systemctl reboot" - }, - - "custom/system-shutdown": { - "format": "\uf011", - "tooltip": true, - "tooltip-format": "Shutdown device", - "on-click": "systemctl poweroff -i" - }, - - "custom/toggle-notifications": { - "on-click": "bash ${SCRIPT_DIR}/do-not-disturb.sh", - "tooltip-format": "Toggle notifications", - "format": "\uf1f6 ", - "tooltip": true + "custom/media": { + "escape": true, + "exec": "~/.config/waybar/mediaplayer.py 2> /dev/null", + "format": "{icon} {}", + "format-icons": { + "default": "\uf51f", + "spotify": "\uf1bc" + }, + "max-length": 40, + "on-click": "playerctl play-pause", + "return-type": "json" }, + "cpu": { "format": "{usage}% \uf2db", - "on-click": "foot -e htop", - "tooltip": true - }, + "on-click": "alacritty -e htop", + "tooltip": true + }, - "group/hardware": { - "orientation": "inherit", - "modules": [ - "power-profiles-daemon", - "memory", - "cpu", - "temperature", - "custom/system-shutdown", - "custom/system-reboot", - "custom/system-hibernate", - "custom/system-sleep", - "custom/system-lock", - ], - "drawer": { - "transition-duration": 500, - "transition-left-to-right": false, - "children-class": "drawer-child", - }, - }, - "group/system": { - "orientation": "inherit", - "modules": [ - "idle_inhibitor", - "custom/light-dark-toggle", - "custom/night-light-toggle", - "custom/toggle-notifications", - ], - "drawer": { - "transition-duration": 500, - "tansition-left-to-right": true, - "children-class": "drawer-child", - }, - }, - - "idle_inhibitor": { + "idle_inhibitor": { "format": "{icon}", - "format-icons": { + "format-icons": { "activated": "\uf06e", - "deactivated": "\uf070" - }, - "tooltip": false - }, + "deactivated": "\uf070" + }, + "tooltip": false + }, - "keyboard-state": { - "format": { - "capslock": "{icon}", - }, - "format-icons": { - "locked": "\uf023", - "unlocked": "" - }, - "numlock": false, - "capslock": true, - "scrollock": false, - }, - "memory": { + "memory": { "format": "{}% \uf1c0", - "on-click": "kitty -e zenith" - }, + "on-click": "alacritty -e htop" + }, - "mpris": { - // "ignored-players": ["firefox"] - "format": "{player_icon} {dynamic}", - "format-paused": "{status_icon} <i>{dynamic}</i>", - "tooltip-format": "{player} ({status}) {title} - {artist} - {album}", - "player-icons": { - "default": "\uf51f", - "spotify": "\uf1bc", - "mpv": "🎵" - }, - "status-icons": { - "paused": "⏸" - }, - "dynamic-order": [ - "title", - "artist" - ], - "dynamic-len": 40, - }, "network": { "format-disconnected": "\uf127", "format-ethernet": "\uf6ff {ifname}: {ipadds}/{cidr}", "format-wifi": "\uf1eb", "interval": 5, - "on-click-right": "kitty -e nmtui", + "on-click-right": "alacritty -e nmtui", "tooltip-format": "{ifname}: {ipaddr}", "tooltip-format-disconnected": "Disconnected", "tooltip-format-wifi": "{essid} ({signalStrength}%)\n{ifname}: {ipaddr}" }, + "sway/window": { "max-length": 85 }, + "sway/workspaces": { "all-outputs": false, "disable-scroll": true, @@ -228,65 +118,39 @@ // "0:¯\\_(ツ)_/¯": [] // } }, - - "power-profiles-daemon": { - "format": "{icon}", - "tooltip-format": "Power profile: {profile}\nDriver: {driver}", - "tooltip": true, - "format-icons": { - "default": "", - "performance": "", - "balanced": "", - "power-saver": "" - } - }, - - "privacy": { - "icon-spacing": 4, - "icon-size": 18, - "transition-duration": 250, - "modules": [ - { - "type": "screenshare", - "tooltip": true, - "tooltip-icon-size": 18, - }, - { - "type": "audio-in", - "tooltip": true, - "tooltip-icon-size": 18, - }, - ], - }, + "pulseaudio": { - "format": "{volume}% {icon}{format_source}", - "format-muted": "\uf6a9{format_source}", - "format-bluetooth": "{volume}% {icon}\uf294{format_source}", - "format-bluetooth-muted": "\uf6a9 {icon}\uf294{format_source}", - "format-source": " {volume}% \uf130", - "format-source-muted": "", - "format-icons": { - "headphone": "\uf58f", - "hands-free": "\uf590", - "headset": "\uf590", - "phone": "\uf3ce", - "portable": "\uf3ce", - "car": "\uf1b9", - "default": ["\uf026", "\uf027", "\uf028 "] - }, - "on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", + "format": "{volume}% {icon}{format_source}", + "format-bluetooth": "{volume}% {icon}\uf294{format_source}", + "format-bluetooth-muted": "\uf6a9 {icon}\uf294{format_source}", + "format-muted": "\uf6a9{format_source}", + "format-source": " {volume}% \uf130", + "format-source-muted": "", + "format-icons": { + "headphone": "\uf58f", + "hands-free": "\uf590", + "headset": "\uf590", + "phone": "\uf3ce", + "portable": "\uf3ce", + "car": "\uf1b9", + "default": ["\uf026", "\uf027", "\uf028 "] + }, + "on-click": "pamixer --toggle-mute", "on-click-right": "pavucontrol", "scroll-step": 2 - }, + }, - "temperature": { - "critical-threshold": 70, - "format": "{temperatureC}°C {icon}", - "format-icons": ["\uf2cb", "\uf2c9", "\uf2c7"] - }, - "tray": { - "spacing": 10 - } + "temperature": { + "critical-threshold": 70, + "format": "{temperatureC}°C {icon}", + "format-icons": ["\uf2cb", "\uf2c9", "\uf2c7"] + }, + + + "tray": { + "spacing": 10 + } + } diff --git a/stow/waybar/.config/waybar/style.css b/stow/waybar/.config/waybar/style.css index f9fe080..499b543 100644 --- a/stow/waybar/.config/waybar/style.css +++ b/stow/waybar/.config/waybar/style.css @@ -15,9 +15,8 @@ @define-color accent #00897b; window#waybar { - font-family: letter, "Font Awesome 6 Free", font-awesome, monospace; + font-family: Letter; /* This is my personal font. */ font-size: 13px; - -webkit-font-smoothing: antialiased; transition-property: background-color; transition-duration: .5s; } @@ -33,47 +32,22 @@ window#waybar { padding: 0 5px; } +#workspaces button:hover, #workspaces button.focused { background-color: transparent; color: @white; } -#workspaces button:hover { - background-color: transparent; - color: @transparent-black; -} - #workspaces button.urgent { color: @white; background-color: @warning-red; } /* All modules individually. */ -#backlight, -#battery, -#bluetooth, -#clock, -#cpu, -#custom-browser, -#custom-light-dark-toggle, -#custom-night-light-toggle, -#custom-system-lock, #custom-system-sleep, #custom-system-hibernate, #custom-system-reboot, #custom-system-shutdown, -#custom-toggle-notifications, -#disk, -#group-hardware, -#group-system, -#idle_inhibitor, -#keyboard-state, -#memory, -#mode, -#mpd, -#mpris, -#network, -#power-profiles-daemon, -#privacy-item.audio-in, #privacy-item.audio-out, #privacy-item.screenshare, -#pulseaudio, -#temperature, -#tray { +#backlight, #battery, #bluetooth, #clock, #cpu, +#custom-browser, #custom-media, #disk, #idle_inhibitor, +#memory, #mode, #mpd, #network, #pulseaudio, +#temperature, #tray { padding: 0 5px; } @@ -122,16 +96,17 @@ label:focus { opacity: 0.6; } -#mpris { +#custom-media { color: #2a5c45; + background-color: #66cc99; min-width: 100px; } -#mpris.spotify { +#custom-media.custom-spotify { background-color: #66cc99; } -#mpris.vlc { +#custom-media.custom-vlc { background-color: #ffa000; } @@ -139,7 +114,6 @@ label:focus { background-color: #eb4d4b; } -#custom_light-dark-toggle.activated, #idle_inhibitor.activated { background-color: #ecf0f1; color: #2d3436; @@ -154,12 +128,5 @@ label:focus { background-color: #eb4d4b; } -#privacy-item.audio-in, -#privacy-item.audio-out, -#privacy-item.screenshare { - background-color: #ffaa01; - color: #2d3436; -} - @import "sharp.css"; diff --git a/stow/zsh/.oh-my-zsh/themes/tdpeuter.zsh-theme b/stow/zsh/.oh-my-zsh/themes/mrfortem.zsh-theme similarity index 91% rename from stow/zsh/.oh-my-zsh/themes/tdpeuter.zsh-theme rename to stow/zsh/.oh-my-zsh/themes/mrfortem.zsh-theme index b3638be..53ba179 100644 --- a/stow/zsh/.oh-my-zsh/themes/tdpeuter.zsh-theme +++ b/stow/zsh/.oh-my-zsh/themes/mrfortem.zsh-theme @@ -1,5 +1,5 @@ # -# ~/.oh-my-zsh/themes/tdpeuter.zsh-theme +# ~/.oh-my-zsh/themes/mrfortem.zsh-theme # Stolen from gentoo-theme and gianni # @@ -10,7 +10,7 @@ zstyle ':vcs_info:*' check-for-changes true zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes zstyle ':vcs_info:*' actionformats '%F{5}(%F{2}%b%F{3}|%F{1}%a%c%u%m%F{5})%f ' -zstyle ':vcs_info:*' formats "%f(%F{cyan} %b%c%u%m%f)%f " +zstyle ':vcs_info:*' formats "%F{white}(%F{cyan} %b%c%u%m%F{white})%f " zstyle ':vcs_info:svn:*' branchformat '%b' zstyle ':vcs_info:svn:*' actionformats '%F{5}(%F{2}%b%F{1}:%{3}%i%F{3}|%F{1}%a%c%u%m%F{5})%f ' zstyle ':vcs_info:svn:*' formats '%F{5}(%F{2}%b%F{1}:%F{3}%i%c%u%m%F{5})%f ' @@ -35,7 +35,7 @@ add-zsh-hook precmd loadgit # Backup line(s) # PROMPT='%(!.%B%F{red}.%B%F{green}%n@)%m %F{blue}%(!.%1~.%~) ${vcs_info_msg_0_}%F{blue}%(!.#.$)%k%b%f ' # PROMPT='%(!.%B%F{red}.%B%F{green}%n@)%m %{$reset_color%}%F{cyan}%c %B${vcs_info_msg_0_}%F{green}%(!.#.$)%k%b%f ' -PROMPT='%(!.%B%F{red}%m .)%{$reset_color%}%F{cyan}%c %B${vcs_info_msg_0_}%(?.%F{green}%(!.#.$).%F{red}%?)%k%b%f ' +PROMPT='%(!.%B%F{red}%m .)%{$reset_color%}%F{cyan}%c %B${vcs_info_msg_0_}%F{green}%(!.#.$)%k%b%f ' # PROMPT='%{$fg_bold[green]%}[%n@%m%{$reset_color%} %{$fg[cyan]%}%c%{$reset_color%}$(git_prompt_info)%{$fg_bold[green]%}]%{$reset_color%}$ ' diff --git a/stow/zsh/.zshrc b/stow/zsh/.zshrc deleted file mode 100644 index 318afca..0000000 --- a/stow/zsh/.zshrc +++ /dev/null @@ -1,70 +0,0 @@ -typeset -U path cdpath fpath manpath - -path+="$HOME/.zsh/plugins/cmdtime" -fpath+="$HOME/.zsh/plugins/cmdtime" - -plugins=(dirhistory git screen) -ZSH_CUSTOM="$HOME/.oh-my-zsh" -ZSH_THEME="tdpeuter" -# Disable automatically updating -zstyle ':omz:update' mode disabled -source $ZSH_CUSTOM/oh-my-zsh.sh - -if [[ -f "$HOME/.zsh/plugins/cmdtime/cmdtime.plugin.zsh" ]]; then - source "$HOME/.zsh/plugins/cmdtime/cmdtime.plugin.zsh" -fi -if [[ -f "$HOME/.zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" ]]; then - source "$HOME/.zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" -fi - -if [[ -f "$HOME/.zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]]; then - source "$HOME/.zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" -fi - -# History options should be set in .zshrc and after oh-my-zsh sourcing. -# See https://github.com/nix-community/home-manager/issues/177. -HISTSIZE="10000" -SAVEHIST="10000" - -HISTFILE="$HOME/.zsh_history" -mkdir -p "$(dirname "$HISTFILE")" - -setopt HIST_FCNTL_LOCK -setopt HIST_IGNORE_DUPS -setopt HIST_IGNORE_SPACE -setopt HIST_EXPIRE_DUPS_FIRST -setopt SHARE_HISTORY -setopt EXTENDED_HISTORY - -# Add direnv -if [ -x "$(command -v direnv)" ]; then - eval "$(direnv hook zsh)" -fi - -# Add fzf -if [ -x "$(command -v fzf-share)" ]; then - source "$(fzf-share)/key-bindings.zsh" - source "$(fzf-share)/completion.zsh" -fi - -# Aliases -alias cp='cp -i' -alias df='df -h' -alias free='free -m' -alias gs='git status' -alias hgrep='history | grep' -alias ll='ls -la' -alias more='less' -alias np='nano -w PKGBUILD' -alias update='pushd ~/projects/sisyphus/nixos -nix flake update -sudo nixos-rebuild switch --flake .# --show-trace -popd -' - -# -- Barrier -- - -for profile in ${(z)NIX_PROFILES}; do - fpath+=($profile/share/zsh/site-functions $profile/share/zsh/$ZSH_VERSION/functions $profile/share/zsh/vendor-completions) -done -