mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-11 18:18:37 +02:00
@@ -1,4 +1,4 @@
|
||||
⚠️ Documentation outdated.
|
||||
⚠️ Documentation outdated. I recently rewrote the entire config using the [dendritic pattern](https://github.com/mightyiam/dendritic/). One of these days, I will update the README.
|
||||
|
||||
# NixOS Configuration
|
||||

|
||||
|
||||
Generated
+69
-19
@@ -11,11 +11,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1778644647,
|
||||
"narHash": "sha256-iQIu4b5by8B3qKeigungSIgRoJg9HS1NiIZwqIbCGYk=",
|
||||
"lastModified": 1779508871,
|
||||
"narHash": "sha256-SFl2je8b423f/tIy0RTgCrWQUJiyFsAZp1Y0cccXqio=",
|
||||
"owner": "caelestia-dots",
|
||||
"repo": "cli",
|
||||
"rev": "2ce6213698d1cfa15b4b067d35c3cda634f443dd",
|
||||
"rev": "7f300626704b7a86fe838ab58df654fa99779613",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -33,11 +33,11 @@
|
||||
"quickshell": "quickshell"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1778986249,
|
||||
"narHash": "sha256-6vIBRLIy41LDrm/ahTcrEj6pBB+oji7bP/5RY9Or0GA=",
|
||||
"lastModified": 1779591587,
|
||||
"narHash": "sha256-Ud83/zsmDSHcqQ64MRiQ7SnGkUVIpRzqwqBBU65DGXY=",
|
||||
"owner": "caelestia-dots",
|
||||
"repo": "shell",
|
||||
"rev": "cf18cea3dad28ddda2f151b1b42a66f2fba1f84a",
|
||||
"rev": "2f7ab5e4140d9188185f6c3164e428c1eeda1fe6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -46,6 +46,24 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1778716662,
|
||||
"narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -53,11 +71,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1778905220,
|
||||
"narHash": "sha256-ox/5IHc8uwy6UTw6N7Shp6uCHIgu/S2PsWeuXsOHSo8=",
|
||||
"lastModified": 1779506708,
|
||||
"narHash": "sha256-QOD/CNm196nCJRheux/URi4/HE66fthdOMqCJoPP1Y0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d1686dc7d36cbd1234cb226ad6ef97e882716acb",
|
||||
"rev": "3ee51fbdac8c8bdfe1e7e1fcaba6520a563f394f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -67,6 +85,21 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"import-tree": {
|
||||
"locked": {
|
||||
"lastModified": 1778781969,
|
||||
"narHash": "sha256-Jjuz5CmSkur8KvLDoGa+vylEp+RkQtv4mt/qcMznpH0=",
|
||||
"owner": "vic",
|
||||
"repo": "import-tree",
|
||||
"rev": "d321337efd0f23a9eb14a42adb7b2c29313ab274",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "vic",
|
||||
"repo": "import-tree",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"microPlugins-vivify": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@@ -117,13 +150,28 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1777168982,
|
||||
"narHash": "sha256-GOkGPcboWE9BmGCRMLX3worL4EMnsnG8MyKmXNeYuhQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "f5901329dade4a6ea039af1433fb087bd9c1fe14",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1778869304,
|
||||
"narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=",
|
||||
"lastModified": 1779536132,
|
||||
"narHash": "sha256-q+fF42iv/geEbHfgSzy3tS0FF/EyD6XTZ98E6yxiBO8=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d233902339c02a9c334e7e593de68855ad26c4cb",
|
||||
"rev": "3d8f0f3f72a6cd4d93d0ad13203f2ea1cb7e1456",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -135,11 +183,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1778737229,
|
||||
"narHash": "sha256-6xWoytx8jFW4PF1GjRm/i/53trbpKGfz6zjzQGBr4cI=",
|
||||
"lastModified": 1779102034,
|
||||
"narHash": "sha256-vZJZjLo513IeI8hjzHFc6TDezUd4uCE2Eq4SNO3DNNg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d7a713c0b7e47c908258e71cba7a2d77cc8d71d5",
|
||||
"rev": "687f05a9184cad4eaf905c48b63649e3a86f5433",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -157,11 +205,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1778488696,
|
||||
"narHash": "sha256-QSWgYuZUCNUJ/cxmaq83WkcT7lHQDDfsPVgH+96kIl0=",
|
||||
"lastModified": 1779430452,
|
||||
"narHash": "sha256-zTslhsxLqUlRTML506iougTGzyR38Fzhzn7t4KDEuuE=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "7d1c9a9c6721606b129829134d6f614f015621e2",
|
||||
"revCount": 818,
|
||||
"rev": "4b4fca3224ab977dc515ac0bb78d00b3dfa71e00",
|
||||
"revCount": 819,
|
||||
"type": "git",
|
||||
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
|
||||
},
|
||||
@@ -173,7 +221,9 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"caelestia-shell": "caelestia-shell",
|
||||
"flake-parts": "flake-parts",
|
||||
"home-manager": "home-manager",
|
||||
"import-tree": "import-tree",
|
||||
"microPlugins-vivify": "microPlugins-vivify",
|
||||
"nixos-grub-themes": "nixos-grub-themes",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
|
||||
@@ -18,49 +18,33 @@
|
||||
url = "git+https://codeberg.org/gibbert/micro-vivify";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
...
|
||||
} @ inputs: let
|
||||
system = "x86_64-linux";
|
||||
|
||||
unfreePkgs = [
|
||||
"hplip"
|
||||
"vivify.vim"
|
||||
"cheatsheet.nvim"
|
||||
];
|
||||
|
||||
mkUnfreePredicate = pkg:
|
||||
builtins.elem (nixpkgs.lib.getName pkg) unfreePkgs;
|
||||
|
||||
pkgs-unstable = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
|
||||
config.allowUnfreePredicate = mkUnfreePredicate;
|
||||
flake-parts = {
|
||||
url = "github:hercules-ci/flake-parts";
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
laptop = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs-unstable;};
|
||||
modules = [
|
||||
./hosts/laptop/configuration.nix
|
||||
# solves evaluation warning
|
||||
/*
|
||||
You have set specialArgs.pkgs, which means that options like nixpkgs.config
|
||||
and nixpkgs.overlays will be ignored. If you wish to reuse an already created
|
||||
pkgs, which you know is configured correctly for this NixOS configuration,
|
||||
please import the `nixosModules.readOnlyPkgs` module from the nixpkgs flake or
|
||||
`(modulesPath + "/misc/nixpkgs/read-only.nix"), and set `{ nixpkgs.pkgs = <your pkgs>; }`.
|
||||
This properly disables the ignored options to prevent future surprises.
|
||||
*/
|
||||
{
|
||||
nixpkgs.config.allowUnfreePredicate = mkUnfreePredicate;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
# we use home-manager directly inside of configuration.nix
|
||||
import-tree.url = "github:vic/import-tree"; # imports ./modules recursively
|
||||
};
|
||||
outputs = inputs @ {flake-parts, ...}:
|
||||
flake-parts.lib.mkFlake {inherit inputs;}
|
||||
({
|
||||
flake = let
|
||||
system = "x86_64-linux";
|
||||
unfreePkgs = [
|
||||
"hplip"
|
||||
"vivify.vim"
|
||||
"cheatsheet.nvim"
|
||||
];
|
||||
mkUnfreePredicate = pkg:
|
||||
builtins.elem (inputs.nixpkgs.lib.getName pkg) unfreePkgs;
|
||||
mkPkgs = nixpkgsInput:
|
||||
import nixpkgsInput {
|
||||
inherit system;
|
||||
config.allowUnfreePredicate = mkUnfreePredicate;
|
||||
};
|
||||
pkgs = mkPkgs inputs.nixpkgs;
|
||||
pkgs-unstable = mkPkgs inputs.nixpkgs-unstable;
|
||||
in {
|
||||
inherit pkgs pkgs-unstable;
|
||||
};
|
||||
}
|
||||
// (inputs.import-tree ./modules));
|
||||
}
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
# 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’).
|
||||
{
|
||||
# nixd says that those attributes are not used. The are used in the imported file. Do not remove.
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
inputs.home-manager.nixosModules.default
|
||||
../../hostsModules/laptop/nixos/battery.nix
|
||||
#../../modules/nixos/ly.nix
|
||||
../../modules/nixos/ly.nix
|
||||
../../modules/nixos/anki.nix
|
||||
../../modules/nixos/nixUtils.nix
|
||||
../../hostsModules/laptop/nixos/nixUtils.nix
|
||||
../../hostsModules/laptop/nixos/udev.nix
|
||||
../../modules/nixos/disk.nix
|
||||
../../hostsModules/laptop/nixos/disk.nix
|
||||
../../modules/nixos/printer.nix
|
||||
../../hostsModules/laptop/nixos/ollama.nix # llm config
|
||||
../../modules/nixos/mullvad.nix # vpn config
|
||||
../../hostsModules/laptop/nixos/autoUpdate.nix # auto update the flakes. Handles notification via libnotify and matrix-commander-rs
|
||||
../../hostsModules/laptop/nixos/autoCleanup.nix # uses alexandra deadnix and statix to clean the whole config
|
||||
../../hostsModules/laptop/nixos/bootloader.nix
|
||||
../../hostsModules/laptop/nixos/networking.nix # firewall, ssh, networkmanager, etc.
|
||||
../../modules/nixos/bluetooth.nix
|
||||
../../modules/nixos/audioAndMedia.nix
|
||||
../../modules/nixos/windowManager.nix
|
||||
../../modules/nixos/documentation.nix
|
||||
../../modules/nixos/IO.nix
|
||||
../../modules/nixos/fonts.nix
|
||||
../../modules/nixos/latex.nix
|
||||
../../modules/nixos/development.nix
|
||||
../../modules/nixos/user.nix
|
||||
../../hostsModules/laptop/nixos/user.nix
|
||||
../../modules/nixos/notifications.nix
|
||||
../../modules/nixos/browser.nix
|
||||
../../modules/nixos/theme.nix # install theming packages and some quickshell stuff
|
||||
../../hostsModules/laptop/nixos/hardwareUtils.nix
|
||||
../../modules/nixos/otherUtils.nix
|
||||
../../modules/nixos/office.nix
|
||||
];
|
||||
|
||||
# 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 = "25.11"; # Did you read the comment?
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usb_storage" "usbhid" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/6aa664c2-8b23-4e20-b6e9-1806bf0f8df2";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/A59A-7AFA";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
{inputs, ...}: {
|
||||
# every import imports a specific module for an app. This module contains the enabling of this app and its settings.
|
||||
# So if you want to add an home-manager app create a module which enables it and configures it and import it.
|
||||
imports = [
|
||||
# app modules
|
||||
../../modules/home-manager/kitty.nix # terminal # use absolute path with --impure flag or go back to /etc/nixos and use relative
|
||||
../../modules/home-manager/zoxide.nix # better cd
|
||||
../../modules/home-manager/zsh.nix # better bash
|
||||
../../hostsModules/laptop/home-manager/zsh.nix # some things are hosts dependant.
|
||||
../../modules/home-manager/gtk.nix # some config for gtk themed apps
|
||||
../../modules/home-manager/git.nix
|
||||
../../modules/home-manager/ssh.nix
|
||||
../../modules/home-manager/fastfetch.nix
|
||||
../../modules/home-manager/hyprland.nix
|
||||
../../hostsModules/laptop/home-manager/hyprland.nix
|
||||
#../../modules/home-manager/wlogout.nix # logout utility
|
||||
../../modules/home-manager/rofi.nix # used for keybinds and for clipboard
|
||||
#notifications are now manager with quickshell../../modules/home-manager/swaync.nix # notification daemon
|
||||
../../modules/home-manager/neovim.nix # dont use nixvim. broken
|
||||
#../../modules/home-manager/neovim2.nix # ./neovim2.nix uses vim plug instead of the nix repository as with ./neovim.nix see the begining of neovim2 for an explanation
|
||||
../../modules/home-manager/rclone.nix
|
||||
#../../modules/home-manager/waybar.nix
|
||||
#../../modules/home-manager/quickshell.nix # used for widgets, waybar and notifications # i migrated to caelestia-shell
|
||||
inputs.caelestia-shell.homeManagerModules.default
|
||||
../../modules/home-manager/caelestia.nix # caelestia shell is based on quickshell
|
||||
#../../modules/home-manager/oh-my-posh.nix # zsh customizer
|
||||
../../modules/home-manager/oh-my-zsh.nix # another zsh customizer
|
||||
#../../modules/home-manager/hypridle.nix
|
||||
#../../modules/home-manager/swaylock.nix
|
||||
../../modules/home-manager/anki.nix # we use only for some settings. see ../../modules/nixos/anki.nix for activating
|
||||
../../modules/home-manager/librewolf.nix # privacy browser
|
||||
../../modules/home-manager/cursor.nix # cursor (the icon not the app)
|
||||
../../modules/home-manager/ripgrep.nix # better grep
|
||||
#../../modules/home-manager/obsidian.nix obsidian was replaced with a custom solution
|
||||
../../modules/home-manager/thunderbird.nix # email client
|
||||
../../modules/home-manager/eza.nix # ls replacement
|
||||
../../modules/home-manager/vivify.nix # neovim markdown viewer (has also config for qutebrowser
|
||||
#../../modules/home-manager/micro.nix # micro text editor. Not main editor (used for testing for notewrapper)
|
||||
../../modules/home-manager/sbb-tui.nix # cff TUI app
|
||||
../../modules/home-manager/mullvad.nix # mullvad vpn
|
||||
|
||||
../../modules/home-manager/other/desktopEntries.nix # creates .desktop files
|
||||
../../modules/home-manager/other/user.nix
|
||||
];
|
||||
|
||||
# Required for Home Manager
|
||||
home.stateVersion = "25.11"; # match your Home Manager release
|
||||
# This value determines the Home Manager release that your configuration is
|
||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||
# introduces backwards incompatible changes.
|
||||
#
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
For modules that are hosts specific.
|
||||
@@ -1,10 +0,0 @@
|
||||
_: {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [
|
||||
"qtbatticon" # custom battery tray
|
||||
];
|
||||
monitor = [
|
||||
"eDP-1, highres@highrr, 0x0, 1"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
_: {
|
||||
programs.zsh = {
|
||||
shellAliases = {
|
||||
snrt = "git -C ~/nixos add -A && time sudo nixos-rebuild test --flake ~/nixos/#laptop && pkill shell || true && pkill caelestia-shell || true && caelestia-shell -n > /dev/null 2>&1 & disown";
|
||||
snrs = "git -C ~/nixos add -A && time sudo nixos-rebuild switch --flake ~/nixos/#laptop && pkill shell || true && pkill caelestia-shell || true && caelestia-shell -n > /dev/null 2>&1 & disown";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
# Ensure your script is available system-wide
|
||||
environment.systemPackages = [
|
||||
(pkgs.callPackage ../scripts/cleanNix.nix {})
|
||||
];
|
||||
users.users.tomasr = {
|
||||
linger = true; # lingering is required
|
||||
};
|
||||
|
||||
systemd.user.services.custom-cleanNix = {
|
||||
description = "NixOS configuration auto cleanup";
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
|
||||
ExecStart = "/run/current-system/sw/bin/custom-cleanNix";
|
||||
|
||||
# safety for long rebuilds
|
||||
TimeoutStartSec = "45min";
|
||||
TimeoutStopSec = "10min";
|
||||
|
||||
# avoid overlap
|
||||
RemainAfterExit = true;
|
||||
|
||||
# tweaks that should make the system run normally during the rebuilds
|
||||
Nice = 10;
|
||||
IOSchedulingClass = "best-effort";
|
||||
IOSchedulingPriority = 7;
|
||||
};
|
||||
};
|
||||
|
||||
# Systemd USER timer
|
||||
systemd.user.timers.custom-cleanNix = {
|
||||
wantedBy = ["timers.target"];
|
||||
|
||||
timerConfig = {
|
||||
OnCalendar = "Sat *-*-* 20:00:00"; # runs saturday night. If for whatever reason something breaks. I have whole sunday to fix it.
|
||||
|
||||
Persistent = true; # if it happens during shutted down
|
||||
|
||||
# avoids thundering herd on boot
|
||||
RandomizedDelaySec = "2h";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
# Ensure your script is available system-wide
|
||||
environment.systemPackages = [
|
||||
(pkgs.callPackage ../scripts/autoUpdate.nix {})
|
||||
];
|
||||
users.users.tomasr = {
|
||||
linger = true; # lingering is required
|
||||
};
|
||||
|
||||
systemd.user.services.custom-autoupdate = {
|
||||
description = "NixOS flake auto update";
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
|
||||
ExecStart = "/run/current-system/sw/bin/custom-autoupdate";
|
||||
|
||||
# safety for long rebuilds
|
||||
TimeoutStartSec = "45min";
|
||||
TimeoutStopSec = "10min";
|
||||
|
||||
# avoid overlap
|
||||
RemainAfterExit = true;
|
||||
|
||||
# tweaks that should make the system run normally during the rebuilds
|
||||
Nice = 10;
|
||||
IOSchedulingClass = "best-effort";
|
||||
IOSchedulingPriority = 7;
|
||||
};
|
||||
};
|
||||
|
||||
# Systemd USER timer
|
||||
systemd.user.timers.custom-autoupdate = {
|
||||
wantedBy = ["timers.target"];
|
||||
|
||||
timerConfig = {
|
||||
OnCalendar = "Fri *-*-* 20:00:00"; # runs friday night. If for whatever reason something breaks. I have whole week-end to fix it.
|
||||
|
||||
Persistent = true; # if it happens during shutted down
|
||||
|
||||
# avoids thundering herd on boot
|
||||
RandomizedDelaySec = "2h";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
# https://discourse.nixos.org/t/what-is-the-best-option-for-power-management/63406/2
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
# we just activate tlp unconditonally
|
||||
#let
|
||||
# cfg = config.custom;
|
||||
#hasBattery =
|
||||
# lib.any (x: lib.strings.hasPrefix "BAT" x)
|
||||
# (builtins.attrNames (builtins.readDir "/sys/class/power_supply"));
|
||||
#in
|
||||
{
|
||||
# options.custom = {
|
||||
# battery.enable = lib.mkOption {
|
||||
# default = hasBattery;
|
||||
# description = "Enable better battery support";
|
||||
# type = lib.types.bool;
|
||||
# };
|
||||
# };
|
||||
|
||||
# config = lib.mkIf cfg.battery.enable {
|
||||
powerManagement.powertop.enable = true; # enable powertop auto tuning on startup.
|
||||
# Acording to https://community.frame.work/t/solved-keys-stick-and-repeat-after-being-released/51153/12
|
||||
# Some powertop bug is responsable for the problem of the random keypress being stuck
|
||||
# fix: from https://git.gabbie.blue/blue/nixconf/src/commit/2d1bc6dad4684c019b6b3e894408e76e2734806c/hosts/gabbielaptop/configuration.nix#L68
|
||||
powerManagement.powertop.postStart = ''
|
||||
${lib.getExe' config.systemd.package "udevadm"} trigger -c bind -s usb -a idVendor=32ac -a idProduct=0018
|
||||
# Retrigger macropad udev rules
|
||||
${lib.getExe' config.systemd.package "udevadm"} trigger -c bind -s usb -a idVendor=32ac -a idProduct=0013
|
||||
'';
|
||||
services.system76-scheduler.settings.cfsProfiles.enable = true; # Better scheduling for CPU cycles - thanks System76!!!
|
||||
services.thermald.enable = true; # Enable thermald, the temperature management daemon. (only necessary if on Intel CPUs)
|
||||
services.power-profiles-daemon.enable = false; # Disable GNOMEs power management
|
||||
services.tlp = {
|
||||
enable = true; # Enable TLP (better than gnomes internal power manager)
|
||||
settings = {
|
||||
CPU_BOOST_ON_AC = 1;
|
||||
CPU_BOOST_ON_BAT = 1;
|
||||
CPU_HWP_DYN_BOOST_ON_AC = 1;
|
||||
CPU_HWP_DYN_BOOST_ON_BAT = 1;
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";
|
||||
PLATFORM_PROFILE_ON_AC = "performance";
|
||||
PLATFORM_PROFILE_ON_BAT = "balanced";
|
||||
START_CHARGE_THRESH_BAT1 = 75;
|
||||
STOP_CHARGE_THRESH_BAT1 = 85;
|
||||
};
|
||||
};
|
||||
# };
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# grub theme
|
||||
boot.loader.grub = {
|
||||
theme = inputs.nixos-grub-themes.packages.${pkgs.system}.nixos; # if you want to use nixos grub theme
|
||||
};
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
_: {
|
||||
# i found swap necessary when running nixpkgs review
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swapfile";
|
||||
size = 16384; # 16 GB
|
||||
}
|
||||
];
|
||||
boot.kernel.sysctl."vm.swappiness" = 10;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
# used for the framework 16 laptop
|
||||
framework-tool
|
||||
framework-tool-tui
|
||||
vial # Open-source GUI and QMK fork for configuring your keyboard in real time
|
||||
];
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
networkmanagerapplet # NetworkManager control applet
|
||||
inetutils # collections of network programs such as telnet
|
||||
];
|
||||
#networking.Name = "nixos"; # Define your hostname.
|
||||
#networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
#networking.proxy.default = "http://user:password@proxy:port/";
|
||||
#networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# 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;
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
_: {
|
||||
# nixpkgs-review crashed my laptop multiple times.
|
||||
nix.settings.max-jobs = 2;
|
||||
nix.settings.cores = 2;
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
{pkgs-unstable, ...}: {
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.ollama-vulkan;
|
||||
#port = 11434;
|
||||
#host = "127.0.0.1:11434";
|
||||
# loadModels load them directly into ram at startup. Doesn't download them.
|
||||
#loadModels = [ "mistral:7b" ]; # don't forget the :xxxxx for ex: "mixtral" don't work
|
||||
#syncModels = true;
|
||||
};
|
||||
systemd.services.ollama.serviceConfig.ExecStartPost = [
|
||||
# use this to auto download models
|
||||
"${pkgs-unstable.ollama-vulkan}/bin/ollama pull mistral:7b"
|
||||
];
|
||||
/*
|
||||
services.open-webui = {
|
||||
enable = true;
|
||||
port = 8080;
|
||||
environment = {
|
||||
OLLAMA_BASE_URL = "http://127.0.0.1:11434";
|
||||
WEBUI_AUTH = "True";
|
||||
};
|
||||
};
|
||||
*/
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
_: {
|
||||
# udev with only the necessary rules. See udev.nix to get all the rules
|
||||
services.udev.extraRules = ''
|
||||
# adapted from here https://wiki.nixos.org/wiki/Keychron_M6
|
||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="32ac", MODE="0660", GROUP="users", TAG+="uaccess"
|
||||
|
||||
|
||||
# taken from here
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0013", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0018", TAG+="uaccess"
|
||||
|
||||
# acording to https://community.frame.work/t/solved-keys-stick-and-repeat-after-being-released/51153/12
|
||||
# the random keypress stuck comes from conflict between powertop and udev
|
||||
# fix from: https://git.gabbie.blue/blue/nixconf/src/commit/2d1bc6dad4684c019b6b3e894408e76e2734806c/hosts/gabbielaptop/configuration.nix#L68
|
||||
# disable USB auto suspend for framework keyboard
|
||||
ACTION=="bind", SUBSYSTEM=="usb", ATTR{idVendor}=="32ac", ATTR{idProduct}=="0018", TEST=="power/control", ATTR{power/control}="on"
|
||||
# disable USB auto suspend for framework macropad
|
||||
ACTION=="bind", SUBSYSTEM=="usb", ATTR{idVendor}=="32ac", ATTR{idProduct}=="0013", TEST=="power/control", ATTR{power/control}="on"
|
||||
'';
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
# configuration is in ../../../modules/nixos/user.nix
|
||||
_: {
|
||||
home-manager.users.tomasr = ../../../hosts/laptop/home.nix;
|
||||
}
|
||||
@@ -1,175 +0,0 @@
|
||||
# because cbatticon, batticonplus and other things didn't work.
|
||||
# chatGpt did this.
|
||||
# https://chatgpt.com/c/69da11b3-ba24-8331-b7b0-a58a72e69d42
|
||||
# at your risk and perils
|
||||
# click on the icon to get a notification with state, percentage and wattage
|
||||
{
|
||||
stdenv,
|
||||
qt6,
|
||||
pkg-config,
|
||||
pkgs,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "qtbatticon";
|
||||
version = "1.0";
|
||||
|
||||
src = pkgs.writeTextFile {
|
||||
name = "qtbatticon.cpp";
|
||||
text = ''
|
||||
#include <QApplication>
|
||||
#include <QSystemTrayIcon>
|
||||
#include <QTimer>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
#include <QIcon>
|
||||
#include <QString>
|
||||
#include <QDebug>
|
||||
#include <cstdlib>
|
||||
|
||||
QString readFile(const QString &path) {
|
||||
QFile f(path);
|
||||
if (!f.open(QIODevice::ReadOnly)) return "";
|
||||
QTextStream in(&f);
|
||||
return in.readAll().trimmed();
|
||||
}
|
||||
|
||||
int readInt(const QString &path) {
|
||||
return readFile(path).toInt();
|
||||
}
|
||||
|
||||
double readDouble(const QString &path) {
|
||||
QFile f(path);
|
||||
if (!f.open(QIODevice::ReadOnly)) return 0;
|
||||
QTextStream in(&f);
|
||||
return in.readAll().trimmed().toDouble();
|
||||
}
|
||||
|
||||
int toStep(int capacity) {
|
||||
return (capacity / 10) * 10;
|
||||
}
|
||||
|
||||
QString pad3(int n) {
|
||||
return QString("%1").arg(n, 3, 10, QChar('0'));
|
||||
}
|
||||
|
||||
double getPowerW(const QString &batPath) {
|
||||
double current_uA = readDouble(batPath + "/current_now");
|
||||
double voltage_uV = readDouble(batPath + "/voltage_now");
|
||||
|
||||
if (current_uA > 0 && voltage_uV > 0) {
|
||||
return (current_uA * voltage_uV) / 1e12;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
QIcon batteryIcon(int capacity, bool charging) {
|
||||
int step = toStep(capacity);
|
||||
QString num = pad3(step);
|
||||
|
||||
QString base = "/run/current-system/sw/share/icons/Papirus/24x24/panel/";
|
||||
|
||||
QString file;
|
||||
if (charging) {
|
||||
file = base + "battery-" + num + "-charging.svg";
|
||||
} else {
|
||||
file = base + "battery-" + num + ".svg";
|
||||
}
|
||||
|
||||
QIcon icon(file);
|
||||
|
||||
if (icon.isNull()) {
|
||||
qDebug() << "FAILED icon:" << file;
|
||||
icon = QIcon(base + "battery-100.svg");
|
||||
}
|
||||
|
||||
return icon;
|
||||
}
|
||||
|
||||
void sendNotification(const QString &title, const QString &body) {
|
||||
QString cmd = "notify-send \"" + title + "\" \"" + body + "\"";
|
||||
system(cmd.toUtf8().constData());
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
QApplication app(argc, argv);
|
||||
|
||||
QString batPath = "/sys/class/power_supply/BAT1";
|
||||
QSystemTrayIcon tray;
|
||||
|
||||
auto updateIcon = [&]() {
|
||||
int capacity = readInt(batPath + "/capacity");
|
||||
QString status = readFile(batPath + "/status");
|
||||
bool charging = status.contains("Charging");
|
||||
|
||||
tray.setIcon(batteryIcon(capacity, charging));
|
||||
};
|
||||
|
||||
auto notify = [&]() {
|
||||
int capacity = readInt(batPath + "/capacity");
|
||||
QString status = readFile(batPath + "/status");
|
||||
|
||||
bool charging = status.contains("Charging");
|
||||
bool discharging = status.contains("Discharging");
|
||||
|
||||
double power = getPowerW(batPath);
|
||||
|
||||
QString state;
|
||||
if (charging) state = "Charging";
|
||||
else if (discharging) state = "Discharging";
|
||||
else state = status;
|
||||
|
||||
QString powerStr = (power > 0.01)
|
||||
? QString::number(power, 'f', 2) + " W"
|
||||
: "N/A";
|
||||
|
||||
QString msg =
|
||||
QString("%1\n%2%\n%3")
|
||||
.arg(state)
|
||||
.arg(capacity)
|
||||
.arg(powerStr);
|
||||
|
||||
sendNotification("Battery status", msg);
|
||||
};
|
||||
|
||||
QObject::connect(&tray, &QSystemTrayIcon::activated,
|
||||
[&](QSystemTrayIcon::ActivationReason r) {
|
||||
if (r == QSystemTrayIcon::Trigger) {
|
||||
notify();
|
||||
}
|
||||
});
|
||||
|
||||
updateIcon();
|
||||
tray.setVisible(true);
|
||||
|
||||
QTimer timer;
|
||||
QObject::connect(&timer, &QTimer::timeout, updateIcon);
|
||||
timer.start(5000);
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
qt6.wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
qt6.qtbase
|
||||
qt6.qtsvg
|
||||
pkgs.papirus-icon-theme
|
||||
];
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
buildPhase = ''
|
||||
g++ $src -o qtbatticon \
|
||||
$(pkg-config --cflags --libs Qt6Widgets)
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install -m755 qtbatticon $out/bin/
|
||||
'';
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
{pkgs, ...}:
|
||||
pkgs.writeShellApplication {
|
||||
name = "custom-autoupdate";
|
||||
|
||||
runtimeInputs = with pkgs; [
|
||||
git
|
||||
nixos-rebuild
|
||||
matrix-commander-rs
|
||||
libnotify
|
||||
];
|
||||
|
||||
text = ''
|
||||
set -e
|
||||
|
||||
FLAKE_DIR="/home/tomasr/nixos"
|
||||
FLAKE="$FLAKE_DIR#laptop"
|
||||
TIME=$(date -u +"%Y-%m-%dT%H-%M-%SZ")
|
||||
|
||||
ERROR_FILE=$(mktemp)
|
||||
|
||||
# snapshot current state
|
||||
git -C "$FLAKE_DIR" add -A
|
||||
git -C "$FLAKE_DIR" commit --allow-empty -m "snapshot pre-autoupdate-$TIME"
|
||||
git -C "$FLAKE_DIR" tag "pre-autoupdate-$TIME" HEAD
|
||||
|
||||
# update lock only
|
||||
nix flake update --flake "$FLAKE_DIR"
|
||||
|
||||
if sudo /run/current-system/sw/bin/nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then # use /run/.../bin/ uses the sudoless rule
|
||||
|
||||
if ! git -C "$FLAKE_DIR" diff --quiet -- flake.lock; then
|
||||
git -C "$FLAKE_DIR" add flake.lock
|
||||
git -C "$FLAKE_DIR" commit -m "flake.lock: autoupdate-$TIME"
|
||||
git -C "$FLAKE_DIR" push
|
||||
|
||||
notify-send "Flake autoupdate" "Rebuild OK"
|
||||
|
||||
matrix-commander-rs --verbose -m "Flake rebuild succesfull.<br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
||||
--html \
|
||||
-r "\!7j-78_02dHROeLj4Ns8F12eo4IiZGv4zNsQ_1-WlyIU"
|
||||
else
|
||||
notify-send "Flake autoupdate" "No changes"
|
||||
git -C "$FLAKE_DIR" push
|
||||
fi
|
||||
|
||||
else
|
||||
ERROR_MSG=$(cat "$ERROR_FILE")
|
||||
|
||||
notify-send -u critical "Flake autoupdate" "FAILED"
|
||||
|
||||
matrix-commander-rs --verbose -m "Flake rebuild failed.<br>Error: <pre>$ERROR_MSG</pre><br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
||||
--html \
|
||||
-r "\!7j-78_02dHROeLj4Ns8F12eo4IiZGv4zNsQ_1-WlyIU"
|
||||
|
||||
git -C "$FLAKE_DIR" reset --hard "pre-autoupdate-$TIME"
|
||||
fi
|
||||
|
||||
git -C "$FLAKE_DIR" tag -d "pre-autoupdate-$TIME" # removes the tag
|
||||
|
||||
rm -f "$ERROR_FILE"
|
||||
'';
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
# taken and adapted https://github.com/miniMinn24/Battery_Notify with MIT License
|
||||
{
|
||||
writeShellApplication,
|
||||
mplayer,
|
||||
brightnessctl,
|
||||
...
|
||||
}: let
|
||||
NotifySound = ../../../assets/battery_notify.mp3;
|
||||
in
|
||||
writeShellApplication {
|
||||
name = "custom-batterynotify";
|
||||
runtimeInputs = [
|
||||
mplayer
|
||||
brightnessctl
|
||||
];
|
||||
text = ''
|
||||
|
||||
# Delay for startup
|
||||
sleep 5
|
||||
|
||||
# Change your sound path here
|
||||
|
||||
playsound() {
|
||||
mplayer ${NotifySound}
|
||||
}
|
||||
|
||||
adjustBrightness() {
|
||||
local adjustment="$1"
|
||||
brightnessctl set "$adjustment"
|
||||
}
|
||||
|
||||
sendNotification() {
|
||||
local title="$1"
|
||||
local message="$2"
|
||||
notify-send -h string:x-canonical-private-synchronous:sys-notify -e -u low "$title" "$message"
|
||||
}
|
||||
|
||||
# Runs full time in background
|
||||
x=0
|
||||
while true; do
|
||||
Battery_Status="$(\cat /sys/class/power_supply/BAT*/status)"
|
||||
Battery_Capacity=$(\cat /sys/class/power_supply/BAT*/capacity)
|
||||
|
||||
case "$Battery_Status" in
|
||||
"Discharging")
|
||||
if [ $x -eq 1 ]; then
|
||||
sendNotification "Discharging" "Remains: <b>''${Battery_Capacity}%</b>"
|
||||
adjustBrightness "15%-"
|
||||
playsound
|
||||
x=0
|
||||
fi
|
||||
;;
|
||||
"Charging")
|
||||
if [ $x -eq 0 ]; then
|
||||
sendNotification "Charging" "Current: <b>''${Battery_Capacity}%</b>"
|
||||
adjustBrightness "15%+"
|
||||
playsound
|
||||
x=1
|
||||
fi
|
||||
;;
|
||||
"Full")
|
||||
if [ $x -eq 0 ]; then
|
||||
sendNotification "Fully Charged" "Noice: <b>''${Battery_Capacity}%</b>"
|
||||
playsound
|
||||
x=1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
sleep 1
|
||||
done
|
||||
'';
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
# taken and adapted https://github.com/miniMinn24/Battery_Notify with MIT License
|
||||
{
|
||||
writeShellApplication,
|
||||
mplayer,
|
||||
brightnessctl,
|
||||
...
|
||||
}: let
|
||||
NotifySound = ../../../assets/battery_notify.mp3;
|
||||
in
|
||||
writeShellApplication {
|
||||
name = "custom-batterywarning";
|
||||
runtimeInputs = [
|
||||
mplayer
|
||||
brightnessctl
|
||||
];
|
||||
text = ''
|
||||
|
||||
# Delay for startup
|
||||
sleep 5
|
||||
|
||||
|
||||
playsound() {
|
||||
mplayer ${NotifySound}
|
||||
}
|
||||
|
||||
|
||||
|
||||
while true; do
|
||||
Battery_Status="$(cat /sys/class/power_supply/BAT*/status)"
|
||||
Battery_Capacity="$(cat /sys/class/power_supply/BAT*/capacity)"
|
||||
|
||||
if [ "$Battery_Status" == "Discharging" ]; then
|
||||
if [ "$Battery_Capacity" -le 20 ] && [ "$Battery_Capacity" -ge 10 ]; then
|
||||
notify-send -e -u critical "Battery Low!" "Power running out: <b>''${Battery_Capacity}%</b>"
|
||||
playsound
|
||||
sleep 180
|
||||
|
||||
elif [ "$Battery_Capacity" -lt 10 ]; then
|
||||
notify-send -e -u critical "Battery Low!" "<b>Save your works</b> before immediate shutdown."
|
||||
playsound
|
||||
sleep 180
|
||||
fi
|
||||
else
|
||||
sleep 120
|
||||
fi
|
||||
done
|
||||
'';
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{pkgs}:
|
||||
pkgs.writeShellApplication {
|
||||
name = "custom-checkMatrix";
|
||||
|
||||
runtimeInputs = [
|
||||
pkgs.matrix-commander-rs
|
||||
pkgs.libnotify
|
||||
];
|
||||
|
||||
text = ''
|
||||
expected="@totorile1:unredacted.org"
|
||||
|
||||
current="$(matrix-commander-rs --whoami | tr -d '\n')"
|
||||
|
||||
if [ "$current" != "$expected" ]; then
|
||||
notify-send "matrix-commander-rs" \
|
||||
"You are not logged in as @totorile1:unredacted.org\nLog:\n$current"
|
||||
fi
|
||||
'';
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
{pkgs, ...}:
|
||||
pkgs.writeShellApplication {
|
||||
name = "custom-cleanNix";
|
||||
|
||||
runtimeInputs = with pkgs; [
|
||||
git
|
||||
nixos-rebuild
|
||||
matrix-commander-rs
|
||||
libnotify
|
||||
alejandra
|
||||
deadnix
|
||||
];
|
||||
|
||||
text = ''
|
||||
set -e
|
||||
|
||||
FLAKE_DIR="/home/tomasr/nixos"
|
||||
FLAKE="$FLAKE_DIR#laptop"
|
||||
TIME=$(date -u +"%Y-%m-%dT%H-%M-%SZ")
|
||||
|
||||
ERROR_FILE=$(mktemp)
|
||||
|
||||
# snapshot current state
|
||||
git -C "$FLAKE_DIR" add -A
|
||||
git -C "$FLAKE_DIR" commit --allow-empty -m "snapshot pre-cleanup-$TIME"
|
||||
git -C "$FLAKE_DIR" tag "pre-cleanup-$TIME" HEAD
|
||||
|
||||
# the echos are to separate what each one is doing. Just for curiosity
|
||||
echo "deadnix scans your Nix code and removes or reports unused (dead) variables and bindings"
|
||||
deadnix --edit "$FLAKE_DIR" # removes unused code
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "statix lints your Nix code to find stylistic issues, bad patterns, and potential mistakes."
|
||||
statix fix "$FLAKE_DIR" # check other linting issues
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "alejandra formats your Nix code consistently according to a strict, opinionated style."
|
||||
alejandra "$FLAKE_DIR" # formats the config
|
||||
echo "--------------------------------------------------------------"
|
||||
|
||||
if sudo /run/current-system/sw/bin/nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then # use /run/.../bin/ uses the sudoless rule
|
||||
|
||||
if ! git -C "$FLAKE_DIR" diff --quiet HEAD; then
|
||||
git -C "$FLAKE_DIR" add -A
|
||||
git -C "$FLAKE_DIR" commit -m "Auto: cleanup-$TIME"
|
||||
git -C "$FLAKE_DIR" push
|
||||
|
||||
notify-send "Nix auto cleanup" "Everything OK"
|
||||
|
||||
matrix-commander-rs --verbose -m "Nix auto cleanup. Everything OK.<br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
||||
--html \
|
||||
-r "\!7j-78_02dHROeLj4Ns8F12eo4IiZGv4zNsQ_1-WlyIU"
|
||||
else
|
||||
notify-send "Nix auto cleanup" "No changes"
|
||||
git -C "$FLAKE_DIR" push
|
||||
fi
|
||||
|
||||
else
|
||||
ERROR_MSG=$(cat "$ERROR_FILE")
|
||||
|
||||
notify-send -u critical "Nix auto cleanup" "FAILED"
|
||||
|
||||
matrix-commander-rs --verbose -m "Nix auto cleanup failed.<br>Error: <pre>$ERROR_MSG</pre><br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
||||
--html \
|
||||
-r "\!7j-78_02dHROeLj4Ns8F12eo4IiZGv4zNsQ_1-WlyIU"
|
||||
|
||||
git -C "$FLAKE_DIR" reset --hard "pre-cleanup-$TIME"
|
||||
fi
|
||||
git -C "$FLAKE_DIR" tag -d "pre-cleanup-$TIME" # removes the tag
|
||||
|
||||
rm -f "$ERROR_FILE"
|
||||
'';
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
This modules must be host independent.
|
||||
@@ -0,0 +1 @@
|
||||
NixOS modules and home-manager modules with their scripts for most of my Applications
|
||||
@@ -0,0 +1,67 @@
|
||||
_: {
|
||||
flake.nixosModules.anki = {pkgs, ...}: {
|
||||
environment.systemPackages = [
|
||||
(pkgs.anki.withAddons [
|
||||
(pkgs.ankiAddons.recolor.withConfig {
|
||||
config = {
|
||||
# we must specify all the colors or it crashes as this overwrite the whole colors set
|
||||
colors = {
|
||||
# ===== Foregrounds =====
|
||||
FG = ["Foreground" "#ebdbb2" "#ebdbb2" ""];
|
||||
FG_SUBTLE = ["Subtle FG" "#d5c4a1" "#d5c4a1" ""];
|
||||
FG_FAINT = ["Faint FG" "#a89984" "#a89984" ""];
|
||||
FG_DISABLED = ["Disabled FG" "#928374" "#928374" ""];
|
||||
|
||||
# ===== Main Background Layers =====
|
||||
BG = ["Background" "#1d2021" "#1d2021" ""];
|
||||
MAIN_BG = ["Main Background" "#1d2021" "#1d2021" ""];
|
||||
VIEW_BG = ["View Background" "#282828" "#282828" ""];
|
||||
EDITOR_BG = ["Editor Background" "#282828" "#282828" ""];
|
||||
CANVAS = ["Canvas" "#282828" "#282828" ""];
|
||||
CANVAS_ELEVATED = ["Elevated Canvas" "#32302f" "#32302f" ""];
|
||||
|
||||
# ===== Tables & Lists =====
|
||||
TABLE_BG = ["Table Background" "#282828" "#282828" ""];
|
||||
TABLE_ALT_BG = ["Table Alt Background" "#32302f" "#32302f" ""];
|
||||
HEADER_BG = ["Header Background" "#3c3836" "#3c3836" ""];
|
||||
SELECTED_BG = ["Selected Background" "#504945" "#504945" ""];
|
||||
|
||||
# ===== Borders =====
|
||||
BORDER = ["Border" "#504945" "#504945" ""];
|
||||
FAINT_BORDER = ["Faint Border" "#3c3836" "#3c3836" ""];
|
||||
|
||||
# ===== Buttons =====
|
||||
BUTTON_GRADIENT_START = ["Button Start" "#3c3836" "#3c3836" ""];
|
||||
BUTTON_GRADIENT_END = ["Button End" "#3c3836" "#3c3836" ""];
|
||||
BUTTON_HOVER = ["Button Hover" "#665c54" "#665c54" ""];
|
||||
|
||||
# ===== Accent & Links =====
|
||||
ACCENT = ["Accent" "#458588" "#458588" ""];
|
||||
LINK = ["Link" "#83a598" "#83a598" ""];
|
||||
LINK_HOVER = ["Link Hover" "#8ec07c" "#8ec07c" ""];
|
||||
|
||||
# ===== Status =====
|
||||
WARNING = ["Warning" "#fe8019" "#fe8019" ""];
|
||||
ERROR = ["Error" "#fb4934" "#fb4934" ""];
|
||||
SUCCESS = ["Success" "#8ec07c" "#8ec07c" ""];
|
||||
};
|
||||
};
|
||||
# version = { major = 3; minor = 1; };
|
||||
# let nixpkgs handle the version
|
||||
})
|
||||
])
|
||||
];
|
||||
};
|
||||
flake.homeModules.anki = _: {
|
||||
programs.anki = {
|
||||
# we enable system wide with nixpkgs because it offers some addon configuration. We just use this for some config
|
||||
#enable = true;
|
||||
theme = "dark";
|
||||
sync = {
|
||||
autoSync = true;
|
||||
autoSyncMediaMinutes = 10;
|
||||
syncMedia = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
_: {
|
||||
# unused at the moment see ../hardware/battery.nix
|
||||
flake.homeModules.batsignal = _: {
|
||||
services.batsignal.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,651 @@
|
||||
{self, ...}: {
|
||||
flake.nixosModules.browsers = {
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
chromium # used only to flash the firmware on my framework laptop 16 (keyboard.frame.work) as only chromium based browser support webHID.
|
||||
pkgs-unstable.tor-browser
|
||||
self.packages.${pkgs.system}.custom-librewolfprofiles
|
||||
];
|
||||
};
|
||||
flake.homeModules.librewolf = _: {
|
||||
# adapted from https://github.com/contre95/dotfiles/blob/main/dotfiles/nixos/programs/librewolf.nix
|
||||
home.sessionVariables = {
|
||||
MOZ_ENABLE_WAYLAND = 1;
|
||||
MOZ_USE_XINPUT2 = 1;
|
||||
MOZ_DBUS_REMOTE = 1;
|
||||
};
|
||||
programs.librewolf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"browser.profiles.enabled" = true;
|
||||
# disabled until i find something that uses it.
|
||||
"webgl.disabled" = true;
|
||||
# settings = lib.mapAttrs' (n: lib.nameValuePair "pref.${n}") {
|
||||
"app.update.auto" = true; # disable auto update
|
||||
#"dom.security.https_only_mode" = true; # force https
|
||||
"extensions.pocket.enabled" = false; # disable pocket
|
||||
#"browser.quitShortcut.disabled" = true; # disable ctrl+q
|
||||
"browser.download.panel.shown" = true; # show download panel
|
||||
"signon.rememberSignons" = false; # disable saving passwords
|
||||
"identity.fxaccounts.enabled" = false; # disable librewolf accounts
|
||||
"app.shield.optoutstudies.enabled" = false; # disable shield studies
|
||||
"browser.shell.checkDefaultBrowser" = false; # don't check if default browser
|
||||
#"browser.bookmarks.restore_default_bookmarks" = false; # don't restore default bookmarks
|
||||
# Download handling
|
||||
#"browser.download.dir" = "/home/meain/down"; # default download dir
|
||||
"browser.startup.page" = 3; # restore previous session
|
||||
# UI changes
|
||||
# "browser.uidensity" = 1; # enable dense UI
|
||||
#"general.autoScroll" = true; # enable autoscroll
|
||||
# "browser.compactmode.show" = true; # enable compact mode
|
||||
# "browser.tabs.firefox-view" = false; # enable librewolf view
|
||||
#"startup.homepage_welcome_url" =
|
||||
# "https://metrics.internal.contre.io/d/cUITC74Vksd/podman-revamped?orgId=1&from=2026-02-23T19:29:26.304Z&to=2026-02-23T19:59:26.304Z&timezone=browser&var-Filters=&var-namespace=alloy&var-level=error&var-level=debug&var-level=info&var-level=warn&refresh=5s&kiosk=true"; # disable welcome page
|
||||
"browser.newtabpage.enabled" = true; # disable new tab page
|
||||
"full-screen-api.ignore-widgets" = true; # fullscreen within window
|
||||
"browser.toolbars.bookmarks.visibility" = "newtab"; # hide bookmarks toolbar; always, never, newtab
|
||||
"browser.aboutConfig.showWarning" = false; # disable warning about about:config
|
||||
"media.videocontrols.picture-in-picture.video-toggle.enabled" = false; # disable picture in picture button
|
||||
|
||||
# Privacy
|
||||
"privacy.resistFingerprinting" = true;
|
||||
# "privacy.clearOnShutdown.cache" = false;
|
||||
"privacy.clearOnShutdown.history" = false;
|
||||
"privacy.clearHistory.cookiesAndStorage" = false;
|
||||
"privacy.clearHistory.historyFormDataAndDownloads" = false;
|
||||
"privacy.clearHistory.cache" = false;
|
||||
"privacy.clearOnShutdown_v2.siteSettings" = false;
|
||||
"privacy.clearOnShutdown_v2.cookiesAndStorage" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.history" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.siteSettings" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.sessions" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.cookies" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown.history" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown.siteSettings" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown.sessions" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown.cookies" = false;
|
||||
"privacy.clearOnShutdown.cookies" = false;
|
||||
"browser.discovery.enabled" = false; # disable discovery
|
||||
"browser.search.suggest.enabled" = true; # disable search suggestions
|
||||
"browser.contentblocking.category" = "standart"; # set tracking protection to standart to not interfer with adnauseam
|
||||
"dom.private-attribution.submission.enabled" = false; # stop doing dumb stuff mozilla
|
||||
"browser.protections_panel.infoMessage.seen" = true; # disable tracking protection info
|
||||
|
||||
# Theme
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"svg.context-properties.content.enabled" = true;
|
||||
"layout.css.color-mix.enabled" = true;
|
||||
|
||||
# Disable telemetry
|
||||
"toolkit.telemetry.enabled" = false;
|
||||
"toolkit.telemetry.unified" = false;
|
||||
"browser.ping-centre.telemetry" = false;
|
||||
"toolkit.telemetry.archive.enabled" = false;
|
||||
"toolkit.telemetry.bhrPing.enabled" = false;
|
||||
"toolkit.telemetry.updatePing.enabled" = false;
|
||||
"browser.translations.automaticallyPopup" = false;
|
||||
"toolkit.telemetry.hybridContent.enabled" = false;
|
||||
"toolkit.telemetry.newProfilePing.enabled" = false;
|
||||
"toolkit.telemetry.reportingpolicy.firstRun" = false;
|
||||
"toolkit.telemetry.firstShutdownPing.enabled" = false;
|
||||
"browser.newtabpage.activity-stream.telemetry" = false;
|
||||
"toolkit.telemetry.shutdownPingSender.enabled" = false;
|
||||
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
|
||||
|
||||
"browser.tabs.loadInBackground" = true; # open new tab in background
|
||||
"browser.tabs.loadBookmarksInTabs" = true; # open bookmarks in new tab
|
||||
"browser.tabs.warnOnOpen" = false; # don't warn when opening multiple tabs
|
||||
"browser.tabs.warnOnQuit" = false; # don't warn when closing multiple tabs
|
||||
"browser.tabs.warnOnClose" = false; # don't warn when closing multiple tabs
|
||||
"browser.tabs.loadDivertedInBackground" = false; # open new tab in background
|
||||
"browser.tabs.warnOnCloseOtherTabs" = false; # don't warn when closing multiple tabs
|
||||
"browser.tabs.closeWindowWithLastTab" = false; # don't close window when last tab is closed
|
||||
|
||||
# other
|
||||
"media.autoplay.default" = 0; # enable autoplay on open
|
||||
"devtools.toolbox.host" = "right"; # move devtools to right
|
||||
"devtools.theme" = "dark";
|
||||
# "browser.ssb.enabled" = true; # enable site specific browser
|
||||
"media.rdd-vpx.enabled" = true; # enable hardware acceleration
|
||||
"devtools.cache.disabled" = true; # disable caching in devtools
|
||||
"media.ffmpeg.vaapi.enabled" = true; # enable hardware acceleration
|
||||
|
||||
# Fonts
|
||||
"font.size.fixed.x-western" = 15;
|
||||
"font.minimum-size.x-western" = 13;
|
||||
"font.size.variable.x-western" = 15;
|
||||
"font.size.monospace.x-western" = 15;
|
||||
"browser.display.use_document_fonts" = 1;
|
||||
"browser.link.open_newwindow.restriction" = 0;
|
||||
#
|
||||
# "browser.fixup.domainsuffixwhitelist.home" = true;
|
||||
# "browser.fixup.domainwhitelist.internal.contre.io" = true;
|
||||
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
||||
# "keyword.enable" = false; # Disable search when typing unexistent TLD
|
||||
};
|
||||
policies = {
|
||||
ExtensionSettings = {
|
||||
# the extension id should be from the manifesto and not a random name.
|
||||
# if you dont know it. Put a random name. It will fail. Go to about:polices#error and the error will give you the correct id.
|
||||
"enhancerforyoutube@maximerf.addons.mozilla.org" = {
|
||||
installation_mode = "normal_installed";
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/enhancer-for-youtube/latest.xpi";
|
||||
};
|
||||
|
||||
"sponsorBlocker@ajay.app" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
|
||||
"adnauseam@rednoise.org" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/adnauseam/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
"uBlock0@raymondhill.net" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
"{08d5243b-4236-4a27-984b-1ded22ce01c3}" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/file/3729287/gruvboxgruvboxgruvboxgruvboxgr-1.0.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
"trackmenot@mrl.nyu.edu" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/trackmenot/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/file/4749958/bitwarden_password_manager-latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
};
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxStudies = true;
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Locked = true;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
};
|
||||
DisablePocket = true;
|
||||
DisableAccounts = true;
|
||||
DisableFirefoxScreenshots = true;
|
||||
# OverrideFirstRunPage = "";
|
||||
# OverridePostUpdatePage = "";
|
||||
DontCheckDefaultBrowser = true;
|
||||
DisplayBookmarksToolbar = "always"; # alternatives: "always" or "newtab"
|
||||
DisplayMenuBar = "never"; # alternatives: "always", "never" or "default-on"
|
||||
SearchBar = "unified"; # alternative: "separate"
|
||||
};
|
||||
profiles.work = {
|
||||
id = 0;
|
||||
# userChrome = builtins.readFile ./userChrome.css;
|
||||
# userContent = builtins.readFile ./userChrome.css;
|
||||
extensions = {
|
||||
#force = true;
|
||||
#settings = {
|
||||
# "adnauseam@rednoise.org".settings = {
|
||||
# # Core behavior
|
||||
# filteringEnabled = true;
|
||||
#
|
||||
# hidingAds = true;
|
||||
# blockingMalware = true;
|
||||
# clickingAds = true;
|
||||
#
|
||||
# # Privacy
|
||||
# disableClickingForDNT = true;
|
||||
# blockSocialMediaWidgets = false;
|
||||
#
|
||||
# # Filter lists
|
||||
# selectedFilterLists = [
|
||||
# "adnauseam-filters"
|
||||
# "easylist"
|
||||
# "easyprivacy"
|
||||
# "ublock-badware"
|
||||
# "ublock-privacy"
|
||||
# "ublock-unbreak"
|
||||
# ];
|
||||
#
|
||||
# # Advanced
|
||||
# advancedUserEnabled = false;
|
||||
# dynamicFilteringEnabled = false;
|
||||
#
|
||||
# # UI
|
||||
# showIconBadge = true;
|
||||
# parseTextAds = true;
|
||||
# eventLogging = false;
|
||||
# };
|
||||
# "trackmenot@mrl.nyu.edu".settings = {
|
||||
# enabled = true;
|
||||
|
||||
# # Query behavior
|
||||
# runAtStartup = true;
|
||||
# useTab = false; # don't open visible tab
|
||||
# showQueries = false; # don't display fake queries
|
||||
|
||||
# # Frequency (seconds between bursts)
|
||||
# timeout = 600; # 10 minutes
|
||||
# burstEnabled = true;
|
||||
# burstTimeout = 20; # burst interval
|
||||
# burstCount = 5;
|
||||
|
||||
# # Query source
|
||||
# useRssFeeds = true; # use dynamic trending feeds
|
||||
# useUserQueries = false; # don't mix your real queries
|
||||
# useBlackList = true;
|
||||
|
||||
# # Search engines to generate noise for
|
||||
# searchEngines = {
|
||||
# google = true;
|
||||
# bing = false;
|
||||
# yahoo = false;
|
||||
# baidu = false;
|
||||
# duckduckgo = false;
|
||||
# };
|
||||
|
||||
# # Logging
|
||||
# enableLogging = false;
|
||||
# };
|
||||
# "sponsorBlocker@ajay.app".settings = {
|
||||
|
||||
# # Core behavior
|
||||
# isEnabled = true;
|
||||
# autoSkip = false;
|
||||
# showSkipNotice = true;
|
||||
# # this does not work
|
||||
# # Segment categories (auto-skip behavior)
|
||||
# categoryChooser = {
|
||||
# Sponsor = {
|
||||
# enabled = true;
|
||||
# skipOption = "manualSkip";
|
||||
# };
|
||||
# intro = {
|
||||
# enabled = true;
|
||||
# actionType = 2;
|
||||
# };
|
||||
# outro = {
|
||||
# enabled = true;
|
||||
# actionType = 2;
|
||||
# };
|
||||
# selfpromo = {
|
||||
# enabled = true;
|
||||
# actionType = 2;
|
||||
# };
|
||||
# interaction = {
|
||||
# enabled = true;
|
||||
# actionType = 1; # 1 = manual skip
|
||||
# };
|
||||
# music_offtopic = {
|
||||
# enabled = false;
|
||||
# actionType = 0;
|
||||
# };
|
||||
# preview = {
|
||||
# enabled = false;
|
||||
# actionType = 0;
|
||||
# };
|
||||
# };
|
||||
|
||||
# # Privacy
|
||||
# disableTelemetry = true;
|
||||
# showDonationLink = false;
|
||||
|
||||
# # UX
|
||||
# showUpsells = false;
|
||||
# hideSkipButtonPlayerControls = false;
|
||||
|
||||
# # Advanced
|
||||
# useLocalCache = true;
|
||||
# trackViewCount = false;
|
||||
# };
|
||||
#};
|
||||
};
|
||||
bookmarks = {
|
||||
force = true;
|
||||
settings = [
|
||||
{
|
||||
name = "Nixos Config";
|
||||
tags = ["github"];
|
||||
keyword = "github";
|
||||
url = "https://github.com/tomasriveral/nixos";
|
||||
}
|
||||
{
|
||||
name = "Public AI";
|
||||
tags = ["ai" "chatgpt" "apertus"];
|
||||
keyword = "apertus";
|
||||
url = "https://chat.publicai.co/";
|
||||
}
|
||||
{
|
||||
name = "Signs of AI writing";
|
||||
tags = ["ai" "write"];
|
||||
keyword = "AI writing";
|
||||
url = "https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing";
|
||||
}
|
||||
{
|
||||
name = "nixpkgs-review-gha";
|
||||
tags = ["nixpkgs-review" "gha"];
|
||||
keyword = "nixpkgs-review";
|
||||
url = "https://github.com/tomasriveral/nixpkgs-review-gha/actions/workflows/review.yml";
|
||||
}
|
||||
{
|
||||
name = "nixpkgs tracker";
|
||||
tags = ["nixpkgs" "tracker"];
|
||||
keyword = "nixpkgs tracker";
|
||||
url = "https://nixpk.gs/pr-tracker.html";
|
||||
}
|
||||
{
|
||||
name = "fahrlehrer";
|
||||
tags = ["theorie" "fahrlehrer" "conduite"];
|
||||
keyword = "fahrlehrer24";
|
||||
url = "https://app.fahrlehrer24.ch/";
|
||||
}
|
||||
{
|
||||
name = "cogito";
|
||||
tags = ["cogito" "esprit" "critique"];
|
||||
keyword = "Cogito l'Esprit critique";
|
||||
url = "https://app.cogito.fr";
|
||||
}
|
||||
];
|
||||
};
|
||||
search = {
|
||||
force = true;
|
||||
default = "quant";
|
||||
privateDefault = "qant";
|
||||
order = [
|
||||
"q"
|
||||
"map"
|
||||
"np"
|
||||
"nw"
|
||||
"bookmarks"
|
||||
"tabs"
|
||||
"history"
|
||||
];
|
||||
engines = {
|
||||
# don't need these default ones
|
||||
"amazondotcom-es".metaData.hidden = true;
|
||||
"bing".metaData.hidden = true;
|
||||
"ebay".metaData.hidden = true;
|
||||
"metager".metaData.hidden = true; # dont work
|
||||
"mojeek".metaData.hidden = true; # dont work
|
||||
"seerx".metaData.hidden = true;
|
||||
"perplexity".metaData.hidden = true;
|
||||
"google".metaData.hidden = true;
|
||||
"startpage".metaData.hidden = true;
|
||||
"duckduckgo".metaData.hidden = true;
|
||||
"Wikitionary" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://fr.wiktionary.org/w/index.php?search={searchTerms}";
|
||||
}
|
||||
];
|
||||
definedAliases = ["dict"];
|
||||
};
|
||||
"quant" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://www.qwant.com/";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["q"];
|
||||
};
|
||||
"OpenStreeetMap" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://www.openstreetmap";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["map"];
|
||||
};
|
||||
"Home Manager Options" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://home-manager-options.extranix.com/";
|
||||
params = [
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["hm"];
|
||||
};
|
||||
"Nix Packages" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["np"];
|
||||
};
|
||||
"Nix Wiki" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";
|
||||
}
|
||||
];
|
||||
definedAliases = ["nw"];
|
||||
};
|
||||
"Repology" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://repology.org/projects/?search={searchTerms}";
|
||||
}
|
||||
];
|
||||
definedAliases = ["rp"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
profiles.other = {
|
||||
id = 1;
|
||||
# userChrome = builtins.readFile ./userChrome.css;
|
||||
# userContent = builtins.readFile ./userChrome.css;
|
||||
extensions = {
|
||||
#force = false;
|
||||
#settings = {
|
||||
# "adnauseam@rednoise.org".settings = {
|
||||
# # Core behavior
|
||||
# filteringEnabled = true;
|
||||
#
|
||||
# hidingAds = true;
|
||||
# blockingMalware = true;
|
||||
# clickingAds = true;
|
||||
#
|
||||
# # Privacy
|
||||
# disableClickingForDNT = true;
|
||||
# blockSocialMediaWidgets = false;
|
||||
#
|
||||
# # Filter lists
|
||||
# selectedFilterLists = [
|
||||
# "adnauseam-filters"
|
||||
# "easylist"
|
||||
# "easyprivacy"
|
||||
# "ublock-badware"
|
||||
# "ublock-privacy"
|
||||
# "ublock-unbreak"
|
||||
# ];
|
||||
#
|
||||
# # Advanced
|
||||
# advancedUserEnabled = false;
|
||||
# dynamicFilteringEnabled = false;
|
||||
#
|
||||
# # UI
|
||||
# showIconBadge = true;
|
||||
# parseTextAds = true;
|
||||
# eventLogging = false;
|
||||
# };
|
||||
# "trackmenot@mrl.nyu.edu".settings = {
|
||||
# enabled = true;
|
||||
|
||||
# # Query behavior
|
||||
# runAtStartup = true;
|
||||
# useTab = false; # don't open visible tab
|
||||
# showQueries = false; # don't display fake queries
|
||||
|
||||
# # Frequency (seconds between bursts)
|
||||
# timeout = 600; # 10 minutes
|
||||
# burstEnabled = true;
|
||||
# burstTimeout = 20; # burst interval
|
||||
# burstCount = 5;
|
||||
|
||||
# # Query source
|
||||
# useRssFeeds = true; # use dynamic trending feeds
|
||||
# useUserQueries = false; # don't mix your real queries
|
||||
# useBlackList = true;
|
||||
|
||||
# # Search engines to generate noise for
|
||||
# searchEngines = {
|
||||
# google = true;
|
||||
# bing = false;
|
||||
# yahoo = false;
|
||||
# baidu = false;
|
||||
# duckduckgo = false;
|
||||
# };
|
||||
|
||||
# # Logging
|
||||
# enableLogging = false;
|
||||
# };
|
||||
# "sponsorBlocker@ajay.app".settings = {
|
||||
|
||||
# # Core behavior
|
||||
# isEnabled = true;
|
||||
# autoSkip = false;
|
||||
# showSkipNotice = true;
|
||||
# # this does not work
|
||||
# # Segment categories (auto-skip behavior)
|
||||
# categoryChooser = {
|
||||
# Sponsor = {
|
||||
# enabled = true;
|
||||
# skipOption = "manualSkip";
|
||||
# };
|
||||
# intro = {
|
||||
# enabled = true;
|
||||
# actionType = 2;
|
||||
# };
|
||||
# outro = {
|
||||
# enabled = true;
|
||||
# actionType = 2;
|
||||
# };
|
||||
# selfpromo = {
|
||||
# enabled = true;
|
||||
# actionType = 2;
|
||||
# };
|
||||
# interaction = {
|
||||
# enabled = true;
|
||||
# actionType = 1; # 1 = manual skip
|
||||
# };
|
||||
# music_offtopic = {
|
||||
# enabled = false;
|
||||
# actionType = 0;
|
||||
# };
|
||||
# preview = {
|
||||
# enabled = false;
|
||||
# actionType = 0;
|
||||
# };
|
||||
# };
|
||||
|
||||
# # Privacy
|
||||
# disableTelemetry = true;
|
||||
# showDonationLink = false;
|
||||
|
||||
# # UX
|
||||
# showUpsells = false;
|
||||
# hideSkipButtonPlayerControls = false;
|
||||
|
||||
# # Advanced
|
||||
# useLocalCache = true;
|
||||
# trackViewCount = false;
|
||||
# };
|
||||
#};
|
||||
};
|
||||
search = {
|
||||
force = true;
|
||||
default = "quant";
|
||||
privateDefault = "qant";
|
||||
order = [
|
||||
"q"
|
||||
"map"
|
||||
"np"
|
||||
"nw"
|
||||
"bookmarks"
|
||||
"tabs"
|
||||
"history"
|
||||
];
|
||||
engines = {
|
||||
# don't need these default ones
|
||||
"amazondotcom-es".metaData.hidden = true;
|
||||
"bing".metaData.hidden = true;
|
||||
"ebay".metaData.hidden = true;
|
||||
"metager".metaData.hidden = true; # dont work
|
||||
"mojeek".metaData.hidden = true; # dont work
|
||||
"seerx".metaData.hidden = true;
|
||||
"perplexity".metaData.hidden = true;
|
||||
"google".metaData.hidden = true;
|
||||
"startpage".metaData.hidden = true;
|
||||
"duckduckgo".metaData.hidden = true;
|
||||
"quant" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://www.qwant.com/";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["q"];
|
||||
};
|
||||
"OpenStreeetMap" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://www.openstreetmap";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["map"];
|
||||
};
|
||||
"Onche.org" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://onche.org/forum/1/blabla-general/search?by=topic&q={searchTerms}";
|
||||
}
|
||||
];
|
||||
definedAliases = ["on"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,610 @@
|
||||
{self, ...}: {
|
||||
flake.nixosModules.caelestia = {pkgs, ...}: {
|
||||
qt.enable = true;
|
||||
# to resolve this https://wiki.nixos.org/wiki/Home_Manager#I_cannot_set_GNOME_or_Gtk_themes_via_Home_Manager
|
||||
programs.dconf.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
self.packages.${pkgs.system}.qtbatticon
|
||||
kdePackages.qtdeclarative # provides qmlls and other things
|
||||
quickshell # we have it but adding it there solves "WARN qt.qpa.services: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: App info not found for 'org.quickshell'")"
|
||||
];
|
||||
};
|
||||
flake.homeModules.caelestia = _: let
|
||||
sisyphe = ../../assets/sisyphe.gif;
|
||||
pepe-music = ../../assets/pepe-music.gif;
|
||||
in {
|
||||
home.file.".local/state/caelestia/wallpaper/path.txt" = {
|
||||
# dummy file. Does nothing. Prevent an error
|
||||
enable = true;
|
||||
text = "${sisyphe}";
|
||||
};
|
||||
home.file.".face" = {
|
||||
# this is were caelestia will search for profiles pictures
|
||||
source = ../../assets/sisyphePFP.png;
|
||||
};
|
||||
# set profile picture in ~/.face
|
||||
programs.caelestia = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = false; # if we launch it form here, the keybinds don't work
|
||||
target = "graphical-session.target";
|
||||
environment = [];
|
||||
};
|
||||
settings = {
|
||||
# default config https://github.com/caelestia-dots/shell?tab=readme-ov-file#example-configuration
|
||||
appearance = {
|
||||
mediaGifSpeedAdjustment = 500;
|
||||
sessionGifSpeed = 0.7;
|
||||
anim = {
|
||||
duration = {
|
||||
scale = 1;
|
||||
};
|
||||
};
|
||||
/*
|
||||
font = {
|
||||
family = {
|
||||
clock = "Rubik"; # (TODO figure out those fonts)
|
||||
material = "Material Symboles Rounded";
|
||||
mono = "CaskaydiaCove NF";
|
||||
sans = "Rubik";
|
||||
};
|
||||
size = {
|
||||
scale = 1;
|
||||
};
|
||||
};
|
||||
*/
|
||||
padding = {
|
||||
scale = 1;
|
||||
};
|
||||
rounding = {
|
||||
scale = 1;
|
||||
};
|
||||
spacing = {
|
||||
scale = 1;
|
||||
};
|
||||
transparency = {
|
||||
enabled = false;
|
||||
base = 0.85;
|
||||
layeres = 0.4;
|
||||
};
|
||||
};
|
||||
general = {
|
||||
logo = "caelestia";
|
||||
apps = {
|
||||
terminal = ["kitty"]; # default foot
|
||||
audio = ["pavucontrol"];
|
||||
playback = ["vlc"]; # what's that?
|
||||
explorer = ["dolphin"]; # default thunar
|
||||
};
|
||||
battery = {
|
||||
wanLevels = [
|
||||
{
|
||||
level = 20;
|
||||
title = "Low battery";
|
||||
message = "You might want to plug in a charger";
|
||||
icon = "battery_android_frame_2";
|
||||
}
|
||||
{
|
||||
level = 10;
|
||||
title = "Did you see the previous message?";
|
||||
message = "You should probably plug in a charger <b>now</b>";
|
||||
icon = "battery_android_frame_1";
|
||||
}
|
||||
{
|
||||
level = 5;
|
||||
title = "Critical battery level";
|
||||
message = "PLUG THE CHARGER RIGHT NOW!!";
|
||||
icon = "battery_android_alert";
|
||||
critical = true;
|
||||
}
|
||||
];
|
||||
criticalLevel = 3;
|
||||
};
|
||||
idle = {
|
||||
lockBeforeSleep = true;
|
||||
inhibitWhenAudio = true;
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 180;
|
||||
idleAction = "lock";
|
||||
}
|
||||
{
|
||||
timeout = 300;
|
||||
idleAction = "dpms off"; # what's that?
|
||||
returnAction = "dpms on";
|
||||
}
|
||||
{
|
||||
timeout = 600;
|
||||
idleAction = ["systemctl" "suspend-then-hibernate"];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
background = {
|
||||
desktopClock = {
|
||||
enabled = false;
|
||||
scale = 1.0;
|
||||
position = "bottom-right";
|
||||
shadow = {
|
||||
enabled = true;
|
||||
opacity = 0.7;
|
||||
blur = 0.4;
|
||||
};
|
||||
background = {
|
||||
enabled = false;
|
||||
opacity = 0.7;
|
||||
blur = true;
|
||||
};
|
||||
invertColors = false;
|
||||
};
|
||||
enabled = false; #default true
|
||||
visualiser = {
|
||||
blur = false;
|
||||
enabled = false;
|
||||
autohide = true;
|
||||
rounding = 1;
|
||||
spacing = 1;
|
||||
};
|
||||
};
|
||||
bar = {
|
||||
activeWindow = {
|
||||
compact = false;
|
||||
inverted = false;
|
||||
showOnHover = true;
|
||||
};
|
||||
clock = {
|
||||
background = true;
|
||||
showDate = true;
|
||||
showIcon = true;
|
||||
};
|
||||
dragThreshold = 20;
|
||||
entries = [
|
||||
{
|
||||
id = "logo";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "workspaces";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "spacer";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "activeWindow";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "spacer";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "tray";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "clock";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "statusIcon";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "power";
|
||||
enabled = true;
|
||||
}
|
||||
];
|
||||
persistent = true;
|
||||
popouts = {
|
||||
activeWindow = true;
|
||||
statusIcon = true;
|
||||
tray = true;
|
||||
};
|
||||
scrollActions = {
|
||||
brightness = true;
|
||||
workspaces = true;
|
||||
volume = true;
|
||||
};
|
||||
showOnHover = true;
|
||||
status = {
|
||||
showAudio = false;
|
||||
showBattery = false; # use powerprofile daemon
|
||||
showBluetooth = false;
|
||||
showKbLayout = false;
|
||||
showMicrophone = false;
|
||||
showNetwork = false;
|
||||
showWifi = true;
|
||||
showLockStatus = false;
|
||||
};
|
||||
tray = {
|
||||
background = true; # default true
|
||||
compact = false;
|
||||
iconSubs = [];
|
||||
recolour = true;
|
||||
};
|
||||
workspaces = {
|
||||
activeIndicator = true;
|
||||
activeLabel = "";
|
||||
activeTrail = false;
|
||||
label = " ";
|
||||
occupiedBg = false;
|
||||
occpiedLabel = "";
|
||||
perMonitorWorkspaces = true;
|
||||
showWindows = true;
|
||||
shown = 5;
|
||||
specialWorkspaceIcons = [
|
||||
{
|
||||
name = "steam";
|
||||
icon = "sports_esports";
|
||||
}
|
||||
];
|
||||
windowIcons = [
|
||||
{
|
||||
regex = "steam(_app_(default|[0-9]+))?";
|
||||
icon = "sports_esports";
|
||||
}
|
||||
];
|
||||
};
|
||||
excludedScreens = [""]; # default says "" those this work?
|
||||
};
|
||||
border = {
|
||||
rounding = 25;
|
||||
thickness = 10;
|
||||
};
|
||||
dashboard = {
|
||||
enabled = true;
|
||||
dragThreshold = 50;
|
||||
mediaUpdateInterval = 500;
|
||||
showOnHover = true;
|
||||
};
|
||||
launcher = {
|
||||
actionsPrefix = ">";
|
||||
actions = [
|
||||
{
|
||||
name = "Calculator";
|
||||
icon = "calculate";
|
||||
description = "Do simple math equations (powered by Qalc)";
|
||||
command = ["autocomplete" "calc"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Scheme";
|
||||
icon = "palette";
|
||||
description = "Change the current colour scheme";
|
||||
command = ["autocomplete" "scheme"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Wallpaper";
|
||||
icon = "image";
|
||||
description = "Change the current wallpaper";
|
||||
command = ["autocomplete" "wallpaper"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Variant"; # to remove
|
||||
icon = "colors";
|
||||
description = "Change the current scheme variant";
|
||||
command = ["autocomplete" "variant"];
|
||||
enabled = true;
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Transparency";
|
||||
icon = "opacity";
|
||||
description = "Change shell transparency";
|
||||
command = ["autocomplete" "transparency"];
|
||||
enabled = false;
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Random";
|
||||
icon = "casino";
|
||||
description = "Switch to a random wallpaper";
|
||||
command = ["caelestia" "wallpaper" "-r"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Light";
|
||||
icon = "light_mode";
|
||||
description = "Change the scheme to light mode";
|
||||
command = ["setMode" "light"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Dark";
|
||||
icon = "dark_mode";
|
||||
description = "Change the scheme to dark mode";
|
||||
command = ["setMode" "dark"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Shutdown";
|
||||
icon = "power_settings_new";
|
||||
description = "Shutdown the system";
|
||||
command = ["systemctl" "poweroff"];
|
||||
enabled = true;
|
||||
dangerous = true;
|
||||
}
|
||||
{
|
||||
name = "Reboot";
|
||||
icon = "cached";
|
||||
description = "Reboot the system";
|
||||
command = ["systemctl" "reboot"];
|
||||
enabled = true;
|
||||
dangerous = true;
|
||||
}
|
||||
{
|
||||
name = "Lock"; # does this work with ly?
|
||||
icon = "lock";
|
||||
description = "Log out of the current session";
|
||||
command = ["loginctl" "terminate-user" ""];
|
||||
enabled = true;
|
||||
dangerous = true;
|
||||
}
|
||||
{
|
||||
name = "Sleep";
|
||||
icon = "bedtime";
|
||||
description = "Suspend then hibernate";
|
||||
command = ["systemctl" "suspend-then-hibernate"];
|
||||
enabled = true;
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Settings";
|
||||
icon = "settings";
|
||||
description = "Configure the shell";
|
||||
command = ["caelestia" "shell" "controlCenter" "open"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
];
|
||||
dragThreshold = 50;
|
||||
vimKeybinds = false; # intersting to put to true
|
||||
enableDangerousActions = false; # set to true
|
||||
maxShown = 7;
|
||||
maxWallpapers = 9;
|
||||
specialPrefix = "@";
|
||||
useFuzzy = {
|
||||
# should try
|
||||
apps = false;
|
||||
actions = false;
|
||||
schemes = false;
|
||||
variants = false;
|
||||
wallpapers = false;
|
||||
};
|
||||
showOnHover = false;
|
||||
favouriteApps = [];
|
||||
hiddenApps = [];
|
||||
};
|
||||
lock = {
|
||||
recolourLogo = false; # what's that
|
||||
hideNotifs = false;
|
||||
};
|
||||
notifs = {
|
||||
actionOnClick = false;
|
||||
clearThreshold = 0.3;
|
||||
defaultExpireTimeout = 5000;
|
||||
expantThreshold = 20;
|
||||
openeExpanded = false;
|
||||
expire = true;
|
||||
};
|
||||
osd = {
|
||||
# thats the slider for brightness and sound
|
||||
enabled = true;
|
||||
enableBrightness = true;
|
||||
enableMicrophone = false;
|
||||
hideDelay = 2000;
|
||||
};
|
||||
paths = {
|
||||
mediaGif = pepe-music; # default "root:/assets/bongocat.gif"
|
||||
sessionGif = sisyphe; # default "root:/assets/kurukuru.gif"
|
||||
noNotifsPic = "root:/assets/dino.png";
|
||||
lockNoNotifsPic = "root:/assets/dino.png";
|
||||
wallpaperDir = "~/Pictures/Wallpapers";
|
||||
lyricsDir = "~/Music/lyrics";
|
||||
};
|
||||
services = {
|
||||
audioIncrement = 0.1;
|
||||
brightnessIncrement = 0.1;
|
||||
maxVolume = 1.0;
|
||||
defaultPlayer = "Spotify";
|
||||
gpuType = "";
|
||||
#playerAliases: [ { "from": "com.github.th_ch.youtube_music", "to": "YT Music" } ]; # how to put this into nix language?
|
||||
weatherLocation = "Lausanne";
|
||||
useFahrenheit = false;
|
||||
useFahrenheitPerformance = false;
|
||||
useTwelveHourClock = false;
|
||||
smartScheme = false; # default true
|
||||
visualisersBars = 45;
|
||||
};
|
||||
session = {
|
||||
dragThreshold = 30; # what does dragThreshold do?
|
||||
enabled = true;
|
||||
vimKeybinds = false; # maybe set to true?
|
||||
icons = {
|
||||
logout = "logout";
|
||||
shutdown = "power_settings_new";
|
||||
hibernate = "downloading"; # find a better icon
|
||||
reboot = "cached";
|
||||
};
|
||||
commands = {
|
||||
logout = ["hyprctl" "dispatch exit"];
|
||||
shutdown = ["systemctl" "poweroff"];
|
||||
hibernate = ["systemctl" "hibernate"];
|
||||
reboot = ["systemctl" "reboot"];
|
||||
};
|
||||
};
|
||||
sidebar = {
|
||||
dragThreshold = 80;
|
||||
enabled = true;
|
||||
};
|
||||
# is there a way to get some system info?
|
||||
utilities = {
|
||||
enabled = true;
|
||||
maxToasts = 4; # toats are like notification but on the botto left
|
||||
toasts = {
|
||||
audioInputChanged = true;
|
||||
audioOutputChanged = true;
|
||||
capsLockChanged = true;
|
||||
chargingChanged = true;
|
||||
configLoaded = true;
|
||||
dndChanged = true;
|
||||
gameModeChanged = true;
|
||||
kbLayoutChanged = true;
|
||||
kbLimit = true;
|
||||
numLockChanged = true;
|
||||
vpnChanged = true;
|
||||
nowPlaying = false;
|
||||
};
|
||||
};
|
||||
vpn = {
|
||||
enabled = false; # default true
|
||||
provider = [
|
||||
{
|
||||
# default example-configuration
|
||||
name = "wireguard";
|
||||
interface = "your-connection-name";
|
||||
displayName = "wireguard (Your VPN)";
|
||||
enabled = false;
|
||||
}
|
||||
];
|
||||
};
|
||||
quickToggles = [
|
||||
{
|
||||
id = "wifi";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "bluetooth";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "mic";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "settings";
|
||||
enabled = true; # should desactivate
|
||||
}
|
||||
{
|
||||
id = "gameMode";
|
||||
enabled = true; # should remap my performance mode
|
||||
}
|
||||
{
|
||||
id = "dnd"; #do not disturb
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "vpn";
|
||||
enabled = false; # default true;
|
||||
}
|
||||
];
|
||||
};
|
||||
cli = {
|
||||
# default config https://github.com/caelestia-dots/cli?tab=readme-ov-file#configuring
|
||||
enable = true; # Also add caelestia-cli to path
|
||||
settings = {
|
||||
record = {
|
||||
extraArgs = [];
|
||||
};
|
||||
wallpaper = {
|
||||
postHook = "caelestia scheme set -n gruvbox -f soft -m dark"; # sets the theme
|
||||
};
|
||||
theme = {
|
||||
enableTerm = false; # we do it manually by adapting our kitty config
|
||||
enableHypr = false; # this seems to add the splash
|
||||
enableDiscord = true;
|
||||
enableSpicetify = true;
|
||||
enableFuzzel = true; #what's that?
|
||||
enablleBtop = false; # default true
|
||||
enableQt = true;
|
||||
};
|
||||
toggles = {
|
||||
communication = {
|
||||
discord = {
|
||||
enable = false; # default true
|
||||
match = [
|
||||
{
|
||||
class = "discord";
|
||||
}
|
||||
];
|
||||
whatsapp = {
|
||||
enable = true;
|
||||
match = [
|
||||
{
|
||||
class = "whatsapp";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
music = {
|
||||
spotify = {
|
||||
enable = false; # default true
|
||||
match = [
|
||||
{
|
||||
class = "Spotify";
|
||||
}
|
||||
{
|
||||
initialTitle = "Spotify";
|
||||
}
|
||||
{
|
||||
initialTitle = "Spotify Free";
|
||||
}
|
||||
];
|
||||
command = ["spicetify" "watch" "-s"];
|
||||
move = true;
|
||||
};
|
||||
feishin = {
|
||||
enable = true;
|
||||
match = [
|
||||
{
|
||||
class = "feishin";
|
||||
}
|
||||
];
|
||||
move = true;
|
||||
};
|
||||
};
|
||||
sysmon = {
|
||||
btop = {
|
||||
enable = true;
|
||||
match = [
|
||||
{
|
||||
class = "btop";
|
||||
title = "btop";
|
||||
workspace = {
|
||||
name = "special:sysmon";
|
||||
};
|
||||
}
|
||||
];
|
||||
command = ["foot" "-a" "btop" "-T" "btop" "fish" "-C" "exec btop"]; # maybe switch to btm and kitty?
|
||||
};
|
||||
};
|
||||
todo = {
|
||||
todoist = {
|
||||
enable = false; # default true
|
||||
match = [
|
||||
{
|
||||
class = "Todoist";
|
||||
}
|
||||
];
|
||||
command = ["todoist"];
|
||||
move = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
_: {
|
||||
flake.homeModules.eza = _: {
|
||||
# ls replacement
|
||||
# see ./zsh.nix for the alias (usefull to se default flags)
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
theme = {
|
||||
# from https://github.com/eza-community/eza-themes/blob/main/themes/gruvbox-dark.yml
|
||||
colourful = true;
|
||||
|
||||
filekinds = {
|
||||
normal = {foreground = "#ebdbb2";};
|
||||
directory = {foreground = "#83a598";};
|
||||
symlink = {foreground = "#8ec07c";};
|
||||
pipe = {foreground = "#928374";};
|
||||
block_device = {foreground = "#fb4934";};
|
||||
char_device = {foreground = "#fb4934";};
|
||||
socket = {foreground = "#665c54";};
|
||||
special = {foreground = "#d3869b";};
|
||||
executable = {foreground = "#b8bb26";};
|
||||
mount_point = {foreground = "#fe8019";};
|
||||
};
|
||||
perms = {
|
||||
user_read = {foreground = "#ebdbb2";};
|
||||
user_write = {foreground = "#fabd2f";};
|
||||
user_execute_file = {foreground = "#b8bb26";};
|
||||
user_execute_other = {foreground = "#b8bb26";};
|
||||
group_read = {foreground = "#ebdbb2";};
|
||||
group_write = {foreground = "#fabd2f";};
|
||||
group_execute = {foreground = "#b8bb26";};
|
||||
other_read = {foreground = "#bdae93";};
|
||||
other_write = {foreground = "#fabd2f";};
|
||||
other_execute = {foreground = "#b8bb26";};
|
||||
special_user_file = {foreground = "#d3869b";};
|
||||
special_other = {foreground = "#928374";};
|
||||
attribute = {foreground = "#bdae93";};
|
||||
};
|
||||
size = {
|
||||
major = {foreground = "#bdae93";};
|
||||
minor = {foreground = "#8ec07c";};
|
||||
number_byte = {foreground = "#ebdbb2";};
|
||||
number_kilo = {foreground = "#ebdbb2";};
|
||||
number_mega = {foreground = "#83a598";};
|
||||
number_giga = {foreground = "#d3869b";};
|
||||
number_huge = {foreground = "#d3869b";};
|
||||
unit_byte = {foreground = "#bdae93";};
|
||||
unit_kilo = {foreground = "#83a598";};
|
||||
unit_mega = {foreground = "#d3869b";};
|
||||
unit_giga = {foreground = "#d3869b";};
|
||||
unit_huge = {foreground = "#fe8019";};
|
||||
};
|
||||
users = {
|
||||
user_you = {foreground = "#ebdbb2";};
|
||||
user_root = {foreground = "#fb4934";};
|
||||
user_other = {foreground = "#d3869b";};
|
||||
group_yours = {foreground = "#ebdbb2";};
|
||||
group_other = {foreground = "#928374";};
|
||||
group_root = {foreground = "#fb4934";};
|
||||
};
|
||||
links = {
|
||||
normal = {foreground = "#8ec07c";};
|
||||
multi_link_file = {foreground = "#fe8019";};
|
||||
};
|
||||
git = {
|
||||
new = {foreground = "#b8bb26";};
|
||||
modified = {foreground = "#fabd2f";};
|
||||
deleted = {foreground = "#fb4934";};
|
||||
renamed = {foreground = "#8ec07c";};
|
||||
typechange = {foreground = "#d3869b";};
|
||||
ignored = {foreground = "#928374";};
|
||||
conflicted = {foreground = "#cc241d";};
|
||||
};
|
||||
git_repo = {
|
||||
branch_main = {foreground = "#ebdbb2";};
|
||||
branch_other = {foreground = "#d3869b";};
|
||||
git_clean = {foreground = "#b8bb26";};
|
||||
git_dirty = {foreground = "#fb4934";};
|
||||
};
|
||||
security_context = {
|
||||
colon = {foreground = "#928374";};
|
||||
user = {foreground = "#ebdbb2";};
|
||||
role = {foreground = "#d3869b";};
|
||||
typ = {foreground = "#665c54";};
|
||||
range = {foreground = "#d3869b";};
|
||||
};
|
||||
file_type = {
|
||||
image = {foreground = "#fabd2f";};
|
||||
video = {foreground = "#fb4934";};
|
||||
music = {foreground = "#b8bb26";};
|
||||
lossless = {foreground = "#8ec07c";};
|
||||
crypto = {foreground = "#928374";};
|
||||
document = {foreground = "#ebdbb2";};
|
||||
compressed = {foreground = "#d3869b";};
|
||||
temp = {foreground = "#cc241d";};
|
||||
compiled = {foreground = "#83a598";};
|
||||
build = {foreground = "#928374";};
|
||||
source = {foreground = "#83a598";};
|
||||
punctuation = {foreground = "#928374";};
|
||||
date = {foreground = "#fabd2f";};
|
||||
inode = {foreground = "#bdae93";};
|
||||
blocks = {foreground = "#a89984";};
|
||||
header = {foreground = "#ebdbb2";};
|
||||
octal = {foreground = "#8ec07c";};
|
||||
flags = {foreground = "#d3869b";};
|
||||
|
||||
symlink_path = {foreground = "#8ec07c";};
|
||||
control_char = {foreground = "#83a598";};
|
||||
broken_symlink = {foreground = "#fb4934";};
|
||||
broken_path_overlay = {foreground = "#928374";};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
_: {
|
||||
flake.homeModules.fastfetch = _: {
|
||||
# Adapted from https://github.com/dacrab/fastfetch-config/blob/main/config.jsonc
|
||||
programs.fastfetch = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
logo = {
|
||||
type = "none";
|
||||
#source = "nixos";
|
||||
};
|
||||
|
||||
modules = [
|
||||
# ───────────── Hardware ─────────────
|
||||
|
||||
{
|
||||
type = "custom";
|
||||
format = "╭───────────────────────── Hardware ──────────────────────────╮";
|
||||
outputColor = "blue";
|
||||
}
|
||||
|
||||
{
|
||||
type = "title";
|
||||
key = " PC";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
{
|
||||
type = "host";
|
||||
key = "│ ├ Laptop";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
{
|
||||
type = "display";
|
||||
key = "│ ├ Display";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
{
|
||||
type = "cpu";
|
||||
key = "│ ├ CPU";
|
||||
showPeCoreCount = true;
|
||||
format = "{1}";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
{
|
||||
type = "gpu";
|
||||
key = "│ ├ GPU";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
{
|
||||
type = "memory";
|
||||
key = "└ └ Memory";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
{
|
||||
type = "custom";
|
||||
format = "╰─────────────────────────────────────────────────────────────╯";
|
||||
outputColor = "blue";
|
||||
}
|
||||
|
||||
# ───────────── Software ─────────────
|
||||
|
||||
{
|
||||
type = "custom";
|
||||
format = "╭───────────────────────── Software ──────────────────────────╮";
|
||||
outputColor = "blue";
|
||||
}
|
||||
|
||||
{
|
||||
type = "os";
|
||||
key = " OS";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
|
||||
{
|
||||
type = "kernel";
|
||||
key = "│ ├ Kernel";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
|
||||
{
|
||||
type = "packages";
|
||||
key = "│ ├ Packages";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
|
||||
{
|
||||
type = "shell";
|
||||
key = "│ ├ Shell";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
|
||||
{
|
||||
type = "terminal";
|
||||
key = "│ ├ Terminal";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
|
||||
{
|
||||
type = "command";
|
||||
key = "│ ├ OS Age";
|
||||
keyColor = "cyan";
|
||||
text = ''
|
||||
birth_install=$(stat -c %W /)
|
||||
current=$(date +%s)
|
||||
time_progression=$((current - birth_install))
|
||||
days_difference=$((time_progression / 86400))
|
||||
echo $days_difference days
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
type = "uptime";
|
||||
key = "└ └ Uptime";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
|
||||
{
|
||||
type = "de";
|
||||
key = " DE";
|
||||
keyColor = "blue";
|
||||
}
|
||||
|
||||
{
|
||||
type = "wm";
|
||||
key = " WM";
|
||||
keyColor = "magenta";
|
||||
}
|
||||
|
||||
{
|
||||
type = "gpu";
|
||||
key = "│ ├ GPU Driver";
|
||||
format = "{3}";
|
||||
keyColor = "magenta";
|
||||
}
|
||||
|
||||
{
|
||||
type = "brightness";
|
||||
key = "│ ├ Brightness";
|
||||
keyColor = "magenta";
|
||||
}
|
||||
|
||||
{
|
||||
type = "version";
|
||||
key = "└ └ FastFetch";
|
||||
keyColor = "magenta";
|
||||
}
|
||||
|
||||
{
|
||||
type = "custom";
|
||||
format = "╰────────────────────────────────────────────────────────────╯";
|
||||
outputColor = "blue";
|
||||
}
|
||||
|
||||
#{
|
||||
# type = "custom";
|
||||
# format = ''
|
||||
# {#0} {#1} {#2} {#3} {#4} {#5} {#6} {#7}
|
||||
# '';
|
||||
#} #for some reason dont work
|
||||
{
|
||||
type = "colors";
|
||||
symbol = "diamond";
|
||||
}
|
||||
|
||||
"break"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
_: {
|
||||
flake.nixosModules.games = {pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
supertux # fuck mario
|
||||
supertuxkart # fuck mariokart
|
||||
# my favorite italian plumber is free software
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
_: {
|
||||
flake.homeModules.git = _: {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
gitCredentialHelper.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
_: {
|
||||
flake.homeModules.gtk = {pkgs, ...}: {
|
||||
# gtk config
|
||||
gtk.theme = {
|
||||
enable = true;
|
||||
Gruvbox-GTK-Theme-BL-MB = {
|
||||
enable = true;
|
||||
name = "Gruvbox-GTK-Theme-BL-MB";
|
||||
package = pkgs.gruvbox-gtk-theme;
|
||||
};
|
||||
};
|
||||
# to resolve this https://wiki.nixos.org/wiki/Home_Manager#I_cannot_set_GNOME_or_Gtk_themes_via_Home_Manager
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
_: {
|
||||
# this was in my home-manager config, but looks like more
|
||||
flake.nixosModules.hypridle = _: {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "notify-send 'lock!'"; # dbus/sysd lock command (loginctl lock-session)
|
||||
unlock_cmd = "notify-send 'unlock!'"; # same as above, but unlock
|
||||
before_sleep_cmd = "notify-send 'Zzz'"; # command ran before sleep
|
||||
after_sleep_cmd = "notify-send 'Awake!"; # command ran after sleep
|
||||
ignore_dbus_inhibit = false; # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
|
||||
ignore_systemd_inhibit = false; # whether to ignore systemd-inhibit --what=idle inhibitors
|
||||
};
|
||||
listener = {
|
||||
timeout = 500; # in seconds
|
||||
on-timeout = "notify-send 'You are idle!'"; # command to run when timeout has passed
|
||||
on-resume = "notify-send 'Welcome back!'"; # command to run when activity is detected after timeout has fired.
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,503 @@
|
||||
{self, ...}: {
|
||||
flake.nixosModules.hyprland = {
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
swww #wallpaper daemon
|
||||
gruvbox-gtk-theme
|
||||
hyprcursor
|
||||
capitaine-cursors-themed # cursor theme
|
||||
papirus-icon-theme
|
||||
papirus-folders
|
||||
self.packages.${pkgs.system}.custom-wallpaper
|
||||
self.packages.${pkgs.system}.custom-dontkillsteam # kill app (if not steam or tomato-c
|
||||
self.packages.${pkgs.system}.custom-killall # kill all windows except focused window
|
||||
xdg-utils
|
||||
home-manager
|
||||
];
|
||||
# enable hyprland WM
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.hyprland; # we use the unstable branch to get the latest features
|
||||
withUWSM = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-wlr
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
# removes uxterm
|
||||
services.xserver.excludePackages = [pkgs.xterm];
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
};
|
||||
flake.homeModules.hyprland-laptop = _: {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [
|
||||
"qtbatticon" # custom battery tray
|
||||
];
|
||||
monitor = [
|
||||
"eDP-1, highres@highrr, 0x0, 1"
|
||||
];
|
||||
};
|
||||
};
|
||||
flake.homeModules.hyprland = {pkgs-unstable, ...}: let
|
||||
wallpaper = ../../assets/wallpaper1.jpg;
|
||||
in {
|
||||
#refer to https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/
|
||||
wayland.windowManager.hyprland.enable = true;
|
||||
wayland.windowManager.hyprland.package = pkgs-unstable.hyprland;
|
||||
#hint Electron apps to use on wayland;
|
||||
home.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
wayland.windowManager.hyprland.plugins = [
|
||||
#pkgs-unstable.hyprlandPlugins.hyprspace # currently broken
|
||||
#pkgs-unstable.hyprlandPlugins.hypr-dynamic-cursors # currently broken
|
||||
];
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$mod" = "SUPER";
|
||||
"$term" = "kitty";
|
||||
"$editor" = "nvim";
|
||||
"$notes" = "kitty --class \"custom-obsidianvaults\" --name \"Select Obsidian vault\" --hold custom-obsidianvaults";
|
||||
"$file" = "dolphin";
|
||||
"$browser" = "kitty --class \"custom-librewolfprofiles\" --name \"Select LibreWolf profile\" --hold custom-librewolfprofiles";
|
||||
# ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█
|
||||
# █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"wind, 0.05, 0.9, 0.1, 1.05"
|
||||
"winIn, 0.1, 1.1, 0.1, 1.1"
|
||||
"winOut, 0.3, -0.3, 0, 1"
|
||||
"liner, 1, 1, 1, 1"
|
||||
];
|
||||
animation = [
|
||||
"windows, 1, 6, wind, slide"
|
||||
"windowsIn, 1, 6, winIn, slide"
|
||||
"windowsOut, 1, 5, winOut, slide"
|
||||
"windowsMove, 1, 5, wind, slide"
|
||||
"border, 1, 1, liner"
|
||||
"borderangle, 1, 30, liner, loop"
|
||||
"fade, 1, 10, default"
|
||||
"workspaces, 1, 5, wind"
|
||||
];
|
||||
};
|
||||
|
||||
# █▀▀ █▄░█ █░█
|
||||
# ██▄ █░▀█ ▀▄▀
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Environment-variables/
|
||||
env = [
|
||||
"PATH, $PATH:$scrPath"
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
"QT_QPA_PLATFORM,wayland;xcb"
|
||||
"QT_QPAPLATFORMTHEME,qt6ct"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"GDK_SCALE,1"
|
||||
];
|
||||
|
||||
# █ █▄░█ █▀█ █░█ ▀█▀
|
||||
# █ █░▀█ █▀▀ █▄█ ░█░
|
||||
|
||||
input = {
|
||||
kb_layout = ["ch"];
|
||||
follow_mouse = 1;
|
||||
sensitivity = 0;
|
||||
force_no_accel = 1;
|
||||
};
|
||||
|
||||
# █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄ █ █▄░█ █▀▀ █▀
|
||||
# █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ █ █░▀█ █▄█ ▄█
|
||||
# caelestia shell drawers toggle dashboard
|
||||
# caelestia shell drawers toggle utilities
|
||||
|
||||
bind = [
|
||||
#hyprland/utility keybindings
|
||||
"$mod, W, togglefloating"
|
||||
"$mod, G, togglegroup"
|
||||
"Alt, Return, fullscreen"
|
||||
"$mod, Left, movefocus, l"
|
||||
"$mod, Right, movefocus, r"
|
||||
"$mod, Up, movefocus, u"
|
||||
"$mod, Down, movefocus, d"
|
||||
"Alt, Tab, movefocus, d"
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$mod, 7, workspace, 7"
|
||||
"$mod, 8, workspace, 8"
|
||||
"$mod, 9, workspace, 9"
|
||||
"$mod, 0, workspace, 10"
|
||||
"$mod+Ctrl, Right, workspace, r+1"
|
||||
"$mod+Ctrl, Left, workspace, r-1"
|
||||
"$mod+Ctrl, Doown, workspace, empty"
|
||||
"$mod+Shift, 1, movetoworkspace, 1"
|
||||
"$mod+Shift, 2, movetoworkspace, 2"
|
||||
"$mod+Shift, 3, movetoworkspace, 3"
|
||||
"$mod+Shift, 4, movetoworkspace, 4"
|
||||
"$mod+Shift, 5, movetoworkspace, 5"
|
||||
"$mod+Shift, 6, movetoworkspace, 6"
|
||||
"$mod+Shift, 7, movetoworkspace, 7"
|
||||
"$mod+Shift, 8, movetoworkspace, 8"
|
||||
"$mod+Shift, 9, movetoworkspace, 9"
|
||||
"$mod+Shift, 0, movetoworkspace, 10"
|
||||
"$mod+Ctrl+Alt, Right, movetoworkspace, r+1"
|
||||
"$mod+Ctrl+Alt, Left, movetoworkspace, r-1"
|
||||
#"$mod, Backspace, exec, wlogout -b 4 -T 600 -B 600"
|
||||
"$mod, Backspace, exec, caelestia shell drawers toggle session"
|
||||
"$mod+Shift+Ctrl, Left, movewindow, l"
|
||||
"$mod+Shift+Ctrl, Right, movewindow, r"
|
||||
"$mod+Shift+Ctrl, Up, movewindow, u"
|
||||
"$mod+Shift+Ctrl, Down, movewindow, d"
|
||||
"$mod, mouse_down, workspace, e+1"
|
||||
"$mod, mouse_up, workspace, e-1"
|
||||
"$mod, V, exec, cliphist list | rofi -dmenu| cliphist decode | wl-copy" # copy paste
|
||||
"$mod, B, exec, hyprkeys -bkr | rofi -dmenu"
|
||||
#"$mod, A, tagwindow, noborder" # used to not apply image border
|
||||
"$mod, S, togglespecialworkspace,"
|
||||
"Alt+$mod, S, movetoworkspace, special"
|
||||
# for the scrolling layout
|
||||
"$mod, A, layoutmsg, move -col"
|
||||
"$mod, D, layoutmsg, move +col"
|
||||
#apps keybindings
|
||||
"$mod, T, exec, $term"
|
||||
"$mod, E, exec, $file"
|
||||
"$mod, F, exec, $browser"
|
||||
"$mod, N, exec, $notes"
|
||||
#"$mod+Shift, A, exec, rofi -show drun"
|
||||
"$mod+Shift, A, exec, caelestia shell drawers toggle launcher"
|
||||
"$mod, Q, exec, custom-dontkillsteam"
|
||||
#"Ctrl+Alt, W, exec, pkill waybar || waybar"
|
||||
"Ctrl+Alt, W, exec, caelestia shell drawers toggle sidebar"
|
||||
#"$mod, L, exec, swaylock -eFLK -i ${wallpaper}"
|
||||
"$mod, L, exec, caelestia shell lock lock"
|
||||
#"$mod, F11, exec, hyprshot -m window"
|
||||
", F11, exec, caelestia screenshot"
|
||||
#"$mod_SHIFT, S, exec, hyprshot -m region --clipboard only"
|
||||
# "$mod_SHIFT, S, exec, qs ipc call screenshot toggle"
|
||||
"$mod_SHIFT, S, exec, caelestia shell picker open"
|
||||
# framework 16 rgb macropad
|
||||
"Ctrl+$mod, 6, exec, custom-killall" # pos 1 1 killall apps except focused one
|
||||
#"Ctrl+Alt, 7, exec, custom-performance" # pos 2 1 start performance mode
|
||||
"Ctrl+Alt, 7, exec, caelestia shell gameMode toggle"
|
||||
# reloads the autostart programs # pos 3 1
|
||||
# we passed to caelestia-shell and stoped using that
|
||||
/*
|
||||
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=16 -e sh -c 'custom-weather'"
|
||||
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=11 -e sh -c 'custom-cowsay'"
|
||||
"Ctrl+$mod, 4, exec, kitty -e 'custom-launch'"
|
||||
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=5 -e btm --theme gruvbox --disable-click --disable_advanced_kill --enable_cache_memory -g -R -T "
|
||||
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=1 -e sh -c 'cmatrix -br'"
|
||||
#"Ctrl+Alt, 1, exec, swaync-client -t" # pos 4 1 notification center
|
||||
"Ctrl+Alt, 1, exec, qs ipc call notifications toggle"
|
||||
*/
|
||||
"Ctrl+Alt, 1, exec, caelestia shell drawers toggle sidebar"
|
||||
"Ctrl+$mod, 4, exec, caelestia shell notifs toggleDnd"
|
||||
"Ctrl+$mod, 3, exec, pavucontrol" # pos 1 2 audiocontrol
|
||||
"Ctrl+Shift+Alt, 0, exec, kitty --hold --class \"custom-changeAudioOutput\" --name \"Select audio output\" zsh -c \"custom-changeAudioOutput\"" # pos 2 2 change audio output fzf
|
||||
"Ctrl+$mod, 5, exec, gnome-characters" # pos 3 2 special chars
|
||||
"Ctrl+Alt, 8, exec, hyprpicker | tee >(wl-copy) | cliphist store" # pos 4 2 colorpicker
|
||||
"Ctrl+Alt, 0, exec, custom-tomato" # pos 1 3 pomodoro app
|
||||
"Ctrl+Alt, 2, exec, custom-bottom" # pos 2 3 btm (like htop but cleaner)
|
||||
"Ctrl+Alt, 9, exec, anki"
|
||||
# if hyprexpo plugin enabled bind = $mainMod, Space, hyprexpo:expo, toggle
|
||||
# maybe exec sudo framework-tools-tui
|
||||
|
||||
#plugins keybindings
|
||||
#"$mod, SPACE, overview:toggle, "
|
||||
];
|
||||
binde = [
|
||||
"$mod+Shift, Right, resizeactive, 30 0"
|
||||
"$mod+Shift, Left, resizeactive, -30, 0"
|
||||
"$mod+Shift, Up, resizeactive, 0 -30"
|
||||
"$mod+Shift, Down, resizeactive,m 0 30"
|
||||
];
|
||||
bindl = [
|
||||
", F1, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle" #toggle audio mute
|
||||
", F5, exec, playerctl play-pause" # media F4-F6
|
||||
", F4, exec, playerctl previous"
|
||||
", F6, exec, playerctl next"
|
||||
];
|
||||
bindel = [
|
||||
", F2, exec, pactl set-sink-volume @DEFAULT_SINK@ -10%" # decrease volume
|
||||
", F3, exec, pactl set-sink-volume @DEFAULT_SINK@ +10%" # increase volume
|
||||
", F7, exec, brightnessctl s 10%-" # decrease brightness
|
||||
", F8, exec, brightnessctl s +10%" # increase brightness
|
||||
];
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
"$mod, Z, movewindow"
|
||||
"$mod, X, resizewindow"
|
||||
];
|
||||
# █░░ ▄▀█ █░█ █▄░█ █▀▀ █░█
|
||||
# █▄▄ █▀█ █▄█ █░▀█ █▄▄ █▀█
|
||||
exec-once = [
|
||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH
|
||||
"dbus-update-activation-environment --systemd --all" # for XDPH
|
||||
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH
|
||||
"systemctl --user start xdg-desktop-portal-wlr.service"
|
||||
"blueman-applet" # systray app for Bluetooth
|
||||
"udiskie --no-automount --smart-tray" # front-end that allows to manage removable media
|
||||
"nm-applet --indicator" # systray app for Network/wifi
|
||||
#setups clipboard
|
||||
"rm -rf ~/.cache/cliphist/ && wl-paste --type text --watch cliphist store & wl-paste --type image --watch cliphist store"
|
||||
#"wl-paste --type text --watch cliphist store" # clipboard store text data
|
||||
#"wl-paste --type image --watch cliphist store" # clipboard store image data
|
||||
"custom-batterynotify"
|
||||
"custom-batterywarning"
|
||||
#"birdtray" # thunderbird tray app # curently broken
|
||||
#wallpapers/b
|
||||
"swww img ${wallpaper}"
|
||||
"swww-daemon"
|
||||
"sleep 1 && custom-wallpaper"
|
||||
"custom-checkKdrive && custom-mountkdrive" # checks if the remote works and mount it
|
||||
#"waybar"
|
||||
"custom-gitnotify"
|
||||
"custom-checkMatrix" # checks if matrix-commander-rs is connected which is important for other stuff
|
||||
#"custom-obsidianbackup" # backups the obsidian notes to kdrive and to a timed hidden dir (~/.Notes.backup/)
|
||||
#"QS-notifycache" # builds the cache that will be used for the notification history
|
||||
"sleep 4 & caelestia-shell" #works better if it sleeps a bit before
|
||||
/*
|
||||
We stopped using that ######################### maybe we should desactivate those scripts
|
||||
# login autostart
|
||||
#######################
|
||||
"[workspace 1 silent] sleep 1 && kitty -o font_size=16 -e sh -c 'custom-weather'"
|
||||
"[workspace 1 silent] sleep 1 && kitty -o font_size=11 -e sh -c 'custom-cowsay'"
|
||||
"[workspace 1 silent] kitty -e 'custom-launch'"
|
||||
"[workspace 1 silent] sleep 1 && kitty -o font_size=5 -e btm --theme gruvbox --disable-click --disable_advanced_kill --enable_cache_memory -g -R -T "
|
||||
"[workspace 1 silent] sleep 1 && kitty -o font_size=1 -e sh -c 'cmatrix -br'"
|
||||
######################
|
||||
######################
|
||||
*/
|
||||
];
|
||||
splash = true; # remove default background on startup
|
||||
# gestures (also keybindings)
|
||||
gesture = [
|
||||
"3, right, move, +col"
|
||||
"3, left, move, -col"
|
||||
];
|
||||
|
||||
# █░░ ▄▀█ █▄█ █▀█ █░█ ▀█▀ █▀
|
||||
# █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█
|
||||
|
||||
dwindle = {
|
||||
preserve_split = true;
|
||||
};
|
||||
scrolling = {
|
||||
column_width = 0.45;
|
||||
};
|
||||
|
||||
# █▀▄▀█ █ █▀ █▀▀
|
||||
# █░▀░█ █ ▄█ █▄▄
|
||||
|
||||
misc = {
|
||||
vrr = 0;
|
||||
force_default_wallpaper = 0;
|
||||
};
|
||||
xwayland = {
|
||||
force_zero_scaling = true;
|
||||
};
|
||||
|
||||
# █▀▄▀█ █▀█ █▄░█ █ ▀█▀ █▀█ █▀█
|
||||
# █░▀░█ █▄█ █#░▀█ █ ░█░ █▄█ █▀▄
|
||||
monitor = [
|
||||
#",preferred, auto, auto"
|
||||
"HDMI-A-1, highres2highrr, auto-left, 1"
|
||||
];
|
||||
# _______ ___ __ __ _______ ___ __ _ _______
|
||||
#| || | | | | || || | | | | || |
|
||||
#| _ || | | | | || ___|| | | |_| || _____|
|
||||
#| |_| || | | |_| || | __ | | | || |_____
|
||||
#| ___|| |___ | || || || | | _ ||_____ |
|
||||
#| | | || || |_| || | | | | | _____| |
|
||||
#|___| |_______||_______||_______||___| |_| |__||_______|
|
||||
#
|
||||
"plugin:dynamic-cursors" = {
|
||||
enabled = true;
|
||||
threshold = 2;
|
||||
mode = "rotate";
|
||||
rotate = {
|
||||
# length in px of the simulated stick used to rotate the cursor
|
||||
# most realistic if this is your actual cursor size
|
||||
length = 20;
|
||||
offset = 0;
|
||||
};
|
||||
shake = {
|
||||
enabled = true;
|
||||
# use nearest-neighbour (pixelated) scaling when shaking
|
||||
# may look weird when effects are enabled
|
||||
nearest = true;
|
||||
threshold = 4;
|
||||
# magnification level immediately after shake start
|
||||
base = 4.0;
|
||||
# magnification increase per second when continuing to shake
|
||||
speed = 4.0;
|
||||
# how much the speed is influenced by the current shake intensitiy
|
||||
influence = 0.0;
|
||||
|
||||
# maximal magnification the cursor can reach
|
||||
# values below 1 disable the limit (e.g. 0)
|
||||
limit = 0.0;
|
||||
|
||||
# time in millseconds the cursor will stay magnified after a shake has ended
|
||||
timeout = 2000;
|
||||
|
||||
# show cursor behaviour `tilt`, `rotate`, etc. while shaking
|
||||
effects = true;
|
||||
|
||||
# enable ipc events for shake
|
||||
ipc = false;
|
||||
};
|
||||
};
|
||||
"plugin:overview" = {
|
||||
disableGestures = true;
|
||||
showEmptyWorkspace = true;
|
||||
workspaceActiveBorder = "rgb(ab7746)";
|
||||
disableBlur = true;
|
||||
};
|
||||
|
||||
#####################################################
|
||||
#####################################################
|
||||
# theme
|
||||
decoration = {
|
||||
dim_special = 0.3;
|
||||
rounding = 18;
|
||||
blur = {
|
||||
special = true;
|
||||
enabled = true;
|
||||
size = 4;
|
||||
passes = 2;
|
||||
new_optimizations = true;
|
||||
ignore_opacity = true;
|
||||
};
|
||||
};
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 15;
|
||||
border_size = 4;
|
||||
"col.active_border" = "rgba(ca6702ff) rgba(ecd3a0ff) 45deg";
|
||||
"col.inactive_border" = "rgba(f1dca7d9) rgba(ffe1a8d9) 45deg";
|
||||
layout = "dwindle";
|
||||
resize_on_border = true;
|
||||
};
|
||||
group = {
|
||||
"col.border_active" = "rgba(ca6702ff) rgba(ecd3a0ff) 45deg";
|
||||
"col.border_inactive" = "rgba(f1dca7d9) rgba(ffe1a8d9) 45deg";
|
||||
"col.border_locked_active" = "rgba(ca6702ff) rgba(ecd3a0ff) 45deg";
|
||||
"col.border_locked_inactive" = "rgba(f1dca7d9) rgba(ffe1a8d9) 45deg";
|
||||
};
|
||||
####################################################
|
||||
##################################################
|
||||
|
||||
# /$$ /$$ /$$
|
||||
#| $$ /$ | $$ | $$
|
||||
#| $$ /$$$| $$ /$$$$$$ /$$$$$$ | $$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$
|
||||
#| $$/$$ $$ $$ /$$__ $$ /$$__ $$| $$ /$$/ /$$_____/ /$$__ $$ |____ $$ /$$_____/ /$$__ $$
|
||||
#| $$$$_ $$$$| $$ \ $$| $$ \__/| $$$$$$/ | $$$$$$ | $$ \ $$ /$$$$$$$| $$ | $$$$$$$$
|
||||
#| $$$/ \ $$$| $$ | $$| $$ | $$_ $$ \____ $$| $$ | $$ /$$__ $$| $$ | $$_____/
|
||||
#| $$/ \ $$| $$$$$$/| $$ | $$ \ $$ /$$$$$$$/| $$$$$$$/| $$$$$$$| $$$$$$$| $$$$$$$
|
||||
#|__/ \__/ \______/ |__/ |__/ \__/|_______/ | $$____/ \_______/ \_______/ \_______/
|
||||
# | $$
|
||||
# | $$
|
||||
# |__/
|
||||
# see https://wiki.hypr.land/Configuring/Workspace-Rules/
|
||||
workspace = [
|
||||
"1, layout:master"
|
||||
"2, layout:scrolling, layoutopt:direction:right"
|
||||
"name:special, layout:scrolling"
|
||||
# used for smart gaps along some windowrules
|
||||
#"w[tv1], gapsout:1, gapsin:1"
|
||||
#"f[1], gapsout:1, gapsin:1"
|
||||
];
|
||||
|
||||
# █░█░█ █ █▄░█ █▀▄ █▀█ █░█░█ █▀█ █░█ █░░ █▀▀ █▀
|
||||
# ▀▄▀▄▀ █ █░▀█ █▄▀ █▄█ ▀▄▀▄▀ █▀▄ █▄█ █▄▄ ██▄ ▄█
|
||||
windowrule = [
|
||||
"opacity 0.90 0.90, match:class ^(firefox)$"
|
||||
"opacity 0.90 0.90, match:class ^(Brave-browser)$"
|
||||
"opacity 0.80 0.80, match:class ^(code-oss)$"
|
||||
"opacity 0.80 0.80, match:class ^(Code)$"
|
||||
"opacity 0.80 0.80, match:class ^(code-url-handler)$"
|
||||
"opacity 0.80 0.80, match:class ^(code-insiders-url-handler)$"
|
||||
"opacity 0.75 0.75, match:class ^(kitty)$"
|
||||
"opacity 0.80 0.80, match:class ^(org.kde.dolphin)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(org.kde.ark)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(nwg-look)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(qt5ct)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(qt6ct)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(kvantummanager)$"
|
||||
"opacity 0.80 0.70, float on, match:class ^(org.pulseaudio.pavucontrol)$"
|
||||
"opacity 0.80 0.70, float on, match:class ^(blueman-manager)$"
|
||||
"opacity 0.80 0.70, float on, match:class ^(nm-applet)$"
|
||||
"opacity 0.80 0.70, float on, match:class ^(nm-connection-editor)$"
|
||||
"opacity 0.80 0.70, float on, match:class ^(org.kde.polkit-kde-authentication-agent-1)$"
|
||||
"opacity 0.80 0.70, match:class ^(polkit-gnome-authentication-agent-1)$"
|
||||
"opacity 0.80 0.70, match:class ^(org.freedesktop.impl.portal.desktop.gtk)$"
|
||||
"opacity 0.80 0.70, match:class ^(org.freedesktop.impl.portal.desktop.hyprland)$"
|
||||
"opacity 0.70 0.70, match:class ^([Ss]team)$"
|
||||
"opacity 0.70 0.70, match:class ^(steamwebhelper)$"
|
||||
"opacity 0.70 0.70, match:class ^(Spotify)$"
|
||||
"opacity 0.70 0.70, match:initial_title ^(Spotify Free)$"
|
||||
"opacity 0.90 0.90, float on, match:class ^(com.github.rafostar.Clapper)$"
|
||||
"opacity 0.80 0.80, match:class ^(com.github.tchx84.Flatseal)$"
|
||||
"opacity 0.80 0.80, match:class ^(hu.kramo.Cartridges)$"
|
||||
"opacity 0.80 0.80, match:class ^(com.obsproject.Studio)$"
|
||||
"opacity 0.80 0.80, match:class ^(gnome-boxes)$"
|
||||
"opacity 0.80 0.80, match:class ^(discord)$"
|
||||
"opacity 0.80 0.80, match:class ^(WebCord)$"
|
||||
"opacity 0.80 0.80, match:class ^(ArmCord)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(app.drey.Warp)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(net.davidotek.pupgui2)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(yad)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(Signal)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(io.github.alainm23.planify)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(io.gitlab.theevilskeleton.Upscaler)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(com.github.unrud.VideoDownloader)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(io.gitlab.adhami3310.Impression)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(io.missioncenter.MissionCenter)$"
|
||||
"opacity 0.80 0.80, match:class ^(io.github.flattool.Warehouse)$"
|
||||
"float on, match:class ^(org.kde.dolphin)$, match:title ^(Progress Dialog — Dolphin)$"
|
||||
"float on, match:class ^(org.kde.dolphin)$, match:title ^(Copying — Dolphin)$"
|
||||
"float on, match:class ^(firefox)$, match:title ^(Picture-in-Picture)$"
|
||||
"float on, match:class ^(firefox)$, match:title ^(Library)$"
|
||||
"float on, match:class ^(kitty)$, match:title ^(top)$"
|
||||
"float on, match:class ^(kitty)$, match:title ^(btop)$"
|
||||
"float on, match:class ^(kitty)$, match:title ^(htop)$"
|
||||
"float on, match:class ^(vlc)$"
|
||||
"float on, match:class ^(eog)$"
|
||||
"float on, size 400 225, match:class ^(custom-librewolfprofiles)$"
|
||||
"float on, size 1050 200, match:class ^(custom-changeAudioOutput)$"
|
||||
"float on, size 400 175, match:class ^(custom-obsidianvaults)$"
|
||||
"float on, size 600 600, match:initial_class ^(custom-pomodoro)$"
|
||||
"float on, size 1500 800, match:initial_class ^(custom-bottom)$"
|
||||
# smart gaps/border is ugly with caelestia-shell
|
||||
#"border_size 2, match:float 0, match:workspace w[tv1]"
|
||||
#"rounding 1, match:float 0, match:workspace w[tv1]"
|
||||
#"border_size 2, match:float 0, match:workspace f[1]"
|
||||
#"rounding 1, match:float 0, match:workspace f[1]"
|
||||
];
|
||||
# add a float for tomato when in kitty
|
||||
#"plugin:imgborders:noimgborders, tag:noborder"
|
||||
layerrule = [
|
||||
"blur on, ignore_alpha 0, match:namespace rofi"
|
||||
"blur on, ignore_alpha 0, match:namespace notifications"
|
||||
"blur on, ignore_alpha 0, match:namespace swaync-notification-window"
|
||||
"blur on, ignore_alpha 0, match:namespace swaync-control-center"
|
||||
"blur on, match:namespace logout_dialog"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
_: {
|
||||
# for some reason perSystem can't expose pkgs-unstable so we need to expose it here
|
||||
# -----------------------------------------------------
|
||||
# Here are a bunch of scripts that interact with hyprland
|
||||
# Some are still used. Some are broken. Some are deprecated. But I do still keep them in case I want to go back to old tools
|
||||
# -----------------------------------------------------
|
||||
perSystem = {pkgs, ...}: let
|
||||
wallpaper1 = ../../assets/wallpaper1.jpg;
|
||||
wallpaper2 = ../../assets/wallpaper2.jpg;
|
||||
wallpaper3 = ../../assets/wallpaper3.jpg;
|
||||
wallpaper4 = ../../assets/wallpaper4.jpg;
|
||||
wallpaper5 = ../../assets/wallpaper5.jpg;
|
||||
in {
|
||||
# kills the app, but when it's steam or custom-pomodoro
|
||||
packages.custom-dontkillsteam = pkgs.writeShellApplication {
|
||||
name = "custom-dontkillsteam";
|
||||
runtimeInputs = with pkgs; [
|
||||
hyprland
|
||||
jq
|
||||
];
|
||||
text = ''
|
||||
class=$(hyprctl activewindow -j | jq -r ".class")
|
||||
if [[ "$class" == "Steam" || "$class" == "custom-pomodoro" ]]; then
|
||||
hyprctl dispatch movetoworkspacesilent special
|
||||
else
|
||||
hyprctl dispatch killactive ""
|
||||
fi
|
||||
|
||||
'';
|
||||
};
|
||||
packages.custom-killall = pkgs.writeShellApplication {
|
||||
name = "custom-killall";
|
||||
runtimeInputs = [
|
||||
pkgs.hyprland # for some reason pkgs-unstable doesn't work here
|
||||
pkgs.jq
|
||||
];
|
||||
text = ''
|
||||
active_workspace_id=$(hyprctl activeworkspace -j | jq -r '.id')
|
||||
|
||||
hyprctl clients -j |
|
||||
jq -r ".[]
|
||||
| select(.workspace.id==''${active_workspace_id})
|
||||
| select(.focusHistoryID!=0)
|
||||
| .pid" |
|
||||
xargs -r kill
|
||||
'';
|
||||
};
|
||||
packages.custom-wallpaper = pkgs.writeShellApplication {
|
||||
name = "custom-wallpaper";
|
||||
runtimeInputs = with pkgs; [
|
||||
socat
|
||||
swww
|
||||
];
|
||||
text = ''
|
||||
handle() {
|
||||
case $1 in
|
||||
workspace*)
|
||||
str=$1
|
||||
i=$((''${#str}-1))
|
||||
workspace="''${str:$i:1}"
|
||||
case $workspace in
|
||||
1 | 6)
|
||||
swww img -t none ${wallpaper1}
|
||||
;;
|
||||
2 | 7)
|
||||
swww img -t none ${wallpaper2}
|
||||
;;
|
||||
3 | 8)
|
||||
swww img -t none ${wallpaper3}
|
||||
;;
|
||||
4 | 9)
|
||||
swww img -t none ${wallpaper4}
|
||||
;;
|
||||
5 | 10 | 0)
|
||||
swww img -t none ${wallpaper5}
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
socat -U - UNIX-CONNECT:"$XDG_RUNTIME_DIR"/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock | while read -r line; do handle "$line"; done
|
||||
'';
|
||||
};
|
||||
packages.custom-launch = pkgs.writeShellApplication {
|
||||
# used for the terminal autostart. Needs to get cleared and recall fastfetch so that the bar from oh-my-zsh get resized
|
||||
# unused
|
||||
name = "custom-launch";
|
||||
runtimeInputs = with pkgs; [
|
||||
zsh
|
||||
];
|
||||
text = ''
|
||||
sleep 2
|
||||
clear
|
||||
zsh
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
{self, ...}: {
|
||||
flake.nixosModules.kdrive = {pkgs-unstable, ...}: {
|
||||
environment.systemPackages = with pkgs-unstable; [
|
||||
rclone
|
||||
self.packages.${pkgs.system}.custom-checkKdrive
|
||||
self.packages.${pkgs.system}.custom-mountkdrive
|
||||
];
|
||||
# removes rclone error
|
||||
programs.fuse = {
|
||||
userAllowOther = true;
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
perSystem = {pkgs, ...}: {
|
||||
packages.custom-checkKdrive = pkgs.writeShellApplication {
|
||||
name = "custom-checkKdrive";
|
||||
runtimeInputs = with pkgs; [
|
||||
rclone
|
||||
matrix-commander-rs
|
||||
libnotify
|
||||
];
|
||||
text = ''
|
||||
|
||||
# waits for an internet connection. It pings both Google DNS and Cloudfare dns in case one of them is down
|
||||
until ping -c1 -W1 1.1.1.1 >/dev/null 2>&1 || \
|
||||
ping -c1 -W1 8.8.8.8 >/dev/null 2>&1
|
||||
do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
set +e
|
||||
|
||||
output=$(rclone lsd kdrive: 2>&1)
|
||||
status=$?
|
||||
|
||||
set -e
|
||||
|
||||
if [ $status -eq 0 ]; then
|
||||
echo "kdrive OK"
|
||||
else
|
||||
echo "kdrive rclone failed with error: $output"
|
||||
notify-send "rclone kdrive failed" "$output"
|
||||
matrix-commander-rs --verbose -m "rclone kdrive failed.<br>Error: <pre>$output</pre><br><a href=\"https://matrix.to/#/@notificationbot_0000:matrix.org\">@notificationbot_0000</a>" \
|
||||
--html \
|
||||
-r "\!7j-78_02dHROeLj4Ns8F12eo4IiZGv4zNsQ_1-WlyIU"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
packages.custom-mountkdrive = pkgs.writeShellApplication {
|
||||
name = "custom-mountkdrive";
|
||||
runtimeInputs = with pkgs; [
|
||||
rclone
|
||||
libnotify
|
||||
];
|
||||
text = ''
|
||||
REMOTE_NAME="kdrive"
|
||||
MOUNT_POINT="$HOME/kdrive"
|
||||
|
||||
if rclone listremotes | rg "^''${REMOTE_NAME}:"; then
|
||||
echo "Mounting ''${REMOTE_NAME}..."
|
||||
rclone mount "''${REMOTE_NAME}:" "$MOUNT_POINT" --vfs-cache-mode writes --allow-non-empty &
|
||||
else
|
||||
notify-send "rclone mount failed" \
|
||||
"Remote ''${REMOTE_NAME} not found.\nConfigure rclone and create the dir ~/kdrive/ or comment out the exec line in hyprland.nix."
|
||||
echo "Remote ''${REMOTE_NAME} not found. Configure rclone or comment out the exec line in hyprland.nix."
|
||||
fi
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
_: {
|
||||
flake.homeModules.kitty = _: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
#font.name = nerd-fonts._0xproto;
|
||||
#font.size = "10";
|
||||
## new config (matches with caelestia
|
||||
## old condfig
|
||||
extraConfig = ''
|
||||
font_size 14
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
|
||||
window_padding_width 25
|
||||
|
||||
# --- Core ---
|
||||
foreground #ece0d9
|
||||
background #18120e
|
||||
|
||||
selection_foreground #18120e
|
||||
selection_background #ece0d9
|
||||
|
||||
cursor #ffb878
|
||||
cursor_text_color #18120e
|
||||
|
||||
# --- Tabs ---
|
||||
active_tab_foreground #18120e
|
||||
active_tab_background #5c412a
|
||||
inactive_tab_foreground #d6c3b5
|
||||
inactive_tab_background #241e1a
|
||||
|
||||
# --- Black / Gray ---
|
||||
color0 #353433
|
||||
color8 #b29f91
|
||||
|
||||
# --- Red ---
|
||||
color1 #e17300
|
||||
color9 #ff8a20
|
||||
|
||||
# --- Green ---
|
||||
color2 #ffc071
|
||||
color10 #ffd6a8
|
||||
|
||||
# --- Yellow ---
|
||||
color3 #ffe0c6
|
||||
color11 #fff2e8
|
||||
|
||||
# --- Blue ---
|
||||
color4 #b9ab66
|
||||
color12 #d7be91
|
||||
|
||||
# --- Magenta ---
|
||||
color5 #ed9562
|
||||
color13 #fcad7e
|
||||
|
||||
# --- Cyan ---
|
||||
color6 #f4c16d
|
||||
color14 #ffd497
|
||||
|
||||
# --- White ---
|
||||
color7 #ebd4c1
|
||||
color15 #FFFFFF
|
||||
'';
|
||||
/*
|
||||
extraConfig = ''
|
||||
# font nerd-fonts._0xproto # this key dont work and causes errors
|
||||
font_size 14
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
window_padding_width 25
|
||||
foreground #FFFFFF
|
||||
background #1B1D1C
|
||||
selection_foreground #1B1D1C
|
||||
selection_background #FFFFFF
|
||||
cursor #C3AC76
|
||||
cursor_text_color #0F1010
|
||||
|
||||
active_tab_foreground #1B1D1C
|
||||
active_tab_background #6B5540
|
||||
inactive_tab_foreground #6B5540
|
||||
inactive_tab_background #1B1D1C
|
||||
|
||||
# black
|
||||
color0 #29523D
|
||||
color8 #578F73
|
||||
|
||||
# red
|
||||
#color1 #FFF0CC
|
||||
#color9 #F0DBAA
|
||||
# we need actual red colors
|
||||
color1 #CC241D
|
||||
color9 #9D0006
|
||||
|
||||
# green
|
||||
color2 #FFEECC
|
||||
color10 #F0D9AA
|
||||
|
||||
# yellow
|
||||
color3 #FFE5CC
|
||||
color11 #F0CCAA
|
||||
|
||||
# blue
|
||||
color4 #9AE6C0
|
||||
color12 #9AE6C0
|
||||
|
||||
# magenta
|
||||
color5 #E6CC9A
|
||||
color13 #E6CC9A
|
||||
|
||||
# cyan
|
||||
color6 #E6BF9A
|
||||
color14 #E6BF9A
|
||||
|
||||
# white
|
||||
color7 #FFF0CC
|
||||
color15 #F0DBAA
|
||||
'';
|
||||
*/
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
_: {
|
||||
flake.nixosModules.ly = _: {
|
||||
# a minimal ly config as the big config (ly.nix) didnt worked
|
||||
services.displayManager.ly = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# Core animation
|
||||
animation = "none"; # none or doom or matrix or gameoflife or a dur file
|
||||
# Ly supports 24-bit true color with styling, which means each color is a 32-bit value.
|
||||
# The format is 0xSSRRGGBB, where SS is the styling, RR is red, GG is green, and BB is blue.
|
||||
# Here are the possible styling options:
|
||||
# TB_BOLD 0x01000000
|
||||
# TB_UNDERLINE 0x02000000
|
||||
# TB_REVERSE 0x04000000
|
||||
# TB_ITALIC 0x08000000
|
||||
# TB_BLINK 0x10000000
|
||||
# TB_HI_BLACK 0x20000000
|
||||
# TB_BRIGHT 0x40000000
|
||||
# TB_DIM 0x80000000
|
||||
# Programmatically, you'd apply them using the bitwise OR operator (|), but because Ly's
|
||||
# configuration doesn't support using it, you have to manually compute the color value.
|
||||
# Note that, if you want to use the default color value of the terminal, you can use the
|
||||
# special value 0x00000000. This means that, if you want to use black, you *must* use
|
||||
# the styling option TB_HI_BLACK (the RGB values are ignored when using this option).
|
||||
# Basic TUI settings
|
||||
clear_password = true;
|
||||
default_input = "password";
|
||||
fg = "0x01cd6400";
|
||||
full_color = true;
|
||||
hide_borders = false;
|
||||
hide_key_hints = false;
|
||||
hide_keyboard_locks = true;
|
||||
hide_version_string = false;
|
||||
input_len = 34;
|
||||
lang = "en";
|
||||
numlock = false;
|
||||
save = true;
|
||||
service_name = "ly";
|
||||
|
||||
bigclock = "en";
|
||||
clock = "%H:%M";
|
||||
|
||||
colormix_col1 = "0x08E85D04";
|
||||
colormix_col2 = "0x08FABD2F";
|
||||
colormix_col3 = "0x08FE8019";
|
||||
|
||||
# Box appearance
|
||||
#border_fg = "0x00FFFFFF";
|
||||
blank_box = true;
|
||||
box_title = "tomasr@nixos";
|
||||
#margin_box_h = 2;
|
||||
#margin_box_v = 1;
|
||||
#text_in_center = false;
|
||||
|
||||
# Animation: Conway’s Game of Life (optional, comment out for minimal setup)
|
||||
gameoflife_fg = "0x40FFFFFF";
|
||||
|
||||
gameoflife_frame_delay = 3;
|
||||
gameoflife_entropy_interval = 10;
|
||||
gameoflife_initial_density = 0.666;
|
||||
|
||||
# Optional commands (leave null or comment if unused)
|
||||
hibernate_cmd = null;
|
||||
inactivity_cmd = null;
|
||||
login_cmd = "start-hyprland";
|
||||
#logout_cmd = null;
|
||||
sleep_cmd = null;
|
||||
|
||||
# System commands keys
|
||||
shutdown_cmd = "/sbin/shutdown $PLATFORM_SHUTDOWN_ARG now";
|
||||
shutdown_key = "F1";
|
||||
restart_key = "F2";
|
||||
sleep_key = "F3";
|
||||
hibernate_key = "F4";
|
||||
|
||||
# top bar
|
||||
session_log = null;
|
||||
initial_info_text = null; #
|
||||
# Custom sessions
|
||||
#custom_sessions = "$CONFIG_DIRECTORY/ly/custom-sessions";
|
||||
#waylandsessions = "$PREFIX_DIRECTORY/share/wayland-sessions";
|
||||
#xsessions = "$PREFIX_DIRECTORY/share/xsessions";
|
||||
|
||||
# Xorg settings (only needed if using X)
|
||||
#x_cmd = "$PREFIX_DIRECTORY/bin/X";
|
||||
#x_vt = null;
|
||||
#xauth_cmd = "$PREFIX_DIRECTORY/bin/xauth";
|
||||
#xinitrc = "~/.xinitrc";
|
||||
|
||||
# Setup / startup scripts
|
||||
#setup_cmd = "$CONFIG_DIRECTORY/ly/setup.sh";
|
||||
#start_cmd = "$CONFIG_DIRECTORY/ly/startup.sh";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{inputs, ...}: {
|
||||
flake.hostModules.micro = {pkgs-unstable, ...}: {
|
||||
programs.micro = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.micro-full;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
home.file.".config/micro/plug/vivify" = {
|
||||
enable = true;
|
||||
source = inputs.microPlugins-vivify;
|
||||
recursive = true;
|
||||
force = true;
|
||||
};
|
||||
home.file.".config/micro/init.lua" = {
|
||||
enable = true;
|
||||
force = true;
|
||||
text = ''
|
||||
local buffer = import("micro/buffer")
|
||||
local shell = import("micro/shell")
|
||||
|
||||
function vivifyOpen(buf)
|
||||
local cursor = buf:GetActiveCursor()
|
||||
local line = cursor.Loc.Y + 1
|
||||
|
||||
shell.ExecCommand("viv", string.format("%s:%d", buf.AbsPath, line))
|
||||
end
|
||||
|
||||
function onBufferOpen(buf)
|
||||
if os.getenv("MICRO_VIVIFY") ~= "1" then
|
||||
return
|
||||
end
|
||||
|
||||
-- only run for real files (not help/log/etc)
|
||||
if buf.Type.Kind == buffer.BTDefault then
|
||||
vivifyOpen(buf)
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
_: {
|
||||
flake.nixosModules.mullvad = {pkgs-unstable, ...}: {
|
||||
services.mullvad-vpn = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.mullvad-vpn;
|
||||
};
|
||||
};
|
||||
flake.homeModules.mullvad = {pkgs-unstable, ...}: {
|
||||
programs.mullvad-vpn = {
|
||||
# gui
|
||||
enable = true;
|
||||
package = pkgs-unstable.mullvad-vpn;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,501 @@
|
||||
_: {
|
||||
flake.homeModules.neovim = {pkgs-unstable, ...}: {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
vimAlias = false;
|
||||
viAlias = false;
|
||||
package = pkgs-unstable.neovim-unwrapped; # required for unwrapped version
|
||||
plugins = [
|
||||
pkgs-unstable.vimPlugins.vivify-vim
|
||||
pkgs-unstable.vimPlugins.vimtex
|
||||
pkgs-unstable.vimPlugins.zoxide-vim
|
||||
#pkgs-unstable.vimPlugins.gruvbox
|
||||
pkgs-unstable.vimPlugins.gruvbox-nvim
|
||||
pkgs-unstable.vimPlugins.neovim-sensible
|
||||
pkgs-unstable.vimPlugins.nvim-web-devicons
|
||||
pkgs-unstable.vimPlugins.nvim-tree-lua
|
||||
pkgs-unstable.vimPlugins.nvim-surround
|
||||
pkgs-unstable.vimPlugins.floaterm
|
||||
pkgs-unstable.vimPlugins.nvim-lspconfig
|
||||
pkgs-unstable.vimPlugins.cmp-nvim-lsp
|
||||
pkgs-unstable.vimPlugins.cmp-nvim-lsp-signature-help
|
||||
pkgs-unstable.vimPlugins.cmp-under-comparator
|
||||
pkgs-unstable.vimPlugins.cmp-buffer
|
||||
pkgs-unstable.vimPlugins.cmp-path
|
||||
pkgs-unstable.vimPlugins.cmp-cmdline
|
||||
pkgs-unstable.vimPlugins.nvim-cmp
|
||||
pkgs-unstable.vimPlugins.cmp-vsnip
|
||||
pkgs-unstable.vimPlugins.vim-vsnip
|
||||
pkgs-unstable.vimPlugins.dashboard-nvim
|
||||
pkgs-unstable.vimPlugins.lualine-nvim
|
||||
pkgs-unstable.vimPlugins.vim-nix
|
||||
pkgs-unstable.vimPlugins.plenary-nvim
|
||||
pkgs-unstable.vimPlugins.blink-ripgrep-nvim
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.rasi
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.regex
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.udev
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.zsh
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.c
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.bibtex
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.bash
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.gitignore
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.comment
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.json
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.hyprlang
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.lua
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.latex
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.kitty
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.markdown
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.nix
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.printf
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.python
|
||||
pkgs-unstable.vimPlugins.telescope-nvim
|
||||
pkgs-unstable.vimPlugins.nvim-scrollbar
|
||||
pkgs-unstable.vimPlugins.promise-async
|
||||
pkgs-unstable.vimPlugins.nvim-ufo
|
||||
pkgs-unstable.vimPlugins.cheatsheet-nvim
|
||||
pkgs-unstable.vimPlugins.popup-nvim
|
||||
pkgs-unstable.vimPlugins.vim-visual-multi
|
||||
pkgs-unstable.vimPlugins.fugit2-nvim
|
||||
pkgs-unstable.vimPlugins.nvim-lastplace
|
||||
pkgs-unstable.vimPlugins.runner-nvim # terminal
|
||||
pkgs-unstable.vimPlugins.better-diagnostic-virtual-text
|
||||
pkgs-unstable.vimPlugins.garbage-day-nvim
|
||||
];
|
||||
extraLuaConfig = ''
|
||||
|
||||
local vim = vim
|
||||
|
||||
-- =========================
|
||||
-- LEADER & KEY DISABLE
|
||||
-- =========================
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
vim.keymap.set({'n', 'v'}, '<Space>', '<Nop>', { desc = 'Leader key, disable default behavior' })
|
||||
vim.keymap.set('n', 'q', '<Nop>', { desc = 'Disable macro recording' })
|
||||
vim.keymap.set('n', 'gg', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gG', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g0', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g^', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g$', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gj', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gk', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g~', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gu', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gU', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g=', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gq', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g@', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g?', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gC', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gD', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gx', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gr', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g[', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g]', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g;', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g,', '<Nop>', { desc = 'Disable g motion' })
|
||||
-- =========================
|
||||
-- GENERAL OPTIONS
|
||||
-- =========================
|
||||
vim.g.have_nerd_font = true
|
||||
vim.opt.relativenumber = false
|
||||
vim.opt.number = true
|
||||
vim.opt.mouse = 'a'
|
||||
vim.opt.showmode = false
|
||||
vim.schedule(function()
|
||||
vim.opt.clipboard = 'unnamedplus'
|
||||
end)
|
||||
vim.opt.breakindent = true
|
||||
vim.opt.undofile = true
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.signcolumn = 'yes'
|
||||
vim.opt.updatetime = 250
|
||||
vim.opt.timeoutlen = 300
|
||||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.inccommand = 'split'
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.scrolloff = 10
|
||||
|
||||
|
||||
-- =========================
|
||||
-- BASIC KEYMAPS
|
||||
-- =========================
|
||||
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
||||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||
|
||||
-- Disable arrow keys in normal mode
|
||||
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
||||
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
||||
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
||||
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
||||
|
||||
-- Window navigation
|
||||
vim.keymap.set('n', '<C-Left>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
|
||||
vim.keymap.set('n', '<C-Right>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
|
||||
vim.keymap.set('n', '<C-Down>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||
vim.keymap.set('n', '<C-Up>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||
|
||||
-- Cheatsheet
|
||||
vim.keymap.set("n","§", "<cmd>Cheatsheet<CR>")
|
||||
require("cheatsheet").setup({
|
||||
bundled_cheatsheets = { enabled = { "default" } },
|
||||
bundled_plugin_cheatsheets = { disabled = { "gitsigns.nvim" } }
|
||||
})
|
||||
|
||||
-- Highlight yanked text
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
desc = 'Highlight on yank',
|
||||
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
||||
callback = function() vim.highlight.on_yank() end,
|
||||
})
|
||||
|
||||
-- ========================
|
||||
-- terminal
|
||||
-- =======================
|
||||
require("runner-nvim").setup({
|
||||
position = 'right', -- position of the terminal window when using the shell_handler
|
||||
-- can be: top, left, right, bottom
|
||||
-- will be overwritten when using the telescope mapping to open horizontally or vertically
|
||||
|
||||
width = 80, -- width of window when position is left or right
|
||||
height = 10, -- height of window when position is top or bottom
|
||||
|
||||
handlers = {
|
||||
lua = function(bufnr)
|
||||
vim.print('Running lua file in buffer ' .. bufnr)
|
||||
-- Run the file here
|
||||
end
|
||||
}
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader><leader>", function() require("runner-nvim").run() end)
|
||||
-- =========================
|
||||
-- SCROLLBAR
|
||||
-- =========================
|
||||
require("scrollbar").setup()
|
||||
|
||||
-- =========================
|
||||
-- UFO FOLDING
|
||||
-- =========================
|
||||
vim.o.foldcolumn = '1'
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
vim.keymap.set('n', '<leader>1', "<cmd>foldopen<CR>")
|
||||
vim.keymap.set('n', '<leader>2', "<cmd>foldclose<CR>")
|
||||
require('ufo').setup({
|
||||
provider_selector = function() return {'treesitter', 'indent'} end
|
||||
})
|
||||
|
||||
-- =========================
|
||||
-- treesitter
|
||||
-- ========================
|
||||
require('nvim-treesitter').setup({
|
||||
ensure_installed = {},
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = { enable = true },
|
||||
})
|
||||
-- =========================
|
||||
-- NVIM-TREE
|
||||
-- =========================
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
require("nvim-tree").setup({
|
||||
sort = { sorter = "case_sensitive" },
|
||||
view = { width = 30 },
|
||||
renderer = { group_empty = true },
|
||||
filters = { dotfiles = true },
|
||||
})
|
||||
|
||||
-- =========================
|
||||
-- CMP CONFIGURATION
|
||||
-- =========================
|
||||
local cmp = require'cmp'
|
||||
cmp.setup({
|
||||
snippet = { expand = function(args) vim.fn["vsnip#anonymous"](args.body) end },
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
}),
|
||||
sources = cmp.config.sources({ { name = 'nvim_lsp' }, { name = 'vsnip' } }, { { name = 'buffer' } }),
|
||||
})
|
||||
|
||||
cmp.setup.cmdline({ '/', '?' }, { mapping = cmp.mapping.preset.cmdline(), sources = { { name = 'buffer' } } })
|
||||
cmp.setup.cmdline(':', { mapping = cmp.mapping.preset.cmdline(), sources = cmp.config.sources({ { name = 'path' } }, { { name = 'cmdline' } }), matching = { disallow_symbol_nonprefix_matching = false } })
|
||||
|
||||
-- =========================
|
||||
-- LSP CONFIGURATION
|
||||
-- =========================
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
-- Diagnostics
|
||||
vim.keymap.set("n", "<leader>e4", function() vim.diagnostic.jump({ prev=true, count = 1 }) end, { desc = "Previous diagnostic" })
|
||||
vim.keymap.set("n", "<leader>e5", function() vim.diagnostic.jump({ prev=false, count = 1 }) end, { desc = "Next diagnostic" })
|
||||
vim.keymap.set("n", "<leader>e1", vim.diagnostic.open_float, { desc = "Show diagnostic" })
|
||||
vim.keymap.set("n", "<leader>e3", vim.diagnostic.setloclist, { desc = "Diagnostic list" })
|
||||
vim.keymap.set("n", "<leader>e2", vim.lsp.buf.code_action, { desc = "Show correction" })
|
||||
|
||||
vim.keymap.set("n", "<leader>e<Tab>", function()
|
||||
local clients = vim.lsp.get_clients({ name = "ltex" })
|
||||
|
||||
if #clients > 0 then
|
||||
-- Stop LTeX
|
||||
for _, client in ipairs(clients) do
|
||||
client.stop()
|
||||
end
|
||||
print("LTeX OFF")
|
||||
else
|
||||
-- Start LTeX
|
||||
vim.cmd("LspStart ltex")
|
||||
print("LTeX ON")
|
||||
end
|
||||
end, { desc = "Toggle LTeX" })
|
||||
|
||||
vim.diagnostic.config({
|
||||
update_in_insert = false, -- i don't get any new error when in insert
|
||||
})
|
||||
require("better-diagnostic-virtual-text").setup({
|
||||
ui = {
|
||||
wrap_line_after = false, -- wrap the line after this length to avoid the virtual text is too long
|
||||
left_kept_space = 3, --- the number of spaces kept on the left side of the virtual text, make sure it enough to custom for each line
|
||||
right_kept_space = 3, --- the number of spaces kept on the right side of the virtual text, make sure it enough to custom for each line
|
||||
arrow = " ",
|
||||
up_arrow = " ",
|
||||
down_arrow = " ",
|
||||
above = false, -- the virtual text will be displayed above the line
|
||||
},
|
||||
priority = 2003, -- the priority of virtual text
|
||||
inline = false,
|
||||
|
||||
})
|
||||
|
||||
|
||||
-- LSP functionality
|
||||
vim.keymap.set("n", "<leader>g1", vim.lsp.buf.hover, { desc = "Hover documentation" })
|
||||
vim.keymap.set("n", "<leader>g2", vim.lsp.buf.definition, { desc = "Go to definition" })
|
||||
vim.keymap.set("n", "<leader>g3", vim.lsp.buf.declaration, { desc = "Go to declaration" })
|
||||
vim.keymap.set("n", "<leader>g4", vim.lsp.buf.implementation, { desc = "Go to implementation" })
|
||||
vim.keymap.set("n", "<leader>g5", vim.lsp.buf.references, { desc = "Show references" })
|
||||
|
||||
-- LSP server setup
|
||||
vim.lsp.config("lua_ls", { cmd = { "lua-language-server" }, filetypes = { "lua" }, root_dir = vim.fs.dirname, on_attach = on_attach })
|
||||
vim.lsp.config("clangd", {
|
||||
cmd = { "clangd", "--header-insertion=never" },
|
||||
filetypes = { "c","cpp","objc","objcpp" },
|
||||
on_attach = on_attach ,
|
||||
init_options = {
|
||||
|
||||
clangdFileStatus = true,
|
||||
usePlaceholders = true,
|
||||
completeUnimported = false, -- this adds a bunch of #include even thought they are #included in another header file
|
||||
headerInsertion = false,
|
||||
headerInsertionDecorators = false,
|
||||
addDependencyHeaders = false,
|
||||
semanticHighlighting = true}
|
||||
})
|
||||
vim.lsp.config("nixd", {
|
||||
cmd = { "nixd" },
|
||||
filetypes = { "nix" },
|
||||
on_attach = on_attach,
|
||||
})
|
||||
vim.lsp.config("pylsp", {
|
||||
cmd = { "pylsp" },
|
||||
filetypes = { "python" },
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
pylsp_mypy = { enabled = true },
|
||||
jedi_completion = { fuzzy = true }
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
vim.lsp.config("texlab", { cmd = { "texlab" }, filetypes = { "tex" }, on_attach = on_attach })
|
||||
vim.lsp.config("ltex", {
|
||||
cmd = { "ltex-ls-plus" },
|
||||
filetypes = { "markdown", "text", "tex", "plaintex" },
|
||||
on_attach = on_attach,
|
||||
|
||||
settings = {
|
||||
ltex = {
|
||||
language = "fr",
|
||||
|
||||
enabled = {
|
||||
"markdown",
|
||||
"text",
|
||||
"tex",
|
||||
"plaintex",
|
||||
},
|
||||
|
||||
completionEnabled = true,
|
||||
diagnosticSeverity = "information",
|
||||
|
||||
additionalRules = {
|
||||
enablePickyRules = false,
|
||||
motherTongue = "fr",
|
||||
},
|
||||
|
||||
dictionary = {
|
||||
["fr"] = {
|
||||
"icelle",
|
||||
"icelui",
|
||||
"iceux",
|
||||
"maldoror",
|
||||
"evariste",
|
||||
"galois",
|
||||
"arno",
|
||||
"dessacrer",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.enable({ "lua_ls", "clangd", "pylsp", "texlab", "nixd", "ltex"})
|
||||
-- =========================
|
||||
-- DASHBOARD
|
||||
-- =========================
|
||||
require('dashboard').setup {
|
||||
theme = 'hyper',
|
||||
config = {
|
||||
header = {
|
||||
" ... ... . ",
|
||||
" .=*8888n..\"%888: @88> ",
|
||||
" X ?8888f '8888 u. ... .. %8P .. . : ",
|
||||
" 88x. '8888X 8888> .u ...ue888b :~\"\"888h.:^\"888: . .888: x888 x888. ",
|
||||
"'8888k 8888X '\"*8h. ud8888. 888R Y888r 8X `8888X 8888> .@88u ~`8888~'888X`?888f` ",
|
||||
" \"8888 X888X .xH8 :888'8888. 888R I888> X888n. 8888X ?888> '\"888E` X888 888X '888> ",
|
||||
" `8\" X888!:888X d888 '88%\" 888R I888> '88888 8888X ?**h. 888E X888 888X '888> ",
|
||||
" =~` X888 X888X 8888.+\" 888R I888> `*88 8888~ x88x. 888E X888 888X '888> ",
|
||||
" :h. X8*` !888X 8888L u8888cJ888 ..<\" 88*` 88888X 888E X888 888X '888> ",
|
||||
" X888xX\" '8888..: '8888c. .+ \"*888*P\" ..XC. `*8888k 888& \"*88%\"\"*88\" '888!` ",
|
||||
":~`888f '*888*\" \"88888% 'Y\" :888888H. `%88> R888\" `~ \" `\"` ",
|
||||
" \"\" `\"` \"YP' < `\"888888: X\" \"\" ",
|
||||
" %888888x.-` ",
|
||||
" \"\"**\"\" ",
|
||||
"",
|
||||
""
|
||||
},
|
||||
shortcut = { { desc = " Open File Tree", group = "", key = 't', action = 'NvimTreeOpen' } },
|
||||
packages = { enable = false },
|
||||
project = { enable = true, limit = 8, icon = ' New file', action = 'Telescope find_files cwd=' },
|
||||
mru = { limit = 10, icon = ' History' },
|
||||
footer = {},
|
||||
}
|
||||
}
|
||||
|
||||
-- jumps cursor when was last cursor last time
|
||||
require("nvim-lastplace").setup({
|
||||
-- Filetypes to ignore
|
||||
ignore_filetypes = {
|
||||
"gitcommit", "gitrebase", "svn", "hgcommit", "xxd", "COMMIT_EDITMSG"
|
||||
},
|
||||
|
||||
-- Buffer types to ignore
|
||||
ignore_buftypes = {
|
||||
"quickfix", "nofile", "help", "terminal"
|
||||
},
|
||||
|
||||
-- Center cursor after jumping
|
||||
center_on_jump = true,
|
||||
|
||||
-- Only jump if target line is not visible
|
||||
jump_only_if_not_visible = false,
|
||||
|
||||
-- Minimum lines required to enable jumping
|
||||
min_lines = 10,
|
||||
|
||||
-- Maximum line to jump to (0 = no limit)
|
||||
max_line = 0,
|
||||
|
||||
-- Open folds after jumping
|
||||
open_folds = true,
|
||||
|
||||
-- Enable debug messages
|
||||
debug = false,
|
||||
})
|
||||
-- ======================
|
||||
-- gruvbox
|
||||
-- ======================
|
||||
|
||||
require("gruvbox").setup({
|
||||
terminal_colors = false, -- add neovim terminal colors
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = false,
|
||||
emphasis = true,
|
||||
comments = true,
|
||||
operators = false,
|
||||
folds = true,
|
||||
},
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "hard", -- can be "hard", "soft" or empty string
|
||||
palette_overrides = { -- for overrides see https://github.com/ellisonleao/gruvbox.nvim/blob/main/lua/gruvbox.lua
|
||||
dark0_hard = "#241F17"
|
||||
},
|
||||
overrides = {
|
||||
String = {fg = "#FFB878", italic = false},
|
||||
FoldColumn = {fg = faded_orange, bg = dark0_hard}
|
||||
},
|
||||
dim_inactive = false,
|
||||
transparent_mode = false,
|
||||
})
|
||||
vim.opt.termguicolors = false
|
||||
vim.o.background = "dark"
|
||||
vim.cmd("colorscheme gruvbox")
|
||||
-- =========================
|
||||
-- LUALINE
|
||||
-- =========================
|
||||
require('lualine').setup { options = { theme = "gruvbox_dark" } }
|
||||
|
||||
|
||||
--==================0
|
||||
-- Some utils
|
||||
--==================
|
||||
vim.keymap.set('n', '<leader>r1', '<cmd>Fugit2<CR>', { desc = 'Open git helper' })
|
||||
|
||||
vim.keymap.set("n", "t", function()
|
||||
local line = vim.api.nvim_get_current_line()
|
||||
|
||||
local result = vim.fn.system({ "custom-syllabes" }, line)
|
||||
|
||||
print(vim.trim(result))
|
||||
end, { desc = "Count syllables (current line)" })
|
||||
-- =========================
|
||||
-- telescope
|
||||
-- =======================
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>f1', builtin.find_files, { desc = 'Telescope find files' })
|
||||
vim.keymap.set('n', '<leader>f2', builtin.live_grep, { desc = 'Telescope live grep' })
|
||||
vim.keymap.set('n', '<leader>f3', builtin.buffers, { desc = 'Telescope buffers' })
|
||||
vim.keymap.set('n', '<leader>f4', builtin.help_tags, { desc = 'Telescope help tags' })
|
||||
|
||||
-- Disable relative numbers even if plugins override
|
||||
vim.api.nvim_create_autocmd("VimEnter", { callback = function() vim.opt.colorcolumn = ""; vim.opt.relativenumber = false end })
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
_: {
|
||||
# obsidian is unused -> see my project https://github.com/tomasriveral/NoteWrapper
|
||||
flake.homeModules.obsidian = _: {
|
||||
programs.obsidian = {
|
||||
enable = true;
|
||||
|
||||
vaults = {
|
||||
miscellanious = {
|
||||
enable = true;
|
||||
target = "/Documents/Notes/miscellanious";
|
||||
};
|
||||
work = {
|
||||
enable = true;
|
||||
target = "/Documents/Notes/work";
|
||||
};
|
||||
};
|
||||
|
||||
defaultSettings = {
|
||||
appearance.theme = "gruvbox";
|
||||
|
||||
extraFiles = {
|
||||
".obsidian/themes/gruvbox/manifest.json" = ../../other/obsidian-theme/manifest.json;
|
||||
".obsidian/themes/gruvbox/obsidian.css" = ../../other/obsidian-theme/obsidian.css;
|
||||
".obsidian/themes/gruvbox/theme.css" = ../../other/obsidian-theme/theme.css;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
perSystem = {pkgs, ...}: {
|
||||
packages.custom-obsidianbackup = pkgs.writeShellApplication {
|
||||
name = "custom-obsidianbackup";
|
||||
runtimeInputs = with pkgs; [
|
||||
rclone
|
||||
libnotify
|
||||
rsync
|
||||
];
|
||||
text = ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SOURCE_DIR="$HOME/Documents/Notes"
|
||||
DEST_DIR="$HOME/kdrive/Notes"
|
||||
BACKUP_DIR="$HOME/.Notes.backup"
|
||||
|
||||
mkdir -p "$DEST_DIR"
|
||||
mkdir -p "$BACKUP_DIR"
|
||||
|
||||
while true; do
|
||||
# Timestamp for this run
|
||||
TIMESTAMP=$(date +%Y-%m-%d_%H-%M)
|
||||
TIMESTAMPED_BACKUP="$BACKUP_DIR/$TIMESTAMP"
|
||||
mkdir -p "$TIMESTAMPED_BACKUP"
|
||||
|
||||
echo "[$(date)] Starting Obsidian backup..."
|
||||
|
||||
# Check rclone mount
|
||||
status=$(rclone about kdrive: 2>&1 || true)
|
||||
if [[ "$status" =~ .*CRITICAL.* ]]; then
|
||||
echo "[$(date)] rclone failed:"
|
||||
echo "$status"
|
||||
notify-send -u critical "rclone failed" \
|
||||
"rclone might be broken or you need to deactivate this script in HomeManager."
|
||||
else
|
||||
# Run rsync with verbose debugging
|
||||
echo "[$(date)] Running rsync..."
|
||||
rsync -Lavh --progress --update --backup --backup-dir="$TIMESTAMPED_BACKUP" \
|
||||
--exclude='.obsidian/cache/**' \
|
||||
"$SOURCE_DIR/" "$DEST_DIR/"
|
||||
|
||||
echo "[$(date)] Backup completed for this run."
|
||||
fi
|
||||
|
||||
# Safely remove backups older than 30 days
|
||||
if [[ -d "$BACKUP_DIR" && "$BACKUP_DIR" == "$HOME/.Notes.backup" ]]; then
|
||||
echo "[$(date)] Cleaning old backups..."
|
||||
find "$BACKUP_DIR/" -mindepth 1 -maxdepth 1 -type d -mtime +30 -exec rm -rf {} \;
|
||||
else
|
||||
echo "[$(date)] Backup directory not safe. Skipping cleanup."
|
||||
fi
|
||||
|
||||
# Wait 1 hour
|
||||
echo "[$(date)] Sleeping for 1 hour..."
|
||||
sleep 3600
|
||||
done
|
||||
'';
|
||||
};
|
||||
# this might be broken after dendritic nix. As it searched for the obsidian.nix to get list of vaults
|
||||
packages.custom-obsidianbvaults = pkgs.writeShellApplication {
|
||||
name = "custom-obsidianvaults";
|
||||
runtimeInputs = with pkgs; [
|
||||
zsh
|
||||
fzf
|
||||
ripgrep
|
||||
];
|
||||
text = ''
|
||||
# Path to your obsidian.nix
|
||||
obsidian_nix="$HOME/nixos/modules/home-manager/obsidian.nix"
|
||||
|
||||
# Extract vault names without line numbers and colors
|
||||
mapfile -t vaults < <(rg -N --color=never -Po 'vaults\.\K[[:alnum:]_]+' "$obsidian_nix")
|
||||
|
||||
# Let user select a vault with fzf
|
||||
selected=$(printf "%s\n" "''${vaults[@]}" \
|
||||
| fzf --height 6 --reverse --prompt="Select Obsidian vault:")
|
||||
|
||||
# Exit if user cancels
|
||||
[[ -z "$selected" ]] && exit 0
|
||||
|
||||
# Remove any stray ANSI codes (optional)
|
||||
selected=$(echo "$selected" | sed -r 's/\x1B\[[0-9;]*[mK]//g')
|
||||
|
||||
# Find the target path of the selected vault
|
||||
vault_path=$(rg -N --color=never -A2 "vaults.$selected" "$obsidian_nix" \
|
||||
| rg 'target =' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||
|
||||
# Expand ~ if present
|
||||
vault_path="''${vault_path/#\~/$HOME}"
|
||||
|
||||
# Launch Obsidian with the selected vault using URI
|
||||
[[ -n "$vault_path" ]] && setsid xdg-open "obsidian://open?vault=$selected" >/dev/null 2>&1 &
|
||||
# Exit the kitty terminal after selection
|
||||
pkill -f "kitty.*Select Obsidian vault"
|
||||
exit
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
_: {
|
||||
flake.homeModules.oh-my-posh = _: {
|
||||
programs.oh-my-posh = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
useTheme = "gruvbox";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
_: {
|
||||
flake.homeModules.quickshell = _: {
|
||||
# pulled from https://codeberg.org/zacoons/rivendell-hyprdots
|
||||
# replaced by caelestia-shell
|
||||
qt.enable = true;
|
||||
programs.quickshell = {
|
||||
systemd.enable = true;
|
||||
enable = true;
|
||||
};
|
||||
home.file.".config/quickshell" = {
|
||||
source = ../../other/quickshell;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
perSystem = {pkgs, ...}: {
|
||||
# creates and maintains cache file for the notification history
|
||||
packages.QS-notifycache = pkgs.writeShellApplication {
|
||||
name = "QS-notifycache";
|
||||
text = ''
|
||||
CACHE="$HOME/.cache/notify_history"
|
||||
# Create or erase existing cache
|
||||
mkdir -p "$(dirname "$CACHE")"
|
||||
: > "$CACHE" # truncate file
|
||||
echo "Notification history initialized at $(date)" >> "$CACHE"
|
||||
'';
|
||||
};
|
||||
packages.QS-notifyhistory = pkgs.writeShellApplication {
|
||||
name = "QS-notifyhistory";
|
||||
text = ''
|
||||
app="$1"
|
||||
title="$2"
|
||||
body="$3"
|
||||
date="$(date +%T)"
|
||||
urgency="$4"
|
||||
|
||||
case "$urgency" in
|
||||
0) urgency_text="low";;
|
||||
1) urgency_text="normal";;
|
||||
2) urgency_text="critical";;
|
||||
*) urgency_text="unknown";;
|
||||
esac
|
||||
{
|
||||
echo "$app"
|
||||
echo "$title"
|
||||
echo "$body"
|
||||
echo "$date"
|
||||
echo "$urgency_text"
|
||||
|
||||
} >> "$HOME/.cache/notify_history"
|
||||
'';
|
||||
};
|
||||
packages.QS-sysinfo = pkgs.writeShellApplication {
|
||||
name = "QS-sysinfo";
|
||||
runtimeInputs = with pkgs; [
|
||||
ripgrep
|
||||
gawkInteractive
|
||||
iproute2
|
||||
coreutils
|
||||
procps
|
||||
upower
|
||||
];
|
||||
text = ''
|
||||
# Pad CPU, MEM, DISK to 2 chars (right-aligned)
|
||||
|
||||
cpu=$(awk '/^cpu /{printf("%.0f", ($2+$4)*100/($2+$4+$5))}' /proc/stat)
|
||||
cpu=$(printf "%2s" "$cpu")
|
||||
|
||||
sum=0
|
||||
count=0
|
||||
|
||||
for f in /sys/class/hwmon/hwmon*/temp*_input; do
|
||||
if [ -r "$f" ]; then
|
||||
val=$(cat "$f" 2>/dev/null) || continue
|
||||
sum=$((sum + val))
|
||||
count=$((count + 1))
|
||||
fi
|
||||
done
|
||||
|
||||
temp=$(( sum / count / 1000 ))
|
||||
|
||||
sum=0
|
||||
count=0
|
||||
|
||||
for f in /sys/class/hwmon/hwmon*/fan*_input; do
|
||||
if [ -r "$f" ]; then
|
||||
val=$(cat "$f" 2>/dev/null) || continue
|
||||
sum=$((sum + val))
|
||||
count=$((count + 1))
|
||||
fi
|
||||
done
|
||||
fan=$(( sum / count ))
|
||||
fan=$(printf "%4s" "$fan")
|
||||
|
||||
mem=$(free | awk '/Mem:/ {printf("%.0f",$3/$2*100)}')
|
||||
mem=$(printf "%2s" "$mem")
|
||||
|
||||
disk=$(df / | awk 'NR==2 {gsub("%",""); print $5}')
|
||||
disk=$(printf "%2s" "$disk")
|
||||
|
||||
# Pad POWER to 5 chars (XX.XX)
|
||||
power=$(upower -b | awk -F: '/energy-rate/ {gsub(/^[ \t]+/, "", $2); split($2,a," "); printf("%.2f", a[1])}')
|
||||
power=$(printf "%5s" "$power")
|
||||
|
||||
# network calculations
|
||||
iface=$(ip route get 1.1.1.1 | awk '{print $5; exit}')
|
||||
|
||||
rx1=$(cat "/sys/class/net/$iface/statistics/rx_bytes")
|
||||
tx1=$(cat "/sys/class/net/$iface/statistics/tx_bytes")
|
||||
|
||||
sleep 1
|
||||
|
||||
rx2=$(cat "/sys/class/net/$iface/statistics/rx_bytes")
|
||||
tx2=$(cat "/sys/class/net/$iface/statistics/tx_bytes")
|
||||
|
||||
down_speed=$(( (rx2 - rx1) / 1024 ))
|
||||
up_speed=$(( (tx2 - tx1) / 1024 ))
|
||||
|
||||
# Output JSON
|
||||
echo "{\"cpu\":\"$cpu\",\"temp\":\"$temp\",\"fan\":\"$fan\",\"mem\":\"$mem\",\"disk\":\"$disk\",\"power\":\"$power\",\"down\":\"$down_speed\",\"up\":\"$up_speed\"}"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
_: {
|
||||
flake.homeModules.ripgrep = _: {
|
||||
programs.ripgrep = {
|
||||
enable = true;
|
||||
arguments = [
|
||||
"-S"
|
||||
"-."
|
||||
"-p"
|
||||
"-n"
|
||||
];
|
||||
};
|
||||
programs.ripgrep-all = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
_: {
|
||||
flake.homeModules.rofi = _: {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
theme = "gruvbox-dark-hard";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
_: {
|
||||
flake.homeModules.sbb-tui = {pkgs-unstable, ...}: {
|
||||
home.packages = [
|
||||
pkgs-unstable.sbb-tui
|
||||
];
|
||||
home.file.".config/sbb-tui/config.yaml" = {
|
||||
enable = true;
|
||||
# Gruvbox (from https://github.com/Necrom4/sbb-tui/blob/master/docs/themes.md)
|
||||
text = ''
|
||||
ui:
|
||||
nerdfont: true
|
||||
theme:
|
||||
text: "#EBDBB2"
|
||||
textMuted: "#928374"
|
||||
error: "#FB4934"
|
||||
warning: "#FB4934"
|
||||
borderFocused: "#FABD2F"
|
||||
borderUnfocused: "#504945"
|
||||
badgeKeyFg: "#282828"
|
||||
badgeKeyBg: "#FABD2F"
|
||||
badgeVehicleFg: "#EBDBB2"
|
||||
badgeVehicleBg: "#458588"
|
||||
badgeModelFg: "#282828"
|
||||
badgeModelBg: "#FB4934"
|
||||
badgeCompanyFg: "#282828"
|
||||
badgeCompanyBg: "#EBDBB2"
|
||||
logo: "#EBDBB2"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
_: {
|
||||
flake.homeModules.ssh = _: {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false; # will be removed in the futur. Removes evaluation warning
|
||||
matchBlocks."*" = {
|
||||
# equivalent to the default config
|
||||
forwardAgent = false;
|
||||
addKeysToAgent = "no";
|
||||
compression = false;
|
||||
serverAliveInterval = 0;
|
||||
serverAliveCountMax = 3;
|
||||
hashKnownHosts = false;
|
||||
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||
controlMaster = "no";
|
||||
controlPath = "~/.ssh/master-%r@%n:%p";
|
||||
controlPersist = "no";
|
||||
};
|
||||
};
|
||||
services.ssh-agent.enable = true;
|
||||
home.file.".ssh/config".text = ''
|
||||
Host *
|
||||
AddKeysToAgent yes
|
||||
IdentityFile ~/.ssh/id_ed25519
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
_: {
|
||||
# replaced by caelestia
|
||||
flake.homeModules.swaync = _: {
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
flake.homeModules.swaylock = _: {
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color = "1e1e2e";
|
||||
bs-hl-color = "f5e0dc";
|
||||
caps-lock-bs-hl-color = "f5e0dc";
|
||||
caps-lock-key-hl-color = "a6e3a1";
|
||||
inside-color = "00000000";
|
||||
inside-clear-color = "00000000";
|
||||
inside-caps-lock-color = "00000000";
|
||||
inside-ver-color = "00000000";
|
||||
inside-wrong-color = "00000000";
|
||||
key-hl-color = "a6e3a1";
|
||||
layout-bg-color = "00000000";
|
||||
layout-border-color = "00000000";
|
||||
layout-text-color = "cdd6f4";
|
||||
line-color = "00000000";
|
||||
line-clear-color = "00000000";
|
||||
line-caps-lock-color = "00000000";
|
||||
line-ver-color = "00000000";
|
||||
line-wrong-color = "00000000";
|
||||
ring-color = "b4befe";
|
||||
ring-clear-color = "f5e0dc";
|
||||
ring-caps-lock-color = "fab387";
|
||||
ring-ver-color = "89b4fa";
|
||||
ring-wrong-color = "eba0ac";
|
||||
separator-color = "00000000";
|
||||
text-color = "cdd6f4";
|
||||
text-clear-color = "f5e0dc";
|
||||
text-caps-lock-color = "fab387";
|
||||
text-ver-color = "89b4fa";
|
||||
text-wrong-color = "eba0ac";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
_: {
|
||||
flake.homeModules.thunderbird = _: {
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles.tomasr = {
|
||||
isDefault = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
_: {
|
||||
flake.homeModules.vivify = {pkgs-unstable, ...}: {
|
||||
home.file.".config/vivify/config.json" = {
|
||||
enable = true;
|
||||
text = ''
|
||||
{
|
||||
"browserOptions": {
|
||||
"name": "qutebrowser",
|
||||
"arguments": ["-T"]
|
||||
}
|
||||
}'';
|
||||
};
|
||||
home.packages = [
|
||||
pkgs-unstable.vivify
|
||||
];
|
||||
programs.qutebrowser = {
|
||||
enable = true;
|
||||
settings = {
|
||||
auto_save.session = false;
|
||||
changelog_after_upgrade = "never";
|
||||
content.cookies.accept = "never";
|
||||
};
|
||||
extraConfig = ''
|
||||
config.bind('<Ctrl-L>', 'yank url ;; message-info "URL copied"')
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,716 @@
|
||||
_: {
|
||||
flake.homeModules.waybar = _: {
|
||||
# replaced by caelestia
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = [
|
||||
{
|
||||
layer = "top";
|
||||
position = "left";
|
||||
margin = "5 2 5 0";
|
||||
reload_style_on_change = true;
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
"group/info"
|
||||
"group/power"
|
||||
];
|
||||
modules-center = [
|
||||
];
|
||||
modules-right = [
|
||||
"hyprland/window"
|
||||
"group/brightness"
|
||||
"group/sound"
|
||||
"group/connection"
|
||||
"group/together"
|
||||
"tray"
|
||||
"battery"
|
||||
];
|
||||
# groups settings are organized by alphabetical order
|
||||
"group/audio" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = false;
|
||||
};
|
||||
modules = [
|
||||
"pulseaudio"
|
||||
"pulseaudio#mic"
|
||||
"pulseaudio/slider"
|
||||
];
|
||||
};
|
||||
"group/bluetooth" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = true;
|
||||
};
|
||||
modules = [
|
||||
"bluetooth"
|
||||
"bluetooth#status"
|
||||
];
|
||||
};
|
||||
"group/brightness" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = false;
|
||||
};
|
||||
modules = [
|
||||
"backlight"
|
||||
"backlight/slider"
|
||||
];
|
||||
};
|
||||
"group/connection" = {
|
||||
orientation = "inherit";
|
||||
modules = ["group/network"];
|
||||
};
|
||||
"group/gcpu" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"custom/cpu-icon"
|
||||
"temperature"
|
||||
"cpu"
|
||||
];
|
||||
};
|
||||
"group/info" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"group/gcpu"
|
||||
"memory"
|
||||
"disk"
|
||||
];
|
||||
};
|
||||
"group/network" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = true;
|
||||
};
|
||||
modules = [
|
||||
"network"
|
||||
"network#speed"
|
||||
];
|
||||
};
|
||||
"group/power" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"battery#w"
|
||||
"battery#powerdraw"
|
||||
];
|
||||
};
|
||||
"group/sound" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"group/audio"
|
||||
"custom/notification"
|
||||
];
|
||||
};
|
||||
"group/together" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"group/utils"
|
||||
"clock"
|
||||
];
|
||||
};
|
||||
"group/utils" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = true;
|
||||
};
|
||||
modules = [
|
||||
"custom/weather"
|
||||
"custom/colorpicker"
|
||||
];
|
||||
};
|
||||
# modules settings are organized by alphabetical order
|
||||
backlight = {
|
||||
device = "intel_backlight"; # my laptop is amd and it works
|
||||
format = "{icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
on-scroll-down = "brightnessctl s 5%-";
|
||||
on-scroll-up = "brightness s +5%";
|
||||
tooltip = true;
|
||||
tooltip-format = "Brightness: {percent}%";
|
||||
smooth-scrolling-threshold = 1;
|
||||
};
|
||||
"backlight/slider" = {
|
||||
min = 5;
|
||||
max = 100;
|
||||
orientation = "vertical";
|
||||
device = "intel_backlight";
|
||||
};
|
||||
battery = {
|
||||
#rotate = 90;
|
||||
interval = 30;
|
||||
states = {
|
||||
good = 95;
|
||||
warning = 20;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}";
|
||||
format-charging = "<b>{icon} {capacity}% </b>";
|
||||
format-full = "<span color='#82A55F'><b>{icon}</b></span>";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
tooltip-format = "{timeTo} {capacity} %";
|
||||
};
|
||||
"battery#powerdraw" = {
|
||||
rotate = 90;
|
||||
interval = 10;
|
||||
format = "{power:.0001f}";
|
||||
};
|
||||
"battery#w" = {
|
||||
rotate = 90;
|
||||
interval = 100000;
|
||||
format = "W";
|
||||
};
|
||||
bluetooth = {
|
||||
format-on = "";
|
||||
format-off = "";
|
||||
format-disabled = "";
|
||||
format-connected = "<b></b>";
|
||||
tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected";
|
||||
tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}";
|
||||
tooltip-format-enumerate-connected = "{device_alias}\t{device_address}";
|
||||
tooltip-format-enumerate-connected-battery = "{device_alias}\t{device_address}\t{device_battery_percentage}%";
|
||||
};
|
||||
"bluetooth#status" = {
|
||||
format-on = "";
|
||||
format-off = "";
|
||||
format-disabled = "";
|
||||
format-connected = "<b>{num_connections}</b>";
|
||||
format-connected-battery = "<small><b>{device_battery_percentage}%</b></small>";
|
||||
tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected";
|
||||
tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}";
|
||||
tooltip-format-enumerate-connected = "{device_alias}\t{device_address}";
|
||||
tooltip-format-enumerate-connected-battery = "{device_alias}\t{device_address}\t{device_battery_percentage}%";
|
||||
};
|
||||
clock = {
|
||||
format = "{:%H\n%M}";
|
||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||
calendar = {
|
||||
mode = "month";
|
||||
mode-mon-col = 3;
|
||||
weeks-pos = "right";
|
||||
on-scroll = 1;
|
||||
on-click-right = "mode";
|
||||
format = {
|
||||
today = "<span color='#d65d0e'><b><u>{}</u></b></span>";
|
||||
};
|
||||
};
|
||||
};
|
||||
cpu = {
|
||||
format = "<b>{usage}%</b>";
|
||||
};
|
||||
"custom/colorpicker" = {
|
||||
format = "";
|
||||
on-click = "hyprpicker | tee >(wl-copy) | cliphist store";
|
||||
};
|
||||
"custom/cpu-icon" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/mark" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/weather" = {
|
||||
format = "{}";
|
||||
interval = 3600;
|
||||
exec = "custom-weatherwaybar";
|
||||
return-type = "json";
|
||||
};
|
||||
disk = {
|
||||
interval = 600;
|
||||
format = "<b> \n{percentage_used}</b>";
|
||||
path = "/"; #maybe we should subtract ~/kdrive if it is counted
|
||||
};
|
||||
"hyprland/window" = {
|
||||
format = "{class}";
|
||||
rotate = 90;
|
||||
};
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
"1" = "";
|
||||
"2" = "";
|
||||
"3" = "";
|
||||
"4" = "";
|
||||
"5" = "";
|
||||
"6" = "";
|
||||
"7" = "";
|
||||
"8" = "";
|
||||
"9" = "";
|
||||
"10" = "";
|
||||
"active" = "";
|
||||
"default" = "";
|
||||
};
|
||||
persistent-workspaces = {
|
||||
"*" = [1 2 3 4 5 6 7 8 9 10];
|
||||
};
|
||||
};
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
tooltip-format-activated = "Idle Inhibitor is active";
|
||||
tooltip-format-deactivated = "Idle Inhibitor is not active";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
memory = {
|
||||
format = "<b> \n{:2}</b>";
|
||||
};
|
||||
network = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
wifi = [""];
|
||||
ethernet = [""];
|
||||
disconnected = [""];
|
||||
};
|
||||
format-wifi = "";
|
||||
format-ethernet = "";
|
||||
format-disconnected = "";
|
||||
format-linked = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"network#speed" = {
|
||||
format = " {bandwidthDownBits} ";
|
||||
rotate = 90;
|
||||
interval = 5;
|
||||
tooltip-format = "{ipaddr}";
|
||||
tooltip-format-wifi = "{essid} ({signalStrength}%) \n{ipaddr} | {frequency} MHz{icon} ";
|
||||
tooltip-format-ethernet = "{ifname} \n{ipaddr} | {frequency} MHz{icon} ";
|
||||
tooltip-format-disconnected = "Not Connected to any type of Network";
|
||||
tooltip = true;
|
||||
};
|
||||
power-profiles-daemon = {
|
||||
format = "{icon}";
|
||||
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
|
||||
tooltip = true;
|
||||
format-icons = {
|
||||
default = "";
|
||||
performance = "<span color='#B37F34'><small></small></span>";
|
||||
balanced = "<span><small> </small></span>";
|
||||
power-saver = "<span color='#a6e3a1'><small></small></span>";
|
||||
};
|
||||
};
|
||||
pulseaudio = {
|
||||
format = "{icon}";
|
||||
format-bluetooth = "{icon}";
|
||||
tooltip-format = "{volume}% {icon} | {desc}";
|
||||
format-muted = "";
|
||||
format-icons = {
|
||||
headphones = "";
|
||||
handsfree = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = " ";
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
on-click = "volume mute";
|
||||
on-click-middle = "pavucontrol";
|
||||
on-scroll-up = "pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
on-scroll-down = "pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
||||
smooth-scrolling-threshold = 1;
|
||||
};
|
||||
"pulseaudio#mic" = {
|
||||
format = "{format_source}";
|
||||
format-source = "";
|
||||
format-source-muted = "";
|
||||
tooltip-format = "{volume}% {format_source}";
|
||||
on-click = "pactl set-source-mute 0 toggle";
|
||||
on-scroll-down = "pactl set-source-volume 0 -1%";
|
||||
on-scroll-up = "pactl set-source-volume 0 +1%";
|
||||
};
|
||||
"pulseaudio/slider" = {
|
||||
min = 0;
|
||||
max = 140;
|
||||
orientation = "vertical";
|
||||
};
|
||||
temperature = {
|
||||
format = "{temperatureC}°C";
|
||||
format-critical = "{temperatureC}°C";
|
||||
interval = 10;
|
||||
};
|
||||
tray = {
|
||||
icon-size = 18;
|
||||
spacing = 10;
|
||||
};
|
||||
}
|
||||
]; # home-manager wants the whole config as a list of bars
|
||||
style = ''
|
||||
@define-color foreground #c5c5c5;
|
||||
@define-color background #191919;
|
||||
@define-color cursor #c5c5c5;
|
||||
|
||||
@define-color color0 #191919;
|
||||
@define-color color1 #3a3632;
|
||||
@define-color color2 #582c1e;
|
||||
@define-color color3 #423f39;
|
||||
@define-color color4 #50473c;
|
||||
@define-color color5 #634723;
|
||||
@define-color color6 #BAA470;
|
||||
@define-color color7 #8c8c8c;
|
||||
@define-color color8 #525252;
|
||||
@define-color color9 #4e4843;
|
||||
@define-color color10 #763b28;
|
||||
@define-color color11 #59554c;
|
||||
@define-color color12 #6b5f51;
|
||||
@define-color color13 #855f2f;
|
||||
@define-color color14 #796d62;
|
||||
@define-color color15 #c5c5c5;
|
||||
|
||||
@define-color active @color6;
|
||||
|
||||
* {
|
||||
font-size: 23px;
|
||||
font-family: "0xProto Nerd Font";
|
||||
min-width: 8px;
|
||||
min-height: 0px;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
border-radius: 8px;
|
||||
border: 2px solid @active;
|
||||
background: @background;
|
||||
background: alpha(@background, 0.7);
|
||||
color: lighter(@active);
|
||||
}
|
||||
|
||||
menu,
|
||||
tooltip {
|
||||
border-radius: 8px;
|
||||
padding: 2px;
|
||||
border: 1px solid lighter(@active);
|
||||
background: alpha(@background, 0.6);
|
||||
|
||||
color: lighter(@active);
|
||||
}
|
||||
|
||||
menu label,
|
||||
tooltip label {
|
||||
font-size: 20px;
|
||||
color: lighter(@active);
|
||||
}
|
||||
|
||||
#submap,
|
||||
#tray>.needs-attention {
|
||||
animation-name: blink-active;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
.modules-right {
|
||||
margin: 0px 6px 6px 6px;
|
||||
border-radius: 4px;
|
||||
background: alpha(@background, 0.4);
|
||||
color: lighter(@active);
|
||||
}
|
||||
|
||||
.modules-left {
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
margin: 6px 6px 6px 6px;
|
||||
border-radius: 4px;
|
||||
background: alpha(@background, 0.4);
|
||||
color: lighter(@active);
|
||||
}
|
||||
|
||||
#gcpu,
|
||||
#custom-github,
|
||||
#memory,
|
||||
#disk,
|
||||
#together,
|
||||
#submap,
|
||||
#custom-weather {
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
#custom-recorder,
|
||||
#connection,
|
||||
#cnoti,
|
||||
#brightness,
|
||||
#power,
|
||||
#custom-updates,
|
||||
#tray,
|
||||
#audio,
|
||||
#privacy,
|
||||
#sound {
|
||||
border-radius: 4px;
|
||||
margin: 2px 2px 4px 2px;
|
||||
background: alpha(darker(@active), 0.3);
|
||||
}
|
||||
|
||||
#custom-notifications {
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
#custom-hotspot,
|
||||
#custom-github,
|
||||
#custom-notifications {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
#custom-hotspot {
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
#custom-vpn,
|
||||
#custom-hotspot {
|
||||
background: alpha(darker(@active), 0.3);
|
||||
}
|
||||
|
||||
#privacy-item {
|
||||
padding: 6px 0px 6px 6px;
|
||||
}
|
||||
|
||||
#gcpu {
|
||||
padding: 8px 0px 8px 0px;
|
||||
}
|
||||
|
||||
#custom-cpu-icon {
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
#custom-cputemp,
|
||||
#temperature {
|
||||
font-size: 17px;
|
||||
}
|
||||
#disk,
|
||||
#memory,
|
||||
#cpu {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#custom-github {
|
||||
padding-top: 2px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
#custom-dmark {
|
||||
color: alpha(@foreground, 0.3);
|
||||
}
|
||||
|
||||
#submap {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
#hyprland.window {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
margin: 0px 2px;
|
||||
padding: 4px 0px 0px 0px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
color: @foreground;
|
||||
background: transparent;
|
||||
border-radius: 4px;
|
||||
color: alpha(@foreground, 0.3);
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
font-weight: bold;
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
padding: 4px 2px;
|
||||
background: alpha(@active, 0.4);
|
||||
color: lighter(@active);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#network.wifi {
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
#submap {
|
||||
min-width: 0px;
|
||||
margin: 4px 6px 4px 6px;
|
||||
}
|
||||
|
||||
#tray {
|
||||
padding: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
#bluetooth {
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
#window {
|
||||
border-radius: 8px;
|
||||
padding: 4px 14px;
|
||||
margin: 4px 2px 4px 2px;
|
||||
}
|
||||
|
||||
#battery {
|
||||
font-size: 17px;
|
||||
border-radius: 8px;
|
||||
padding: 4px 0px;
|
||||
margin: 4px 2px 4px 2px;
|
||||
}
|
||||
|
||||
#battery.discharging.warning {
|
||||
animation-name: blink-yellow;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#battery.discharging.critical {
|
||||
animation-name: blink-red;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#battery.powerdraw {
|
||||
font-size: 17px;
|
||||
padding: 0;
|
||||
margin-right: -20px;
|
||||
margin-left: -20px;
|
||||
}
|
||||
#battery.w {
|
||||
font-size: 17px;
|
||||
padding: 0;
|
||||
margin-left: -20px;
|
||||
margin-right: -20px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
padding: 4px 2px 2px 2px;
|
||||
}
|
||||
|
||||
#pulseaudio.mic {
|
||||
border-radius: 4px;
|
||||
color: @background;
|
||||
background: alpha(darker(@foreground), 0.6);
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
#backlight-slider slider,
|
||||
#pulseaudio-slider slider {
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#backlight-slider trough,
|
||||
#pulseaudio-slider trough {
|
||||
margin-top: 4px;
|
||||
min-width: 6px;
|
||||
min-height: 60px;
|
||||
border-radius: 8px;
|
||||
background-color: alpha(@background, 0.6);
|
||||
}
|
||||
|
||||
#backlight-slider highlight,
|
||||
#pulseaudio-slider highlight {
|
||||
border-radius: 8px;
|
||||
background-color: lighter(@active);
|
||||
}
|
||||
|
||||
#bluetooth.discoverable,
|
||||
#bluetooth.discovering,
|
||||
#bluetooth.pairable {
|
||||
border-radius: 8px;
|
||||
animation-name: blink-active;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
@keyframes blink-active {
|
||||
to {
|
||||
background-color: @active;
|
||||
color: @foreground;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes blink-red {
|
||||
to {
|
||||
background-color: #c64d4f;
|
||||
color: @foreground;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes blink-yellow {
|
||||
to {
|
||||
background-color: #cf9022;
|
||||
color: @foreground;
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
perSystem = {pkgs, ...}: {
|
||||
packages.custom-weatherwaybar = pkgs.writeShellApplication {
|
||||
name = "custom-weatherwaybar";
|
||||
runtimeInputs = with pkgs; [
|
||||
curl
|
||||
];
|
||||
text = ''
|
||||
PATTERN="C"
|
||||
PATTERN2=" "
|
||||
TEXT1="''$(curl -s "https://wttr.in/?format=%c")"
|
||||
TEXT1=''${TEXT1/$PATTERN2/}
|
||||
TEXT2="''$(curl -s "https://wttr.in/?format=%t")"
|
||||
TEXT2=''${TEXT2/$PATTERN/}
|
||||
TEXT3="''$(curl -s "https://wttr.in/?format=%f")"
|
||||
TEXT3=''${TEXT3/$PATTERN/}
|
||||
printf '{"text":" %s\\n %s\\n %s", "tooltip": false, "class": "weather"}\\n' \
|
||||
"$TEXT1" "$TEXT2" "$TEXT3"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
_: {
|
||||
# replaced by wlogout
|
||||
flake.homeModules.wlogout = _: let
|
||||
wallpaper = ../../assets/wallpaper1.jpg;
|
||||
lock = ../../assets/lock.png;
|
||||
lock-hover = ../../assets/lock-hover.png;
|
||||
shutdown = ../../assets/power.png;
|
||||
shutdown-hover = ../../assets/power-hover.png;
|
||||
logout = ../../assets/logout.png;
|
||||
logout-hover = ../../assets/logout-hover.png;
|
||||
reboot = ../../assets/restart.png;
|
||||
reboot-hover = ../../assets/restart-hover.png;
|
||||
in {
|
||||
programs.wlogout = {
|
||||
enable = true;
|
||||
layout = [
|
||||
{
|
||||
label = "lock";
|
||||
action = "swaylock -eFLfk -i ${wallpaper}";
|
||||
text = " Lock (L) ";
|
||||
keybind = "l";
|
||||
}
|
||||
{
|
||||
label = "reboot";
|
||||
action = "systemctl reboot";
|
||||
text = " Reboot (R) ";
|
||||
keybind = "r";
|
||||
}
|
||||
{
|
||||
label = "shutdown";
|
||||
action = "systemctl poweroff";
|
||||
text = "Shutdown (S)";
|
||||
keybind = "s";
|
||||
}
|
||||
{
|
||||
label = "logout";
|
||||
action = "loginctl terminate-session $(loginctl show-session $(loginctl | grep $USER | awk '{print $1}') -p Id --value)";
|
||||
text = " Logout (E) ";
|
||||
keybind = "e";
|
||||
}
|
||||
];
|
||||
style = ''
|
||||
window {
|
||||
font-family: OxProto Nerd Font;
|
||||
font-size: 14pt;
|
||||
color: #000000; /* text */
|
||||
background-color: rgba(40, 40, 40, 0.76);
|
||||
}
|
||||
|
||||
button {
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 50%;
|
||||
border-style: solid;
|
||||
border-radius: 4px;
|
||||
border-width: 2px;
|
||||
border-color: #ebdbb2;
|
||||
background-color: rgba(40, 40, 40, 0.76);
|
||||
margin: 10px;
|
||||
transition:
|
||||
box-shadow 0.3s ease-in-out,
|
||||
background-color 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: rgba(250, 137, 26, 0.3);
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
background-color: #ebdbb2;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
#lock {
|
||||
background-image: image(url("${lock}"));
|
||||
}
|
||||
#lock:focus {
|
||||
background-image: image(url("${lock-hover}"));
|
||||
}
|
||||
#lock:hover {
|
||||
background-image: image(url("${lock-hover}"));
|
||||
}
|
||||
|
||||
#logout {
|
||||
background-image: image(url("${logout}"));
|
||||
}
|
||||
#logout:focus {
|
||||
background-image: image(url("${logout-hover}"));
|
||||
}
|
||||
#logout:hover {
|
||||
background-image: image(url("${logout-hover}"));
|
||||
}
|
||||
|
||||
|
||||
#shutdown {
|
||||
background-image: image(url("${shutdown}"));
|
||||
}
|
||||
#shutdown:focus {
|
||||
background-image: image(url("${shutdown-hover}"));
|
||||
}
|
||||
#shutdown:hover {
|
||||
background-image: image(url("${shutdown-hover}"));
|
||||
}
|
||||
|
||||
#reboot {
|
||||
background-image: image(url("${reboot}"));
|
||||
}
|
||||
#reboot:focus {
|
||||
background-image: image(url("${reboot-hover}"));
|
||||
}
|
||||
#reboot:hover {
|
||||
background-image: image(url("${reboot-hover}"));
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
_: {
|
||||
flake.homeModules.zoxide = _: {
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
{self, ...}: {
|
||||
flake.homeModules.zsh-laptop = _: {
|
||||
programs.zsh = {
|
||||
shellAliases = {
|
||||
snrt = "git -C ~/nixos add -A && time sudo nixos-rebuild test --flake ~/nixos/#laptop && pkill shell || true && pkill caelestia-shell || true && caelestia-shell -n > /dev/null 2>&1 & disown";
|
||||
snrs = "git -C ~/nixos add -A && time sudo nixos-rebuild switch --flake ~/nixos/#laptop && pkill shell || true && pkill caelestia-shell || true && caelestia-shell -n > /dev/null 2>&1 & disown";
|
||||
};
|
||||
};
|
||||
};
|
||||
flake.homeModules.zsh = {pkgs, ...}: {
|
||||
home.packages = [
|
||||
self.packages.${pkgs.system}.dejaManuallyDerived
|
||||
#pkgs-unstable.deja
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestion.enable = false; # zsh-autocomplete is replaced by deja
|
||||
initContent = ''
|
||||
# Safe cat that uses colorize plugin ccat
|
||||
custom-cat() {
|
||||
if [[ -t 1 ]]; then
|
||||
ccat "$@"
|
||||
else
|
||||
command cat "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
custom-eza() { # behaves differently if we just call it or if we pipe initContent
|
||||
if [[ -t 1 ]]; then
|
||||
eza -hlF -aa --color=always --hyperlink --group-directories-first --show-symlinks --icons=always --git --no-permissions "$@"
|
||||
else
|
||||
command eza "$@"
|
||||
fi
|
||||
}
|
||||
eval "$(direnv hook zsh)"
|
||||
eval "$(deja init zsh)"
|
||||
export PATH="$PATH:$HOME/NoteWrapper" # some project im coding
|
||||
fastfetch''\n'';
|
||||
shellAliases = {
|
||||
".." = "z ..";
|
||||
grep = "rg";
|
||||
ll = "custom-eza"; # if there is a special ls just use the big eza
|
||||
la = "custom-eza";
|
||||
l = "custom-eza";
|
||||
eza = "custom-eza";
|
||||
ls = "\\eza -a"; # ls -> normal ls. eza gives more info
|
||||
tree = "\\eza -hlTF --color=always --hyperlink --group-directories-first --show-symlinks --icons=always --git --no-permissions";
|
||||
cat = "custom-cat";
|
||||
pomodoro = "custom-tomato";
|
||||
librewolf = "kitty --class \"custom-librewolfprofiles\" --name \"Select LibreWolf profile\" --hold custom-librewolfprofiles";
|
||||
manix = "custom-manix";
|
||||
man = "custom-man";
|
||||
mplayer = "mplayer -volume 5";
|
||||
# these are to create the developpement shell
|
||||
cenv = "nix-shell -p zsh gcc raylib libx11 libGL";
|
||||
# i always write nvim wrong :(
|
||||
nbim = "nvim";
|
||||
nivm = "nvim";
|
||||
bivm = "nvim";
|
||||
nibm = "nvim";
|
||||
vikm = "nvim";
|
||||
nvimm = "nvim";
|
||||
nnvim = "nvim";
|
||||
nvvim = "nvim";
|
||||
nviim = "nvim";
|
||||
};
|
||||
};
|
||||
};
|
||||
flake.homeModules.oh-my-zsh = _: {
|
||||
programs.zsh.oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "jonathan";
|
||||
plugins = [
|
||||
"aliases"
|
||||
"alias-finder"
|
||||
"colored-man-pages"
|
||||
"colorize"
|
||||
"command-not-found"
|
||||
"dirhistory"
|
||||
"fzf"
|
||||
"git"
|
||||
"rclone"
|
||||
"safe-paste"
|
||||
"sudo"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,445 @@
|
||||
_: {
|
||||
flake.nixosModules.battery-laptop = {
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
# https://discourse.nixos.org/t/what-is-the-best-option-for-power-management/63406/2
|
||||
# we just activate tlp unconditonally
|
||||
#let
|
||||
# cfg = config.custom;
|
||||
#hasBattery =
|
||||
# lib.any (x: lib.strings.hasPrefix "BAT" x)
|
||||
# (builtins.attrNames (builtins.readDir "/sys/class/power_supply"));
|
||||
#in
|
||||
{
|
||||
# options.custom = {
|
||||
# battery.enable = lib.mkOption {
|
||||
# default = hasBattery;
|
||||
# description = "Enable better battery support";
|
||||
# type = lib.types.bool;
|
||||
# };
|
||||
# };
|
||||
|
||||
# config = lib.mkIf cfg.battery.enable {
|
||||
powerManagement.powertop.enable = true; # enable powertop auto tuning on startup.
|
||||
# Acording to https://community.frame.work/t/solved-keys-stick-and-repeat-after-being-released/51153/12
|
||||
# Some powertop bug is responsable for the problem of the random keypress being stuck
|
||||
# fix: from https://git.gabbie.blue/blue/nixconf/src/commit/2d1bc6dad4684c019b6b3e894408e76e2734806c/hosts/gabbielaptop/configuration.nix#L68
|
||||
powerManagement.powertop.postStart = ''
|
||||
${lib.getExe' config.systemd.package "udevadm"} trigger -c bind -s usb -a idVendor=32ac -a idProduct=0018
|
||||
# Retrigger macropad udev rules
|
||||
${lib.getExe' config.systemd.package "udevadm"} trigger -c bind -s usb -a idVendor=32ac -a idProduct=0013
|
||||
'';
|
||||
services.system76-scheduler.settings.cfsProfiles.enable = true; # Better scheduling for CPU cycles - thanks System76!!!
|
||||
services.thermald.enable = true; # Enable thermald, the temperature management daemon. (only necessary if on Intel CPUs)
|
||||
services.power-profiles-daemon.enable = false; # Disable GNOMEs power management
|
||||
services.tlp = {
|
||||
enable = true; # Enable TLP (better than gnomes internal power manager)
|
||||
settings = {
|
||||
CPU_BOOST_ON_AC = 1;
|
||||
CPU_BOOST_ON_BAT = 1;
|
||||
CPU_HWP_DYN_BOOST_ON_AC = 1;
|
||||
CPU_HWP_DYN_BOOST_ON_BAT = 1;
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";
|
||||
PLATFORM_PROFILE_ON_AC = "performance";
|
||||
PLATFORM_PROFILE_ON_BAT = "balanced";
|
||||
START_CHARGE_THRESH_BAT1 = 75;
|
||||
STOP_CHARGE_THRESH_BAT1 = 85;
|
||||
};
|
||||
};
|
||||
# };
|
||||
};
|
||||
perSystem = {pkgs, ...}: let
|
||||
NotifySound = ../../assets/battery_notify.mp3;
|
||||
in {
|
||||
packages.custom-batterynotify = pkgs.writeShellApplication {
|
||||
# taken and adapted https://github.com/miniMinn24/Battery_Notify with MIT License
|
||||
|
||||
name = "custom-batterynotify";
|
||||
runtimeInputs = with pkgs; [
|
||||
mplayer
|
||||
brightnessctl
|
||||
];
|
||||
text = ''
|
||||
|
||||
# Delay for startup
|
||||
sleep 5
|
||||
|
||||
# Change your sound path here
|
||||
|
||||
playsound() {
|
||||
mplayer ${NotifySound}
|
||||
}
|
||||
|
||||
adjustBrightness() {
|
||||
local adjustment="$1"
|
||||
brightnessctl set "$adjustment"
|
||||
}
|
||||
|
||||
sendNotification() {
|
||||
local title="$1"
|
||||
local message="$2"
|
||||
notify-send -h string:x-canonical-private-synchronous:sys-notify -e -u low "$title" "$message"
|
||||
}
|
||||
|
||||
# Runs full time in background
|
||||
x=0
|
||||
while true; do
|
||||
Battery_Status="$(\cat /sys/class/power_supply/BAT*/status)"
|
||||
Battery_Capacity=$(\cat /sys/class/power_supply/BAT*/capacity)
|
||||
|
||||
case "$Battery_Status" in
|
||||
"Discharging")
|
||||
if [ $x -eq 1 ]; then
|
||||
sendNotification "Discharging" "Remains: <b>''${Battery_Capacity}%</b>"
|
||||
adjustBrightness "15%-"
|
||||
playsound
|
||||
x=0
|
||||
fi
|
||||
;;
|
||||
"Charging")
|
||||
if [ $x -eq 0 ]; then
|
||||
sendNotification "Charging" "Current: <b>''${Battery_Capacity}%</b>"
|
||||
adjustBrightness "15%+"
|
||||
playsound
|
||||
x=1
|
||||
fi
|
||||
;;
|
||||
"Full")
|
||||
if [ $x -eq 0 ]; then
|
||||
sendNotification "Fully Charged" "Noice: <b>''${Battery_Capacity}%</b>"
|
||||
playsound
|
||||
x=1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
sleep 1
|
||||
done
|
||||
'';
|
||||
};
|
||||
packages.custom-batterywarning = pkgs.writeShellApplication {
|
||||
# taken and adapted https://github.com/miniMinn24/Battery_Notify with MIT License
|
||||
name = "custom-batterywarning";
|
||||
runtimeInputs = with pkgs; [
|
||||
mplayer
|
||||
brightnessctl
|
||||
];
|
||||
text = ''
|
||||
|
||||
# Delay for startup
|
||||
sleep 5
|
||||
|
||||
|
||||
playsound() {
|
||||
mplayer ${NotifySound}
|
||||
}
|
||||
|
||||
|
||||
|
||||
while true; do
|
||||
Battery_Status="$(cat /sys/class/power_supply/BAT*/status)"
|
||||
Battery_Capacity="$(cat /sys/class/power_supply/BAT*/capacity)"
|
||||
|
||||
if [ "$Battery_Status" == "Discharging" ]; then
|
||||
if [ "$Battery_Capacity" -le 20 ] && [ "$Battery_Capacity" -ge 10 ]; then
|
||||
notify-send -e -u critical "Battery Low!" "Power running out: <b>''${Battery_Capacity}%</b>"
|
||||
playsound
|
||||
sleep 180
|
||||
|
||||
elif [ "$Battery_Capacity" -lt 10 ]; then
|
||||
notify-send -e -u critical "Battery Low!" "<b>Save your works</b> before immediate shutdown."
|
||||
playsound
|
||||
sleep 180
|
||||
fi
|
||||
else
|
||||
sleep 120
|
||||
fi
|
||||
done
|
||||
'';
|
||||
};
|
||||
# because cbatticon, batticonplus and other things didn't work.
|
||||
# chatGpt did this.
|
||||
# https://chatgpt.com/c/69da11b3-ba24-8331-b7b0-a58a72e69d42
|
||||
# at your risk and perils
|
||||
# click on the icon to get a notification with state, percentage and wattage
|
||||
packages.qtbatticon = pkgs.stdenv.mkDerivation {
|
||||
pname = "qtbatticon";
|
||||
version = "1.0";
|
||||
|
||||
src = pkgs.writeTextFile {
|
||||
name = "qtbatticon.cpp";
|
||||
text = ''
|
||||
#include <QApplication>
|
||||
#include <QSystemTrayIcon>
|
||||
#include <QTimer>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
#include <QIcon>
|
||||
#include <QString>
|
||||
#include <QDebug>
|
||||
#include <cstdlib>
|
||||
|
||||
QString readFile(const QString &path) {
|
||||
QFile f(path);
|
||||
if (!f.open(QIODevice::ReadOnly)) return "";
|
||||
QTextStream in(&f);
|
||||
return in.readAll().trimmed();
|
||||
}
|
||||
|
||||
int readInt(const QString &path) {
|
||||
return readFile(path).toInt();
|
||||
}
|
||||
|
||||
double readDouble(const QString &path) {
|
||||
QFile f(path);
|
||||
if (!f.open(QIODevice::ReadOnly)) return 0;
|
||||
QTextStream in(&f);
|
||||
return in.readAll().trimmed().toDouble();
|
||||
}
|
||||
|
||||
int toStep(int capacity) {
|
||||
return (capacity / 10) * 10;
|
||||
}
|
||||
|
||||
QString pad3(int n) {
|
||||
return QString("%1").arg(n, 3, 10, QChar('0'));
|
||||
}
|
||||
|
||||
double getPowerW(const QString &batPath) {
|
||||
double current_uA = readDouble(batPath + "/current_now");
|
||||
double voltage_uV = readDouble(batPath + "/voltage_now");
|
||||
|
||||
if (current_uA > 0 && voltage_uV > 0) {
|
||||
return (current_uA * voltage_uV) / 1e12;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
QIcon batteryIcon(int capacity, bool charging) {
|
||||
int step = toStep(capacity);
|
||||
QString num = pad3(step);
|
||||
|
||||
QString base = "/run/current-system/sw/share/icons/Papirus/24x24/panel/";
|
||||
|
||||
QString file;
|
||||
if (charging) {
|
||||
file = base + "battery-" + num + "-charging.svg";
|
||||
} else {
|
||||
file = base + "battery-" + num + ".svg";
|
||||
}
|
||||
|
||||
QIcon icon(file);
|
||||
|
||||
if (icon.isNull()) {
|
||||
qDebug() << "FAILED icon:" << file;
|
||||
icon = QIcon(base + "battery-100.svg");
|
||||
}
|
||||
|
||||
return icon;
|
||||
}
|
||||
|
||||
void sendNotification(const QString &title, const QString &body) {
|
||||
QString cmd = "notify-send \"" + title + "\" \"" + body + "\"";
|
||||
system(cmd.toUtf8().constData());
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
QApplication app(argc, argv);
|
||||
|
||||
QString batPath = "/sys/class/power_supply/BAT1";
|
||||
QSystemTrayIcon tray;
|
||||
|
||||
auto updateIcon = [&]() {
|
||||
int capacity = readInt(batPath + "/capacity");
|
||||
QString status = readFile(batPath + "/status");
|
||||
bool charging = status.contains("Charging");
|
||||
|
||||
tray.setIcon(batteryIcon(capacity, charging));
|
||||
};
|
||||
|
||||
auto notify = [&]() {
|
||||
int capacity = readInt(batPath + "/capacity");
|
||||
QString status = readFile(batPath + "/status");
|
||||
|
||||
bool charging = status.contains("Charging");
|
||||
bool discharging = status.contains("Discharging");
|
||||
|
||||
double power = getPowerW(batPath);
|
||||
|
||||
QString state;
|
||||
if (charging) state = "Charging";
|
||||
else if (discharging) state = "Discharging";
|
||||
else state = status;
|
||||
|
||||
QString powerStr = (power > 0.01)
|
||||
? QString::number(power, 'f', 2) + " W"
|
||||
: "N/A";
|
||||
|
||||
QString msg =
|
||||
QString("%1\n%2%\n%3")
|
||||
.arg(state)
|
||||
.arg(capacity)
|
||||
.arg(powerStr);
|
||||
|
||||
sendNotification("Battery status", msg);
|
||||
};
|
||||
|
||||
QObject::connect(&tray, &QSystemTrayIcon::activated,
|
||||
[&](QSystemTrayIcon::ActivationReason r) {
|
||||
if (r == QSystemTrayIcon::Trigger) {
|
||||
notify();
|
||||
}
|
||||
});
|
||||
|
||||
updateIcon();
|
||||
tray.setVisible(true);
|
||||
|
||||
QTimer timer;
|
||||
QObject::connect(&timer, &QTimer::timeout, updateIcon);
|
||||
timer.start(5000);
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
pkg-config
|
||||
qt6.wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
qt6.qtbase
|
||||
qt6.qtsvg
|
||||
papirus-icon-theme
|
||||
];
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
buildPhase = ''
|
||||
g++ $src -o qtbatticon \
|
||||
$(pkg-config --cflags --libs Qt6Widgets)
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install -m755 qtbatticon $out/bin/
|
||||
'';
|
||||
};
|
||||
# This was replaced by caelestia shell's Game Mode
|
||||
packages.custom-performance = pkgs.writeShellApplication {
|
||||
name = "custom-performance";
|
||||
runtimeInputs = with pkgs; [
|
||||
hyprland
|
||||
gawk
|
||||
libnotify
|
||||
];
|
||||
text = ''
|
||||
HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}')
|
||||
if [ "$HYPRGAMEMODE" = 1 ] ; then
|
||||
hyprctl --batch "\
|
||||
keyword animations:enabled 0;\
|
||||
keyword animation borderangle,0; \
|
||||
keyword decoration:shadow:enabled 0;\
|
||||
keyword decoration:blur:enabled 0;\
|
||||
keyword decoration:fullscreen_opacity 1;\
|
||||
keyword general:gaps_in 0;\
|
||||
keyword general:gaps_out 0;\
|
||||
keyword general:border_size 1;\
|
||||
keyword decoration:rounding 0"
|
||||
notify-send -u critical -t 5000 "Performance mode [ON]"
|
||||
exit
|
||||
else
|
||||
notify-send -u critical -t 5000 "Performance mode [OFF]"
|
||||
hyprctl reload
|
||||
exit 0
|
||||
fi
|
||||
'';
|
||||
};
|
||||
# Old script that was used for the battery. Might not work.
|
||||
packages.custom-olddeprecatedbatterynotify = pkgs.writeShellApplication {
|
||||
name = "custom-olddeprecatedbatterynotify";
|
||||
|
||||
runtimeInputs = with pkgs; [
|
||||
libnotify # provides notify-send
|
||||
systemd # provides systemctl
|
||||
];
|
||||
|
||||
text = ''
|
||||
set -euo pipefail
|
||||
|
||||
LOW="''${BATTERY_LOW_THRESHOLD:-20}"
|
||||
CRITICAL="''${BATTERY_CRITICAL_THRESHOLD:-5}"
|
||||
FULL="''${BATTERY_FULL_THRESHOLD:-95}"
|
||||
INTERVAL="''${BATTERY_INTERVAL:-30}"
|
||||
ACTION="''${BATTERY_CRITICAL_ACTION:-systemctl suspend}"
|
||||
|
||||
notify() {
|
||||
notify-send -a "Battery" -u "$1" "$2" "$3"
|
||||
}
|
||||
|
||||
get_info() {
|
||||
total=0
|
||||
count=0
|
||||
|
||||
for bat in /sys/class/power_supply/BAT*; do
|
||||
[ -f "$bat/capacity" ] || continue
|
||||
capacity=$(<"$bat/capacity")
|
||||
status=$(<"$bat/status")
|
||||
total=$((total + capacity))
|
||||
count=$((count + 1))
|
||||
done
|
||||
|
||||
[ "$count" -gt 0 ] || exit 0
|
||||
percentage=$((total / count))
|
||||
}
|
||||
|
||||
last_state=""
|
||||
|
||||
while true; do
|
||||
get_info
|
||||
|
||||
if [[ "$status" == "Discharging" && "$percentage" -le "$CRITICAL" ]]; then
|
||||
notify critical "Battery Critically Low" "$percentage% — suspending."
|
||||
$ACTION
|
||||
|
||||
elif [[ "$status" == "Discharging" && "$percentage" -le "$LOW" ]]; then
|
||||
if [[ "$last_state" != "low" ]]; then
|
||||
notify normal "Battery Low" "$percentage% remaining."
|
||||
last_state="low"
|
||||
fi
|
||||
|
||||
elif [[ "$status" != "Discharging" && "$percentage" -ge "$FULL" ]]; then
|
||||
if [[ "$last_state" != "full" ]]; then
|
||||
notify normal "Battery Full" "$percentage% — unplug charger."
|
||||
last_state="full"
|
||||
fi
|
||||
|
||||
else
|
||||
last_state=""
|
||||
fi
|
||||
|
||||
sleep "$INTERVAL"
|
||||
done
|
||||
'';
|
||||
};
|
||||
};
|
||||
flake.homeModules.cbatticon = _: {
|
||||
# don't works. some GTK error. I let it here if someday, someone is interest in this shit.
|
||||
# ChatGPT half baked a replacement that works on my system.
|
||||
# see qtbatticon
|
||||
services.cbatticon = {
|
||||
enable = true;
|
||||
lowLevelPercent = 20;
|
||||
criticalLevelPercent = 5;
|
||||
batteryId = "BAT1";
|
||||
hideNotification = true; # we use another script for battery notifications
|
||||
updateIntervalSeconds = 10;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
_: {
|
||||
flake.nixosModules.bluetooth = {pkgs, ...}: {
|
||||
hardware.bluetooth.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
blueman # GTK-based Bluetooth Manager
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
_: {
|
||||
flake.nixosModules.bootloader-laptop = {
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# grub theme
|
||||
boot.loader.grub = {
|
||||
theme = inputs.nixos-grub-themes.packages.${pkgs.system}.nixos; # if you want to use nixos grub theme
|
||||
};
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
_: {
|
||||
flake.nixosModules.disk = {pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome-disk-utility
|
||||
udiskie
|
||||
];
|
||||
};
|
||||
flake.nixosModules.disk-laptop = _: {
|
||||
# i found swap necessary when running nixpkgs review
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swapfile";
|
||||
size = 16384; # 16 GB
|
||||
}
|
||||
];
|
||||
boot.kernel.sysctl."vm.swappiness" = 10;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
_: {
|
||||
flake.nixosModules.hardware-configuration-laptop = {
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usb_storage" "usbhid" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/6aa664c2-8b23-4e20-b6e9-1806bf0f8df2";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/A59A-7AFA";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
_: {
|
||||
flake.nixosModules.hardwareUtils-laptop = {pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
# used for the framework 16 laptop
|
||||
framework-tool
|
||||
framework-tool-tui
|
||||
vial # Open-source GUI and QMK fork for configuring your keyboard in real time
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
_: {
|
||||
flake.nixosModules.udev = _: {
|
||||
# udev with only the necessary rules. See udev.nix to get all the rules
|
||||
services.udev.extraRules = ''
|
||||
# adapted from here https://wiki.nixos.org/wiki/Keychron_M6
|
||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="32ac", MODE="0660", GROUP="users", TAG+="uaccess"
|
||||
|
||||
|
||||
# taken from here
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0013", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0018", TAG+="uaccess"
|
||||
|
||||
# acording to https://community.frame.work/t/solved-keys-stick-and-repeat-after-being-released/51153/12
|
||||
# the random keypress stuck comes from conflict between powertop and udev
|
||||
# fix from: https://git.gabbie.blue/blue/nixconf/src/commit/2d1bc6dad4684c019b6b3e894408e76e2734806c/hosts/gabbielaptop/configuration.nix#L68
|
||||
# disable USB auto suspend for framework keyboard
|
||||
ACTION=="bind", SUBSYSTEM=="usb", ATTR{idVendor}=="32ac", ATTR{idProduct}=="0018", TEST=="power/control", ATTR{power/control}="on"
|
||||
# disable USB auto suspend for framework macropad
|
||||
ACTION=="bind", SUBSYSTEM=="usb", ATTR{idVendor}=="32ac", ATTR{idProduct}=="0013", TEST=="power/control", ATTR{power/control}="on"
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,551 +0,0 @@
|
||||
# OLD Deprecated.
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
# same as ./neovim.nix but you vim plug.
|
||||
# i tried importing my nvim config from fedora to a more nixy way but a lot of settings and plugins didnt work. Maybe i'll fix it latter
|
||||
# the only difference is the we use :PlugInstall or a similar command before doing anything
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
vimAlias = true;
|
||||
viAlias = true;
|
||||
extraLuaConfig = ''
|
||||
local vim = vim
|
||||
-- local Plug = vim.fn['plug#']
|
||||
vim.g.mapleader ='ü'
|
||||
vim.g.maplocalleader = 'ü'
|
||||
|
||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||
vim.g.have_nerd_font = true
|
||||
|
||||
-- [[ Setting options ]]
|
||||
-- See `:help vim.opt`
|
||||
-- NOTE: You can change these options as you wish!
|
||||
-- For more options, you can see `:help option-list`
|
||||
|
||||
-- Make line numbers default
|
||||
-- You can also add relative line numbers, to help with jumping.
|
||||
-- Experiment for yourself to see if you like it!
|
||||
-- vim.opt.relativenumber = true
|
||||
|
||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||
vim.opt.mouse = 'a'
|
||||
|
||||
-- Don't show the mode, since it's already in the status line
|
||||
vim.opt.showmode = true
|
||||
|
||||
-- Sync clipboard between OS and Neovim.
|
||||
-- Schedule the setting after `UiEnter` because it can increase startup-time.
|
||||
-- Remove this option if you want your OS clipboard to remain independent.
|
||||
-- See `:help 'clipboard'`
|
||||
vim.schedule(function()
|
||||
vim.opt.clipboard = 'unnamedplus'
|
||||
end)
|
||||
|
||||
|
||||
-- Enable break indent
|
||||
vim.opt.breakindent = true
|
||||
|
||||
-- Save undo history
|
||||
vim.opt.undofile = true
|
||||
|
||||
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
|
||||
-- Keep signcolumn on by default
|
||||
vim.opt.signcolumn = 'yes'
|
||||
|
||||
-- Decrease update time
|
||||
vim.opt.updatetime = 250
|
||||
|
||||
-- Decrease mapped sequence wait time
|
||||
-- Displays which-key popup sooner
|
||||
vim.opt.timeoutlen = 300
|
||||
|
||||
-- Configure how new splits should be opened
|
||||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
|
||||
-- Sets how neovim will display certain whitespace characters in the editor.
|
||||
-- See `:help 'list'`
|
||||
-- and `:help 'listchars'`
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||
|
||||
|
||||
|
||||
-- indentation settings - added by me
|
||||
-- refere to https://stackoverflow.com/questions/51995128/setting-autoindentation-to-spaces-in-neovim for more information
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
|
||||
-- Preview substitutions live, as you type!
|
||||
vim.opt.inccommand = 'split'
|
||||
|
||||
-- Show which line your cursor is on
|
||||
vim.opt.cursorline = true
|
||||
|
||||
-- Minimal number of screen lines to keep above and below the cursor.
|
||||
vim.opt.scrolloff = 10
|
||||
|
||||
-- [[ Basic Keymaps ]]
|
||||
-- See `:help vim.keymap.set()`
|
||||
|
||||
-- Clear highlights on search when pressing <Esc> in normal mode
|
||||
-- See `:help hlsearch`
|
||||
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
||||
|
||||
-- Diagnostic keymaps
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||
|
||||
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
|
||||
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
|
||||
-- is not what someone will guess without a bit more experience.
|
||||
--
|
||||
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
|
||||
-- or just use <C-\><C-n> to exit terminal mode
|
||||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||
|
||||
-- TIP: Disable arrow keys in normal mode
|
||||
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
||||
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
||||
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
||||
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
||||
|
||||
-- Keybinds to make split navigation easier.
|
||||
-- Use CTRL+<hjkl> to switch between windows
|
||||
--
|
||||
-- See `:help wincmd` for a list of all window commands
|
||||
vim.keymap.set('n', '<C-Left>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
|
||||
vim.keymap.set('n', '<C-Right>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
|
||||
vim.keymap.set('n', '<C-Down>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||
vim.keymap.set('n', '<C-Up>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||
|
||||
-- jump to next error
|
||||
vim.keymap.set("n", "t", vim.diagnostic.goto_prev)
|
||||
vim.keymap.set("n", "z", vim.diagnostic.goto_next)
|
||||
|
||||
|
||||
-- [[ Basic Autocommands ]]
|
||||
-- See `:help lua-guide-autocommands`
|
||||
|
||||
-- Highlight when yanking (copying) text
|
||||
-- Try it with `yap` in normal mode
|
||||
-- See `:help vim.highlight.on_yank()`
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
desc = 'Highlight when yanking (copying) text',
|
||||
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
--require("multiple-cursors").setup({
|
||||
-- version = "*", -- Use the latest tagged version
|
||||
-- opts = {}, -- This causes the plugin setup function to be called
|
||||
-- keys = {
|
||||
-- {"<C-j>", "<Cmd>MultipleCursorsAddDown<CR>", mode = {"n", "x"}, desc = "Add cursor and move down"},
|
||||
-- {"<C-k>", "<Cmd>MultipleCursorsAddUp<CR>", mode = {"n", "x"}, desc = "Add cursor and move up"},
|
||||
--
|
||||
-- {"<C-Up>", "<Cmd>MultipleCursorsAddUp<CR>", mode = {"n", "i", "x"}, desc = "Add cursor and move up"},
|
||||
-- {"<C-Down>", "<Cmd>MultipleCursorsAddDown<CR>", mode = {"n", "i", "x"}, desc = "Add cursor and move down"},
|
||||
--
|
||||
-- {"<C-LeftMouse>", "<Cmd>MultipleCursorsMouseAddDelete<CR>", mode = {"n", "i"}, desc = "Add or remove cursor"},
|
||||
--
|
||||
-- {"<Leader>m", "<Cmd>MultipleCursorsAddVisualArea<CR>", mode = {"x"}, desc = "Add cursors to the lines of the visual area"},
|
||||
--
|
||||
-- {"<Leader>a", "<Cmd>MultipleCursorsAddMatches<CR>", mode = {"n", "x"}, desc = "Add cursors to cword"},
|
||||
-- {"<Leader>A", "<Cmd>MultipleCursorsAddMatchesV<CR>", mode = {"n", "x"}, desc = "Add cursors to cword in previous area"},
|
||||
--
|
||||
-- {"<Leader>d", "<Cmd>MultipleCursorsAddJumpNextMatch<CR>", mode = {"n", "x"}, desc = "Add cursor and jump to next cword"},
|
||||
-- {"<Leader>D", "<Cmd>MultipleCursorsJumpNextMatch<CR>", mode = {"n", "x"}, desc = "Jump to next cword"},
|
||||
--
|
||||
-- {"<Leader>l", "<Cmd>MultipleCursorsLock<CR>", mode = {"n", "x"}, desc = "Lock virtual cursors"},
|
||||
-- },
|
||||
--})
|
||||
|
||||
|
||||
vim.keymap.set("n","§", "<cmd>Cheatsheet<CR>")
|
||||
|
||||
require("cheatsheet").setup({
|
||||
bundled_cheatsheets = {
|
||||
-- only show the default cheatsheet
|
||||
enabled = { "default" },
|
||||
},
|
||||
bundled_plugin_cheatsheets = {
|
||||
-- show cheatsheets for all plugins except gitsigns
|
||||
disabled = { "gitsigns.nvim" },
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
-- Can be applied to each buffer separately
|
||||
|
||||
local default_options = {
|
||||
ui = {
|
||||
wrap_line_after = false, -- wrap the line after this length to avoid the virtual text is too long
|
||||
left_kept_space = 3, --- the number of spaces kept on the left side of the virtual text, make sure it enough to custom for each line
|
||||
right_kept_space = 3, --- the number of spaces kept on the right side of the virtual text, make sure it enough to custom for each line
|
||||
arrow = " ",
|
||||
up_arrow = " ",
|
||||
down_arrow = " ",
|
||||
above = false, -- the virtual text will be displayed above the line
|
||||
},
|
||||
priority = 2003, -- the priority of virtual text
|
||||
inline = true,
|
||||
}
|
||||
|
||||
|
||||
-- scrollbar
|
||||
require("scrollbar").setup()
|
||||
|
||||
-- ufo https://github.com/kevinhwang91/nvim-ufo
|
||||
vim.o.foldcolumn = '1' -- '0' is not bad
|
||||
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
|
||||
-- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
|
||||
vim.keymap.set('n', '1', "<cmd>foldopen<CR>")
|
||||
vim.keymap.set('n', '2', "<cmd>foldclose<CR>")
|
||||
vim.keymap.set('n', '3', "<cmd>openAllFold<CR>")
|
||||
vim.keymap.set('n', '4', "<cmd> closeAllFold<CR>")
|
||||
-- Option 3: treesitter as a main provider instead
|
||||
-- (Note: the `nvim-treesitter` plugin is *not* needed.)
|
||||
-- ufo uses the same query files for folding (queries/<lang>/folds.scm)
|
||||
-- performance and stability are better than `foldmethod=nvim_treesitter#foldexpr()`
|
||||
--vim.keymap.set('n', '1', function() require("ufo").foldopen() end, {buffer=0})
|
||||
--vim.keymap.set('n', '2', function() require("ufo").foldclose() end)
|
||||
|
||||
|
||||
|
||||
-- added by myself
|
||||
require('ufo').setup({
|
||||
provider_selector = function(bufnr, filetype, buftype)
|
||||
return {'treesitter', 'indent'}
|
||||
end
|
||||
})
|
||||
|
||||
-- Color schemes should be loaded after plug#end().
|
||||
vim.o.background = "dark" -- or "light" for light mode
|
||||
-- Default options:
|
||||
require("gruvbox").setup({
|
||||
terminal_colors = true, -- add neovim terminal colors
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = true,
|
||||
emphasis = true,
|
||||
comments = true,
|
||||
operators = false,
|
||||
folds = true,
|
||||
},
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
invert_intend_guides = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "", -- can be "hard", "soft" or empty string
|
||||
palette_overrides = {},
|
||||
overrides = {},
|
||||
dim_inactive = false,
|
||||
transparent_mode = false,
|
||||
})
|
||||
vim.cmd("colorscheme gruvbox")
|
||||
-- nvim-tree https://github.com/nvim-tree/nvim-tree.lua
|
||||
-- disable netrw at the very start of your init.lua
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
-- optionally enable 24-bit colour
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
|
||||
-- setup with some options
|
||||
require("nvim-tree").setup({
|
||||
sort = {
|
||||
sorter = "case_sensitive",
|
||||
},
|
||||
view = {
|
||||
width = 30,
|
||||
},
|
||||
renderer = {
|
||||
group_empty = true,
|
||||
},
|
||||
filters = {
|
||||
dotfiles = true,
|
||||
},
|
||||
})
|
||||
vim.opt.number = true
|
||||
-- Uncomment for opening the navigable tree file systeme on startup of NeoVim
|
||||
--vim.cmd('NvimTreeOpen')
|
||||
|
||||
require('md-pdf').setup({
|
||||
--- Set margins around document
|
||||
margins = "1.5cm",
|
||||
-- tango, pygments are quite nice for white on white
|
||||
highlight = "tango",
|
||||
-- Generate a table of contents, on by default
|
||||
toc = true,
|
||||
-- Define a custom preview command, enabling hooks and other custom logic
|
||||
preview_cmd = function() return 'firefox' end,
|
||||
-- if true, then the markdown file is continuously converted on each write, even if the
|
||||
-- file viewer closed, e.g., firefox is "closed" once the document is opened in it.
|
||||
ignore_viewer_state = false,
|
||||
-- Specify font, `nil` uses the default font of the theme
|
||||
fonts = nil,
|
||||
-- or, where all or only some options can be specified. NOTE: those that are `nil` can be left
|
||||
-- out completely
|
||||
fonts = {
|
||||
main_font = nil,
|
||||
sans_font = "DejaVuSans",
|
||||
mono_font = "IosevkaTerm Nerd Font Mono",
|
||||
math_font = nil,
|
||||
},
|
||||
-- Custom options passed to `pandoc` CLI call, can be ignored for setup
|
||||
pandoc_user_args = nil,
|
||||
-- or
|
||||
pandoc_user_args = {
|
||||
-- short
|
||||
"-V KEY[:VALUE]",
|
||||
-- long options
|
||||
"--standalone=[true|false]",
|
||||
},
|
||||
--- Path to output. Needs to be always relative, e.g.: "./", "../", "./out" or simply "out", but
|
||||
--- not absolute e.g.: "/"!
|
||||
output_path = "",
|
||||
})
|
||||
|
||||
-- setup mapping
|
||||
vim.keymap.set("n", "<Space>,", function()
|
||||
require('md-pdf').convert_md_to_pdf()
|
||||
end)
|
||||
-- Set up nvim-cmp.
|
||||
local cmp = require'cmp'
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
-- REQUIRED - you must specify a snippet engine
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||
-- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
||||
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||
-- vim.snippet.expand(args.body) -- For native neovim snippets (Neovim v0.10+)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
-- completion = cmp.config.window.bordered(),
|
||||
-- documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'vsnip' }, -- For vsnip users.
|
||||
-- { name = 'luasnip' }, -- For luasnip users.
|
||||
-- { name = 'ultisnips' }, -- For ultisnips users.
|
||||
-- { name = 'snippy' }, -- For snippy users.
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
-- To use git you need to install the plugin petertriho/cmp-git and uncomment lines below
|
||||
-- Set configuration for specific filetype.
|
||||
--[[ cmp.setup.filetype('gitcommit', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'git' },
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
require("cmp_git").setup() ]]--
|
||||
|
||||
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline({ '/', '?' }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
}),
|
||||
matching = { disallow_symbol_nonprefix_matching = false }
|
||||
})
|
||||
|
||||
|
||||
-- require(lspconfig) is deprecated
|
||||
-- -- Set up lspconfig.
|
||||
-- local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
-- -- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled.
|
||||
-- require('lspconfig')['texlab'].setup {
|
||||
-- capabilities = capabilities
|
||||
-- }
|
||||
--require'lspconfig'.clangd.setup{}
|
||||
--lspconfig = require("lspconfig")
|
||||
--lspconfig.pylsp.setup {
|
||||
--on_attach = custom_attach,
|
||||
--settings = {
|
||||
-- pylsp = {
|
||||
-- plugins = {
|
||||
-- -- formatter options
|
||||
-- black = { enabled = true },
|
||||
-- autopep8 = { enabled = false },
|
||||
-- yapf = { enabled = false },
|
||||
-- -- linter options
|
||||
-- pylint = { enabled = true, executable = "pylint" },
|
||||
-- pyflakes = { enabled = false },
|
||||
-- pycodestyle = { enabled = false },
|
||||
-- -- type checker
|
||||
-- pylsp_mypy = { enabled = true },
|
||||
-- -- auto-completion options
|
||||
-- jedi_completion = { fuzzy = true },
|
||||
-- -- import sorting
|
||||
-- pyls_isort = { enabled = true },
|
||||
-- },
|
||||
-- },
|
||||
--},
|
||||
--flags = {
|
||||
-- debounce_text_changes = 200,
|
||||
--},
|
||||
--capabilities = capabilities,
|
||||
--}
|
||||
---- lua-lsp
|
||||
--require'lspconfig'.lua_ls.setup{}
|
||||
--
|
||||
--new version
|
||||
-- ============================
|
||||
-- LSP CONFIGURATION (Neovim 0.11+)
|
||||
-- ============================
|
||||
|
||||
-- Set up capabilities for nvim-cmp LSP completion
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
-- Optional: custom on_attach function if you have keymaps
|
||||
-- local custom_attach = function(client, bufnr)
|
||||
-- -- your on_attach code here
|
||||
-- end
|
||||
|
||||
-- Utility function to simplify server setup
|
||||
local function setup_lsp(server_name, opts)
|
||||
vim.lsp.config(server_name, opts or {})
|
||||
end
|
||||
|
||||
-- ======== LSP SERVERS ========
|
||||
|
||||
-- TeXLab
|
||||
setup_lsp("texlab", {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- Clangd (C/C++)
|
||||
setup_lsp("clangd", {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- Python LSP (pylsp)
|
||||
setup_lsp("pylsp", {
|
||||
on_attach = custom_attach,
|
||||
capabilities = capabilities,
|
||||
flags = {
|
||||
debounce_text_changes = 200,
|
||||
},
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
-- Formatter options
|
||||
black = { enabled = true },
|
||||
autopep8 = { enabled = false },
|
||||
yapf = { enabled = false },
|
||||
-- Linter options
|
||||
pylint = { enabled = true, executable = "pylint" },
|
||||
pyflakes = { enabled = false },
|
||||
pycodestyle = { enabled = false },
|
||||
-- Type checker
|
||||
pylsp_mypy = { enabled = true },
|
||||
-- Auto-completion options
|
||||
jedi_completion = { fuzzy = true },
|
||||
-- Import sorting
|
||||
pyls_isort = { enabled = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Lua LSP
|
||||
setup_lsp("lua_ls", {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
|
||||
-- dashboard config
|
||||
require('dashboard').setup {
|
||||
theme = 'hyper',
|
||||
config = {
|
||||
header = {
|
||||
" ... ... . ",
|
||||
" .=*8888n..\"%888: @88> ",
|
||||
" X ?8888f '8888 u. ... .. %8P .. . : ",
|
||||
" 88x. '8888X 8888> .u ...ue888b :~\"\"888h.:^\"888: . .888: x888 x888. ",
|
||||
"'8888k 8888X '\"*8h. ud8888. 888R Y888r 8X `8888X 8888> .@88u ~`8888~'888X`?888f` ",
|
||||
" \"8888 X888X .xH8 :888'8888. 888R I888> X888n. 8888X ?888> '\"888E` X888 888X '888> ",
|
||||
" `8\" X888!:888X d888 '88%\" 888R I888> '88888 8888X ?**h. 888E X888 888X '888> ",
|
||||
" =~` X888 X888X 8888.+\" 888R I888> `*88 8888~ x88x. 888E X888 888X '888> ",
|
||||
" :h. X8*` !888X 8888L u8888cJ888 ..<\" 88*` 88888X 888E X888 888X '888> ",
|
||||
" X888xX\" '8888..: '8888c. .+ \"*888*P\" ..XC. `*8888k 888& \"*88%\"\"*88\" '888!` ",
|
||||
":~`888f '*888*\" \"88888% 'Y\" :888888H. `%88> R888\" `~ \" `\"` ",
|
||||
" \"\" `\"` \"YP' < `\"888888: X\" \"\" ",
|
||||
" %888888x.-` ",
|
||||
" \"\"**\"\" ",
|
||||
"",
|
||||
""
|
||||
},
|
||||
shortcut = {
|
||||
{ desc = " Open File Tree", group = "", key = 't', action = 'NvimTreeOpen' },
|
||||
-- action can be a function type
|
||||
},
|
||||
packages = { enable = false }, -- show how many plugins neovim loaded
|
||||
-- limit how many projects list, action when you press key or enter it will run this action.
|
||||
-- action can be a functino type, e.g.
|
||||
-- action = func(path) vim.cmd('Telescope find_files cwd=' .. path) end
|
||||
project = { enable = true, limit = 8, icon = ' New file', label = "", action = 'Telescope find_files cwd=' },
|
||||
mru = { limit = 10, icon = ' History', label = "", cwd_only = false },
|
||||
footer = {}, -- footer
|
||||
}
|
||||
}
|
||||
|
||||
-- lualine config https://github.com/nvim-lualine/lualine.nvim/blob/master/examples/bubbles.lua
|
||||
require('lualine').setup {
|
||||
options = { theme = "gruvbox_dark" },
|
||||
}
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
_: {
|
||||
programs.anki = {
|
||||
# we enable system wide with nixpkgs because it offers some addon configuration. We just use this for some config
|
||||
#enable = true;
|
||||
theme = "dark";
|
||||
sync = {
|
||||
autoSync = true;
|
||||
autoSyncMediaMinutes = 10;
|
||||
syncMedia = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
_: {
|
||||
services.batsignal = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,597 +0,0 @@
|
||||
_: let
|
||||
sisyphe = ../../assets/sisyphe.gif;
|
||||
pepe-music = ../../assets/pepe-music.gif;
|
||||
in {
|
||||
home.file.".local/state/caelestia/wallpaper/path.txt" = {
|
||||
# dummy file. Does nothing. Prevent an error
|
||||
enable = true;
|
||||
text = "${sisyphe}";
|
||||
};
|
||||
home.file.".face" = {
|
||||
# this is were caelestia will search for profiles pictures
|
||||
source = ../../assets/sisyphePFP.png;
|
||||
};
|
||||
# set profile picture in ~/.face
|
||||
programs.caelestia = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = false; # if we launch it form here, the keybinds don't work
|
||||
target = "graphical-session.target";
|
||||
environment = [];
|
||||
};
|
||||
settings = {
|
||||
# default config https://github.com/caelestia-dots/shell?tab=readme-ov-file#example-configuration
|
||||
appearance = {
|
||||
mediaGifSpeedAdjustment = 500;
|
||||
sessionGifSpeed = 0.7;
|
||||
anim = {
|
||||
duration = {
|
||||
scale = 1;
|
||||
};
|
||||
};
|
||||
/*
|
||||
font = {
|
||||
family = {
|
||||
clock = "Rubik"; # (TODO figure out those fonts)
|
||||
material = "Material Symboles Rounded";
|
||||
mono = "CaskaydiaCove NF";
|
||||
sans = "Rubik";
|
||||
};
|
||||
size = {
|
||||
scale = 1;
|
||||
};
|
||||
};
|
||||
*/
|
||||
padding = {
|
||||
scale = 1;
|
||||
};
|
||||
rounding = {
|
||||
scale = 1;
|
||||
};
|
||||
spacing = {
|
||||
scale = 1;
|
||||
};
|
||||
transparency = {
|
||||
enabled = false;
|
||||
base = 0.85;
|
||||
layeres = 0.4;
|
||||
};
|
||||
};
|
||||
general = {
|
||||
logo = "caelestia";
|
||||
apps = {
|
||||
terminal = ["kitty"]; # default foot
|
||||
audio = ["pavucontrol"];
|
||||
playback = ["vlc"]; # what's that?
|
||||
explorer = ["dolphin"]; # default thunar
|
||||
};
|
||||
battery = {
|
||||
wanLevels = [
|
||||
{
|
||||
level = 20;
|
||||
title = "Low battery";
|
||||
message = "You might want to plug in a charger";
|
||||
icon = "battery_android_frame_2";
|
||||
}
|
||||
{
|
||||
level = 10;
|
||||
title = "Did you see the previous message?";
|
||||
message = "You should probably plug in a charger <b>now</b>";
|
||||
icon = "battery_android_frame_1";
|
||||
}
|
||||
{
|
||||
level = 5;
|
||||
title = "Critical battery level";
|
||||
message = "PLUG THE CHARGER RIGHT NOW!!";
|
||||
icon = "battery_android_alert";
|
||||
critical = true;
|
||||
}
|
||||
];
|
||||
criticalLevel = 3;
|
||||
};
|
||||
idle = {
|
||||
lockBeforeSleep = true;
|
||||
inhibitWhenAudio = true;
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 180;
|
||||
idleAction = "lock";
|
||||
}
|
||||
{
|
||||
timeout = 300;
|
||||
idleAction = "dpms off"; # what's that?
|
||||
returnAction = "dpms on";
|
||||
}
|
||||
{
|
||||
timeout = 600;
|
||||
idleAction = ["systemctl" "suspend-then-hibernate"];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
background = {
|
||||
desktopClock = {
|
||||
enabled = false;
|
||||
scale = 1.0;
|
||||
position = "bottom-right";
|
||||
shadow = {
|
||||
enabled = true;
|
||||
opacity = 0.7;
|
||||
blur = 0.4;
|
||||
};
|
||||
background = {
|
||||
enabled = false;
|
||||
opacity = 0.7;
|
||||
blur = true;
|
||||
};
|
||||
invertColors = false;
|
||||
};
|
||||
enabled = false; #default true
|
||||
visualiser = {
|
||||
blur = false;
|
||||
enabled = false;
|
||||
autohide = true;
|
||||
rounding = 1;
|
||||
spacing = 1;
|
||||
};
|
||||
};
|
||||
bar = {
|
||||
activeWindow = {
|
||||
compact = false;
|
||||
inverted = false;
|
||||
showOnHover = true;
|
||||
};
|
||||
clock = {
|
||||
background = true;
|
||||
showDate = true;
|
||||
showIcon = true;
|
||||
};
|
||||
dragThreshold = 20;
|
||||
entries = [
|
||||
{
|
||||
id = "logo";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "workspaces";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "spacer";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "activeWindow";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "spacer";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "tray";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "clock";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "statusIcon";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "power";
|
||||
enabled = true;
|
||||
}
|
||||
];
|
||||
persistent = true;
|
||||
popouts = {
|
||||
activeWindow = true;
|
||||
statusIcon = true;
|
||||
tray = true;
|
||||
};
|
||||
scrollActions = {
|
||||
brightness = true;
|
||||
workspaces = true;
|
||||
volume = true;
|
||||
};
|
||||
showOnHover = true;
|
||||
status = {
|
||||
showAudio = false;
|
||||
showBattery = false; # use powerprofile daemon
|
||||
showBluetooth = false;
|
||||
showKbLayout = false;
|
||||
showMicrophone = false;
|
||||
showNetwork = false;
|
||||
showWifi = true;
|
||||
showLockStatus = false;
|
||||
};
|
||||
tray = {
|
||||
background = true; # default true
|
||||
compact = false;
|
||||
iconSubs = [];
|
||||
recolour = true;
|
||||
};
|
||||
workspaces = {
|
||||
activeIndicator = true;
|
||||
activeLabel = "";
|
||||
activeTrail = false;
|
||||
label = " ";
|
||||
occupiedBg = false;
|
||||
occpiedLabel = "";
|
||||
perMonitorWorkspaces = true;
|
||||
showWindows = true;
|
||||
shown = 5;
|
||||
specialWorkspaceIcons = [
|
||||
{
|
||||
name = "steam";
|
||||
icon = "sports_esports";
|
||||
}
|
||||
];
|
||||
windowIcons = [
|
||||
{
|
||||
regex = "steam(_app_(default|[0-9]+))?";
|
||||
icon = "sports_esports";
|
||||
}
|
||||
];
|
||||
};
|
||||
excludedScreens = [""]; # default says "" those this work?
|
||||
};
|
||||
border = {
|
||||
rounding = 25;
|
||||
thickness = 10;
|
||||
};
|
||||
dashboard = {
|
||||
enabled = true;
|
||||
dragThreshold = 50;
|
||||
mediaUpdateInterval = 500;
|
||||
showOnHover = true;
|
||||
};
|
||||
launcher = {
|
||||
actionsPrefix = ">";
|
||||
actions = [
|
||||
{
|
||||
name = "Calculator";
|
||||
icon = "calculate";
|
||||
description = "Do simple math equations (powered by Qalc)";
|
||||
command = ["autocomplete" "calc"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Scheme";
|
||||
icon = "palette";
|
||||
description = "Change the current colour scheme";
|
||||
command = ["autocomplete" "scheme"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Wallpaper";
|
||||
icon = "image";
|
||||
description = "Change the current wallpaper";
|
||||
command = ["autocomplete" "wallpaper"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Variant"; # to remove
|
||||
icon = "colors";
|
||||
description = "Change the current scheme variant";
|
||||
command = ["autocomplete" "variant"];
|
||||
enabled = true;
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Transparency";
|
||||
icon = "opacity";
|
||||
description = "Change shell transparency";
|
||||
command = ["autocomplete" "transparency"];
|
||||
enabled = false;
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Random";
|
||||
icon = "casino";
|
||||
description = "Switch to a random wallpaper";
|
||||
command = ["caelestia" "wallpaper" "-r"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Light";
|
||||
icon = "light_mode";
|
||||
description = "Change the scheme to light mode";
|
||||
command = ["setMode" "light"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Dark";
|
||||
icon = "dark_mode";
|
||||
description = "Change the scheme to dark mode";
|
||||
command = ["setMode" "dark"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Shutdown";
|
||||
icon = "power_settings_new";
|
||||
description = "Shutdown the system";
|
||||
command = ["systemctl" "poweroff"];
|
||||
enabled = true;
|
||||
dangerous = true;
|
||||
}
|
||||
{
|
||||
name = "Reboot";
|
||||
icon = "cached";
|
||||
description = "Reboot the system";
|
||||
command = ["systemctl" "reboot"];
|
||||
enabled = true;
|
||||
dangerous = true;
|
||||
}
|
||||
{
|
||||
name = "Lock"; # does this work with ly?
|
||||
icon = "lock";
|
||||
description = "Log out of the current session";
|
||||
command = ["loginctl" "terminate-user" ""];
|
||||
enabled = true;
|
||||
dangerous = true;
|
||||
}
|
||||
{
|
||||
name = "Sleep";
|
||||
icon = "bedtime";
|
||||
description = "Suspend then hibernate";
|
||||
command = ["systemctl" "suspend-then-hibernate"];
|
||||
enabled = true;
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Settings";
|
||||
icon = "settings";
|
||||
description = "Configure the shell";
|
||||
command = ["caelestia" "shell" "controlCenter" "open"];
|
||||
enabled = false; # default true
|
||||
dangerous = false;
|
||||
}
|
||||
];
|
||||
dragThreshold = 50;
|
||||
vimKeybinds = false; # intersting to put to true
|
||||
enableDangerousActions = false; # set to true
|
||||
maxShown = 7;
|
||||
maxWallpapers = 9;
|
||||
specialPrefix = "@";
|
||||
useFuzzy = {
|
||||
# should try
|
||||
apps = false;
|
||||
actions = false;
|
||||
schemes = false;
|
||||
variants = false;
|
||||
wallpapers = false;
|
||||
};
|
||||
showOnHover = false;
|
||||
favouriteApps = [];
|
||||
hiddenApps = [];
|
||||
};
|
||||
lock = {
|
||||
recolourLogo = false; # what's that
|
||||
hideNotifs = false;
|
||||
};
|
||||
notifs = {
|
||||
actionOnClick = false;
|
||||
clearThreshold = 0.3;
|
||||
defaultExpireTimeout = 5000;
|
||||
expantThreshold = 20;
|
||||
openeExpanded = false;
|
||||
expire = true;
|
||||
};
|
||||
osd = {
|
||||
# thats the slider for brightness and sound
|
||||
enabled = true;
|
||||
enableBrightness = true;
|
||||
enableMicrophone = false;
|
||||
hideDelay = 2000;
|
||||
};
|
||||
paths = {
|
||||
mediaGif = pepe-music; # default "root:/assets/bongocat.gif"
|
||||
sessionGif = sisyphe; # default "root:/assets/kurukuru.gif"
|
||||
noNotifsPic = "root:/assets/dino.png";
|
||||
lockNoNotifsPic = "root:/assets/dino.png";
|
||||
wallpaperDir = "~/Pictures/Wallpapers";
|
||||
lyricsDir = "~/Music/lyrics";
|
||||
};
|
||||
services = {
|
||||
audioIncrement = 0.1;
|
||||
brightnessIncrement = 0.1;
|
||||
maxVolume = 1.0;
|
||||
defaultPlayer = "Spotify";
|
||||
gpuType = "";
|
||||
#playerAliases: [ { "from": "com.github.th_ch.youtube_music", "to": "YT Music" } ]; # how to put this into nix language?
|
||||
weatherLocation = "Lausanne";
|
||||
useFahrenheit = false;
|
||||
useFahrenheitPerformance = false;
|
||||
useTwelveHourClock = false;
|
||||
smartScheme = false; # default true
|
||||
visualisersBars = 45;
|
||||
};
|
||||
session = {
|
||||
dragThreshold = 30; # what does dragThreshold do?
|
||||
enabled = true;
|
||||
vimKeybinds = false; # maybe set to true?
|
||||
icons = {
|
||||
logout = "logout";
|
||||
shutdown = "power_settings_new";
|
||||
hibernate = "downloading"; # find a better icon
|
||||
reboot = "cached";
|
||||
};
|
||||
commands = {
|
||||
logout = ["hyprctl" "dispatch exit"];
|
||||
shutdown = ["systemctl" "poweroff"];
|
||||
hibernate = ["systemctl" "hibernate"];
|
||||
reboot = ["systemctl" "reboot"];
|
||||
};
|
||||
};
|
||||
sidebar = {
|
||||
dragThreshold = 80;
|
||||
enabled = true;
|
||||
};
|
||||
# is there a way to get some system info?
|
||||
utilities = {
|
||||
enabled = true;
|
||||
maxToasts = 4; # toats are like notification but on the botto left
|
||||
toasts = {
|
||||
audioInputChanged = true;
|
||||
audioOutputChanged = true;
|
||||
capsLockChanged = true;
|
||||
chargingChanged = true;
|
||||
configLoaded = true;
|
||||
dndChanged = true;
|
||||
gameModeChanged = true;
|
||||
kbLayoutChanged = true;
|
||||
kbLimit = true;
|
||||
numLockChanged = true;
|
||||
vpnChanged = true;
|
||||
nowPlaying = false;
|
||||
};
|
||||
};
|
||||
vpn = {
|
||||
enabled = false; # default true
|
||||
provider = [
|
||||
{
|
||||
# default example-configuration
|
||||
name = "wireguard";
|
||||
interface = "your-connection-name";
|
||||
displayName = "wireguard (Your VPN)";
|
||||
enabled = false;
|
||||
}
|
||||
];
|
||||
};
|
||||
quickToggles = [
|
||||
{
|
||||
id = "wifi";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "bluetooth";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "mic";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "settings";
|
||||
enabled = true; # should desactivate
|
||||
}
|
||||
{
|
||||
id = "gameMode";
|
||||
enabled = true; # should remap my performance mode
|
||||
}
|
||||
{
|
||||
id = "dnd"; #do not disturb
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "vpn";
|
||||
enabled = false; # default true;
|
||||
}
|
||||
];
|
||||
};
|
||||
cli = {
|
||||
# default config https://github.com/caelestia-dots/cli?tab=readme-ov-file#configuring
|
||||
enable = true; # Also add caelestia-cli to path
|
||||
settings = {
|
||||
record = {
|
||||
extraArgs = [];
|
||||
};
|
||||
wallpaper = {
|
||||
postHook = "caelestia scheme set -n gruvbox -f soft -m dark"; # sets the theme
|
||||
};
|
||||
theme = {
|
||||
enableTerm = false; # we do it manually by adapting our kitty config
|
||||
enableHypr = false; # this seems to add the splash
|
||||
enableDiscord = true;
|
||||
enableSpicetify = true;
|
||||
enableFuzzel = true; #what's that?
|
||||
enablleBtop = false; # default true
|
||||
enableQt = true;
|
||||
};
|
||||
toggles = {
|
||||
communication = {
|
||||
discord = {
|
||||
enable = false; # default true
|
||||
match = [
|
||||
{
|
||||
class = "discord";
|
||||
}
|
||||
];
|
||||
whatsapp = {
|
||||
enable = true;
|
||||
match = [
|
||||
{
|
||||
class = "whatsapp";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
music = {
|
||||
spotify = {
|
||||
enable = false; # default true
|
||||
match = [
|
||||
{
|
||||
class = "Spotify";
|
||||
}
|
||||
{
|
||||
initialTitle = "Spotify";
|
||||
}
|
||||
{
|
||||
initialTitle = "Spotify Free";
|
||||
}
|
||||
];
|
||||
command = ["spicetify" "watch" "-s"];
|
||||
move = true;
|
||||
};
|
||||
feishin = {
|
||||
enable = true;
|
||||
match = [
|
||||
{
|
||||
class = "feishin";
|
||||
}
|
||||
];
|
||||
move = true;
|
||||
};
|
||||
};
|
||||
sysmon = {
|
||||
btop = {
|
||||
enable = true;
|
||||
match = [
|
||||
{
|
||||
class = "btop";
|
||||
title = "btop";
|
||||
workspace = {
|
||||
name = "special:sysmon";
|
||||
};
|
||||
}
|
||||
];
|
||||
command = ["foot" "-a" "btop" "-T" "btop" "fish" "-C" "exec btop"]; # maybe switch to btm and kitty?
|
||||
};
|
||||
};
|
||||
todo = {
|
||||
todoist = {
|
||||
enable = false; # default true
|
||||
match = [
|
||||
{
|
||||
class = "Todoist";
|
||||
}
|
||||
];
|
||||
command = ["todoist"];
|
||||
move = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
# don't works. some GTK error. I let it here if someday, someone is interest in this shit.
|
||||
# ChatGPT half baked a replacement that works on my system.
|
||||
# see ../qt/qtbatticon
|
||||
_: {
|
||||
services.cbatticon = {
|
||||
enable = true;
|
||||
lowLevelPercent = 20;
|
||||
criticalLevelPercent = 5;
|
||||
batteryId = "BAT1";
|
||||
hideNotification = true; # we use another script for battery notifications
|
||||
updateIntervalSeconds = 10;
|
||||
};
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
home.pointerCursor = {
|
||||
hyprcursor.enable = true;
|
||||
enable = true;
|
||||
package = pkgs.capitaine-cursors-themed;
|
||||
name = "Capitaine Cursors (Gruvbox)";
|
||||
size = 32;
|
||||
};
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
_:
|
||||
# ls replacement
|
||||
# see ./zsh.nix for the alias (usefull to se default flags)
|
||||
{
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
theme = {
|
||||
# from https://github.com/eza-community/eza-themes/blob/main/themes/gruvbox-dark.yml
|
||||
colourful = true;
|
||||
|
||||
filekinds = {
|
||||
normal = {foreground = "#ebdbb2";};
|
||||
directory = {foreground = "#83a598";};
|
||||
symlink = {foreground = "#8ec07c";};
|
||||
pipe = {foreground = "#928374";};
|
||||
block_device = {foreground = "#fb4934";};
|
||||
char_device = {foreground = "#fb4934";};
|
||||
socket = {foreground = "#665c54";};
|
||||
special = {foreground = "#d3869b";};
|
||||
executable = {foreground = "#b8bb26";};
|
||||
mount_point = {foreground = "#fe8019";};
|
||||
};
|
||||
perms = {
|
||||
user_read = {foreground = "#ebdbb2";};
|
||||
user_write = {foreground = "#fabd2f";};
|
||||
user_execute_file = {foreground = "#b8bb26";};
|
||||
user_execute_other = {foreground = "#b8bb26";};
|
||||
group_read = {foreground = "#ebdbb2";};
|
||||
group_write = {foreground = "#fabd2f";};
|
||||
group_execute = {foreground = "#b8bb26";};
|
||||
other_read = {foreground = "#bdae93";};
|
||||
other_write = {foreground = "#fabd2f";};
|
||||
other_execute = {foreground = "#b8bb26";};
|
||||
special_user_file = {foreground = "#d3869b";};
|
||||
special_other = {foreground = "#928374";};
|
||||
attribute = {foreground = "#bdae93";};
|
||||
};
|
||||
size = {
|
||||
major = {foreground = "#bdae93";};
|
||||
minor = {foreground = "#8ec07c";};
|
||||
number_byte = {foreground = "#ebdbb2";};
|
||||
number_kilo = {foreground = "#ebdbb2";};
|
||||
number_mega = {foreground = "#83a598";};
|
||||
number_giga = {foreground = "#d3869b";};
|
||||
number_huge = {foreground = "#d3869b";};
|
||||
unit_byte = {foreground = "#bdae93";};
|
||||
unit_kilo = {foreground = "#83a598";};
|
||||
unit_mega = {foreground = "#d3869b";};
|
||||
unit_giga = {foreground = "#d3869b";};
|
||||
unit_huge = {foreground = "#fe8019";};
|
||||
};
|
||||
users = {
|
||||
user_you = {foreground = "#ebdbb2";};
|
||||
user_root = {foreground = "#fb4934";};
|
||||
user_other = {foreground = "#d3869b";};
|
||||
group_yours = {foreground = "#ebdbb2";};
|
||||
group_other = {foreground = "#928374";};
|
||||
group_root = {foreground = "#fb4934";};
|
||||
};
|
||||
links = {
|
||||
normal = {foreground = "#8ec07c";};
|
||||
multi_link_file = {foreground = "#fe8019";};
|
||||
};
|
||||
git = {
|
||||
new = {foreground = "#b8bb26";};
|
||||
modified = {foreground = "#fabd2f";};
|
||||
deleted = {foreground = "#fb4934";};
|
||||
renamed = {foreground = "#8ec07c";};
|
||||
typechange = {foreground = "#d3869b";};
|
||||
ignored = {foreground = "#928374";};
|
||||
conflicted = {foreground = "#cc241d";};
|
||||
};
|
||||
git_repo = {
|
||||
branch_main = {foreground = "#ebdbb2";};
|
||||
branch_other = {foreground = "#d3869b";};
|
||||
git_clean = {foreground = "#b8bb26";};
|
||||
git_dirty = {foreground = "#fb4934";};
|
||||
};
|
||||
security_context = {
|
||||
colon = {foreground = "#928374";};
|
||||
user = {foreground = "#ebdbb2";};
|
||||
role = {foreground = "#d3869b";};
|
||||
typ = {foreground = "#665c54";};
|
||||
range = {foreground = "#d3869b";};
|
||||
};
|
||||
file_type = {
|
||||
image = {foreground = "#fabd2f";};
|
||||
video = {foreground = "#fb4934";};
|
||||
music = {foreground = "#b8bb26";};
|
||||
lossless = {foreground = "#8ec07c";};
|
||||
crypto = {foreground = "#928374";};
|
||||
document = {foreground = "#ebdbb2";};
|
||||
compressed = {foreground = "#d3869b";};
|
||||
temp = {foreground = "#cc241d";};
|
||||
compiled = {foreground = "#83a598";};
|
||||
build = {foreground = "#928374";};
|
||||
source = {foreground = "#83a598";};
|
||||
punctuation = {foreground = "#928374";};
|
||||
date = {foreground = "#fabd2f";};
|
||||
inode = {foreground = "#bdae93";};
|
||||
blocks = {foreground = "#a89984";};
|
||||
header = {foreground = "#ebdbb2";};
|
||||
octal = {foreground = "#8ec07c";};
|
||||
flags = {foreground = "#d3869b";};
|
||||
|
||||
symlink_path = {foreground = "#8ec07c";};
|
||||
control_char = {foreground = "#83a598";};
|
||||
broken_symlink = {foreground = "#fb4934";};
|
||||
broken_path_overlay = {foreground = "#928374";};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
_: {
|
||||
# Adapted from https://github.com/dacrab/fastfetch-config/blob/main/config.jsonc
|
||||
programs.fastfetch = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
logo = {
|
||||
type = "none";
|
||||
#source = "nixos";
|
||||
};
|
||||
|
||||
modules = [
|
||||
# ───────────── Hardware ─────────────
|
||||
|
||||
{
|
||||
type = "custom";
|
||||
format = "╭───────────────────────── Hardware ──────────────────────────╮";
|
||||
outputColor = "blue";
|
||||
}
|
||||
|
||||
{
|
||||
type = "title";
|
||||
key = " PC";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
{
|
||||
type = "host";
|
||||
key = "│ ├ Laptop";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
{
|
||||
type = "display";
|
||||
key = "│ ├ Display";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
{
|
||||
type = "cpu";
|
||||
key = "│ ├ CPU";
|
||||
showPeCoreCount = true;
|
||||
format = "{1}";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
{
|
||||
type = "gpu";
|
||||
key = "│ ├ GPU";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
{
|
||||
type = "memory";
|
||||
key = "└ └ Memory";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
{
|
||||
type = "custom";
|
||||
format = "╰─────────────────────────────────────────────────────────────╯";
|
||||
outputColor = "blue";
|
||||
}
|
||||
|
||||
# ───────────── Software ─────────────
|
||||
|
||||
{
|
||||
type = "custom";
|
||||
format = "╭───────────────────────── Software ──────────────────────────╮";
|
||||
outputColor = "blue";
|
||||
}
|
||||
|
||||
{
|
||||
type = "os";
|
||||
key = " OS";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
|
||||
{
|
||||
type = "kernel";
|
||||
key = "│ ├ Kernel";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
|
||||
{
|
||||
type = "packages";
|
||||
key = "│ ├ Packages";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
|
||||
{
|
||||
type = "shell";
|
||||
key = "│ ├ Shell";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
|
||||
{
|
||||
type = "terminal";
|
||||
key = "│ ├ Terminal";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
|
||||
{
|
||||
type = "command";
|
||||
key = "│ ├ OS Age";
|
||||
keyColor = "cyan";
|
||||
text = ''
|
||||
birth_install=$(stat -c %W /)
|
||||
current=$(date +%s)
|
||||
time_progression=$((current - birth_install))
|
||||
days_difference=$((time_progression / 86400))
|
||||
echo $days_difference days
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
type = "uptime";
|
||||
key = "└ └ Uptime";
|
||||
keyColor = "cyan";
|
||||
}
|
||||
|
||||
{
|
||||
type = "de";
|
||||
key = " DE";
|
||||
keyColor = "blue";
|
||||
}
|
||||
|
||||
{
|
||||
type = "wm";
|
||||
key = " WM";
|
||||
keyColor = "magenta";
|
||||
}
|
||||
|
||||
{
|
||||
type = "gpu";
|
||||
key = "│ ├ GPU Driver";
|
||||
format = "{3}";
|
||||
keyColor = "magenta";
|
||||
}
|
||||
|
||||
{
|
||||
type = "brightness";
|
||||
key = "│ ├ Brightness";
|
||||
keyColor = "magenta";
|
||||
}
|
||||
|
||||
{
|
||||
type = "version";
|
||||
key = "└ └ FastFetch";
|
||||
keyColor = "magenta";
|
||||
}
|
||||
|
||||
{
|
||||
type = "custom";
|
||||
format = "╰────────────────────────────────────────────────────────────╯";
|
||||
outputColor = "blue";
|
||||
}
|
||||
|
||||
#{
|
||||
# type = "custom";
|
||||
# format = ''
|
||||
# {#0} {#1} {#2} {#3} {#4} {#5} {#6} {#7}
|
||||
# '';
|
||||
#} #for some reason dont work
|
||||
{
|
||||
type = "colors";
|
||||
symbol = "diamond";
|
||||
}
|
||||
|
||||
"break"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
_: {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
gitCredentialHelper.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
# gtk config
|
||||
gtk.theme = {
|
||||
enable = true;
|
||||
Gruvbox-GTK-Theme-BL-MB = {
|
||||
enable = true;
|
||||
name = "Gruvbox-GTK-Theme-BL-MB";
|
||||
package = pkgs.gruvbox-gtk-theme;
|
||||
};
|
||||
};
|
||||
# to resolve this https://wiki.nixos.org/wiki/Home_Manager#I_cannot_set_GNOME_or_Gtk_themes_via_Home_Manager
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
_: {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "notify-send 'lock!'"; # dbus/sysd lock command (loginctl lock-session)
|
||||
unlock_cmd = "notify-send 'unlock!'"; # same as above, but unlock
|
||||
before_sleep_cmd = "notify-send 'Zzz'"; # command ran before sleep
|
||||
after_sleep_cmd = "notify-send 'Awake!"; # command ran after sleep
|
||||
ignore_dbus_inhibit = false; # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
|
||||
ignore_systemd_inhibit = false; # whether to ignore systemd-inhibit --what=idle inhibitors
|
||||
};
|
||||
listener = {
|
||||
timeout = 500; # in seconds
|
||||
on-timeout = "notify-send 'You are idle!'"; # command to run when timeout has passed
|
||||
on-resume = "notify-send 'Welcome back!'"; # command to run when activity is detected after timeout has fired.
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,452 +0,0 @@
|
||||
{pkgs-unstable, ...}: let
|
||||
wallpaper = ../../assets/wallpaper1.jpg;
|
||||
in {
|
||||
#refer to https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/
|
||||
wayland.windowManager.hyprland.enable = true;
|
||||
wayland.windowManager.hyprland.package = pkgs-unstable.hyprland;
|
||||
#hint Electron apps to use on wayland;
|
||||
home.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
wayland.windowManager.hyprland.plugins = [
|
||||
#pkgs-unstable.hyprlandPlugins.hyprspace # currently broken
|
||||
#pkgs-unstable.hyprlandPlugins.hypr-dynamic-cursors # currently broken
|
||||
];
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$mod" = "SUPER";
|
||||
"$term" = "kitty";
|
||||
"$editor" = "nvim";
|
||||
"$notes" = "kitty --class \"custom-obsidianvaults\" --name \"Select Obsidian vault\" --hold custom-obsidianvaults";
|
||||
"$file" = "dolphin";
|
||||
"$browser" = "kitty --class \"custom-librewolfprofiles\" --name \"Select LibreWolf profile\" --hold custom-librewolfprofiles";
|
||||
# ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█
|
||||
# █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"wind, 0.05, 0.9, 0.1, 1.05"
|
||||
"winIn, 0.1, 1.1, 0.1, 1.1"
|
||||
"winOut, 0.3, -0.3, 0, 1"
|
||||
"liner, 1, 1, 1, 1"
|
||||
];
|
||||
animation = [
|
||||
"windows, 1, 6, wind, slide"
|
||||
"windowsIn, 1, 6, winIn, slide"
|
||||
"windowsOut, 1, 5, winOut, slide"
|
||||
"windowsMove, 1, 5, wind, slide"
|
||||
"border, 1, 1, liner"
|
||||
"borderangle, 1, 30, liner, loop"
|
||||
"fade, 1, 10, default"
|
||||
"workspaces, 1, 5, wind"
|
||||
];
|
||||
};
|
||||
|
||||
# █▀▀ █▄░█ █░█
|
||||
# ██▄ █░▀█ ▀▄▀
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Environment-variables/
|
||||
env = [
|
||||
"PATH, $PATH:$scrPath"
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
"QT_QPA_PLATFORM,wayland;xcb"
|
||||
"QT_QPAPLATFORMTHEME,qt6ct"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"GDK_SCALE,1"
|
||||
];
|
||||
|
||||
# █ █▄░█ █▀█ █░█ ▀█▀
|
||||
# █ █░▀█ █▀▀ █▄█ ░█░
|
||||
|
||||
input = {
|
||||
kb_layout = ["ch"];
|
||||
follow_mouse = 1;
|
||||
sensitivity = 0;
|
||||
force_no_accel = 1;
|
||||
};
|
||||
|
||||
# █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄ █ █▄░█ █▀▀ █▀
|
||||
# █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ █ █░▀█ █▄█ ▄█
|
||||
# caelestia shell drawers toggle dashboard
|
||||
# caelestia shell drawers toggle utilities
|
||||
|
||||
bind = [
|
||||
#hyprland/utility keybindings
|
||||
"$mod, W, togglefloating"
|
||||
"$mod, G, togglegroup"
|
||||
"Alt, Return, fullscreen"
|
||||
"$mod, Left, movefocus, l"
|
||||
"$mod, Right, movefocus, r"
|
||||
"$mod, Up, movefocus, u"
|
||||
"$mod, Down, movefocus, d"
|
||||
"Alt, Tab, movefocus, d"
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$mod, 7, workspace, 7"
|
||||
"$mod, 8, workspace, 8"
|
||||
"$mod, 9, workspace, 9"
|
||||
"$mod, 0, workspace, 10"
|
||||
"$mod+Ctrl, Right, workspace, r+1"
|
||||
"$mod+Ctrl, Left, workspace, r-1"
|
||||
"$mod+Ctrl, Doown, workspace, empty"
|
||||
"$mod+Shift, 1, movetoworkspace, 1"
|
||||
"$mod+Shift, 2, movetoworkspace, 2"
|
||||
"$mod+Shift, 3, movetoworkspace, 3"
|
||||
"$mod+Shift, 4, movetoworkspace, 4"
|
||||
"$mod+Shift, 5, movetoworkspace, 5"
|
||||
"$mod+Shift, 6, movetoworkspace, 6"
|
||||
"$mod+Shift, 7, movetoworkspace, 7"
|
||||
"$mod+Shift, 8, movetoworkspace, 8"
|
||||
"$mod+Shift, 9, movetoworkspace, 9"
|
||||
"$mod+Shift, 0, movetoworkspace, 10"
|
||||
"$mod+Ctrl+Alt, Right, movetoworkspace, r+1"
|
||||
"$mod+Ctrl+Alt, Left, movetoworkspace, r-1"
|
||||
#"$mod, Backspace, exec, wlogout -b 4 -T 600 -B 600"
|
||||
"$mod, Backspace, exec, caelestia shell drawers toggle session"
|
||||
"$mod+Shift+Ctrl, Left, movewindow, l"
|
||||
"$mod+Shift+Ctrl, Right, movewindow, r"
|
||||
"$mod+Shift+Ctrl, Up, movewindow, u"
|
||||
"$mod+Shift+Ctrl, Down, movewindow, d"
|
||||
"$mod, mouse_down, workspace, e+1"
|
||||
"$mod, mouse_up, workspace, e-1"
|
||||
"$mod, V, exec, cliphist list | rofi -dmenu| cliphist decode | wl-copy" # copy paste
|
||||
"$mod, B, exec, hyprkeys -bkr | rofi -dmenu"
|
||||
#"$mod, A, tagwindow, noborder" # used to not apply image border
|
||||
"$mod, S, togglespecialworkspace,"
|
||||
"Alt+$mod, S, movetoworkspace, special"
|
||||
# for the scrolling layout
|
||||
"$mod, A, layoutmsg, move -col"
|
||||
"$mod, D, layoutmsg, move +col"
|
||||
#apps keybindings
|
||||
"$mod, T, exec, $term"
|
||||
"$mod, E, exec, $file"
|
||||
"$mod, F, exec, $browser"
|
||||
"$mod, N, exec, $notes"
|
||||
#"$mod+Shift, A, exec, rofi -show drun"
|
||||
"$mod+Shift, A, exec, caelestia shell drawers toggle launcher"
|
||||
"$mod, Q, exec, custom-dontkillsteam"
|
||||
#"Ctrl+Alt, W, exec, pkill waybar || waybar"
|
||||
"Ctrl+Alt, W, exec, caelestia shell drawers toggle sidebar"
|
||||
#"$mod, L, exec, swaylock -eFLK -i ${wallpaper}"
|
||||
"$mod, L, exec, caelestia shell lock lock"
|
||||
#"$mod, F11, exec, hyprshot -m window"
|
||||
", F11, exec, caelestia screenshot"
|
||||
#"$mod_SHIFT, S, exec, hyprshot -m region --clipboard only"
|
||||
# "$mod_SHIFT, S, exec, qs ipc call screenshot toggle"
|
||||
"$mod_SHIFT, S, exec, caelestia shell picker open"
|
||||
# framework 16 rgb macropad
|
||||
"Ctrl+$mod, 6, exec, custom-killall" # pos 1 1 killall apps except focused one
|
||||
#"Ctrl+Alt, 7, exec, custom-performance" # pos 2 1 start performance mode
|
||||
"Ctrl+Alt, 7, exec, caelestia shell gameMode toggle"
|
||||
# reloads the autostart programs # pos 3 1
|
||||
# we passed to caelestia-shell and stoped using that
|
||||
/*
|
||||
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=16 -e sh -c 'custom-weather'"
|
||||
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=11 -e sh -c 'custom-cowsay'"
|
||||
"Ctrl+$mod, 4, exec, kitty -e 'custom-launch'"
|
||||
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=5 -e btm --theme gruvbox --disable-click --disable_advanced_kill --enable_cache_memory -g -R -T "
|
||||
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=1 -e sh -c 'cmatrix -br'"
|
||||
#"Ctrl+Alt, 1, exec, swaync-client -t" # pos 4 1 notification center
|
||||
"Ctrl+Alt, 1, exec, qs ipc call notifications toggle"
|
||||
*/
|
||||
"Ctrl+Alt, 1, exec, caelestia shell drawers toggle sidebar"
|
||||
"Ctrl+$mod, 4, exec, caelestia shell notifs toggleDnd"
|
||||
"Ctrl+$mod, 3, exec, pavucontrol" # pos 1 2 audiocontrol
|
||||
"Ctrl+Shift+Alt, 0, exec, kitty --hold --class \"custom-changeAudioOutput\" --name \"Select audio output\" zsh -c \"custom-changeAudioOutput\"" # pos 2 2 change audio output fzf
|
||||
"Ctrl+$mod, 5, exec, gnome-characters" # pos 3 2 special chars
|
||||
"Ctrl+Alt, 8, exec, hyprpicker | tee >(wl-copy) | cliphist store" # pos 4 2 colorpicker
|
||||
"Ctrl+Alt, 0, exec, custom-tomato" # pos 1 3 pomodoro app
|
||||
"Ctrl+Alt, 2, exec, custom-bottom" # pos 2 3 btm (like htop but cleaner)
|
||||
"Ctrl+Alt, 9, exec, anki"
|
||||
# if hyprexpo plugin enabled bind = $mainMod, Space, hyprexpo:expo, toggle
|
||||
# maybe exec sudo framework-tools-tui
|
||||
|
||||
#plugins keybindings
|
||||
#"$mod, SPACE, overview:toggle, "
|
||||
];
|
||||
binde = [
|
||||
"$mod+Shift, Right, resizeactive, 30 0"
|
||||
"$mod+Shift, Left, resizeactive, -30, 0"
|
||||
"$mod+Shift, Up, resizeactive, 0 -30"
|
||||
"$mod+Shift, Down, resizeactive,m 0 30"
|
||||
];
|
||||
bindl = [
|
||||
", F1, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle" #toggle audio mute
|
||||
", F5, exec, playerctl play-pause" # media F4-F6
|
||||
", F4, exec, playerctl previous"
|
||||
", F6, exec, playerctl next"
|
||||
];
|
||||
bindel = [
|
||||
", F2, exec, pactl set-sink-volume @DEFAULT_SINK@ -10%" # decrease volume
|
||||
", F3, exec, pactl set-sink-volume @DEFAULT_SINK@ +10%" # increase volume
|
||||
", F7, exec, brightnessctl s 10%-" # decrease brightness
|
||||
", F8, exec, brightnessctl s +10%" # increase brightness
|
||||
];
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
"$mod, Z, movewindow"
|
||||
"$mod, X, resizewindow"
|
||||
];
|
||||
# █░░ ▄▀█ █░█ █▄░█ █▀▀ █░█
|
||||
# █▄▄ █▀█ █▄█ █░▀█ █▄▄ █▀█
|
||||
exec-once = [
|
||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH
|
||||
"dbus-update-activation-environment --systemd --all" # for XDPH
|
||||
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH
|
||||
"systemctl --user start xdg-desktop-portal-wlr.service"
|
||||
"blueman-applet" # systray app for Bluetooth
|
||||
"udiskie --no-automount --smart-tray" # front-end that allows to manage removable media
|
||||
"nm-applet --indicator" # systray app for Network/wifi
|
||||
#setups clipboard
|
||||
"rm -rf ~/.cache/cliphist/ && wl-paste --type text --watch cliphist store & wl-paste --type image --watch cliphist store"
|
||||
#"wl-paste --type text --watch cliphist store" # clipboard store text data
|
||||
#"wl-paste --type image --watch cliphist store" # clipboard store image data
|
||||
"custom-batterynotify"
|
||||
"custom-batterywarning"
|
||||
#"birdtray" # thunderbird tray app # curently broken
|
||||
#wallpapers/b
|
||||
"swww img ${wallpaper}"
|
||||
"swww-daemon"
|
||||
"sleep 1 && custom-wallpaper"
|
||||
"custom-checkKdrive && custom-mountkdrive" # checks if the remote works and mount it
|
||||
#"waybar"
|
||||
"custom-gitnotify"
|
||||
"custom-checkMatrix" # checks if matrix-commander-rs is connected which is important for other stuff
|
||||
#"custom-obsidianbackup" # backups the obsidian notes to kdrive and to a timed hidden dir (~/.Notes.backup/)
|
||||
#"QS-notifycache" # builds the cache that will be used for the notification history
|
||||
"sleep 4 & caelestia-shell" #works better if it sleeps a bit before
|
||||
/*
|
||||
We stopped using that ######################### maybe we should desactivate those scripts
|
||||
# login autostart
|
||||
#######################
|
||||
"[workspace 1 silent] sleep 1 && kitty -o font_size=16 -e sh -c 'custom-weather'"
|
||||
"[workspace 1 silent] sleep 1 && kitty -o font_size=11 -e sh -c 'custom-cowsay'"
|
||||
"[workspace 1 silent] kitty -e 'custom-launch'"
|
||||
"[workspace 1 silent] sleep 1 && kitty -o font_size=5 -e btm --theme gruvbox --disable-click --disable_advanced_kill --enable_cache_memory -g -R -T "
|
||||
"[workspace 1 silent] sleep 1 && kitty -o font_size=1 -e sh -c 'cmatrix -br'"
|
||||
######################
|
||||
######################
|
||||
*/
|
||||
];
|
||||
splash = true; # remove default background on startup
|
||||
# gestures (also keybindings)
|
||||
gesture = [
|
||||
"3, right, move, +col"
|
||||
"3, left, move, -col"
|
||||
];
|
||||
|
||||
# █░░ ▄▀█ █▄█ █▀█ █░█ ▀█▀ █▀
|
||||
# █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█
|
||||
|
||||
dwindle = {
|
||||
preserve_split = true;
|
||||
};
|
||||
scrolling = {
|
||||
column_width = 0.45;
|
||||
};
|
||||
|
||||
# █▀▄▀█ █ █▀ █▀▀
|
||||
# █░▀░█ █ ▄█ █▄▄
|
||||
|
||||
misc = {
|
||||
vrr = 0;
|
||||
force_default_wallpaper = 0;
|
||||
};
|
||||
xwayland = {
|
||||
force_zero_scaling = true;
|
||||
};
|
||||
|
||||
# █▀▄▀█ █▀█ █▄░█ █ ▀█▀ █▀█ █▀█
|
||||
# █░▀░█ █▄█ █#░▀█ █ ░█░ █▄█ █▀▄
|
||||
monitor = [
|
||||
#",preferred, auto, auto"
|
||||
"HDMI-A-1, highres2highrr, auto-left, 1"
|
||||
];
|
||||
# _______ ___ __ __ _______ ___ __ _ _______
|
||||
#| || | | | | || || | | | | || |
|
||||
#| _ || | | | | || ___|| | | |_| || _____|
|
||||
#| |_| || | | |_| || | __ | | | || |_____
|
||||
#| ___|| |___ | || || || | | _ ||_____ |
|
||||
#| | | || || |_| || | | | | | _____| |
|
||||
#|___| |_______||_______||_______||___| |_| |__||_______|
|
||||
#
|
||||
"plugin:dynamic-cursors" = {
|
||||
enabled = true;
|
||||
threshold = 2;
|
||||
mode = "rotate";
|
||||
rotate = {
|
||||
# length in px of the simulated stick used to rotate the cursor
|
||||
# most realistic if this is your actual cursor size
|
||||
length = 20;
|
||||
offset = 0;
|
||||
};
|
||||
shake = {
|
||||
enabled = true;
|
||||
# use nearest-neighbour (pixelated) scaling when shaking
|
||||
# may look weird when effects are enabled
|
||||
nearest = true;
|
||||
threshold = 4;
|
||||
# magnification level immediately after shake start
|
||||
base = 4.0;
|
||||
# magnification increase per second when continuing to shake
|
||||
speed = 4.0;
|
||||
# how much the speed is influenced by the current shake intensitiy
|
||||
influence = 0.0;
|
||||
|
||||
# maximal magnification the cursor can reach
|
||||
# values below 1 disable the limit (e.g. 0)
|
||||
limit = 0.0;
|
||||
|
||||
# time in millseconds the cursor will stay magnified after a shake has ended
|
||||
timeout = 2000;
|
||||
|
||||
# show cursor behaviour `tilt`, `rotate`, etc. while shaking
|
||||
effects = true;
|
||||
|
||||
# enable ipc events for shake
|
||||
ipc = false;
|
||||
};
|
||||
};
|
||||
"plugin:overview" = {
|
||||
disableGestures = true;
|
||||
showEmptyWorkspace = true;
|
||||
workspaceActiveBorder = "rgb(ab7746)";
|
||||
disableBlur = true;
|
||||
};
|
||||
|
||||
#####################################################
|
||||
#####################################################
|
||||
# theme
|
||||
decoration = {
|
||||
dim_special = 0.3;
|
||||
rounding = 18;
|
||||
blur = {
|
||||
special = true;
|
||||
enabled = true;
|
||||
size = 4;
|
||||
passes = 2;
|
||||
new_optimizations = true;
|
||||
ignore_opacity = true;
|
||||
};
|
||||
};
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 15;
|
||||
border_size = 4;
|
||||
"col.active_border" = "rgba(ca6702ff) rgba(ecd3a0ff) 45deg";
|
||||
"col.inactive_border" = "rgba(f1dca7d9) rgba(ffe1a8d9) 45deg";
|
||||
layout = "dwindle";
|
||||
resize_on_border = true;
|
||||
};
|
||||
group = {
|
||||
"col.border_active" = "rgba(ca6702ff) rgba(ecd3a0ff) 45deg";
|
||||
"col.border_inactive" = "rgba(f1dca7d9) rgba(ffe1a8d9) 45deg";
|
||||
"col.border_locked_active" = "rgba(ca6702ff) rgba(ecd3a0ff) 45deg";
|
||||
"col.border_locked_inactive" = "rgba(f1dca7d9) rgba(ffe1a8d9) 45deg";
|
||||
};
|
||||
####################################################
|
||||
##################################################
|
||||
|
||||
# /$$ /$$ /$$
|
||||
#| $$ /$ | $$ | $$
|
||||
#| $$ /$$$| $$ /$$$$$$ /$$$$$$ | $$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$
|
||||
#| $$/$$ $$ $$ /$$__ $$ /$$__ $$| $$ /$$/ /$$_____/ /$$__ $$ |____ $$ /$$_____/ /$$__ $$
|
||||
#| $$$$_ $$$$| $$ \ $$| $$ \__/| $$$$$$/ | $$$$$$ | $$ \ $$ /$$$$$$$| $$ | $$$$$$$$
|
||||
#| $$$/ \ $$$| $$ | $$| $$ | $$_ $$ \____ $$| $$ | $$ /$$__ $$| $$ | $$_____/
|
||||
#| $$/ \ $$| $$$$$$/| $$ | $$ \ $$ /$$$$$$$/| $$$$$$$/| $$$$$$$| $$$$$$$| $$$$$$$
|
||||
#|__/ \__/ \______/ |__/ |__/ \__/|_______/ | $$____/ \_______/ \_______/ \_______/
|
||||
# | $$
|
||||
# | $$
|
||||
# |__/
|
||||
# see https://wiki.hypr.land/Configuring/Workspace-Rules/
|
||||
workspace = [
|
||||
"1, layout:master"
|
||||
"2, layout:scrolling, layoutopt:direction:right"
|
||||
"name:special, layout:scrolling"
|
||||
# used for smart gaps along some windowrules
|
||||
#"w[tv1], gapsout:1, gapsin:1"
|
||||
#"f[1], gapsout:1, gapsin:1"
|
||||
];
|
||||
|
||||
# █░█░█ █ █▄░█ █▀▄ █▀█ █░█░█ █▀█ █░█ █░░ █▀▀ █▀
|
||||
# ▀▄▀▄▀ █ █░▀█ █▄▀ █▄█ ▀▄▀▄▀ █▀▄ █▄█ █▄▄ ██▄ ▄█
|
||||
windowrule = [
|
||||
"opacity 0.90 0.90, match:class ^(firefox)$"
|
||||
"opacity 0.90 0.90, match:class ^(Brave-browser)$"
|
||||
"opacity 0.80 0.80, match:class ^(code-oss)$"
|
||||
"opacity 0.80 0.80, match:class ^(Code)$"
|
||||
"opacity 0.80 0.80, match:class ^(code-url-handler)$"
|
||||
"opacity 0.80 0.80, match:class ^(code-insiders-url-handler)$"
|
||||
"opacity 0.75 0.75, match:class ^(kitty)$"
|
||||
"opacity 0.80 0.80, match:class ^(org.kde.dolphin)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(org.kde.ark)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(nwg-look)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(qt5ct)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(qt6ct)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(kvantummanager)$"
|
||||
"opacity 0.80 0.70, float on, match:class ^(org.pulseaudio.pavucontrol)$"
|
||||
"opacity 0.80 0.70, float on, match:class ^(blueman-manager)$"
|
||||
"opacity 0.80 0.70, float on, match:class ^(nm-applet)$"
|
||||
"opacity 0.80 0.70, float on, match:class ^(nm-connection-editor)$"
|
||||
"opacity 0.80 0.70, float on, match:class ^(org.kde.polkit-kde-authentication-agent-1)$"
|
||||
"opacity 0.80 0.70, match:class ^(polkit-gnome-authentication-agent-1)$"
|
||||
"opacity 0.80 0.70, match:class ^(org.freedesktop.impl.portal.desktop.gtk)$"
|
||||
"opacity 0.80 0.70, match:class ^(org.freedesktop.impl.portal.desktop.hyprland)$"
|
||||
"opacity 0.70 0.70, match:class ^([Ss]team)$"
|
||||
"opacity 0.70 0.70, match:class ^(steamwebhelper)$"
|
||||
"opacity 0.70 0.70, match:class ^(Spotify)$"
|
||||
"opacity 0.70 0.70, match:initial_title ^(Spotify Free)$"
|
||||
"opacity 0.90 0.90, float on, match:class ^(com.github.rafostar.Clapper)$"
|
||||
"opacity 0.80 0.80, match:class ^(com.github.tchx84.Flatseal)$"
|
||||
"opacity 0.80 0.80, match:class ^(hu.kramo.Cartridges)$"
|
||||
"opacity 0.80 0.80, match:class ^(com.obsproject.Studio)$"
|
||||
"opacity 0.80 0.80, match:class ^(gnome-boxes)$"
|
||||
"opacity 0.80 0.80, match:class ^(discord)$"
|
||||
"opacity 0.80 0.80, match:class ^(WebCord)$"
|
||||
"opacity 0.80 0.80, match:class ^(ArmCord)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(app.drey.Warp)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(net.davidotek.pupgui2)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(yad)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(Signal)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(io.github.alainm23.planify)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(io.gitlab.theevilskeleton.Upscaler)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(com.github.unrud.VideoDownloader)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(io.gitlab.adhami3310.Impression)$"
|
||||
"opacity 0.80 0.80, float on, match:class ^(io.missioncenter.MissionCenter)$"
|
||||
"opacity 0.80 0.80, match:class ^(io.github.flattool.Warehouse)$"
|
||||
"float on, match:class ^(org.kde.dolphin)$, match:title ^(Progress Dialog — Dolphin)$"
|
||||
"float on, match:class ^(org.kde.dolphin)$, match:title ^(Copying — Dolphin)$"
|
||||
"float on, match:class ^(firefox)$, match:title ^(Picture-in-Picture)$"
|
||||
"float on, match:class ^(firefox)$, match:title ^(Library)$"
|
||||
"float on, match:class ^(kitty)$, match:title ^(top)$"
|
||||
"float on, match:class ^(kitty)$, match:title ^(btop)$"
|
||||
"float on, match:class ^(kitty)$, match:title ^(htop)$"
|
||||
"float on, match:class ^(vlc)$"
|
||||
"float on, match:class ^(eog)$"
|
||||
"float on, size 400 175, match:class ^(custom-librewolfprofiles)$"
|
||||
"float on, size 1050 200, match:class ^(custom-changeAudioOutput)$"
|
||||
"float on, size 400 175, match:class ^(custom-obsidianvaults)$"
|
||||
"float on, size 600 600, match:initial_class ^(custom-pomodoro)$"
|
||||
"float on, size 1500 800, match:initial_class ^(custom-bottom)$"
|
||||
# smart gaps/border is ugly with caelestia-shell
|
||||
#"border_size 2, match:float 0, match:workspace w[tv1]"
|
||||
#"rounding 1, match:float 0, match:workspace w[tv1]"
|
||||
#"border_size 2, match:float 0, match:workspace f[1]"
|
||||
#"rounding 1, match:float 0, match:workspace f[1]"
|
||||
];
|
||||
# add a float for tomato when in kitty
|
||||
#"plugin:imgborders:noimgborders, tag:noborder"
|
||||
layerrule = [
|
||||
"blur on, ignore_alpha 0, match:namespace rofi"
|
||||
"blur on, ignore_alpha 0, match:namespace notifications"
|
||||
"blur on, ignore_alpha 0, match:namespace swaync-notification-window"
|
||||
"blur on, ignore_alpha 0, match:namespace swaync-control-center"
|
||||
"blur on, match:namespace logout_dialog"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,121 +0,0 @@
|
||||
_: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
#font.name = nerd-fonts._0xproto;
|
||||
#font.size = "10";
|
||||
## new config (matches with caelestia
|
||||
## old condfig
|
||||
extraConfig = ''
|
||||
font_size 14
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
|
||||
window_padding_width 25
|
||||
|
||||
# --- Core ---
|
||||
foreground #ece0d9
|
||||
background #18120e
|
||||
|
||||
selection_foreground #18120e
|
||||
selection_background #ece0d9
|
||||
|
||||
cursor #ffb878
|
||||
cursor_text_color #18120e
|
||||
|
||||
# --- Tabs ---
|
||||
active_tab_foreground #18120e
|
||||
active_tab_background #5c412a
|
||||
inactive_tab_foreground #d6c3b5
|
||||
inactive_tab_background #241e1a
|
||||
|
||||
# --- Black / Gray ---
|
||||
color0 #353433
|
||||
color8 #b29f91
|
||||
|
||||
# --- Red ---
|
||||
color1 #e17300
|
||||
color9 #ff8a20
|
||||
|
||||
# --- Green ---
|
||||
color2 #ffc071
|
||||
color10 #ffd6a8
|
||||
|
||||
# --- Yellow ---
|
||||
color3 #ffe0c6
|
||||
color11 #fff2e8
|
||||
|
||||
# --- Blue ---
|
||||
color4 #b9ab66
|
||||
color12 #d7be91
|
||||
|
||||
# --- Magenta ---
|
||||
color5 #ed9562
|
||||
color13 #fcad7e
|
||||
|
||||
# --- Cyan ---
|
||||
color6 #f4c16d
|
||||
color14 #ffd497
|
||||
|
||||
# --- White ---
|
||||
color7 #ebd4c1
|
||||
color15 #FFFFFF
|
||||
'';
|
||||
/*
|
||||
extraConfig = ''
|
||||
# font nerd-fonts._0xproto # this key dont work and causes errors
|
||||
font_size 14
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
window_padding_width 25
|
||||
foreground #FFFFFF
|
||||
background #1B1D1C
|
||||
selection_foreground #1B1D1C
|
||||
selection_background #FFFFFF
|
||||
cursor #C3AC76
|
||||
cursor_text_color #0F1010
|
||||
|
||||
active_tab_foreground #1B1D1C
|
||||
active_tab_background #6B5540
|
||||
inactive_tab_foreground #6B5540
|
||||
inactive_tab_background #1B1D1C
|
||||
|
||||
# black
|
||||
color0 #29523D
|
||||
color8 #578F73
|
||||
|
||||
# red
|
||||
#color1 #FFF0CC
|
||||
#color9 #F0DBAA
|
||||
# we need actual red colors
|
||||
color1 #CC241D
|
||||
color9 #9D0006
|
||||
|
||||
# green
|
||||
color2 #FFEECC
|
||||
color10 #F0D9AA
|
||||
|
||||
# yellow
|
||||
color3 #FFE5CC
|
||||
color11 #F0CCAA
|
||||
|
||||
# blue
|
||||
color4 #9AE6C0
|
||||
color12 #9AE6C0
|
||||
|
||||
# magenta
|
||||
color5 #E6CC9A
|
||||
color13 #E6CC9A
|
||||
|
||||
# cyan
|
||||
color6 #E6BF9A
|
||||
color14 #E6BF9A
|
||||
|
||||
# white
|
||||
color7 #FFF0CC
|
||||
color15 #F0DBAA
|
||||
'';
|
||||
*/
|
||||
};
|
||||
}
|
||||
@@ -1,626 +0,0 @@
|
||||
# adapted from https://github.com/contre95/dotfiles/blob/main/dotfiles/nixos/programs/librewolf.nix
|
||||
_: {
|
||||
home.sessionVariables = {
|
||||
MOZ_ENABLE_WAYLAND = 1;
|
||||
MOZ_USE_XINPUT2 = 1;
|
||||
MOZ_DBUS_REMOTE = 1;
|
||||
};
|
||||
programs.librewolf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"browser.profiles.enabled" = true;
|
||||
# disabled until i find something that uses it.
|
||||
"webgl.disabled" = true;
|
||||
# settings = lib.mapAttrs' (n: lib.nameValuePair "pref.${n}") {
|
||||
"app.update.auto" = true; # disable auto update
|
||||
#"dom.security.https_only_mode" = true; # force https
|
||||
"extensions.pocket.enabled" = false; # disable pocket
|
||||
#"browser.quitShortcut.disabled" = true; # disable ctrl+q
|
||||
"browser.download.panel.shown" = true; # show download panel
|
||||
"signon.rememberSignons" = false; # disable saving passwords
|
||||
"identity.fxaccounts.enabled" = false; # disable librewolf accounts
|
||||
"app.shield.optoutstudies.enabled" = false; # disable shield studies
|
||||
"browser.shell.checkDefaultBrowser" = false; # don't check if default browser
|
||||
#"browser.bookmarks.restore_default_bookmarks" = false; # don't restore default bookmarks
|
||||
# Download handling
|
||||
#"browser.download.dir" = "/home/meain/down"; # default download dir
|
||||
"browser.startup.page" = 3; # restore previous session
|
||||
# UI changes
|
||||
# "browser.uidensity" = 1; # enable dense UI
|
||||
#"general.autoScroll" = true; # enable autoscroll
|
||||
# "browser.compactmode.show" = true; # enable compact mode
|
||||
# "browser.tabs.firefox-view" = false; # enable librewolf view
|
||||
#"startup.homepage_welcome_url" =
|
||||
# "https://metrics.internal.contre.io/d/cUITC74Vksd/podman-revamped?orgId=1&from=2026-02-23T19:29:26.304Z&to=2026-02-23T19:59:26.304Z&timezone=browser&var-Filters=&var-namespace=alloy&var-level=error&var-level=debug&var-level=info&var-level=warn&refresh=5s&kiosk=true"; # disable welcome page
|
||||
"browser.newtabpage.enabled" = true; # disable new tab page
|
||||
"full-screen-api.ignore-widgets" = true; # fullscreen within window
|
||||
"browser.toolbars.bookmarks.visibility" = "never"; # hide bookmarks toolbar
|
||||
"browser.aboutConfig.showWarning" = false; # disable warning about about:config
|
||||
"media.videocontrols.picture-in-picture.video-toggle.enabled" = false; # disable picture in picture button
|
||||
|
||||
# Privacy
|
||||
"privacy.resistFingerprinting" = true;
|
||||
# "privacy.clearOnShutdown.cache" = false;
|
||||
"privacy.clearOnShutdown.history" = false;
|
||||
"privacy.clearHistory.cookiesAndStorage" = false;
|
||||
"privacy.clearHistory.historyFormDataAndDownloads" = false;
|
||||
"privacy.clearHistory.cache" = false;
|
||||
"privacy.clearOnShutdown_v2.siteSettings" = false;
|
||||
"privacy.clearOnShutdown_v2.cookiesAndStorage" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.history" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.siteSettings" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.sessions" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown_v2.cookies" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown.history" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown.siteSettings" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown.sessions" = false;
|
||||
"services.sync.prefs.sync.privacy.clearOnShutdown.cookies" = false;
|
||||
"privacy.clearOnShutdown.cookies" = false;
|
||||
"browser.discovery.enabled" = false; # disable discovery
|
||||
"browser.search.suggest.enabled" = true; # disable search suggestions
|
||||
"browser.contentblocking.category" = "standart"; # set tracking protection to standart to not interfer with adnauseam
|
||||
"dom.private-attribution.submission.enabled" = false; # stop doing dumb stuff mozilla
|
||||
"browser.protections_panel.infoMessage.seen" = true; # disable tracking protection info
|
||||
|
||||
# Theme
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"svg.context-properties.content.enabled" = true;
|
||||
"layout.css.color-mix.enabled" = true;
|
||||
|
||||
# Disable telemetry
|
||||
"toolkit.telemetry.enabled" = false;
|
||||
"toolkit.telemetry.unified" = false;
|
||||
"browser.ping-centre.telemetry" = false;
|
||||
"toolkit.telemetry.archive.enabled" = false;
|
||||
"toolkit.telemetry.bhrPing.enabled" = false;
|
||||
"toolkit.telemetry.updatePing.enabled" = false;
|
||||
"browser.translations.automaticallyPopup" = false;
|
||||
"toolkit.telemetry.hybridContent.enabled" = false;
|
||||
"toolkit.telemetry.newProfilePing.enabled" = false;
|
||||
"toolkit.telemetry.reportingpolicy.firstRun" = false;
|
||||
"toolkit.telemetry.firstShutdownPing.enabled" = false;
|
||||
"browser.newtabpage.activity-stream.telemetry" = false;
|
||||
"toolkit.telemetry.shutdownPingSender.enabled" = false;
|
||||
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
|
||||
|
||||
"browser.tabs.loadInBackground" = true; # open new tab in background
|
||||
"browser.tabs.loadBookmarksInTabs" = true; # open bookmarks in new tab
|
||||
"browser.tabs.warnOnOpen" = false; # don't warn when opening multiple tabs
|
||||
"browser.tabs.warnOnQuit" = false; # don't warn when closing multiple tabs
|
||||
"browser.tabs.warnOnClose" = false; # don't warn when closing multiple tabs
|
||||
"browser.tabs.loadDivertedInBackground" = false; # open new tab in background
|
||||
"browser.tabs.warnOnCloseOtherTabs" = false; # don't warn when closing multiple tabs
|
||||
"browser.tabs.closeWindowWithLastTab" = false; # don't close window when last tab is closed
|
||||
|
||||
# other
|
||||
"media.autoplay.default" = 0; # enable autoplay on open
|
||||
"devtools.toolbox.host" = "right"; # move devtools to right
|
||||
"devtools.theme" = "dark";
|
||||
# "browser.ssb.enabled" = true; # enable site specific browser
|
||||
"media.rdd-vpx.enabled" = true; # enable hardware acceleration
|
||||
"devtools.cache.disabled" = true; # disable caching in devtools
|
||||
"media.ffmpeg.vaapi.enabled" = true; # enable hardware acceleration
|
||||
|
||||
# Fonts
|
||||
"font.size.fixed.x-western" = 15;
|
||||
"font.minimum-size.x-western" = 13;
|
||||
"font.size.variable.x-western" = 15;
|
||||
"font.size.monospace.x-western" = 15;
|
||||
"browser.display.use_document_fonts" = 1;
|
||||
"browser.link.open_newwindow.restriction" = 0;
|
||||
#
|
||||
# "browser.fixup.domainsuffixwhitelist.home" = true;
|
||||
# "browser.fixup.domainwhitelist.internal.contre.io" = true;
|
||||
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
||||
# "keyword.enable" = false; # Disable search when typing unexistent TLD
|
||||
};
|
||||
policies = {
|
||||
ExtensionSettings = {
|
||||
# the extension id should be from the manifesto and not a random name.
|
||||
# if you dont know it. Put a random name. It will fail. Go to about:polices#error and the error will give you the correct id.
|
||||
"enhancerforyoutube@maximerf.addons.mozilla.org" = {
|
||||
installation_mode = "normal_installed";
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/enhancer-for-youtube/latest.xpi";
|
||||
};
|
||||
|
||||
"sponsorBlocker@ajay.app" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
|
||||
"adnauseam@rednoise.org" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/adnauseam/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
"uBlock0@raymondhill.net" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
"{08d5243b-4236-4a27-984b-1ded22ce01c3}" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/file/3729287/gruvboxgruvboxgruvboxgruvboxgr-1.0.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
"trackmenot@mrl.nyu.edu" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/trackmenot/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/file/4749958/bitwarden_password_manager-latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
};
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxStudies = true;
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Locked = true;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
};
|
||||
DisablePocket = true;
|
||||
DisableAccounts = true;
|
||||
DisableFirefoxScreenshots = true;
|
||||
# OverrideFirstRunPage = "";
|
||||
# OverridePostUpdatePage = "";
|
||||
DontCheckDefaultBrowser = true;
|
||||
DisplayBookmarksToolbar = "always"; # alternatives: "always" or "newtab"
|
||||
DisplayMenuBar = "never"; # alternatives: "always", "never" or "default-on"
|
||||
SearchBar = "unified"; # alternative: "separate"
|
||||
};
|
||||
profiles.work = {
|
||||
id = 0;
|
||||
# userChrome = builtins.readFile ./userChrome.css;
|
||||
# userContent = builtins.readFile ./userChrome.css;
|
||||
extensions = {
|
||||
#force = true;
|
||||
#settings = {
|
||||
# "adnauseam@rednoise.org".settings = {
|
||||
# # Core behavior
|
||||
# filteringEnabled = true;
|
||||
#
|
||||
# hidingAds = true;
|
||||
# blockingMalware = true;
|
||||
# clickingAds = true;
|
||||
#
|
||||
# # Privacy
|
||||
# disableClickingForDNT = true;
|
||||
# blockSocialMediaWidgets = false;
|
||||
#
|
||||
# # Filter lists
|
||||
# selectedFilterLists = [
|
||||
# "adnauseam-filters"
|
||||
# "easylist"
|
||||
# "easyprivacy"
|
||||
# "ublock-badware"
|
||||
# "ublock-privacy"
|
||||
# "ublock-unbreak"
|
||||
# ];
|
||||
#
|
||||
# # Advanced
|
||||
# advancedUserEnabled = false;
|
||||
# dynamicFilteringEnabled = false;
|
||||
#
|
||||
# # UI
|
||||
# showIconBadge = true;
|
||||
# parseTextAds = true;
|
||||
# eventLogging = false;
|
||||
# };
|
||||
# "trackmenot@mrl.nyu.edu".settings = {
|
||||
# enabled = true;
|
||||
|
||||
# # Query behavior
|
||||
# runAtStartup = true;
|
||||
# useTab = false; # don't open visible tab
|
||||
# showQueries = false; # don't display fake queries
|
||||
|
||||
# # Frequency (seconds between bursts)
|
||||
# timeout = 600; # 10 minutes
|
||||
# burstEnabled = true;
|
||||
# burstTimeout = 20; # burst interval
|
||||
# burstCount = 5;
|
||||
|
||||
# # Query source
|
||||
# useRssFeeds = true; # use dynamic trending feeds
|
||||
# useUserQueries = false; # don't mix your real queries
|
||||
# useBlackList = true;
|
||||
|
||||
# # Search engines to generate noise for
|
||||
# searchEngines = {
|
||||
# google = true;
|
||||
# bing = false;
|
||||
# yahoo = false;
|
||||
# baidu = false;
|
||||
# duckduckgo = false;
|
||||
# };
|
||||
|
||||
# # Logging
|
||||
# enableLogging = false;
|
||||
# };
|
||||
# "sponsorBlocker@ajay.app".settings = {
|
||||
|
||||
# # Core behavior
|
||||
# isEnabled = true;
|
||||
# autoSkip = false;
|
||||
# showSkipNotice = true;
|
||||
# # this does not work
|
||||
# # Segment categories (auto-skip behavior)
|
||||
# categoryChooser = {
|
||||
# Sponsor = {
|
||||
# enabled = true;
|
||||
# skipOption = "manualSkip";
|
||||
# };
|
||||
# intro = {
|
||||
# enabled = true;
|
||||
# actionType = 2;
|
||||
# };
|
||||
# outro = {
|
||||
# enabled = true;
|
||||
# actionType = 2;
|
||||
# };
|
||||
# selfpromo = {
|
||||
# enabled = true;
|
||||
# actionType = 2;
|
||||
# };
|
||||
# interaction = {
|
||||
# enabled = true;
|
||||
# actionType = 1; # 1 = manual skip
|
||||
# };
|
||||
# music_offtopic = {
|
||||
# enabled = false;
|
||||
# actionType = 0;
|
||||
# };
|
||||
# preview = {
|
||||
# enabled = false;
|
||||
# actionType = 0;
|
||||
# };
|
||||
# };
|
||||
|
||||
# # Privacy
|
||||
# disableTelemetry = true;
|
||||
# showDonationLink = false;
|
||||
|
||||
# # UX
|
||||
# showUpsells = false;
|
||||
# hideSkipButtonPlayerControls = false;
|
||||
|
||||
# # Advanced
|
||||
# useLocalCache = true;
|
||||
# trackViewCount = false;
|
||||
# };
|
||||
#};
|
||||
};
|
||||
bookmarks = {
|
||||
force = true;
|
||||
settings = [
|
||||
{
|
||||
name = "Nixos Config";
|
||||
tags = ["github"];
|
||||
keyword = "github";
|
||||
url = "https://github.com/tomasriveral/nixos";
|
||||
}
|
||||
{
|
||||
name = "Public AI";
|
||||
tags = ["ai" "chatgpt" "apertus"];
|
||||
keyword = "apertus";
|
||||
url = "https://chat.publicai.co/";
|
||||
}
|
||||
{
|
||||
name = "Signs of AI writing";
|
||||
tags = ["ai" "write"];
|
||||
keyword = "AI writing";
|
||||
url = "https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing";
|
||||
}
|
||||
{
|
||||
name = "nixpkgs-review-gha";
|
||||
tags = ["nixpkgs-review" "gha"];
|
||||
keyword = "nixpkgs-review";
|
||||
url = "https://github.com/tomasriveral/nixpkgs-review-gha/actions/workflows/review.yml";
|
||||
}
|
||||
{
|
||||
name = "nixpkgs tracker";
|
||||
tags = ["nixpkgs" "tracker"];
|
||||
keyword = "nixpkgs tracker";
|
||||
url = "https://nixpk.gs/pr-tracker.html";
|
||||
}
|
||||
];
|
||||
};
|
||||
search = {
|
||||
force = true;
|
||||
default = "quant";
|
||||
privateDefault = "qant";
|
||||
order = [
|
||||
"q"
|
||||
"map"
|
||||
"np"
|
||||
"nw"
|
||||
"bookmarks"
|
||||
"tabs"
|
||||
"history"
|
||||
];
|
||||
engines = {
|
||||
# don't need these default ones
|
||||
"amazondotcom-es".metaData.hidden = true;
|
||||
"bing".metaData.hidden = true;
|
||||
"ebay".metaData.hidden = true;
|
||||
"metager".metaData.hidden = true; # dont work
|
||||
"mojeek".metaData.hidden = true; # dont work
|
||||
"seerx".metaData.hidden = true;
|
||||
"perplexity".metaData.hidden = true;
|
||||
"google".metaData.hidden = true;
|
||||
"startpage".metaData.hidden = true;
|
||||
"duckduckgo".metaData.hidden = true;
|
||||
"Wikitionary" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://fr.wiktionary.org/w/index.php?search={searchTerms}";
|
||||
}
|
||||
];
|
||||
definedAliases = ["dict"];
|
||||
};
|
||||
"quant" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://www.qwant.com/";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["q"];
|
||||
};
|
||||
"OpenStreeetMap" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://www.openstreetmap";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["map"];
|
||||
};
|
||||
"Home Manager Options" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://home-manager-options.extranix.com/";
|
||||
params = [
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["hm"];
|
||||
};
|
||||
"Nix Packages" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["np"];
|
||||
};
|
||||
"Nix Wiki" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";
|
||||
}
|
||||
];
|
||||
definedAliases = ["nw"];
|
||||
};
|
||||
"Repology" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://repology.org/projects/?search={searchTerms}";
|
||||
}
|
||||
];
|
||||
definedAliases = ["rp"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
profiles.other = {
|
||||
id = 1;
|
||||
# userChrome = builtins.readFile ./userChrome.css;
|
||||
# userContent = builtins.readFile ./userChrome.css;
|
||||
extensions = {
|
||||
#force = false;
|
||||
#settings = {
|
||||
# "adnauseam@rednoise.org".settings = {
|
||||
# # Core behavior
|
||||
# filteringEnabled = true;
|
||||
#
|
||||
# hidingAds = true;
|
||||
# blockingMalware = true;
|
||||
# clickingAds = true;
|
||||
#
|
||||
# # Privacy
|
||||
# disableClickingForDNT = true;
|
||||
# blockSocialMediaWidgets = false;
|
||||
#
|
||||
# # Filter lists
|
||||
# selectedFilterLists = [
|
||||
# "adnauseam-filters"
|
||||
# "easylist"
|
||||
# "easyprivacy"
|
||||
# "ublock-badware"
|
||||
# "ublock-privacy"
|
||||
# "ublock-unbreak"
|
||||
# ];
|
||||
#
|
||||
# # Advanced
|
||||
# advancedUserEnabled = false;
|
||||
# dynamicFilteringEnabled = false;
|
||||
#
|
||||
# # UI
|
||||
# showIconBadge = true;
|
||||
# parseTextAds = true;
|
||||
# eventLogging = false;
|
||||
# };
|
||||
# "trackmenot@mrl.nyu.edu".settings = {
|
||||
# enabled = true;
|
||||
|
||||
# # Query behavior
|
||||
# runAtStartup = true;
|
||||
# useTab = false; # don't open visible tab
|
||||
# showQueries = false; # don't display fake queries
|
||||
|
||||
# # Frequency (seconds between bursts)
|
||||
# timeout = 600; # 10 minutes
|
||||
# burstEnabled = true;
|
||||
# burstTimeout = 20; # burst interval
|
||||
# burstCount = 5;
|
||||
|
||||
# # Query source
|
||||
# useRssFeeds = true; # use dynamic trending feeds
|
||||
# useUserQueries = false; # don't mix your real queries
|
||||
# useBlackList = true;
|
||||
|
||||
# # Search engines to generate noise for
|
||||
# searchEngines = {
|
||||
# google = true;
|
||||
# bing = false;
|
||||
# yahoo = false;
|
||||
# baidu = false;
|
||||
# duckduckgo = false;
|
||||
# };
|
||||
|
||||
# # Logging
|
||||
# enableLogging = false;
|
||||
# };
|
||||
# "sponsorBlocker@ajay.app".settings = {
|
||||
|
||||
# # Core behavior
|
||||
# isEnabled = true;
|
||||
# autoSkip = false;
|
||||
# showSkipNotice = true;
|
||||
# # this does not work
|
||||
# # Segment categories (auto-skip behavior)
|
||||
# categoryChooser = {
|
||||
# Sponsor = {
|
||||
# enabled = true;
|
||||
# skipOption = "manualSkip";
|
||||
# };
|
||||
# intro = {
|
||||
# enabled = true;
|
||||
# actionType = 2;
|
||||
# };
|
||||
# outro = {
|
||||
# enabled = true;
|
||||
# actionType = 2;
|
||||
# };
|
||||
# selfpromo = {
|
||||
# enabled = true;
|
||||
# actionType = 2;
|
||||
# };
|
||||
# interaction = {
|
||||
# enabled = true;
|
||||
# actionType = 1; # 1 = manual skip
|
||||
# };
|
||||
# music_offtopic = {
|
||||
# enabled = false;
|
||||
# actionType = 0;
|
||||
# };
|
||||
# preview = {
|
||||
# enabled = false;
|
||||
# actionType = 0;
|
||||
# };
|
||||
# };
|
||||
|
||||
# # Privacy
|
||||
# disableTelemetry = true;
|
||||
# showDonationLink = false;
|
||||
|
||||
# # UX
|
||||
# showUpsells = false;
|
||||
# hideSkipButtonPlayerControls = false;
|
||||
|
||||
# # Advanced
|
||||
# useLocalCache = true;
|
||||
# trackViewCount = false;
|
||||
# };
|
||||
#};
|
||||
};
|
||||
search = {
|
||||
force = true;
|
||||
default = "quant";
|
||||
privateDefault = "qant";
|
||||
order = [
|
||||
"q"
|
||||
"map"
|
||||
"np"
|
||||
"nw"
|
||||
"bookmarks"
|
||||
"tabs"
|
||||
"history"
|
||||
];
|
||||
engines = {
|
||||
# don't need these default ones
|
||||
"amazondotcom-es".metaData.hidden = true;
|
||||
"bing".metaData.hidden = true;
|
||||
"ebay".metaData.hidden = true;
|
||||
"metager".metaData.hidden = true; # dont work
|
||||
"mojeek".metaData.hidden = true; # dont work
|
||||
"seerx".metaData.hidden = true;
|
||||
"perplexity".metaData.hidden = true;
|
||||
"google".metaData.hidden = true;
|
||||
"startpage".metaData.hidden = true;
|
||||
"duckduckgo".metaData.hidden = true;
|
||||
"quant" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://www.qwant.com/";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["q"];
|
||||
};
|
||||
"OpenStreeetMap" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://www.openstreetmap";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["map"];
|
||||
};
|
||||
"Onche.org" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://onche.org/forum/1/blabla-general/search?by=topic&q={searchTerms}";
|
||||
}
|
||||
];
|
||||
definedAliases = ["on"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
{
|
||||
pkgs-unstable,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
programs.micro = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.micro-full;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
home.file.".config/micro/plug/vivify" = {
|
||||
enable = true;
|
||||
source = inputs.microPlugins-vivify;
|
||||
recursive = true;
|
||||
force = true;
|
||||
};
|
||||
home.file.".config/micro/init.lua" = {
|
||||
enable = true;
|
||||
force = true;
|
||||
text = ''
|
||||
local buffer = import("micro/buffer")
|
||||
local shell = import("micro/shell")
|
||||
|
||||
function vivifyOpen(buf)
|
||||
local cursor = buf:GetActiveCursor()
|
||||
local line = cursor.Loc.Y + 1
|
||||
|
||||
shell.ExecCommand("viv", string.format("%s:%d", buf.AbsPath, line))
|
||||
end
|
||||
|
||||
function onBufferOpen(buf)
|
||||
if os.getenv("MICRO_VIVIFY") ~= "1" then
|
||||
return
|
||||
end
|
||||
|
||||
-- only run for real files (not help/log/etc)
|
||||
if buf.Type.Kind == buffer.BTDefault then
|
||||
vivifyOpen(buf)
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
# see also ../nixos/mullvad.nix
|
||||
_: {
|
||||
programs.mullvad-vpn = {
|
||||
enable = true;
|
||||
# see https://github.com/mullvad/mullvadvpn-app/blob/main/desktop/packages/mullvad-vpn/src/main/gui-settings.ts for options
|
||||
settings = {
|
||||
autoConnect = true;
|
||||
autoStart = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,499 +0,0 @@
|
||||
{pkgs-unstable, ...}: {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
vimAlias = false;
|
||||
viAlias = false;
|
||||
package = pkgs-unstable.neovim-unwrapped; # required for unwrapped version
|
||||
plugins = [
|
||||
pkgs-unstable.vimPlugins.vivify-vim
|
||||
pkgs-unstable.vimPlugins.vimtex
|
||||
pkgs-unstable.vimPlugins.zoxide-vim
|
||||
#pkgs-unstable.vimPlugins.gruvbox
|
||||
pkgs-unstable.vimPlugins.gruvbox-nvim
|
||||
pkgs-unstable.vimPlugins.neovim-sensible
|
||||
pkgs-unstable.vimPlugins.nvim-web-devicons
|
||||
pkgs-unstable.vimPlugins.nvim-tree-lua
|
||||
pkgs-unstable.vimPlugins.nvim-surround
|
||||
pkgs-unstable.vimPlugins.floaterm
|
||||
pkgs-unstable.vimPlugins.nvim-lspconfig
|
||||
pkgs-unstable.vimPlugins.cmp-nvim-lsp
|
||||
pkgs-unstable.vimPlugins.cmp-nvim-lsp-signature-help
|
||||
pkgs-unstable.vimPlugins.cmp-under-comparator
|
||||
pkgs-unstable.vimPlugins.cmp-buffer
|
||||
pkgs-unstable.vimPlugins.cmp-path
|
||||
pkgs-unstable.vimPlugins.cmp-cmdline
|
||||
pkgs-unstable.vimPlugins.nvim-cmp
|
||||
pkgs-unstable.vimPlugins.cmp-vsnip
|
||||
pkgs-unstable.vimPlugins.vim-vsnip
|
||||
pkgs-unstable.vimPlugins.dashboard-nvim
|
||||
pkgs-unstable.vimPlugins.lualine-nvim
|
||||
pkgs-unstable.vimPlugins.vim-nix
|
||||
pkgs-unstable.vimPlugins.plenary-nvim
|
||||
pkgs-unstable.vimPlugins.blink-ripgrep-nvim
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.rasi
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.regex
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.udev
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.zsh
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.c
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.bibtex
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.bash
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.gitignore
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.comment
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.json
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.hyprlang
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.lua
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.latex
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.kitty
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.markdown
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.nix
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.printf
|
||||
pkgs-unstable.vimPlugins.nvim-treesitter-parsers.python
|
||||
pkgs-unstable.vimPlugins.telescope-nvim
|
||||
pkgs-unstable.vimPlugins.nvim-scrollbar
|
||||
pkgs-unstable.vimPlugins.promise-async
|
||||
pkgs-unstable.vimPlugins.nvim-ufo
|
||||
pkgs-unstable.vimPlugins.cheatsheet-nvim
|
||||
pkgs-unstable.vimPlugins.popup-nvim
|
||||
pkgs-unstable.vimPlugins.vim-visual-multi
|
||||
pkgs-unstable.vimPlugins.fugit2-nvim
|
||||
pkgs-unstable.vimPlugins.nvim-lastplace
|
||||
pkgs-unstable.vimPlugins.runner-nvim # terminal
|
||||
pkgs-unstable.vimPlugins.better-diagnostic-virtual-text
|
||||
pkgs-unstable.vimPlugins.garbage-day-nvim
|
||||
];
|
||||
extraLuaConfig = ''
|
||||
|
||||
local vim = vim
|
||||
|
||||
-- =========================
|
||||
-- LEADER & KEY DISABLE
|
||||
-- =========================
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
vim.keymap.set({'n', 'v'}, '<Space>', '<Nop>', { desc = 'Leader key, disable default behavior' })
|
||||
vim.keymap.set('n', 'q', '<Nop>', { desc = 'Disable macro recording' })
|
||||
vim.keymap.set('n', 'gg', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gG', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g0', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g^', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g$', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gj', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gk', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g~', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gu', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gU', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g=', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gq', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g@', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g?', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gC', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gD', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gx', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'gr', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g[', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g]', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g;', '<Nop>', { desc = 'Disable g motion' })
|
||||
vim.keymap.set('n', 'g,', '<Nop>', { desc = 'Disable g motion' })
|
||||
-- =========================
|
||||
-- GENERAL OPTIONS
|
||||
-- =========================
|
||||
vim.g.have_nerd_font = true
|
||||
vim.opt.relativenumber = false
|
||||
vim.opt.number = true
|
||||
vim.opt.mouse = 'a'
|
||||
vim.opt.showmode = false
|
||||
vim.schedule(function()
|
||||
vim.opt.clipboard = 'unnamedplus'
|
||||
end)
|
||||
vim.opt.breakindent = true
|
||||
vim.opt.undofile = true
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.signcolumn = 'yes'
|
||||
vim.opt.updatetime = 250
|
||||
vim.opt.timeoutlen = 300
|
||||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.inccommand = 'split'
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.scrolloff = 10
|
||||
|
||||
|
||||
-- =========================
|
||||
-- BASIC KEYMAPS
|
||||
-- =========================
|
||||
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
||||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||
|
||||
-- Disable arrow keys in normal mode
|
||||
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
||||
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
||||
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
||||
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
||||
|
||||
-- Window navigation
|
||||
vim.keymap.set('n', '<C-Left>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
|
||||
vim.keymap.set('n', '<C-Right>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
|
||||
vim.keymap.set('n', '<C-Down>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||
vim.keymap.set('n', '<C-Up>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||
|
||||
-- Cheatsheet
|
||||
vim.keymap.set("n","§", "<cmd>Cheatsheet<CR>")
|
||||
require("cheatsheet").setup({
|
||||
bundled_cheatsheets = { enabled = { "default" } },
|
||||
bundled_plugin_cheatsheets = { disabled = { "gitsigns.nvim" } }
|
||||
})
|
||||
|
||||
-- Highlight yanked text
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
desc = 'Highlight on yank',
|
||||
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
||||
callback = function() vim.highlight.on_yank() end,
|
||||
})
|
||||
|
||||
-- ========================
|
||||
-- terminal
|
||||
-- =======================
|
||||
require("runner-nvim").setup({
|
||||
position = 'right', -- position of the terminal window when using the shell_handler
|
||||
-- can be: top, left, right, bottom
|
||||
-- will be overwritten when using the telescope mapping to open horizontally or vertically
|
||||
|
||||
width = 80, -- width of window when position is left or right
|
||||
height = 10, -- height of window when position is top or bottom
|
||||
|
||||
handlers = {
|
||||
lua = function(bufnr)
|
||||
vim.print('Running lua file in buffer ' .. bufnr)
|
||||
-- Run the file here
|
||||
end
|
||||
}
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader><leader>", function() require("runner-nvim").run() end)
|
||||
-- =========================
|
||||
-- SCROLLBAR
|
||||
-- =========================
|
||||
require("scrollbar").setup()
|
||||
|
||||
-- =========================
|
||||
-- UFO FOLDING
|
||||
-- =========================
|
||||
vim.o.foldcolumn = '1'
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
vim.keymap.set('n', '<leader>1', "<cmd>foldopen<CR>")
|
||||
vim.keymap.set('n', '<leader>2', "<cmd>foldclose<CR>")
|
||||
require('ufo').setup({
|
||||
provider_selector = function() return {'treesitter', 'indent'} end
|
||||
})
|
||||
|
||||
-- =========================
|
||||
-- treesitter
|
||||
-- ========================
|
||||
require('nvim-treesitter').setup({
|
||||
ensure_installed = {},
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = { enable = true },
|
||||
})
|
||||
-- =========================
|
||||
-- NVIM-TREE
|
||||
-- =========================
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
require("nvim-tree").setup({
|
||||
sort = { sorter = "case_sensitive" },
|
||||
view = { width = 30 },
|
||||
renderer = { group_empty = true },
|
||||
filters = { dotfiles = true },
|
||||
})
|
||||
|
||||
-- =========================
|
||||
-- CMP CONFIGURATION
|
||||
-- =========================
|
||||
local cmp = require'cmp'
|
||||
cmp.setup({
|
||||
snippet = { expand = function(args) vim.fn["vsnip#anonymous"](args.body) end },
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
}),
|
||||
sources = cmp.config.sources({ { name = 'nvim_lsp' }, { name = 'vsnip' } }, { { name = 'buffer' } }),
|
||||
})
|
||||
|
||||
cmp.setup.cmdline({ '/', '?' }, { mapping = cmp.mapping.preset.cmdline(), sources = { { name = 'buffer' } } })
|
||||
cmp.setup.cmdline(':', { mapping = cmp.mapping.preset.cmdline(), sources = cmp.config.sources({ { name = 'path' } }, { { name = 'cmdline' } }), matching = { disallow_symbol_nonprefix_matching = false } })
|
||||
|
||||
-- =========================
|
||||
-- LSP CONFIGURATION
|
||||
-- =========================
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
-- Diagnostics
|
||||
vim.keymap.set("n", "<leader>e4", function() vim.diagnostic.jump({ prev=true, count = 1 }) end, { desc = "Previous diagnostic" })
|
||||
vim.keymap.set("n", "<leader>e5", function() vim.diagnostic.jump({ prev=false, count = 1 }) end, { desc = "Next diagnostic" })
|
||||
vim.keymap.set("n", "<leader>e1", vim.diagnostic.open_float, { desc = "Show diagnostic" })
|
||||
vim.keymap.set("n", "<leader>e3", vim.diagnostic.setloclist, { desc = "Diagnostic list" })
|
||||
vim.keymap.set("n", "<leader>e2", vim.lsp.buf.code_action, { desc = "Show correction" })
|
||||
|
||||
vim.keymap.set("n", "<leader>e<Tab>", function()
|
||||
local clients = vim.lsp.get_clients({ name = "ltex" })
|
||||
|
||||
if #clients > 0 then
|
||||
-- Stop LTeX
|
||||
for _, client in ipairs(clients) do
|
||||
client.stop()
|
||||
end
|
||||
print("LTeX OFF")
|
||||
else
|
||||
-- Start LTeX
|
||||
vim.cmd("LspStart ltex")
|
||||
print("LTeX ON")
|
||||
end
|
||||
end, { desc = "Toggle LTeX" })
|
||||
|
||||
vim.diagnostic.config({
|
||||
update_in_insert = false, -- i don't get any new error when in insert
|
||||
})
|
||||
require("better-diagnostic-virtual-text").setup({
|
||||
ui = {
|
||||
wrap_line_after = false, -- wrap the line after this length to avoid the virtual text is too long
|
||||
left_kept_space = 3, --- the number of spaces kept on the left side of the virtual text, make sure it enough to custom for each line
|
||||
right_kept_space = 3, --- the number of spaces kept on the right side of the virtual text, make sure it enough to custom for each line
|
||||
arrow = " ",
|
||||
up_arrow = " ",
|
||||
down_arrow = " ",
|
||||
above = false, -- the virtual text will be displayed above the line
|
||||
},
|
||||
priority = 2003, -- the priority of virtual text
|
||||
inline = false,
|
||||
|
||||
})
|
||||
|
||||
|
||||
-- LSP functionality
|
||||
vim.keymap.set("n", "<leader>g1", vim.lsp.buf.hover, { desc = "Hover documentation" })
|
||||
vim.keymap.set("n", "<leader>g2", vim.lsp.buf.definition, { desc = "Go to definition" })
|
||||
vim.keymap.set("n", "<leader>g3", vim.lsp.buf.declaration, { desc = "Go to declaration" })
|
||||
vim.keymap.set("n", "<leader>g4", vim.lsp.buf.implementation, { desc = "Go to implementation" })
|
||||
vim.keymap.set("n", "<leader>g5", vim.lsp.buf.references, { desc = "Show references" })
|
||||
|
||||
-- LSP server setup
|
||||
vim.lsp.config("lua_ls", { cmd = { "lua-language-server" }, filetypes = { "lua" }, root_dir = vim.fs.dirname, on_attach = on_attach })
|
||||
vim.lsp.config("clangd", {
|
||||
cmd = { "clangd", "--header-insertion=never" },
|
||||
filetypes = { "c","cpp","objc","objcpp" },
|
||||
on_attach = on_attach ,
|
||||
init_options = {
|
||||
|
||||
clangdFileStatus = true,
|
||||
usePlaceholders = true,
|
||||
completeUnimported = false, -- this adds a bunch of #include even thought they are #included in another header file
|
||||
headerInsertion = false,
|
||||
headerInsertionDecorators = false,
|
||||
addDependencyHeaders = false,
|
||||
semanticHighlighting = true}
|
||||
})
|
||||
vim.lsp.config("nixd", {
|
||||
cmd = { "nixd" },
|
||||
filetypes = { "nix" },
|
||||
on_attach = on_attach,
|
||||
})
|
||||
vim.lsp.config("pylsp", {
|
||||
cmd = { "pylsp" },
|
||||
filetypes = { "python" },
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
pylsp_mypy = { enabled = true },
|
||||
jedi_completion = { fuzzy = true }
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
vim.lsp.config("texlab", { cmd = { "texlab" }, filetypes = { "tex" }, on_attach = on_attach })
|
||||
vim.lsp.config("ltex", {
|
||||
cmd = { "ltex-ls-plus" },
|
||||
filetypes = { "markdown", "text", "tex", "plaintex" },
|
||||
on_attach = on_attach,
|
||||
|
||||
settings = {
|
||||
ltex = {
|
||||
language = "fr",
|
||||
|
||||
enabled = {
|
||||
"markdown",
|
||||
"text",
|
||||
"tex",
|
||||
"plaintex",
|
||||
},
|
||||
|
||||
completionEnabled = true,
|
||||
diagnosticSeverity = "information",
|
||||
|
||||
additionalRules = {
|
||||
enablePickyRules = false,
|
||||
motherTongue = "fr",
|
||||
},
|
||||
|
||||
dictionary = {
|
||||
["fr"] = {
|
||||
"icelle",
|
||||
"icelui",
|
||||
"iceux",
|
||||
"maldoror",
|
||||
"evariste",
|
||||
"galois",
|
||||
"arno",
|
||||
"dessacrer",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.enable({ "lua_ls", "clangd", "pylsp", "texlab", "nixd", "ltex"})
|
||||
-- =========================
|
||||
-- DASHBOARD
|
||||
-- =========================
|
||||
require('dashboard').setup {
|
||||
theme = 'hyper',
|
||||
config = {
|
||||
header = {
|
||||
" ... ... . ",
|
||||
" .=*8888n..\"%888: @88> ",
|
||||
" X ?8888f '8888 u. ... .. %8P .. . : ",
|
||||
" 88x. '8888X 8888> .u ...ue888b :~\"\"888h.:^\"888: . .888: x888 x888. ",
|
||||
"'8888k 8888X '\"*8h. ud8888. 888R Y888r 8X `8888X 8888> .@88u ~`8888~'888X`?888f` ",
|
||||
" \"8888 X888X .xH8 :888'8888. 888R I888> X888n. 8888X ?888> '\"888E` X888 888X '888> ",
|
||||
" `8\" X888!:888X d888 '88%\" 888R I888> '88888 8888X ?**h. 888E X888 888X '888> ",
|
||||
" =~` X888 X888X 8888.+\" 888R I888> `*88 8888~ x88x. 888E X888 888X '888> ",
|
||||
" :h. X8*` !888X 8888L u8888cJ888 ..<\" 88*` 88888X 888E X888 888X '888> ",
|
||||
" X888xX\" '8888..: '8888c. .+ \"*888*P\" ..XC. `*8888k 888& \"*88%\"\"*88\" '888!` ",
|
||||
":~`888f '*888*\" \"88888% 'Y\" :888888H. `%88> R888\" `~ \" `\"` ",
|
||||
" \"\" `\"` \"YP' < `\"888888: X\" \"\" ",
|
||||
" %888888x.-` ",
|
||||
" \"\"**\"\" ",
|
||||
"",
|
||||
""
|
||||
},
|
||||
shortcut = { { desc = " Open File Tree", group = "", key = 't', action = 'NvimTreeOpen' } },
|
||||
packages = { enable = false },
|
||||
project = { enable = true, limit = 8, icon = ' New file', action = 'Telescope find_files cwd=' },
|
||||
mru = { limit = 10, icon = ' History' },
|
||||
footer = {},
|
||||
}
|
||||
}
|
||||
|
||||
-- jumps cursor when was last cursor last time
|
||||
require("nvim-lastplace").setup({
|
||||
-- Filetypes to ignore
|
||||
ignore_filetypes = {
|
||||
"gitcommit", "gitrebase", "svn", "hgcommit", "xxd", "COMMIT_EDITMSG"
|
||||
},
|
||||
|
||||
-- Buffer types to ignore
|
||||
ignore_buftypes = {
|
||||
"quickfix", "nofile", "help", "terminal"
|
||||
},
|
||||
|
||||
-- Center cursor after jumping
|
||||
center_on_jump = true,
|
||||
|
||||
-- Only jump if target line is not visible
|
||||
jump_only_if_not_visible = false,
|
||||
|
||||
-- Minimum lines required to enable jumping
|
||||
min_lines = 10,
|
||||
|
||||
-- Maximum line to jump to (0 = no limit)
|
||||
max_line = 0,
|
||||
|
||||
-- Open folds after jumping
|
||||
open_folds = true,
|
||||
|
||||
-- Enable debug messages
|
||||
debug = false,
|
||||
})
|
||||
-- ======================
|
||||
-- gruvbox
|
||||
-- ======================
|
||||
|
||||
require("gruvbox").setup({
|
||||
terminal_colors = false, -- add neovim terminal colors
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = false,
|
||||
emphasis = true,
|
||||
comments = true,
|
||||
operators = false,
|
||||
folds = true,
|
||||
},
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "hard", -- can be "hard", "soft" or empty string
|
||||
palette_overrides = { -- for overrides see https://github.com/ellisonleao/gruvbox.nvim/blob/main/lua/gruvbox.lua
|
||||
dark0_hard = "#241F17"
|
||||
},
|
||||
overrides = {
|
||||
String = {fg = "#FFB878", italic = false},
|
||||
FoldColumn = {fg = faded_orange, bg = dark0_hard}
|
||||
},
|
||||
dim_inactive = false,
|
||||
transparent_mode = false,
|
||||
})
|
||||
vim.opt.termguicolors = false
|
||||
vim.o.background = "dark"
|
||||
vim.cmd("colorscheme gruvbox")
|
||||
-- =========================
|
||||
-- LUALINE
|
||||
-- =========================
|
||||
require('lualine').setup { options = { theme = "gruvbox_dark" } }
|
||||
|
||||
|
||||
--==================0
|
||||
-- Some utils
|
||||
--==================
|
||||
vim.keymap.set('n', '<leader>r1', '<cmd>Fugit2<CR>', { desc = 'Open git helper' })
|
||||
|
||||
vim.keymap.set("n", "t", function()
|
||||
local line = vim.api.nvim_get_current_line()
|
||||
|
||||
local result = vim.fn.system({ "custom-syllabes" }, line)
|
||||
|
||||
print(vim.trim(result))
|
||||
end, { desc = "Count syllables (current line)" })
|
||||
-- =========================
|
||||
-- telescope
|
||||
-- =======================
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>f1', builtin.find_files, { desc = 'Telescope find files' })
|
||||
vim.keymap.set('n', '<leader>f2', builtin.live_grep, { desc = 'Telescope live grep' })
|
||||
vim.keymap.set('n', '<leader>f3', builtin.buffers, { desc = 'Telescope buffers' })
|
||||
vim.keymap.set('n', '<leader>f4', builtin.help_tags, { desc = 'Telescope help tags' })
|
||||
|
||||
-- Disable relative numbers even if plugins override
|
||||
vim.api.nvim_create_autocmd("VimEnter", { callback = function() vim.opt.colorcolumn = ""; vim.opt.relativenumber = false end })
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
_: {
|
||||
programs.obsidian = {
|
||||
enable = true;
|
||||
|
||||
vaults = {
|
||||
miscellanious = {
|
||||
enable = true;
|
||||
target = "/Documents/Notes/miscellanious";
|
||||
};
|
||||
work = {
|
||||
enable = true;
|
||||
target = "/Documents/Notes/work";
|
||||
};
|
||||
};
|
||||
|
||||
defaultSettings = {
|
||||
appearance.theme = "gruvbox";
|
||||
|
||||
extraFiles = {
|
||||
".obsidian/themes/gruvbox/manifest.json" = ../../other/obsidian-theme/manifest.json;
|
||||
".obsidian/themes/gruvbox/obsidian.css" = ../../other/obsidian-theme/obsidian.css;
|
||||
".obsidian/themes/gruvbox/theme.css" = ../../other/obsidian-theme/theme.css;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
_: {
|
||||
programs.oh-my-posh = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
useTheme = "gruvbox";
|
||||
};
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
_: {
|
||||
programs.zsh.oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "jonathan";
|
||||
plugins = [
|
||||
"aliases"
|
||||
"alias-finder"
|
||||
"colored-man-pages"
|
||||
"colorize"
|
||||
"command-not-found"
|
||||
"dirhistory"
|
||||
"fzf"
|
||||
"git"
|
||||
"rclone"
|
||||
"safe-paste"
|
||||
"sudo"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
_:
|
||||
# see ../../docs/printing.md
|
||||
{
|
||||
home.file.".local/share/applications/org.quickshell.desktop" = {
|
||||
enable = true;
|
||||
text = ''
|
||||
[Desktop Entry]
|
||||
Name=QuickShell
|
||||
Comment=QuickShell application
|
||||
Exec=quickshell
|
||||
Icon=utilities-terminal
|
||||
Type=Application
|
||||
Categories=Utility;
|
||||
StartupNotify=true
|
||||
X-DBUS-ServiceName=org.quickshell
|
||||
'';
|
||||
};
|
||||
home.file.".local/share/applications/org.kde.PrintQueue.desktop" = {
|
||||
enable = true;
|
||||
text = ''
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Print Queue
|
||||
Exec=print-queue
|
||||
Icon=printer
|
||||
Categories=Utility;
|
||||
StartupNotify=true
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
_: {
|
||||
home.username = "tomasr";
|
||||
home.homeDirectory = "/home/tomasr";
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "neovim";
|
||||
TERMINAL = "kitty";
|
||||
};
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
# pulled from https://codeberg.org/zacoons/rivendell-hyprdots
|
||||
_: {
|
||||
qt.enable = true;
|
||||
programs.quickshell = {
|
||||
systemd.enable = true;
|
||||
enable = true;
|
||||
};
|
||||
home.file.".config/quickshell" = {
|
||||
source = ../../other/quickshell;
|
||||
recursive = true;
|
||||
};
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{pkgs-unstable, ...}: {
|
||||
programs.rclone = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.rclone;
|
||||
};
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
_: {
|
||||
programs.ripgrep = {
|
||||
enable = true;
|
||||
arguments = [
|
||||
"-S"
|
||||
"-."
|
||||
"-p"
|
||||
"-n"
|
||||
];
|
||||
};
|
||||
programs.ripgrep-all = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
_: {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
theme = "gruvbox-dark-hard";
|
||||
};
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
_: {
|
||||
home.packages = [
|
||||
#pkgs-unstable.sbb-tui
|
||||
];
|
||||
home.file.".config/sbb-tui/config.yaml" = {
|
||||
enable = true;
|
||||
# Gruvbox (from https://github.com/Necrom4/sbb-tui/blob/master/docs/themes.md)
|
||||
text = ''
|
||||
ui:
|
||||
nerdfont: true
|
||||
theme:
|
||||
text: "#EBDBB2"
|
||||
textMuted: "#928374"
|
||||
error: "#FB4934"
|
||||
warning: "#FB4934"
|
||||
borderFocused: "#FABD2F"
|
||||
borderUnfocused: "#504945"
|
||||
badgeKeyFg: "#282828"
|
||||
badgeKeyBg: "#FABD2F"
|
||||
badgeVehicleFg: "#EBDBB2"
|
||||
badgeVehicleBg: "#458588"
|
||||
badgeModelFg: "#282828"
|
||||
badgeModelBg: "#FB4934"
|
||||
badgeCompanyFg: "#282828"
|
||||
badgeCompanyBg: "#EBDBB2"
|
||||
logo: "#EBDBB2"
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
_: {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false; # will be removed in the futur. Removes evaluation warning
|
||||
matchBlocks."*" = {
|
||||
# equivalent to the default config
|
||||
forwardAgent = false;
|
||||
addKeysToAgent = "no";
|
||||
compression = false;
|
||||
serverAliveInterval = 0;
|
||||
serverAliveCountMax = 3;
|
||||
hashKnownHosts = false;
|
||||
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||
controlMaster = "no";
|
||||
controlPath = "~/.ssh/master-%r@%n:%p";
|
||||
controlPersist = "no";
|
||||
};
|
||||
};
|
||||
services.ssh-agent.enable = true;
|
||||
home.file.".ssh/config".text = ''
|
||||
Host *
|
||||
AddKeysToAgent yes
|
||||
IdentityFile ~/.ssh/id_ed25519
|
||||
'';
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
_: {
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color = "1e1e2e";
|
||||
bs-hl-color = "f5e0dc";
|
||||
caps-lock-bs-hl-color = "f5e0dc";
|
||||
caps-lock-key-hl-color = "a6e3a1";
|
||||
inside-color = "00000000";
|
||||
inside-clear-color = "00000000";
|
||||
inside-caps-lock-color = "00000000";
|
||||
inside-ver-color = "00000000";
|
||||
inside-wrong-color = "00000000";
|
||||
key-hl-color = "a6e3a1";
|
||||
layout-bg-color = "00000000";
|
||||
layout-border-color = "00000000";
|
||||
layout-text-color = "cdd6f4";
|
||||
line-color = "00000000";
|
||||
line-clear-color = "00000000";
|
||||
line-caps-lock-color = "00000000";
|
||||
line-ver-color = "00000000";
|
||||
line-wrong-color = "00000000";
|
||||
ring-color = "b4befe";
|
||||
ring-clear-color = "f5e0dc";
|
||||
ring-caps-lock-color = "fab387";
|
||||
ring-ver-color = "89b4fa";
|
||||
ring-wrong-color = "eba0ac";
|
||||
separator-color = "00000000";
|
||||
text-color = "cdd6f4";
|
||||
text-clear-color = "f5e0dc";
|
||||
text-caps-lock-color = "fab387";
|
||||
text-ver-color = "89b4fa";
|
||||
text-wrong-color = "eba0ac";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
_: {
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
_: {
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles.tomasr = {
|
||||
isDefault = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{pkgs-unstable, ...}: {
|
||||
home.file.".config/vivify/config.json" = {
|
||||
enable = true;
|
||||
text = ''
|
||||
{
|
||||
"browserOptions": {
|
||||
"name": "qutebrowser",
|
||||
"arguments": ["-T"]
|
||||
}
|
||||
}'';
|
||||
};
|
||||
home.packages = [
|
||||
pkgs-unstable.vivify
|
||||
];
|
||||
programs.qutebrowser = {
|
||||
enable = true;
|
||||
settings = {
|
||||
auto_save.session = false;
|
||||
changelog_after_upgrade = "never";
|
||||
content.cookies.accept = "never";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,693 +0,0 @@
|
||||
_: {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = [
|
||||
{
|
||||
layer = "top";
|
||||
position = "left";
|
||||
margin = "5 2 5 0";
|
||||
reload_style_on_change = true;
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
"group/info"
|
||||
"group/power"
|
||||
];
|
||||
modules-center = [
|
||||
];
|
||||
modules-right = [
|
||||
"hyprland/window"
|
||||
"group/brightness"
|
||||
"group/sound"
|
||||
"group/connection"
|
||||
"group/together"
|
||||
"tray"
|
||||
"battery"
|
||||
];
|
||||
# groups settings are organized by alphabetical order
|
||||
"group/audio" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = false;
|
||||
};
|
||||
modules = [
|
||||
"pulseaudio"
|
||||
"pulseaudio#mic"
|
||||
"pulseaudio/slider"
|
||||
];
|
||||
};
|
||||
"group/bluetooth" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = true;
|
||||
};
|
||||
modules = [
|
||||
"bluetooth"
|
||||
"bluetooth#status"
|
||||
];
|
||||
};
|
||||
"group/brightness" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = false;
|
||||
};
|
||||
modules = [
|
||||
"backlight"
|
||||
"backlight/slider"
|
||||
];
|
||||
};
|
||||
"group/connection" = {
|
||||
orientation = "inherit";
|
||||
modules = ["group/network"];
|
||||
};
|
||||
"group/gcpu" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"custom/cpu-icon"
|
||||
"temperature"
|
||||
"cpu"
|
||||
];
|
||||
};
|
||||
"group/info" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"group/gcpu"
|
||||
"memory"
|
||||
"disk"
|
||||
];
|
||||
};
|
||||
"group/network" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = true;
|
||||
};
|
||||
modules = [
|
||||
"network"
|
||||
"network#speed"
|
||||
];
|
||||
};
|
||||
"group/power" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"battery#w"
|
||||
"battery#powerdraw"
|
||||
];
|
||||
};
|
||||
"group/sound" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"group/audio"
|
||||
"custom/notification"
|
||||
];
|
||||
};
|
||||
"group/together" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"group/utils"
|
||||
"clock"
|
||||
];
|
||||
};
|
||||
"group/utils" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = true;
|
||||
};
|
||||
modules = [
|
||||
"custom/weather"
|
||||
"custom/colorpicker"
|
||||
];
|
||||
};
|
||||
# modules settings are organized by alphabetical order
|
||||
backlight = {
|
||||
device = "intel_backlight"; # my laptop is amd and it works
|
||||
format = "{icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
on-scroll-down = "brightnessctl s 5%-";
|
||||
on-scroll-up = "brightness s +5%";
|
||||
tooltip = true;
|
||||
tooltip-format = "Brightness: {percent}%";
|
||||
smooth-scrolling-threshold = 1;
|
||||
};
|
||||
"backlight/slider" = {
|
||||
min = 5;
|
||||
max = 100;
|
||||
orientation = "vertical";
|
||||
device = "intel_backlight";
|
||||
};
|
||||
battery = {
|
||||
#rotate = 90;
|
||||
interval = 30;
|
||||
states = {
|
||||
good = 95;
|
||||
warning = 20;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}";
|
||||
format-charging = "<b>{icon} {capacity}% </b>";
|
||||
format-full = "<span color='#82A55F'><b>{icon}</b></span>";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
tooltip-format = "{timeTo} {capacity} %";
|
||||
};
|
||||
"battery#powerdraw" = {
|
||||
rotate = 90;
|
||||
interval = 10;
|
||||
format = "{power:.0001f}";
|
||||
};
|
||||
"battery#w" = {
|
||||
rotate = 90;
|
||||
interval = 100000;
|
||||
format = "W";
|
||||
};
|
||||
bluetooth = {
|
||||
format-on = "";
|
||||
format-off = "";
|
||||
format-disabled = "";
|
||||
format-connected = "<b></b>";
|
||||
tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected";
|
||||
tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}";
|
||||
tooltip-format-enumerate-connected = "{device_alias}\t{device_address}";
|
||||
tooltip-format-enumerate-connected-battery = "{device_alias}\t{device_address}\t{device_battery_percentage}%";
|
||||
};
|
||||
"bluetooth#status" = {
|
||||
format-on = "";
|
||||
format-off = "";
|
||||
format-disabled = "";
|
||||
format-connected = "<b>{num_connections}</b>";
|
||||
format-connected-battery = "<small><b>{device_battery_percentage}%</b></small>";
|
||||
tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected";
|
||||
tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}";
|
||||
tooltip-format-enumerate-connected = "{device_alias}\t{device_address}";
|
||||
tooltip-format-enumerate-connected-battery = "{device_alias}\t{device_address}\t{device_battery_percentage}%";
|
||||
};
|
||||
clock = {
|
||||
format = "{:%H\n%M}";
|
||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||
calendar = {
|
||||
mode = "month";
|
||||
mode-mon-col = 3;
|
||||
weeks-pos = "right";
|
||||
on-scroll = 1;
|
||||
on-click-right = "mode";
|
||||
format = {
|
||||
today = "<span color='#d65d0e'><b><u>{}</u></b></span>";
|
||||
};
|
||||
};
|
||||
};
|
||||
cpu = {
|
||||
format = "<b>{usage}%</b>";
|
||||
};
|
||||
"custom/colorpicker" = {
|
||||
format = "";
|
||||
on-click = "hyprpicker | tee >(wl-copy) | cliphist store";
|
||||
};
|
||||
"custom/cpu-icon" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/mark" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/weather" = {
|
||||
format = "{}";
|
||||
interval = 3600;
|
||||
exec = "custom-weatherwaybar";
|
||||
return-type = "json";
|
||||
};
|
||||
disk = {
|
||||
interval = 600;
|
||||
format = "<b> \n{percentage_used}</b>";
|
||||
path = "/"; #maybe we should subtract ~/kdrive if it is counted
|
||||
};
|
||||
"hyprland/window" = {
|
||||
format = "{class}";
|
||||
rotate = 90;
|
||||
};
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
"1" = "";
|
||||
"2" = "";
|
||||
"3" = "";
|
||||
"4" = "";
|
||||
"5" = "";
|
||||
"6" = "";
|
||||
"7" = "";
|
||||
"8" = "";
|
||||
"9" = "";
|
||||
"10" = "";
|
||||
"active" = "";
|
||||
"default" = "";
|
||||
};
|
||||
persistent-workspaces = {
|
||||
"*" = [1 2 3 4 5 6 7 8 9 10];
|
||||
};
|
||||
};
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
tooltip-format-activated = "Idle Inhibitor is active";
|
||||
tooltip-format-deactivated = "Idle Inhibitor is not active";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
memory = {
|
||||
format = "<b> \n{:2}</b>";
|
||||
};
|
||||
network = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
wifi = [""];
|
||||
ethernet = [""];
|
||||
disconnected = [""];
|
||||
};
|
||||
format-wifi = "";
|
||||
format-ethernet = "";
|
||||
format-disconnected = "";
|
||||
format-linked = "";
|
||||
tooltip = false;
|
||||
};
|
||||
"network#speed" = {
|
||||
format = " {bandwidthDownBits} ";
|
||||
rotate = 90;
|
||||
interval = 5;
|
||||
tooltip-format = "{ipaddr}";
|
||||
tooltip-format-wifi = "{essid} ({signalStrength}%) \n{ipaddr} | {frequency} MHz{icon} ";
|
||||
tooltip-format-ethernet = "{ifname} \n{ipaddr} | {frequency} MHz{icon} ";
|
||||
tooltip-format-disconnected = "Not Connected to any type of Network";
|
||||
tooltip = true;
|
||||
};
|
||||
power-profiles-daemon = {
|
||||
format = "{icon}";
|
||||
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
|
||||
tooltip = true;
|
||||
format-icons = {
|
||||
default = "";
|
||||
performance = "<span color='#B37F34'><small></small></span>";
|
||||
balanced = "<span><small> </small></span>";
|
||||
power-saver = "<span color='#a6e3a1'><small></small></span>";
|
||||
};
|
||||
};
|
||||
pulseaudio = {
|
||||
format = "{icon}";
|
||||
format-bluetooth = "{icon}";
|
||||
tooltip-format = "{volume}% {icon} | {desc}";
|
||||
format-muted = "";
|
||||
format-icons = {
|
||||
headphones = "";
|
||||
handsfree = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = " ";
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
on-click = "volume mute";
|
||||
on-click-middle = "pavucontrol";
|
||||
on-scroll-up = "pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
on-scroll-down = "pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
||||
smooth-scrolling-threshold = 1;
|
||||
};
|
||||
"pulseaudio#mic" = {
|
||||
format = "{format_source}";
|
||||
format-source = "";
|
||||
format-source-muted = "";
|
||||
tooltip-format = "{volume}% {format_source}";
|
||||
on-click = "pactl set-source-mute 0 toggle";
|
||||
on-scroll-down = "pactl set-source-volume 0 -1%";
|
||||
on-scroll-up = "pactl set-source-volume 0 +1%";
|
||||
};
|
||||
"pulseaudio/slider" = {
|
||||
min = 0;
|
||||
max = 140;
|
||||
orientation = "vertical";
|
||||
};
|
||||
temperature = {
|
||||
format = "{temperatureC}°C";
|
||||
format-critical = "{temperatureC}°C";
|
||||
interval = 10;
|
||||
};
|
||||
tray = {
|
||||
icon-size = 18;
|
||||
spacing = 10;
|
||||
};
|
||||
}
|
||||
]; # home-manager wants the whole config as a list of bars
|
||||
style = ''
|
||||
@define-color foreground #c5c5c5;
|
||||
@define-color background #191919;
|
||||
@define-color cursor #c5c5c5;
|
||||
|
||||
@define-color color0 #191919;
|
||||
@define-color color1 #3a3632;
|
||||
@define-color color2 #582c1e;
|
||||
@define-color color3 #423f39;
|
||||
@define-color color4 #50473c;
|
||||
@define-color color5 #634723;
|
||||
@define-color color6 #BAA470;
|
||||
@define-color color7 #8c8c8c;
|
||||
@define-color color8 #525252;
|
||||
@define-color color9 #4e4843;
|
||||
@define-color color10 #763b28;
|
||||
@define-color color11 #59554c;
|
||||
@define-color color12 #6b5f51;
|
||||
@define-color color13 #855f2f;
|
||||
@define-color color14 #796d62;
|
||||
@define-color color15 #c5c5c5;
|
||||
|
||||
@define-color active @color6;
|
||||
|
||||
* {
|
||||
font-size: 23px;
|
||||
font-family: "0xProto Nerd Font";
|
||||
min-width: 8px;
|
||||
min-height: 0px;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
border-radius: 8px;
|
||||
border: 2px solid @active;
|
||||
background: @background;
|
||||
background: alpha(@background, 0.7);
|
||||
color: lighter(@active);
|
||||
}
|
||||
|
||||
menu,
|
||||
tooltip {
|
||||
border-radius: 8px;
|
||||
padding: 2px;
|
||||
border: 1px solid lighter(@active);
|
||||
background: alpha(@background, 0.6);
|
||||
|
||||
color: lighter(@active);
|
||||
}
|
||||
|
||||
menu label,
|
||||
tooltip label {
|
||||
font-size: 20px;
|
||||
color: lighter(@active);
|
||||
}
|
||||
|
||||
#submap,
|
||||
#tray>.needs-attention {
|
||||
animation-name: blink-active;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
.modules-right {
|
||||
margin: 0px 6px 6px 6px;
|
||||
border-radius: 4px;
|
||||
background: alpha(@background, 0.4);
|
||||
color: lighter(@active);
|
||||
}
|
||||
|
||||
.modules-left {
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
margin: 6px 6px 6px 6px;
|
||||
border-radius: 4px;
|
||||
background: alpha(@background, 0.4);
|
||||
color: lighter(@active);
|
||||
}
|
||||
|
||||
#gcpu,
|
||||
#custom-github,
|
||||
#memory,
|
||||
#disk,
|
||||
#together,
|
||||
#submap,
|
||||
#custom-weather {
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
#custom-recorder,
|
||||
#connection,
|
||||
#cnoti,
|
||||
#brightness,
|
||||
#power,
|
||||
#custom-updates,
|
||||
#tray,
|
||||
#audio,
|
||||
#privacy,
|
||||
#sound {
|
||||
border-radius: 4px;
|
||||
margin: 2px 2px 4px 2px;
|
||||
background: alpha(darker(@active), 0.3);
|
||||
}
|
||||
|
||||
#custom-notifications {
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
#custom-hotspot,
|
||||
#custom-github,
|
||||
#custom-notifications {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
#custom-hotspot {
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
#custom-vpn,
|
||||
#custom-hotspot {
|
||||
background: alpha(darker(@active), 0.3);
|
||||
}
|
||||
|
||||
#privacy-item {
|
||||
padding: 6px 0px 6px 6px;
|
||||
}
|
||||
|
||||
#gcpu {
|
||||
padding: 8px 0px 8px 0px;
|
||||
}
|
||||
|
||||
#custom-cpu-icon {
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
#custom-cputemp,
|
||||
#temperature {
|
||||
font-size: 17px;
|
||||
}
|
||||
#disk,
|
||||
#memory,
|
||||
#cpu {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#custom-github {
|
||||
padding-top: 2px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
#custom-dmark {
|
||||
color: alpha(@foreground, 0.3);
|
||||
}
|
||||
|
||||
#submap {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
#hyprland.window {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
margin: 0px 2px;
|
||||
padding: 4px 0px 0px 0px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
color: @foreground;
|
||||
background: transparent;
|
||||
border-radius: 4px;
|
||||
color: alpha(@foreground, 0.3);
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
font-weight: bold;
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
padding: 4px 2px;
|
||||
background: alpha(@active, 0.4);
|
||||
color: lighter(@active);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#network.wifi {
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
#submap {
|
||||
min-width: 0px;
|
||||
margin: 4px 6px 4px 6px;
|
||||
}
|
||||
|
||||
#tray {
|
||||
padding: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
#bluetooth {
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
#window {
|
||||
border-radius: 8px;
|
||||
padding: 4px 14px;
|
||||
margin: 4px 2px 4px 2px;
|
||||
}
|
||||
|
||||
#battery {
|
||||
font-size: 17px;
|
||||
border-radius: 8px;
|
||||
padding: 4px 0px;
|
||||
margin: 4px 2px 4px 2px;
|
||||
}
|
||||
|
||||
#battery.discharging.warning {
|
||||
animation-name: blink-yellow;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#battery.discharging.critical {
|
||||
animation-name: blink-red;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#battery.powerdraw {
|
||||
font-size: 17px;
|
||||
padding: 0;
|
||||
margin-right: -20px;
|
||||
margin-left: -20px;
|
||||
}
|
||||
#battery.w {
|
||||
font-size: 17px;
|
||||
padding: 0;
|
||||
margin-left: -20px;
|
||||
margin-right: -20px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
padding: 4px 2px 2px 2px;
|
||||
}
|
||||
|
||||
#pulseaudio.mic {
|
||||
border-radius: 4px;
|
||||
color: @background;
|
||||
background: alpha(darker(@foreground), 0.6);
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
#backlight-slider slider,
|
||||
#pulseaudio-slider slider {
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#backlight-slider trough,
|
||||
#pulseaudio-slider trough {
|
||||
margin-top: 4px;
|
||||
min-width: 6px;
|
||||
min-height: 60px;
|
||||
border-radius: 8px;
|
||||
background-color: alpha(@background, 0.6);
|
||||
}
|
||||
|
||||
#backlight-slider highlight,
|
||||
#pulseaudio-slider highlight {
|
||||
border-radius: 8px;
|
||||
background-color: lighter(@active);
|
||||
}
|
||||
|
||||
#bluetooth.discoverable,
|
||||
#bluetooth.discovering,
|
||||
#bluetooth.pairable {
|
||||
border-radius: 8px;
|
||||
animation-name: blink-active;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
@keyframes blink-active {
|
||||
to {
|
||||
background-color: @active;
|
||||
color: @foreground;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes blink-red {
|
||||
to {
|
||||
background-color: #c64d4f;
|
||||
color: @foreground;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes blink-yellow {
|
||||
to {
|
||||
background-color: #cf9022;
|
||||
color: @foreground;
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user