formated whole config with alejandra

This commit is contained in:
Tomas Rivera
2026-03-08 19:02:23 +01:00
parent 0564b1d418
commit 5be7198efe
52 changed files with 3724 additions and 3623 deletions
+26 -21
View File
@@ -11,41 +11,46 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
# never got nixvim to wokrs. ): # never got nixvim to wokrs. ):
# nixvim = { # nixvim = {
# url = "github:nix-community/nixvim/nixos-25.11"; # url = "github:nix-community/nixvim/nixos-25.11";
# }; # };
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, nixos-grub-themes, ... }@inputs: outputs = {
let self,
nixpkgs,
nixpkgs-unstable,
home-manager,
nixos-grub-themes,
...
} @ inputs: let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
pkgs-unstable = import nixpkgs-unstable { pkgs-unstable = import nixpkgs-unstable {
inherit system; inherit system;
config.allowUnfree = false; config.allowUnfree = false;
}; };
in in {
{
nixosConfigurations = { nixosConfigurations = {
laptop = nixpkgs.lib.nixosSystem { laptop = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs pkgs-unstable;}; specialArgs = {inherit inputs pkgs-unstable;};
modules = [ modules = [
./hosts/laptop/configuration.nix ./hosts/laptop/configuration.nix
]; ];
}; };
}; };
# we use home-manager directly inside of configuration.nix # we use home-manager directly inside of configuration.nix
# last time i tried to use flake i broke everything ): # last time i tried to use flake i broke everything ):
# homeManagerConfigurations = { # homeManagerConfigurations = {
# tomasr = home-manager.lib.homeManagerConfiguration { # tomasr = home-manager.lib.homeManagerConfiguration {
# pkgs = pkgs; # pkgs = pkgs;
# system = "x86_64-linux"; # system = "x86_64-linux";
# username = "tomasr"; # username = "tomasr";
# homeDirectory = "/home/tomasr"; # homeDirectory = "/home/tomasr";
# modules = [ # modules = [
# ./hosts/laptop/home.nix # ./hosts/laptop/home.nix
# #nixvim.homeModules.default # #nixvim.homeModules.default
#]; #];
# Import your Home Manager module # Import your Home Manager module
# configuration = ./hosts/laptop/home.nix; # configuration = ./hosts/laptop/home.nix;
@@ -53,5 +58,5 @@
# }; # };
#}; #};
#}; #};
}; };
} }
+96 -101
View File
@@ -1,11 +1,16 @@
# Edit this configuration file to define what should be installed on # Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, pkgs-unstable, libs, inputs, ... }:
{ {
imports = config,
[ # Include the results of the hardware scan. pkgs,
pkgs-unstable,
libs,
inputs,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
../../modules/nixos/battery.nix ../../modules/nixos/battery.nix
@@ -15,38 +20,33 @@
../../modules/nixos/udevsimple.nix ../../modules/nixos/udevsimple.nix
]; ];
documentation.man.generateCaches = true; # used for the man script
documentation.man.generateCaches = true; # used for the man script # grub theme
boot.loader.grub = {
# grub theme
boot.loader.grub = {
theme = inputs.nixos-grub-themes.packages.${pkgs.system}.nixos; # if you want to use nixos grub theme theme = inputs.nixos-grub-themes.packages.${pkgs.system}.nixos; # if you want to use nixos grub theme
}; };
nix.nixPath = [ nix.nixPath = [
"nixpkgs=${inputs.nixpkgs.outPath}" "nixpkgs=${inputs.nixpkgs.outPath}"
"home-manager=${inputs.home-manager.outPath}" "home-manager=${inputs.home-manager.outPath}"
]; #manix is unhappy without this ]; #manix is unhappy without this
home-manager = {
home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
users = { users = {
tomasr = ./home.nix; tomasr = ./home.nix;
}; };
extraSpecialArgs = { inherit pkgs-unstable; }; extraSpecialArgs = {inherit pkgs-unstable;};
}; };
environment.pathsToLink = [
environment.pathsToLink = [
"/share/applications" "/share/applications"
"/share/xdg-desktop-portal" "/share/xdg-desktop-portal"
]; ];
# removes uxterm # removes uxterm
services.xserver.excludePackages = [ pkgs.xterm ]; services.xserver.excludePackages = [pkgs.xterm];
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
@@ -73,29 +73,26 @@ services.xserver.excludePackages = [ pkgs.xterm ];
# zsh dont want to work if it is not initialzed here. # zsh dont want to work if it is not initialzed here.
programs.zsh.enable = true; programs.zsh.enable = true;
# Enable the GNOME Desktop Environment. # Enable the GNOME Desktop Environment.
# services.displayManager.gdm.enable = true; # services.displayManager.gdm.enable = true;
# services.desktopManager.gnome.enable = true; # services.desktopManager.gnome.enable = true;
# we dont use gnome but some utils yes -> see pckgs # we dont use gnome but some utils yes -> see pckgs
#enable sddm #enable sddm
#services.displayManager.sddm = { #services.displayManager.sddm = {
# enable = true; # enable = true;
# wayland.enable = true; # wayland.enable = true;
#}; #};
# we use ly as the displayManager. see ../../modules/nixos/ly.nix # we use ly as the displayManager. see ../../modules/nixos/ly.nix
# enable hyprland WM
# enable hyprland WM programs.hyprland = {
programs.hyprland = {
enable = true; enable = true;
package = pkgs-unstable.hyprland; # we use the unstable branch to get the latest features package = pkgs-unstable.hyprland; # we use the unstable branch to get the latest features
withUWSM = true; withUWSM = true;
xwayland.enable = true; xwayland.enable = true;
}; };
services.upower.enable = true;
services.upower.enable = true;
# Configure keymap in X11 # Configure keymap in X11
services.xserver.xkb = { services.xserver.xkb = {
@@ -132,13 +129,12 @@ services.upower.enable = true;
users.users.tomasr = { users.users.tomasr = {
isNormalUser = true; isNormalUser = true;
description = "Tomas Rivera"; description = "Tomas Rivera";
extraGroups = [ "networkmanager" "wheel" ]; #wheel allow to use sudo extraGroups = ["networkmanager" "wheel"]; #wheel allow to use sudo
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
#adds nixos experimental features: #adds nixos experimental features:
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = ["nix-command" "flakes"];
# Garbage collector of generations # Garbage collector of generations
nix.gc = { nix.gc = {
@@ -153,71 +149,71 @@ services.upower.enable = true;
# Allow unfree packages # Allow unfree packages
nixpkgs.config.allowUnfree = false; nixpkgs.config.allowUnfree = false;
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# use pkgs-unstable if you want the package from the unstable channel # use pkgs-unstable if you want the package from the unstable channel
#we need to install gnome and kde utils individually as we dont use gnome #we need to install gnome and kde utils individually as we dont use gnome
gnome-calculator gnome-calculator
snapshot snapshot
gnome-characters gnome-characters
gnome-disk-utility gnome-disk-utility
kdePackages.okular kdePackages.okular
nautilus nautilus
gnome-font-viewer gnome-font-viewer
wget wget
tree # shows dir in tree tree # shows dir in tree
zsh # better bash zsh # better bash
brightnessctl # control brightness brightnessctl # control brightness
pulseaudio # sound server pulseaudio # sound server
playerctl # controls media player playerctl # controls media player
blueman # GTK-based Bluetooth Manager blueman # GTK-based Bluetooth Manager
udiskie # removable disk automounter for udisks udiskie # removable disk automounter for udisks
networkmanagerapplet # NetworkManager control applet networkmanagerapplet # NetworkManager control applet
cliphist # Wayland clipboard manager cliphist # Wayland clipboard manager
wl-clipboard # cli copy/past utilities for Wayland wl-clipboard # cli copy/past utilities for Wayland
jp # lightweight and flexible cli JSON parser jp # lightweight and flexible cli JSON parser
notepad-next notepad-next
libnotify # Library that sends desktop notifications to a notification daemon libnotify # Library that sends desktop notifications to a notification daemon
hyprkeys # keybind helper hyprkeys # keybind helper
cowsay cowsay
cmatrix cmatrix
swww #wallpaper daemon swww #wallpaper daemon
socat # Utility for bidirectional data transfer between two independent data channels (used to communicate between hyprland and swww to change wallpapers dinamically) socat # Utility for bidirectional data transfer between two independent data channels (used to communicate between hyprland and swww to change wallpapers dinamically)
gcc # GNU C compiler gcc # GNU C compiler
libreoffice libreoffice
gruvbox-gtk-theme gruvbox-gtk-theme
hyprpicker hyprpicker
powertop powertop
inetutils # collections of network programs such as telnet inetutils # collections of network programs such as telnet
python313Packages.pygments # used for ccat (comment of colorize plugin from oh-my-zsh) python313Packages.pygments # used for ccat (comment of colorize plugin from oh-my-zsh)
fzf fzf
jq # json parser used in some scripts jq # json parser used in some scripts
bottom # Cross-platform graphical process/system monitor with a customizable interface bottom # Cross-platform graphical process/system monitor with a customizable interface
cmatrix cmatrix
tomato-c # pomodoro timer tomato-c # pomodoro timer
pavucontrol # PulseAudio Volume Control pavucontrol # PulseAudio Volume Control
hyprshot hyprshot
hyprcursor hyprcursor
vial # Open-source GUI and QMK fork for configuring your keyboard in real time vial # Open-source GUI and QMK fork for configuring your keyboard in real time
mplayer # Movie player that supports many video formats mplayer # Movie player that supports many video formats
chromium # used only to flash the firmware on my framework laptop 16 (keyboard.frame.work) as only chromium based browser support webHID. chromium # used only to flash the firmware on my framework laptop 16 (keyboard.frame.work) as only chromium based browser support webHID.
capitaine-cursors-themed # cursor theme capitaine-cursors-themed # cursor theme
usbutils # used for lsusb usbutils # used for lsusb
# used for the framework 16 laptop # used for the framework 16 laptop
framework-tool framework-tool
framework-tool-tui framework-tool-tui
#some nix tools #some nix tools
manix manix
deadnix deadnix
]; alejandra
];
# fonts # fonts
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
nerd-fonts._0xproto nerd-fonts._0xproto
]; ];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.
@@ -245,5 +241,4 @@ nerd-fonts._0xproto
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "25.11"; # Did you read the comment? system.stateVersion = "25.11"; # Did you read the comment?
} }
+18 -14
View File
@@ -1,30 +1,34 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usb_storage" "usbhid" "sd_mod"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/6aa664c2-8b23-4e20-b6e9-1806bf0f8df2"; device = "/dev/disk/by-uuid/6aa664c2-8b23-4e20-b6e9-1806bf0f8df2";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/A59A-7AFA"; device = "/dev/disk/by-uuid/A59A-7AFA";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = ["fmask=0077" "dmask=0077"];
}; };
swapDevices = [ ]; swapDevices = [];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+132 -136
View File
@@ -1,163 +1,159 @@
{ config, pkgs, inputs, ... }:
{ {
# every import imports a specific module for an app. This module contains the enabling of this app and its settings. config,
# So if you want to add an home-manager app create a module which enables it and configures it and import it. pkgs,
imports = [ inputs,
# 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 # every import imports a specific module for an app. This module contains the enabling of this app and its settings.
../../modules/home-manager/zsh.nix # better bash # So if you want to add an home-manager app create a module which enables it and configures it and import it.
../../modules/home-manager/git.nix imports = [
../../modules/home-manager/ssh.nix # app modules
../../modules/home-manager/fastfetch.nix ../../modules/home-manager/kitty.nix # terminal # use absolute path with --impure flag or go back to /etc/nixos and use relative
../../modules/home-manager/hyprland.nix ../../modules/home-manager/zoxide.nix # better cd
../../modules/home-manager/wlogout.nix # logout utility ../../modules/home-manager/zsh.nix # better bash
../../modules/home-manager/rofi.nix # launcher and keybindings helper ../../modules/home-manager/git.nix
../../modules/home-manager/swaync.nix # notification daemon ../../modules/home-manager/ssh.nix
../../modules/home-manager/neovim.nix # dont use nixvim. broken ../../modules/home-manager/fastfetch.nix
#../../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/hyprland.nix
../../modules/home-manager/rclone.nix ../../modules/home-manager/wlogout.nix # logout utility
../../modules/home-manager/waybar.nix ../../modules/home-manager/rofi.nix # launcher and keybindings helper
#../../modules/home-manager/oh-my-posh.nix # zsh customizer ../../modules/home-manager/swaync.nix # notification daemon
../../modules/home-manager/oh-my-zsh.nix # another zsh customizer ../../modules/home-manager/neovim.nix # dont use nixvim. broken
../../modules/home-manager/hypridle.nix #../../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/swaylock.nix ../../modules/home-manager/rclone.nix
../../modules/home-manager/anki.nix # we use only for some settings. see ../../modules/nixos/anki.nix for activating ../../modules/home-manager/waybar.nix
../../modules/home-manager/librewolf.nix # privacy browser #../../modules/home-manager/oh-my-posh.nix # zsh customizer
../../modules/home-manager/cursor.nix # cursor (the icon not the app) ../../modules/home-manager/oh-my-zsh.nix # another zsh customizer
../../modules/home-manager/ripgrep.nix # better grep ../../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
];
#programs.nixvim = {
# enable = true;
# imports = [ ../../modules/nixvim/neovim.nix ];
#programs.nixvim = { # package = pkgs.neovim;
# enable = true; #};
# imports = [ ../../modules/nixvim/neovim.nix ]; # Home Manager needs a bit of information about you and the paths it should
# package = pkgs.neovim;
#};
# Home Manager needs a bit of information about you and the paths it should
# Required for Home Manager # Required for Home Manager
home.username = "tomasr"; home.username = "tomasr";
home.homeDirectory = "/home/tomasr"; home.homeDirectory = "/home/tomasr";
home.stateVersion = "25.11"; # match your Home Manager release home.stateVersion = "25.11"; # match your Home Manager release
# This value determines the Home Manager release that your configuration is # This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release # compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes. # introduces backwards incompatible changes.
# #
# You should not change this value, even if you update Home Manager. If you do # 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 # want to update the value, then make sure to first check the Home Manager
# release notes. # release notes.
# The home.packages option allows you to install Nix packages into your # The home.packages option allows you to install Nix packages into your
# environment. # environment.
home.packages = [ home.packages = [
#scritps #scritps
(pkgs.callPackage ../../modules/scripts/dontkillsteam.nix {}) # kill app (if it is steam put it in some background (pkgs.callPackage ../../modules/scripts/dontkillsteam.nix {}) # kill app (if it is steam put it in some background
(pkgs.callPackage ../../modules/scripts/batterynotify.nix {}) (pkgs.callPackage ../../modules/scripts/batterynotify.nix {})
(pkgs.callPackage ../../modules/scripts/batterywarning.nix {}) (pkgs.callPackage ../../modules/scripts/batterywarning.nix {})
(pkgs.callPackage ../../modules/scripts/weather.nix {}) (pkgs.callPackage ../../modules/scripts/weather.nix {})
(pkgs.callPackage ../../modules/scripts/cowsay.nix {}) (pkgs.callPackage ../../modules/scripts/cowsay.nix {})
(pkgs.callPackage ../../modules/scripts/wallpaper.nix {}) (pkgs.callPackage ../../modules/scripts/wallpaper.nix {})
(pkgs.callPackage ../../modules/scripts/mountkdrive.nix {}) (pkgs.callPackage ../../modules/scripts/mountkdrive.nix {})
(pkgs.callPackage ../../modules/scripts/weatherwaybar.nix {}) (pkgs.callPackage ../../modules/scripts/weatherwaybar.nix {})
(pkgs.callPackage ../../modules/scripts/colorpicker.nix {}) (pkgs.callPackage ../../modules/scripts/colorpicker.nix {})
(pkgs.callPackage ../../modules/scripts/killall.nix {}) # kill all windows except focused window (pkgs.callPackage ../../modules/scripts/killall.nix {}) # kill all windows except focused window
(pkgs.callPackage ../../modules/scripts/launch.nix {}) # necessary for the apps i launch with hyprland at every start (pkgs.callPackage ../../modules/scripts/launch.nix {}) # necessary for the apps i launch with hyprland at every start
(pkgs.callPackage ../../modules/scripts/gitnotify.nix {}) (pkgs.callPackage ../../modules/scripts/gitnotify.nix {})
(pkgs.callPackage ../../modules/scripts/tomato.nix {}) (pkgs.callPackage ../../modules/scripts/tomato.nix {})
(pkgs.callPackage ../../modules/scripts/librewolfprofiles.nix {}) (pkgs.callPackage ../../modules/scripts/librewolfprofiles.nix {})
(pkgs.callPackage ../../modules/scripts/performance-mode.nix {}) (pkgs.callPackage ../../modules/scripts/performance-mode.nix {})
(pkgs.callPackage ../../modules/scripts/btm.nix {}) (pkgs.callPackage ../../modules/scripts/btm.nix {})
(pkgs.callPackage ../../modules/scripts/manix.nix {}) (pkgs.callPackage ../../modules/scripts/manix.nix {})
(pkgs.callPackage ../../modules/scripts/man.nix {}) (pkgs.callPackage ../../modules/scripts/man.nix {})
#pkgs #pkgs
pkgs.gruvbox-gtk-theme pkgs.gruvbox-gtk-theme
# # Adds the 'hello' command to your environment. It prints a friendly # # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run. # # "Hello, world!" when run.
# pkgs.hello # pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying # # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the # # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of # # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts? # # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your # # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your # # configuration. For example, this adds a command 'my-hello' to your
# # environment: # # environment:
# (pkgs.writeShellScriptBin "my-hello" '' # (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!" # echo "Hello, ${config.home.username}!"
# '') # '')
]; ];
#maybe migrate both of them in a separate file #maybe migrate both of them in a separate file
# gtk config # gtk config
gtk.theme = { gtk.theme = {
enable = true; enable = true;
Gruvbox-GTK-Theme-BL-MB = { Gruvbox-GTK-Theme-BL-MB = {
enable = true; enable = true;
name = "Gruvbox-GTK-Theme-BL-MB"; name = "Gruvbox-GTK-Theme-BL-MB";
package = pkgs.gruvbox-gtk-theme; package = pkgs.gruvbox-gtk-theme;
}; };
}; };
# ssh config # ssh config
programs.ssh.enable = true; programs.ssh.enable = true;
services.ssh-agent.enable = true; services.ssh-agent.enable = true;
home.file.".ssh/config".text = '' home.file.".ssh/config".text = ''
Host * Host *
AddKeysToAgent yes AddKeysToAgent yes
IdentityFile ~/.ssh/id_ed25519 IdentityFile ~/.ssh/id_ed25519
''; '';
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# Home Manager is pretty good at managing dotfiles. The primary way to manage # Home Manager can also manage your environment variables through
# plain files is through 'home.file'. # 'home.sessionVariables'. These will be explicitly sourced when using a
home.file = { # shell provided by Home Manager. If you don't want to manage your shell
# # Building this configuration will create a copy of 'dotfiles/screenrc' in # through Home Manager then you have to manually source 'hm-session-vars.sh'
# # the Nix store. Activating the configuration will then make '~/.screenrc' a # located at either
# # symlink to the Nix store copy. #
# ".screenrc".source = dotfiles/screenrc; # ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# # You can also set the file content immediately. # or
# ".gradle/gradle.properties".text = '' #
# org.gradle.console=verbose # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
# org.gradle.daemon.idletimeout=3600000 #
# ''; # or
}; #
# /etc/profiles/per-user/tomasr/etc/profile.d/hm-session-vars.sh
#
# Home Manager can also manage your environment variables through home.sessionVariables = {
# 'home.sessionVariables'. These will be explicitly sourced when using a
# shell provided by Home Manager. If you don't want to manage your shell
# through Home Manager then you have to manually source 'hm-session-vars.sh'
# located at either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/tomasr/etc/profile.d/hm-session-vars.sh
#
home.sessionVariables = {
EDITOR = "neovim"; EDITOR = "neovim";
# Git update function # Git update function
# Prompts for commit message; defaults if empty # Prompts for commit message; defaults if empty
TERMINAL = "kitty"; TERMINAL = "kitty";
}; };
# Let Home Manager install and manage itself.
# Let Home Manager install and manage itself. programs.home-manager.enable = true;
programs.home-manager.enable = true;
} }
+4 -1
View File
@@ -1,5 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
programs.anki = { programs.anki = {
# we enable system wide with nixpkgs because it offers some addon configuration. We just use this for some config # we enable system wide with nixpkgs because it offers some addon configuration. We just use this for some config
#enable = true; #enable = true;
+5 -3
View File
@@ -1,7 +1,9 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
services.batsignal = { services.batsignal = {
enable = true; enable = true;
}; };
} }
+4 -1
View File
@@ -1,5 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
home.pointerCursor = { home.pointerCursor = {
hyprcursor.enable = true; hyprcursor.enable = true;
enable = true; enable = true;
+5 -4
View File
@@ -1,7 +1,9 @@
{ config, pkgs, ... }:
{ {
# Adapted from https://github.com/dacrab/fastfetch-config/blob/main/config.jsonc config,
pkgs,
...
}: {
# Adapted from https://github.com/dacrab/fastfetch-config/blob/main/config.jsonc
programs.fastfetch = { programs.fastfetch = {
enable = true; enable = true;
@@ -12,7 +14,6 @@
}; };
modules = [ modules = [
# ───────────── Hardware ───────────── # ───────────── Hardware ─────────────
{ {
+4 -2
View File
@@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
programs.git = { programs.git = {
enable = true; enable = true;
settings = { settings = {
+4 -3
View File
@@ -1,7 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
services.hypridle = { services.hypridle = {
enable = true; enable = true;
settings = { settings = {
+123 -131
View File
@@ -1,16 +1,16 @@
{ config, pkgs, pkgs-unstable, ... }:
let
wallpaper = ../../assets/wallpaper1.jpg;
in
{ {
config,
pkgs,
pkgs-unstable,
...
}: let
wallpaper = ../../assets/wallpaper1.jpg;
in {
#refer to https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/ #refer to https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/
wayland.windowManager.hyprland.enable = true; wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.package = pkgs-unstable.hyprland; wayland.windowManager.hyprland.package = pkgs-unstable.hyprland;
#hint Electron apps to use on wayland; #hint Electron apps to use on wayland;
home.sessionVariables.NIXOS_OZONE_WL="1"; home.sessionVariables.NIXOS_OZONE_WL = "1";
wayland.windowManager.hyprland.plugins = [ wayland.windowManager.hyprland.plugins = [
#pkgs-unstable.hyprlandPlugins.hyprspace # currently broken #pkgs-unstable.hyprlandPlugins.hyprspace # currently broken
@@ -22,8 +22,8 @@ in
"$editor" = "nvim"; "$editor" = "nvim";
"$file" = "nautilus"; "$file" = "nautilus";
"$browser" = "kitty --class \"custom-librewolfprofiles\" --name \"Select LibreWolf profile\" --hold custom-librewolfprofiles"; "$browser" = "kitty --class \"custom-librewolfprofiles\" --name \"Select LibreWolf profile\" --hold custom-librewolfprofiles";
# ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█ # ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█
# █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█ # █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█
animations = { animations = {
enabled = true; enabled = true;
bezier = [ bezier = [
@@ -44,8 +44,8 @@ in
]; ];
}; };
# █▀▀ █▄░█ █░█ # █▀▀ █▄░█ █░█
# ██▄ █░▀█ ▀▄▀ # ██▄ █░▀█ ▀▄▀
# See https://wiki.hyprland.org/Configuring/Environment-variables/ # See https://wiki.hyprland.org/Configuring/Environment-variables/
env = [ env = [
@@ -60,18 +60,18 @@ in
"GDK_SCALE,1" "GDK_SCALE,1"
]; ];
# █ █▄░█ █▀█ █░█ ▀█▀ # █ █▄░█ █▀█ █░█ ▀█▀
# █ █░▀█ █▀▀ █▄█ ░█░ # █ █░▀█ █▀▀ █▄█ ░█░
input = { input = {
kb_layout = [ "ch" ]; kb_layout = ["ch"];
follow_mouse = 1; follow_mouse = 1;
sensitivity = 0; sensitivity = 0;
force_no_accel = 1; force_no_accel = 1;
}; };
# █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄ █ █▄░█ █▀▀ █▀ # █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄ █ █▄░█ █▀▀ █▀
# █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ █ █░▀█ █▄█ ▄█ # █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ █ █░▀█ █▄█ ▄█
# binds to do # binds to do
bind = [ bind = [
@@ -151,12 +151,11 @@ in
"Ctrl+Alt, 0, exec, custom-tomato" # pos 1 3 pomodoro app "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, 2, exec, custom-bottom" # pos 2 3 btm (like htop but cleaner)
"Ctrl+Alt, 9, exec, anki" "Ctrl+Alt, 9, exec, anki"
# if hyprexpo plugin enabled bind = $mainMod, Space, hyprexpo:expo, toggle # if hyprexpo plugin enabled bind = $mainMod, Space, hyprexpo:expo, toggle
# maybe exec sudo framework-tools-tui # maybe exec sudo framework-tools-tui
#plugins keybindings #plugins keybindings
#"$mod, SPACE, overview:toggle, " #"$mod, SPACE, overview:toggle, "
]; ];
binde = [ binde = [
"$mod+Shift, Right, resizeactive, 30 0" "$mod+Shift, Right, resizeactive, 30 0"
@@ -182,8 +181,8 @@ in
"$mod, Z, movewindow" "$mod, Z, movewindow"
"$mod, X, resizewindow" "$mod, X, resizewindow"
]; ];
# █░░ ▄▀█ █░█ █▄░█ █▀▀ █░█ # █░░ ▄▀█ █░█ █▄░█ █▀▀ █░█
# █▄▄ █▀█ █▄█ █░▀█ █▄▄ █▀█ # █▄▄ █▀█ █▄█ █░▀█ █▄▄ █▀█
exec-once = [ exec-once = [
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH
"dbus-update-activation-environment --systemd --all" # for XDPH "dbus-update-activation-environment --systemd --all" # for XDPH
@@ -216,23 +215,22 @@ in
###################### ######################
]; ];
# gestures (also keybindings) # gestures (also keybindings)
gesture = [ gesture = [
"3, right, move, +col" "3, right, move, +col"
"3, left, move, -col" "3, left, move, -col"
]; ];
# █░░ ▄▀█ █▄█ █▀█ █░█ ▀█▀ █▀
# █░░ ▄▀█ █▄█ ██ ██ ▀█▀ █▀ # █▄▄ █▀█ ░█░ ██ ██ ░█░ ▄█
# █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█
dwindle = { dwindle = {
pseudotile = true; pseudotile = true;
preserve_split = true; preserve_split = true;
}; };
# █▀▄▀█ █ █▀ █▀▀ # █▀▄▀█ █ █▀ █▀▀
# █░▀░█ █ ▄█ █▄▄ # █░▀░█ █ ▄█ █▄▄
misc = { misc = {
vrr = 0; vrr = 0;
@@ -242,21 +240,21 @@ in
force_zero_scaling = true; force_zero_scaling = true;
}; };
# █▀▄▀█ █▀█ █▄░█ █ ▀█▀ █▀█ █▀█ # █▀▄▀█ █▀█ █▄░█ █ ▀█▀ █▀█ █▀█
# █░▀░█ █▄█ █#░▀█ █ ░█░ █▄█ █▀▄ # █░▀░█ █▄█ █#░▀█ █ ░█░ █▄█ █▀▄
monitor = [ monitor = [
#",preferred, auto, auto" #",preferred, auto, auto"
"eDP-1, highres@highrr, 0x0, 1" "eDP-1, highres@highrr, 0x0, 1"
"HDMI-A-1, highres2highrr, auto-left, 1" "HDMI-A-1, highres2highrr, auto-left, 1"
]; ];
# _______ ___ __ __ _______ ___ __ _ _______ # _______ ___ __ __ _______ ___ __ _ _______
#| || | | | | || || | | | | || | #| || | | | | || || | | | | || |
#| _ || | | | | || ___|| | | |_| || _____| #| _ || | | | | || ___|| | | |_| || _____|
#| |_| || | | |_| || | __ | | | || |_____ #| |_| || | | |_| || | __ | | | || |_____
#| ___|| |___ | || || || | | _ ||_____ | #| ___|| |___ | || || || | | _ ||_____ |
#| | | || || |_| || | | | | | _____| | #| | | || || |_| || | | | | | _____| |
#|___| |_______||_______||_______||___| |_| |__||_______| #|___| |_______||_______||_______||___| |_| |__||_______|
# #
"plugin:dynamic-cursors" = { "plugin:dynamic-cursors" = {
enabled = true; enabled = true;
threshold = 2; threshold = 2;
@@ -301,9 +299,9 @@ in
disableBlur = true; disableBlur = true;
}; };
##################################################### #####################################################
##################################################### #####################################################
# theme # theme
decoration = { decoration = {
dim_special = 0.3; dim_special = 0.3;
blur = { blur = {
@@ -323,8 +321,6 @@ in
"col.inactive_border" = "rgba(f1dca7d9) rgba(ffe1a8d9) 45deg"; "col.inactive_border" = "rgba(f1dca7d9) rgba(ffe1a8d9) 45deg";
layout = "dwindle"; layout = "dwindle";
resize_on_border = true; resize_on_border = true;
}; };
group = { group = {
"col.border_active" = "rgba(ca6702ff) rgba(ecd3a0ff) 45deg"; "col.border_active" = "rgba(ca6702ff) rgba(ecd3a0ff) 45deg";
@@ -332,21 +328,21 @@ in
"col.border_locked_active" = "rgba(ca6702ff) rgba(ecd3a0ff) 45deg"; "col.border_locked_active" = "rgba(ca6702ff) rgba(ecd3a0ff) 45deg";
"col.border_locked_inactive" = "rgba(f1dca7d9) rgba(ffe1a8d9) 45deg"; "col.border_locked_inactive" = "rgba(f1dca7d9) rgba(ffe1a8d9) 45deg";
}; };
#################################################### ####################################################
################################################## ##################################################
# /$$ /$$ /$$ # /$$ /$$ /$$
#| $$ /$ | $$ | $$ #| $$ /$ | $$ | $$
#| $$ /$$$| $$ /$$$$$$ /$$$$$$ | $$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$ #| $$ /$$$| $$ /$$$$$$ /$$$$$$ | $$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$
#| $$/$$ $$ $$ /$$__ $$ /$$__ $$| $$ /$$/ /$$_____/ /$$__ $$ |____ $$ /$$_____/ /$$__ $$ #| $$/$$ $$ $$ /$$__ $$ /$$__ $$| $$ /$$/ /$$_____/ /$$__ $$ |____ $$ /$$_____/ /$$__ $$
#| $$$$_ $$$$| $$ \ $$| $$ \__/| $$$$$$/ | $$$$$$ | $$ \ $$ /$$$$$$$| $$ | $$$$$$$$ #| $$$$_ $$$$| $$ \ $$| $$ \__/| $$$$$$/ | $$$$$$ | $$ \ $$ /$$$$$$$| $$ | $$$$$$$$
#| $$$/ \ $$$| $$ | $$| $$ | $$_ $$ \____ $$| $$ | $$ /$$__ $$| $$ | $$_____/ #| $$$/ \ $$$| $$ | $$| $$ | $$_ $$ \____ $$| $$ | $$ /$$__ $$| $$ | $$_____/
#| $$/ \ $$| $$$$$$/| $$ | $$ \ $$ /$$$$$$$/| $$$$$$$/| $$$$$$$| $$$$$$$| $$$$$$$ #| $$/ \ $$| $$$$$$/| $$ | $$ \ $$ /$$$$$$$/| $$$$$$$/| $$$$$$$| $$$$$$$| $$$$$$$
#|__/ \__/ \______/ |__/ |__/ \__/|_______/ | $$____/ \_______/ \_______/ \_______/ #|__/ \__/ \______/ |__/ |__/ \__/|_______/ | $$____/ \_______/ \_______/ \_______/
# | $$ # | $$
# | $$ # | $$
# |__/ # |__/
# see https://wiki.hypr.land/Configuring/Workspace-Rules/ # see https://wiki.hypr.land/Configuring/Workspace-Rules/
workspace = [ workspace = [
"1, layout:master" "1, layout:master"
"2, layout:scrolling, layoutopt:direction:right" "2, layout:scrolling, layoutopt:direction:right"
@@ -356,81 +352,77 @@ in
"f[1], gapsout:0, gapsin:0" "f[1], gapsout:0, gapsin:0"
]; ];
# █░█░█ █ █▄░█ █▀▄ █▀█ █░█░█   █▀█ █░█ █░░ █▀▀ █▀
# ▀▄▀▄▀ █ █░▀█ █▄▀ █▄█ ▀▄▀▄▀   █▀▄ █▄█ █▄▄ ██▄ ▄█
# █░█░█ █ █▄░█ █▀▄ █▀█ █░█░█   █▀█ █░█ █░░ █▀▀ █▀
# ▀▄▀▄▀ █ █░▀█ █▄▀ █▄█ ▀▄▀▄▀   █▀▄ █▄█ █▄▄ ██▄ ▄█
windowrule = [ windowrule = [
"opacity 0.90 0.90, match:class ^(firefox)$" "opacity 0.90 0.90, match:class ^(firefox)$"
"opacity 0.90 0.90, match:class ^(Brave-browser)$" "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-oss)$"
"opacity 0.80 0.80, match:class ^(Code)$" "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-url-handler)$"
"opacity 0.80 0.80, match:class ^(code-insiders-url-handler)$" "opacity 0.80 0.80, match:class ^(code-insiders-url-handler)$"
"opacity 0.75 0.75, match:class ^(kitty)$" "opacity 0.75 0.75, match:class ^(kitty)$"
"opacity 0.80 0.80, match:class ^(org.kde.dolphin)$" "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 ^(org.kde.ark)$"
"opacity 0.80 0.80, float on, match:class ^(nwg-look)$" "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 ^(qt5ct)$"
"opacity 0.80 0.80, float on, match:class ^(qt6ct)$" "opacity 0.80 0.80, float on, match:class ^(qt6ct)$"
"opacity 0.80 0.80, float on, match:class ^(kvantummanager)$" "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 ^(org.pulseaudio.pavucontrol)$"
"opacity 0.80 0.70, float on, match:class ^(blueman-manager)$" "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-applet)$"
"opacity 0.80 0.70, float on, match:class ^(nm-connection-editor)$" "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, 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 ^(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.gtk)$"
"opacity 0.80 0.70, match:class ^(org.freedesktop.impl.portal.desktop.hyprland)$" "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 ^([Ss]team)$"
"opacity 0.70 0.70, match:class ^(steamwebhelper)$" "opacity 0.70 0.70, match:class ^(steamwebhelper)$"
"opacity 0.70 0.70, match:class ^(Spotify)$" "opacity 0.70 0.70, match:class ^(Spotify)$"
"opacity 0.70 0.70, match:initial_title ^(Spotify Free)$" "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.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 ^(com.github.tchx84.Flatseal)$"
"opacity 0.80 0.80, match:class ^(hu.kramo.Cartridges)$" "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 ^(com.obsproject.Studio)$"
"opacity 0.80 0.80, match:class ^(gnome-boxes)$" "opacity 0.80 0.80, match:class ^(gnome-boxes)$"
"opacity 0.80 0.80, match:class ^(discord)$" "opacity 0.80 0.80, match:class ^(discord)$"
"opacity 0.80 0.80, match:class ^(WebCord)$" "opacity 0.80 0.80, match:class ^(WebCord)$"
"opacity 0.80 0.80, match:class ^(ArmCord)$" "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 ^(app.drey.Warp)$"
"opacity 0.80 0.80, float on, match:class ^(net.davidotek.pupgui2)$" "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 ^(yad)$"
"opacity 0.80 0.80, float on, match:class ^(Signal)$" "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.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 ^(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 ^(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.gitlab.adhami3310.Impression)$"
"opacity 0.80 0.80, float on, match:class ^(io.missioncenter.MissionCenter)$" "opacity 0.80 0.80, float on, match:class ^(io.missioncenter.MissionCenter)$"
"opacity 0.80 0.80, match:class ^(io.github.flattool.Warehouse)$" "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 ^(Progress Dialog Dolphin)$"
"float on, match:class ^(org.kde.dolphin)$, match:title ^(Copying 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 ^(Picture-in-Picture)$"
"float on, match:class ^(firefox)$, match:title ^(Library)$" "float on, match:class ^(firefox)$, match:title ^(Library)$"
"float on, match:class ^(kitty)$, match:title ^(top)$" "float on, match:class ^(kitty)$, match:title ^(top)$"
"float on, match:class ^(kitty)$, match:title ^(btop)$" "float on, match:class ^(kitty)$, match:title ^(btop)$"
"float on, match:class ^(kitty)$, match:title ^(htop)$" "float on, match:class ^(kitty)$, match:title ^(htop)$"
"float on, match:class ^(vlc)$" "float on, match:class ^(vlc)$"
"float on, match:class ^(eog)$" "float on, match:class ^(eog)$"
"float on, size 400 175, match:class ^(custom-librewolfprofiles)$" "float on, size 400 175, match:class ^(custom-librewolfprofiles)$"
"float on, size 600 600, match:initial_class ^(custom-pomodoro)$" "float on, size 600 600, match:initial_class ^(custom-pomodoro)$"
"float on, size 1500 800, match:initial_class ^(custom-bottom)$" "float on, size 1500 800, match:initial_class ^(custom-bottom)$"
"border_size 0, match:float 0, match:workspace w[tv1]" "border_size 0, match:float 0, match:workspace w[tv1]"
"rounding 0, match:float 0, match:workspace w[tv1]" "rounding 0, match:float 0, match:workspace w[tv1]"
"border_size 0, match:float 0, match:workspace f[1]" "border_size 0, match:float 0, match:workspace f[1]"
"rounding 0, match:float 0, match:workspace f[1]" "rounding 0, match:float 0, match:workspace f[1]"
]; ];
# add a float for tomato when in kitty # add a float for tomato when in kitty
#"plugin:imgborders:noimgborders, tag:noborder" #"plugin:imgborders:noimgborders, tag:noborder"
layerrule = [ layerrule = [
"blur on, ignore_alpha 0, match:namespace rofi" "blur on, ignore_alpha 0, match:namespace rofi"
"blur on, ignore_alpha 0, match:namespace notifications" "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-notification-window"
"blur on, ignore_alpha 0, match:namespace swaync-control-center" "blur on, ignore_alpha 0, match:namespace swaync-control-center"
"blur on, match:namespace logout_dialog" "blur on, match:namespace logout_dialog"
]; ];
}; };
} }
+46 -44
View File
@@ -1,60 +1,62 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
programs.kitty = { programs.kitty = {
enable = true; enable = true;
#font.name = nerd-fonts._0xproto; #font.name = nerd-fonts._0xproto;
#font.size = "10"; #font.size = "10";
extraConfig = '' extraConfig = ''
# font nerd-fonts._0xproto # this key dont work and causes errors # font nerd-fonts._0xproto # this key dont work and causes errors
font_size 14 font_size 14
bold_font auto bold_font auto
italic_font auto italic_font auto
bold_italic_font auto bold_italic_font auto
window_padding_width 25 window_padding_width 25
foreground #FFFFFF foreground #FFFFFF
background #1B1D1C background #1B1D1C
selection_foreground #1B1D1C selection_foreground #1B1D1C
selection_background #FFFFFF selection_background #FFFFFF
cursor #C3AC76 cursor #C3AC76
cursor_text_color #0F1010 cursor_text_color #0F1010
active_tab_foreground #1B1D1C active_tab_foreground #1B1D1C
active_tab_background #6B5540 active_tab_background #6B5540
inactive_tab_foreground #6B5540 inactive_tab_foreground #6B5540
inactive_tab_background #1B1D1C inactive_tab_background #1B1D1C
# black # black
color0 #29523D color0 #29523D
color8 #578F73 color8 #578F73
# red # red
color1 #FFF0CC color1 #FFF0CC
color9 #F0DBAA color9 #F0DBAA
# green # green
color2 #FFEECC color2 #FFEECC
color10 #F0D9AA color10 #F0D9AA
# yellow # yellow
color3 #FFE5CC color3 #FFE5CC
color11 #F0CCAA color11 #F0CCAA
# blue # blue
color4 #9AE6C0 color4 #9AE6C0
color12 #9AE6C0 color12 #9AE6C0
# magenta # magenta
color5 #E6CC9A color5 #E6CC9A
color13 #E6CC9A color13 #E6CC9A
# cyan # cyan
color6 #E6BF9A color6 #E6BF9A
color14 #E6BF9A color14 #E6BF9A
# white # white
color7 #FFF0CC color7 #FFF0CC
color15 #F0DBAA color15 #F0DBAA
''; '';
}; };
} }
+15 -15
View File
@@ -1,6 +1,9 @@
# adapted from https://github.com/contre95/dotfiles/blob/main/dotfiles/nixos/programs/librewolf.nix # adapted from https://github.com/contre95/dotfiles/blob/main/dotfiles/nixos/programs/librewolf.nix
{ pkgs, config, ... }:
{ {
pkgs,
config,
...
}: {
home.sessionVariables = { home.sessionVariables = {
MOZ_ENABLE_WAYLAND = 1; MOZ_ENABLE_WAYLAND = 1;
MOZ_USE_XINPUT2 = 1; MOZ_USE_XINPUT2 = 1;
@@ -114,7 +117,6 @@
# "browser.fixup.domainwhitelist.internal.contre.io" = true; # "browser.fixup.domainwhitelist.internal.contre.io" = true;
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; "extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
# "keyword.enable" = false; # Disable search when typing unexistent TLD # "keyword.enable" = false; # Disable search when typing unexistent TLD
}; };
policies = { policies = {
ExtensionSettings = { ExtensionSettings = {
@@ -292,7 +294,7 @@
settings = [ settings = [
{ {
name = "Nixos Config"; name = "Nixos Config";
tags = [ "github" ]; tags = ["github"];
keyword = "github"; keyword = "github";
url = "https://github.com/Totorile1/nixos"; url = "https://github.com/Totorile1/nixos";
} }
@@ -329,7 +331,7 @@
template = "https://fr.wiktionary.org/w/index.php?search={searchTerms}"; template = "https://fr.wiktionary.org/w/index.php?search={searchTerms}";
} }
]; ];
definedAliases = [ "dict" ]; definedAliases = ["dict"];
}; };
"quant" = { "quant" = {
urls = [ urls = [
@@ -343,7 +345,7 @@
]; ];
} }
]; ];
definedAliases = [ "q" ]; definedAliases = ["q"];
}; };
"OpenStreeetMap" = { "OpenStreeetMap" = {
urls = [ urls = [
@@ -357,7 +359,7 @@
]; ];
} }
]; ];
definedAliases = [ "map" ]; definedAliases = ["map"];
}; };
"Home Manager Options" = { "Home Manager Options" = {
urls = [ urls = [
@@ -371,7 +373,7 @@
]; ];
} }
]; ];
definedAliases = [ "hm" ]; definedAliases = ["hm"];
}; };
"Nix Packages" = { "Nix Packages" = {
urls = [ urls = [
@@ -389,7 +391,7 @@
]; ];
} }
]; ];
definedAliases = [ "np" ]; definedAliases = ["np"];
}; };
"Nix Wiki" = { "Nix Wiki" = {
urls = [ urls = [
@@ -397,7 +399,7 @@
template = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";
} }
]; ];
definedAliases = [ "nw" ]; definedAliases = ["nw"];
}; };
"Repology" = { "Repology" = {
urls = [ urls = [
@@ -405,7 +407,7 @@
template = "https://repology.org/projects/?search={searchTerms}"; template = "https://repology.org/projects/?search={searchTerms}";
} }
]; ];
definedAliases = [ "rp" ]; definedAliases = ["rp"];
}; };
}; };
}; };
@@ -569,7 +571,7 @@
]; ];
} }
]; ];
definedAliases = [ "q" ]; definedAliases = ["q"];
}; };
"OpenStreeetMap" = { "OpenStreeetMap" = {
urls = [ urls = [
@@ -583,7 +585,7 @@
]; ];
} }
]; ];
definedAliases = [ "map" ]; definedAliases = ["map"];
}; };
"Onche.org" = { "Onche.org" = {
urls = [ urls = [
@@ -591,12 +593,10 @@
template = "https://onche.org/forum/1/blabla-general/search?by=topic&q={searchTerms}"; template = "https://onche.org/forum/1/blabla-general/search?by=topic&q={searchTerms}";
} }
]; ];
definedAliases = [ "on" ]; definedAliases = ["on"];
}; };
}; };
}; };
}; };
}; };
} }
+308 -306
View File
@@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
programs.neovim = { programs.neovim = {
enable = true; enable = true;
vimAlias = true; vimAlias = true;
@@ -43,173 +45,173 @@
#Plug 'brenton-leighton/multiple-cursors.nvim' #Plug 'brenton-leighton/multiple-cursors.nvim'
# i use instead the following: # i use instead the following:
pkgs.vimPlugins.vim-visual-multi pkgs.vimPlugins.vim-visual-multi
# plugins not found # plugins not found
#Plug 'arminveres/md-pdf.nvim' #Plug 'arminveres/md-pdf.nvim'
#Plug "sharkdp/fd" #Plug "sharkdp/fd"
#Plug 'sontungexpt/better-diagnostic-virtual-text' #Plug 'sontungexpt/better-diagnostic-virtual-text'
]; ];
extraLuaConfig = '' extraLuaConfig = ''
local vim = vim local vim = vim
-- local Plug = vim.fn['plug#'] -- local Plug = vim.fn['plug#']
vim.g.mapleader ='ü' vim.g.mapleader ='ü'
vim.g.maplocalleader = 'ü' vim.g.maplocalleader = 'ü'
-- Set to true if you have a Nerd Font installed and selected in the terminal -- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = true vim.g.have_nerd_font = true
-- [[ Setting options ]] -- [[ Setting options ]]
-- See `:help vim.opt` -- See `:help vim.opt`
-- NOTE: You can change these options as you wish! -- NOTE: You can change these options as you wish!
-- For more options, you can see `:help option-list` -- For more options, you can see `:help option-list`
-- Make line numbers default -- Make line numbers default
-- You can also add relative line numbers, to help with jumping. -- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it! -- Experiment for yourself to see if you like it!
vim.opt.relativenumber = false vim.opt.relativenumber = false
-- Enable mouse mode, can be useful for resizing splits for example! -- Enable mouse mode, can be useful for resizing splits for example!
vim.opt.mouse = 'a' vim.opt.mouse = 'a'
-- Don't show the mode, since it's already in the status line -- Don't show the mode, since it's already in the status line
vim.opt.showmode = false vim.opt.showmode = false
-- Sync clipboard between OS and Neovim. -- Sync clipboard between OS and Neovim.
-- Schedule the setting after `UiEnter` because it can increase startup-time. -- Schedule the setting after `UiEnter` because it can increase startup-time.
-- Remove this option if you want your OS clipboard to remain independent. -- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'` -- See `:help 'clipboard'`
vim.schedule(function() vim.schedule(function()
vim.opt.clipboard = 'unnamedplus' vim.opt.clipboard = 'unnamedplus'
end) end)
-- Enable break indent -- Enable break indent
vim.opt.breakindent = true vim.opt.breakindent = true
-- Save undo history -- Save undo history
vim.opt.undofile = true vim.opt.undofile = true
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term -- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
vim.opt.ignorecase = true vim.opt.ignorecase = true
vim.opt.smartcase = true vim.opt.smartcase = true
-- Keep signcolumn on by default -- Keep signcolumn on by default
vim.opt.signcolumn = 'yes' vim.opt.signcolumn = 'yes'
-- Decrease update time -- Decrease update time
vim.opt.updatetime = 250 vim.opt.updatetime = 250
-- Decrease mapped sequence wait time -- Decrease mapped sequence wait time
-- Displays which-key popup sooner -- Displays which-key popup sooner
vim.opt.timeoutlen = 300 vim.opt.timeoutlen = 300
-- Configure how new splits should be opened -- Configure how new splits should be opened
vim.opt.splitright = true vim.opt.splitright = true
vim.opt.splitbelow = true vim.opt.splitbelow = true
-- Sets how neovim will display certain whitespace characters in the editor. -- Sets how neovim will display certain whitespace characters in the editor.
-- See `:help 'list'` -- See `:help 'list'`
-- and `:help 'listchars'` -- and `:help 'listchars'`
vim.opt.list = true vim.opt.list = true
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' } vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
-- indentation settings - added by me -- indentation settings - added by me
-- refere to https://stackoverflow.com/questions/51995128/setting-autoindentation-to-spaces-in-neovim for more information -- refere to https://stackoverflow.com/questions/51995128/setting-autoindentation-to-spaces-in-neovim for more information
vim.opt.expandtab = true vim.opt.expandtab = true
vim.opt.smartindent = true vim.opt.smartindent = true
vim.opt.tabstop = 4 vim.opt.tabstop = 4
vim.opt.shiftwidth = 4 vim.opt.shiftwidth = 4
-- Preview substitutions live, as you type! -- Preview substitutions live, as you type!
vim.opt.inccommand = 'split' vim.opt.inccommand = 'split'
-- Show which line your cursor is on -- Show which line your cursor is on
vim.opt.cursorline = true vim.opt.cursorline = true
-- Minimal number of screen lines to keep above and below the cursor. -- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 10 vim.opt.scrolloff = 10
-- [[ Basic Keymaps ]] -- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()` -- See `:help vim.keymap.set()`
-- Clear highlights on search when pressing <Esc> in normal mode -- Clear highlights on search when pressing <Esc> in normal mode
-- See `:help hlsearch` -- See `:help hlsearch`
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>') vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
-- Diagnostic keymaps -- Diagnostic keymaps
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) 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 -- 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 -- 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. -- 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 -- 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 -- or just use <C-\><C-n> to exit terminal mode
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' }) vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
-- TIP: Disable arrow keys in normal mode -- TIP: Disable arrow keys in normal mode
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>') -- 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', '<right>', '<cmd>echo "Use l to move!!"<CR>')
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k 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>') -- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
-- Keybinds to make split navigation easier. -- Keybinds to make split navigation easier.
-- Use CTRL+<hjkl> to switch between windows -- Use CTRL+<hjkl> to switch between windows
-- --
-- See `:help wincmd` for a list of all window commands -- 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-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-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-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' }) vim.keymap.set('n', '<C-Up>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
-- jump to next error -- jump to next error
vim.keymap.set("n", "t", vim.diagnostic.goto_prev) vim.keymap.set("n", "t", vim.diagnostic.goto_prev)
vim.keymap.set("n", "z", vim.diagnostic.goto_next) vim.keymap.set("n", "z", vim.diagnostic.goto_next)
-- [[ Basic Autocommands ]] -- [[ Basic Autocommands ]]
-- See `:help lua-guide-autocommands` -- See `:help lua-guide-autocommands`
-- Highlight when yanking (copying) text -- Highlight when yanking (copying) text
-- Try it with `yap` in normal mode -- Try it with `yap` in normal mode
-- See `:help vim.highlight.on_yank()` -- See `:help vim.highlight.on_yank()`
vim.api.nvim_create_autocmd('TextYankPost', { vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text', desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }), group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
callback = function() callback = function()
vim.highlight.on_yank() vim.highlight.on_yank()
end, end,
}) })
--require("multiple-cursors").setup({ --require("multiple-cursors").setup({
-- version = "*", -- Use the latest tagged version -- version = "*", -- Use the latest tagged version
-- opts = {}, -- This causes the plugin setup function to be called -- opts = {}, -- This causes the plugin setup function to be called
-- keys = { -- keys = {
-- {"<C-j>", "<Cmd>MultipleCursorsAddDown<CR>", mode = {"n", "x"}, desc = "Add cursor and move down"}, -- {"<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-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-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-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"}, -- {"<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>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>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>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>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>D", "<Cmd>MultipleCursorsJumpNextMatch<CR>", mode = {"n", "x"}, desc = "Jump to next cword"},
-- --
-- {"<Leader>l", "<Cmd>MultipleCursorsLock<CR>", mode = {"n", "x"}, desc = "Lock virtual cursors"}, -- {"<Leader>l", "<Cmd>MultipleCursorsLock<CR>", mode = {"n", "x"}, desc = "Lock virtual cursors"},
-- }, -- },
--}) --})
vim.keymap.set("n","§", "<cmd>Cheatsheet<CR>") vim.keymap.set("n","§", "<cmd>Cheatsheet<CR>")
require("cheatsheet").setup({ require("cheatsheet").setup({
bundled_cheatsheets = { bundled_cheatsheets = {
-- only show the default cheatsheet -- only show the default cheatsheet
enabled = { "default" }, enabled = { "default" },
@@ -218,13 +220,13 @@ require("cheatsheet").setup({
-- show cheatsheets for all plugins except gitsigns -- show cheatsheets for all plugins except gitsigns
disabled = { "gitsigns.nvim" }, disabled = { "gitsigns.nvim" },
} }
}) })
-- Can be applied to each buffer separately -- Can be applied to each buffer separately
local default_options = { local default_options = {
ui = { ui = {
wrap_line_after = false, -- wrap the line after this length to avoid the virtual text is too long 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 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
@@ -236,78 +238,78 @@ local default_options = {
}, },
priority = 2003, -- the priority of virtual text priority = 2003, -- the priority of virtual text
inline = true, inline = true,
} }
-- scrollbar -- scrollbar
require("scrollbar").setup() require("scrollbar").setup()
-- ufo https://github.com/kevinhwang91/nvim-ufo -- ufo https://github.com/kevinhwang91/nvim-ufo
vim.o.foldcolumn = '1' -- '0' is not bad 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.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
vim.o.foldlevelstart = 99 vim.o.foldlevelstart = 99
vim.o.foldenable = true vim.o.foldenable = true
-- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself -- 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', '1', "<cmd>foldopen<CR>")
vim.keymap.set('n', '2', "<cmd>foldclose<CR>") vim.keymap.set('n', '2', "<cmd>foldclose<CR>")
vim.keymap.set('n', '3', "<cmd>openAllFold<CR>") vim.keymap.set('n', '3', "<cmd>openAllFold<CR>")
vim.keymap.set('n', '4', "<cmd> closeAllFold<CR>") vim.keymap.set('n', '4', "<cmd> closeAllFold<CR>")
-- Option 3: treesitter as a main provider instead -- Option 3: treesitter as a main provider instead
-- (Note: the `nvim-treesitter` plugin is *not* needed.) -- (Note: the `nvim-treesitter` plugin is *not* needed.)
-- ufo uses the same query files for folding (queries/<lang>/folds.scm) -- ufo uses the same query files for folding (queries/<lang>/folds.scm)
-- performance and stability are better than `foldmethod=nvim_treesitter#foldexpr()` -- 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', '1', function() require("ufo").foldopen() end, {buffer=0})
--vim.keymap.set('n', '2', function() require("ufo").foldclose() end) --vim.keymap.set('n', '2', function() require("ufo").foldclose() end)
-- added by myself -- added by myself
require('ufo').setup({ require('ufo').setup({
provider_selector = function(bufnr, filetype, buftype) provider_selector = function(bufnr, filetype, buftype)
return {'treesitter', 'indent'} return {'treesitter', 'indent'}
end end
}) })
-- Color schemes should be loaded after plug#end(). -- Color schemes should be loaded after plug#end().
vim.o.background = "dark" -- or "light" for light mode vim.o.background = "dark" -- or "light" for light mode
-- Default options: -- Default options:
--require("gruvbox").setup({ --require("gruvbox").setup({
-- terminal_colors = true, -- add neovim terminal colors -- terminal_colors = true, -- add neovim terminal colors
-- undercurl = true, -- undercurl = true,
-- underline = true, -- underline = true,
-- bold = true, -- bold = true,
-- italic = { -- italic = {
-- strings = true, -- strings = true,
-- emphasis = true, -- emphasis = true,
-- comments = true, -- comments = true,
-- operators = false, -- operators = false,
-- folds = true, -- folds = true,
-- }, -- },
-- strikethrough = true, -- strikethrough = true,
-- invert_selection = false, -- invert_selection = false,
-- invert_signs = false, -- invert_signs = false,
-- invert_tabline = false, -- invert_tabline = false,
-- invert_intend_guides = false, -- invert_intend_guides = false,
-- inverse = true, -- invert background for search, diffs, statuslines and errors -- inverse = true, -- invert background for search, diffs, statuslines and errors
-- contrast = "", -- can be "hard", "soft" or empty string -- contrast = "", -- can be "hard", "soft" or empty string
-- palette_overrides = {}, -- palette_overrides = {},
-- overrides = {}, -- overrides = {},
-- dim_inactive = false, -- dim_inactive = false,
-- transparent_mode = false, -- transparent_mode = false,
--}) --})
vim.cmd("colorscheme gruvbox") vim.cmd("colorscheme gruvbox")
-- nvim-tree https://github.com/nvim-tree/nvim-tree.lua -- nvim-tree https://github.com/nvim-tree/nvim-tree.lua
-- disable netrw at the very start of your init.lua -- disable netrw at the very start of your init.lua
vim.g.loaded_netrw = 1 vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1 vim.g.loaded_netrwPlugin = 1
-- optionally enable 24-bit colour -- optionally enable 24-bit colour
vim.opt.termguicolors = true vim.opt.termguicolors = true
-- setup with some options -- setup with some options
require("nvim-tree").setup({ require("nvim-tree").setup({
sort = { sort = {
sorter = "case_sensitive", sorter = "case_sensitive",
}, },
@@ -320,51 +322,51 @@ require("nvim-tree").setup({
filters = { filters = {
dotfiles = true, dotfiles = true,
}, },
}) })
vim.opt.number = true vim.opt.number = true
-- Uncomment for opening the navigable tree file systeme on startup of NeoVim -- Uncomment for opening the navigable tree file systeme on startup of NeoVim
--vim.cmd('NvimTreeOpen') --vim.cmd('NvimTreeOpen')
--require('md-pdf').setup({ --require('md-pdf').setup({
-- --- Set margins around document -- --- Set margins around document
-- margins = "1.5cm", -- margins = "1.5cm",
-- -- tango, pygments are quite nice for white on white -- -- tango, pygments are quite nice for white on white
-- highlight = "tango", -- highlight = "tango",
-- -- Generate a table of contents, on by default -- -- Generate a table of contents, on by default
-- toc = true, -- toc = true,
-- -- Define a custom preview command, enabling hooks and other custom logic -- -- Define a custom preview command, enabling hooks and other custom logic
-- preview_cmd = function() return 'firefox' end, -- preview_cmd = function() return 'firefox' end,
-- -- if true, then the markdown file is continuously converted on each write, even if the -- -- 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. -- -- file viewer closed, e.g., firefox is "closed" once the document is opened in it.
-- ignore_viewer_state = false, -- ignore_viewer_state = false,
-- -- Specify font, `nil` uses the default font of the theme -- -- Specify font, `nil` uses the default font of the theme
-- fonts = nil, -- fonts = nil,
-- -- or, where all or only some options can be specified. NOTE: those that are `nil` can be left -- -- or, where all or only some options can be specified. NOTE: those that are `nil` can be left
-- -- out completely -- -- out completely
-- fonts = { -- fonts = {
-- main_font = nil, -- main_font = nil,
-- sans_font = "DejaVuSans", -- sans_font = "DejaVuSans",
-- mono_font = "IosevkaTerm Nerd Font Mono", -- mono_font = "IosevkaTerm Nerd Font Mono",
-- math_font = nil, -- math_font = nil,
-- }, -- },
-- -- Custom options passed to `pandoc` CLI call, can be ignored for setup -- -- Custom options passed to `pandoc` CLI call, can be ignored for setup
-- pandoc_user_args = nil, -- pandoc_user_args = nil,
-- -- or -- -- or
-- pandoc_user_args = { -- pandoc_user_args = {
-- -- short -- -- short
-- "-V KEY[:VALUE]", -- "-V KEY[:VALUE]",
-- -- long options -- -- long options
-- "--standalone=[true|false]", -- "--standalone=[true|false]",
-- }, -- },
-- --- Path to output. Needs to be always relative, e.g.: "./", "../", "./out" or simply "out", but -- --- Path to output. Needs to be always relative, e.g.: "./", "../", "./out" or simply "out", but
-- --- not absolute e.g.: "/"! -- --- not absolute e.g.: "/"!
-- output_path = "", -- output_path = "",
--}) --})
-- setup mapping -- setup mapping
vim.keymap.set("n", "<Space>,", function() vim.keymap.set("n", "<Space>,", function()
require('md-pdf').convert_md_to_pdf() require('md-pdf').convert_md_to_pdf()
end) end)
-- Set up nvim-cmp. -- Set up nvim-cmp.
local cmp = require'cmp' local cmp = require'cmp'
@@ -433,76 +435,76 @@ end)
-- require(lspconfig) is deprecated -- require(lspconfig) is deprecated
-- -- Set up lspconfig. -- -- Set up lspconfig.
-- local capabilities = require('cmp_nvim_lsp').default_capabilities() -- local capabilities = require('cmp_nvim_lsp').default_capabilities()
-- -- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled. -- -- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled.
-- require('lspconfig')['texlab'].setup { -- require('lspconfig')['texlab'].setup {
-- capabilities = capabilities -- capabilities = capabilities
-- } -- }
--require'lspconfig'.clangd.setup{} --require'lspconfig'.clangd.setup{}
--lspconfig = require("lspconfig") --lspconfig = require("lspconfig")
--lspconfig.pylsp.setup { --lspconfig.pylsp.setup {
--on_attach = custom_attach, --on_attach = custom_attach,
--settings = { --settings = {
-- pylsp = { -- pylsp = {
-- plugins = { -- plugins = {
-- -- formatter options -- -- formatter options
-- black = { enabled = true }, -- black = { enabled = true },
-- autopep8 = { enabled = false }, -- autopep8 = { enabled = false },
-- yapf = { enabled = false }, -- yapf = { enabled = false },
-- -- linter options -- -- linter options
-- pylint = { enabled = true, executable = "pylint" }, -- pylint = { enabled = true, executable = "pylint" },
-- pyflakes = { enabled = false }, -- pyflakes = { enabled = false },
-- pycodestyle = { enabled = false }, -- pycodestyle = { enabled = false },
-- -- type checker -- -- type checker
-- pylsp_mypy = { enabled = true }, -- pylsp_mypy = { enabled = true },
-- -- auto-completion options -- -- auto-completion options
-- jedi_completion = { fuzzy = true }, -- jedi_completion = { fuzzy = true },
-- -- import sorting -- -- import sorting
-- pyls_isort = { enabled = true }, -- pyls_isort = { enabled = true },
-- }, -- },
-- }, -- },
--}, --},
--flags = { --flags = {
-- debounce_text_changes = 200, -- debounce_text_changes = 200,
--}, --},
--capabilities = capabilities, --capabilities = capabilities,
--} --}
---- lua-lsp ---- lua-lsp
--require'lspconfig'.lua_ls.setup{} --require'lspconfig'.lua_ls.setup{}
-- --
--new version --new version
-- ============================ -- ============================
-- LSP CONFIGURATION (Neovim 0.11+) -- LSP CONFIGURATION (Neovim 0.11+)
-- ============================ -- ============================
-- Set up capabilities for nvim-cmp LSP completion -- Set up capabilities for nvim-cmp LSP completion
local capabilities = require('cmp_nvim_lsp').default_capabilities() local capabilities = require('cmp_nvim_lsp').default_capabilities()
-- Optional: custom on_attach function if you have keymaps -- Optional: custom on_attach function if you have keymaps
-- local custom_attach = function(client, bufnr) -- local custom_attach = function(client, bufnr)
-- -- your on_attach code here -- -- your on_attach code here
-- end -- end
-- Utility function to simplify server setup -- Utility function to simplify server setup
local function setup_lsp(server_name, opts) local function setup_lsp(server_name, opts)
vim.lsp.config(server_name, opts or {}) vim.lsp.config(server_name, opts or {})
end end
-- ======== LSP SERVERS ======== -- ======== LSP SERVERS ========
-- TeXLab -- TeXLab
setup_lsp("texlab", { setup_lsp("texlab", {
capabilities = capabilities, capabilities = capabilities,
}) })
-- Clangd (C/C++) -- Clangd (C/C++)
setup_lsp("clangd", { setup_lsp("clangd", {
capabilities = capabilities, capabilities = capabilities,
}) })
-- Python LSP (pylsp) -- Python LSP (pylsp)
setup_lsp("pylsp", { setup_lsp("pylsp", {
on_attach = custom_attach, on_attach = custom_attach,
capabilities = capabilities, capabilities = capabilities,
flags = { flags = {
@@ -528,16 +530,16 @@ setup_lsp("pylsp", {
}, },
}, },
}, },
}) })
-- Lua LSP -- Lua LSP
setup_lsp("lua_ls", { setup_lsp("lua_ls", {
capabilities = capabilities, capabilities = capabilities,
}) })
-- dashboard config -- dashboard config
require('dashboard').setup { require('dashboard').setup {
theme = 'hyper', theme = 'hyper',
config = { config = {
header = { header = {
@@ -557,7 +559,7 @@ require('dashboard').setup {
" \"\"**\"\" ", " \"\"**\"\" ",
"", "",
"" ""
}, },
shortcut = { shortcut = {
{ desc = " Open File Tree", group = "", key = 't', action = 'NvimTreeOpen' }, { desc = " Open File Tree", group = "", key = 't', action = 'NvimTreeOpen' },
-- action can be a function type -- action can be a function type
@@ -569,26 +571,26 @@ require('dashboard').setup {
project = { enable = true, limit = 8, icon = ' New file', label = "", action = 'Telescope find_files cwd=' }, project = { enable = true, limit = 8, icon = ' New file', label = "", action = 'Telescope find_files cwd=' },
mru = { limit = 10, icon = ' History', label = "", cwd_only = false }, mru = { limit = 10, icon = ' History', label = "", cwd_only = false },
footer = {}, -- footer footer = {}, -- footer
} }
} }
-- lualine config https://github.com/nvim-lualine/lualine.nvim/blob/master/examples/bubbles.lua -- lualine config https://github.com/nvim-lualine/lualine.nvim/blob/master/examples/bubbles.lua
require('lualine').setup { require('lualine').setup {
options = { theme = "gruvbox_dark" }, options = { theme = "gruvbox_dark" },
} }
local builtin = require('telescope.builtin') local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' }) 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>fg', builtin.live_grep, { desc = 'Telescope live grep' })
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' }) vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' }) vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
-- Disable relative numbers even if a plugin (like neovim-sensible) turns them on -- Disable relative numbers even if a plugin (like neovim-sensible) turns them on
vim.api.nvim_create_autocmd("VimEnter", { vim.api.nvim_create_autocmd("VimEnter", {
callback = function() callback = function()
vim.opt.colorcolumn = "" vim.opt.colorcolumn = ""
vim.opt.relativenumber = false vim.opt.relativenumber = false
end, end,
}) })
''; '';
}; };
} }
+250 -247
View File
@@ -1,175 +1,178 @@
{ config, pkgs, ... }: {
config,
pkgs,
...
}:
# same as ./neovim.nix but you vim plug. # 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 # 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 # the only difference is the we use :PlugInstall or a similar command before doing anything
{ {
programs.neovim = { programs.neovim = {
enable = true; enable = true;
vimAlias = true; vimAlias = true;
viAlias = true; viAlias = true;
extraLuaConfig = '' extraLuaConfig = ''
local vim = vim local vim = vim
-- local Plug = vim.fn['plug#'] -- local Plug = vim.fn['plug#']
vim.g.mapleader ='ü' vim.g.mapleader ='ü'
vim.g.maplocalleader = 'ü' vim.g.maplocalleader = 'ü'
-- Set to true if you have a Nerd Font installed and selected in the terminal -- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = true vim.g.have_nerd_font = true
-- [[ Setting options ]] -- [[ Setting options ]]
-- See `:help vim.opt` -- See `:help vim.opt`
-- NOTE: You can change these options as you wish! -- NOTE: You can change these options as you wish!
-- For more options, you can see `:help option-list` -- For more options, you can see `:help option-list`
-- Make line numbers default -- Make line numbers default
-- You can also add relative line numbers, to help with jumping. -- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it! -- Experiment for yourself to see if you like it!
-- vim.opt.relativenumber = true -- vim.opt.relativenumber = true
-- Enable mouse mode, can be useful for resizing splits for example! -- Enable mouse mode, can be useful for resizing splits for example!
vim.opt.mouse = 'a' vim.opt.mouse = 'a'
-- Don't show the mode, since it's already in the status line -- Don't show the mode, since it's already in the status line
vim.opt.showmode = true vim.opt.showmode = true
-- Sync clipboard between OS and Neovim. -- Sync clipboard between OS and Neovim.
-- Schedule the setting after `UiEnter` because it can increase startup-time. -- Schedule the setting after `UiEnter` because it can increase startup-time.
-- Remove this option if you want your OS clipboard to remain independent. -- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'` -- See `:help 'clipboard'`
vim.schedule(function() vim.schedule(function()
vim.opt.clipboard = 'unnamedplus' vim.opt.clipboard = 'unnamedplus'
end) end)
-- Enable break indent -- Enable break indent
vim.opt.breakindent = true vim.opt.breakindent = true
-- Save undo history -- Save undo history
vim.opt.undofile = true vim.opt.undofile = true
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term -- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
vim.opt.ignorecase = true vim.opt.ignorecase = true
vim.opt.smartcase = true vim.opt.smartcase = true
-- Keep signcolumn on by default -- Keep signcolumn on by default
vim.opt.signcolumn = 'yes' vim.opt.signcolumn = 'yes'
-- Decrease update time -- Decrease update time
vim.opt.updatetime = 250 vim.opt.updatetime = 250
-- Decrease mapped sequence wait time -- Decrease mapped sequence wait time
-- Displays which-key popup sooner -- Displays which-key popup sooner
vim.opt.timeoutlen = 300 vim.opt.timeoutlen = 300
-- Configure how new splits should be opened -- Configure how new splits should be opened
vim.opt.splitright = true vim.opt.splitright = true
vim.opt.splitbelow = true vim.opt.splitbelow = true
-- Sets how neovim will display certain whitespace characters in the editor. -- Sets how neovim will display certain whitespace characters in the editor.
-- See `:help 'list'` -- See `:help 'list'`
-- and `:help 'listchars'` -- and `:help 'listchars'`
vim.opt.list = true vim.opt.list = true
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' } vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
-- indentation settings - added by me -- indentation settings - added by me
-- refere to https://stackoverflow.com/questions/51995128/setting-autoindentation-to-spaces-in-neovim for more information -- refere to https://stackoverflow.com/questions/51995128/setting-autoindentation-to-spaces-in-neovim for more information
vim.opt.expandtab = true vim.opt.expandtab = true
vim.opt.smartindent = true vim.opt.smartindent = true
vim.opt.tabstop = 4 vim.opt.tabstop = 4
vim.opt.shiftwidth = 4 vim.opt.shiftwidth = 4
-- Preview substitutions live, as you type! -- Preview substitutions live, as you type!
vim.opt.inccommand = 'split' vim.opt.inccommand = 'split'
-- Show which line your cursor is on -- Show which line your cursor is on
vim.opt.cursorline = true vim.opt.cursorline = true
-- Minimal number of screen lines to keep above and below the cursor. -- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 10 vim.opt.scrolloff = 10
-- [[ Basic Keymaps ]] -- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()` -- See `:help vim.keymap.set()`
-- Clear highlights on search when pressing <Esc> in normal mode -- Clear highlights on search when pressing <Esc> in normal mode
-- See `:help hlsearch` -- See `:help hlsearch`
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>') vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
-- Diagnostic keymaps -- Diagnostic keymaps
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) 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 -- 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 -- 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. -- 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 -- 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 -- or just use <C-\><C-n> to exit terminal mode
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' }) vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
-- TIP: Disable arrow keys in normal mode -- TIP: Disable arrow keys in normal mode
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>') -- 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', '<right>', '<cmd>echo "Use l to move!!"<CR>')
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k 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>') -- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
-- Keybinds to make split navigation easier. -- Keybinds to make split navigation easier.
-- Use CTRL+<hjkl> to switch between windows -- Use CTRL+<hjkl> to switch between windows
-- --
-- See `:help wincmd` for a list of all window commands -- 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-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-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-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' }) vim.keymap.set('n', '<C-Up>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
-- jump to next error -- jump to next error
vim.keymap.set("n", "t", vim.diagnostic.goto_prev) vim.keymap.set("n", "t", vim.diagnostic.goto_prev)
vim.keymap.set("n", "z", vim.diagnostic.goto_next) vim.keymap.set("n", "z", vim.diagnostic.goto_next)
-- [[ Basic Autocommands ]] -- [[ Basic Autocommands ]]
-- See `:help lua-guide-autocommands` -- See `:help lua-guide-autocommands`
-- Highlight when yanking (copying) text -- Highlight when yanking (copying) text
-- Try it with `yap` in normal mode -- Try it with `yap` in normal mode
-- See `:help vim.highlight.on_yank()` -- See `:help vim.highlight.on_yank()`
vim.api.nvim_create_autocmd('TextYankPost', { vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text', desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }), group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
callback = function() callback = function()
vim.highlight.on_yank() vim.highlight.on_yank()
end, end,
}) })
--require("multiple-cursors").setup({ --require("multiple-cursors").setup({
-- version = "*", -- Use the latest tagged version -- version = "*", -- Use the latest tagged version
-- opts = {}, -- This causes the plugin setup function to be called -- opts = {}, -- This causes the plugin setup function to be called
-- keys = { -- keys = {
-- {"<C-j>", "<Cmd>MultipleCursorsAddDown<CR>", mode = {"n", "x"}, desc = "Add cursor and move down"}, -- {"<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-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-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-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"}, -- {"<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>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>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>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>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>D", "<Cmd>MultipleCursorsJumpNextMatch<CR>", mode = {"n", "x"}, desc = "Jump to next cword"},
-- --
-- {"<Leader>l", "<Cmd>MultipleCursorsLock<CR>", mode = {"n", "x"}, desc = "Lock virtual cursors"}, -- {"<Leader>l", "<Cmd>MultipleCursorsLock<CR>", mode = {"n", "x"}, desc = "Lock virtual cursors"},
-- }, -- },
--}) --})
vim.keymap.set("n","§", "<cmd>Cheatsheet<CR>") vim.keymap.set("n","§", "<cmd>Cheatsheet<CR>")
require("cheatsheet").setup({ require("cheatsheet").setup({
bundled_cheatsheets = { bundled_cheatsheets = {
-- only show the default cheatsheet -- only show the default cheatsheet
enabled = { "default" }, enabled = { "default" },
@@ -178,13 +181,13 @@ require("cheatsheet").setup({
-- show cheatsheets for all plugins except gitsigns -- show cheatsheets for all plugins except gitsigns
disabled = { "gitsigns.nvim" }, disabled = { "gitsigns.nvim" },
} }
}) })
-- Can be applied to each buffer separately -- Can be applied to each buffer separately
local default_options = { local default_options = {
ui = { ui = {
wrap_line_after = false, -- wrap the line after this length to avoid the virtual text is too long 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 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
@@ -196,43 +199,43 @@ local default_options = {
}, },
priority = 2003, -- the priority of virtual text priority = 2003, -- the priority of virtual text
inline = true, inline = true,
} }
-- scrollbar -- scrollbar
require("scrollbar").setup() require("scrollbar").setup()
-- ufo https://github.com/kevinhwang91/nvim-ufo -- ufo https://github.com/kevinhwang91/nvim-ufo
vim.o.foldcolumn = '1' -- '0' is not bad 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.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
vim.o.foldlevelstart = 99 vim.o.foldlevelstart = 99
vim.o.foldenable = true vim.o.foldenable = true
-- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself -- 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', '1', "<cmd>foldopen<CR>")
vim.keymap.set('n', '2', "<cmd>foldclose<CR>") vim.keymap.set('n', '2', "<cmd>foldclose<CR>")
vim.keymap.set('n', '3', "<cmd>openAllFold<CR>") vim.keymap.set('n', '3', "<cmd>openAllFold<CR>")
vim.keymap.set('n', '4', "<cmd> closeAllFold<CR>") vim.keymap.set('n', '4', "<cmd> closeAllFold<CR>")
-- Option 3: treesitter as a main provider instead -- Option 3: treesitter as a main provider instead
-- (Note: the `nvim-treesitter` plugin is *not* needed.) -- (Note: the `nvim-treesitter` plugin is *not* needed.)
-- ufo uses the same query files for folding (queries/<lang>/folds.scm) -- ufo uses the same query files for folding (queries/<lang>/folds.scm)
-- performance and stability are better than `foldmethod=nvim_treesitter#foldexpr()` -- 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', '1', function() require("ufo").foldopen() end, {buffer=0})
--vim.keymap.set('n', '2', function() require("ufo").foldclose() end) --vim.keymap.set('n', '2', function() require("ufo").foldclose() end)
-- added by myself -- added by myself
require('ufo').setup({ require('ufo').setup({
provider_selector = function(bufnr, filetype, buftype) provider_selector = function(bufnr, filetype, buftype)
return {'treesitter', 'indent'} return {'treesitter', 'indent'}
end end
}) })
-- Color schemes should be loaded after plug#end(). -- Color schemes should be loaded after plug#end().
vim.o.background = "dark" -- or "light" for light mode vim.o.background = "dark" -- or "light" for light mode
-- Default options: -- Default options:
require("gruvbox").setup({ require("gruvbox").setup({
terminal_colors = true, -- add neovim terminal colors terminal_colors = true, -- add neovim terminal colors
undercurl = true, undercurl = true,
underline = true, underline = true,
@@ -255,19 +258,19 @@ require("gruvbox").setup({
overrides = {}, overrides = {},
dim_inactive = false, dim_inactive = false,
transparent_mode = false, transparent_mode = false,
}) })
vim.cmd("colorscheme gruvbox") vim.cmd("colorscheme gruvbox")
-- nvim-tree https://github.com/nvim-tree/nvim-tree.lua -- nvim-tree https://github.com/nvim-tree/nvim-tree.lua
-- disable netrw at the very start of your init.lua -- disable netrw at the very start of your init.lua
vim.g.loaded_netrw = 1 vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1 vim.g.loaded_netrwPlugin = 1
-- optionally enable 24-bit colour -- optionally enable 24-bit colour
vim.opt.termguicolors = true vim.opt.termguicolors = true
-- setup with some options -- setup with some options
require("nvim-tree").setup({ require("nvim-tree").setup({
sort = { sort = {
sorter = "case_sensitive", sorter = "case_sensitive",
}, },
@@ -280,12 +283,12 @@ require("nvim-tree").setup({
filters = { filters = {
dotfiles = true, dotfiles = true,
}, },
}) })
vim.opt.number = true vim.opt.number = true
-- Uncomment for opening the navigable tree file systeme on startup of NeoVim -- Uncomment for opening the navigable tree file systeme on startup of NeoVim
--vim.cmd('NvimTreeOpen') --vim.cmd('NvimTreeOpen')
require('md-pdf').setup({ require('md-pdf').setup({
--- Set margins around document --- Set margins around document
margins = "1.5cm", margins = "1.5cm",
-- tango, pygments are quite nice for white on white -- tango, pygments are quite nice for white on white
@@ -319,12 +322,12 @@ require('md-pdf').setup({
--- Path to output. Needs to be always relative, e.g.: "./", "../", "./out" or simply "out", but --- Path to output. Needs to be always relative, e.g.: "./", "../", "./out" or simply "out", but
--- not absolute e.g.: "/"! --- not absolute e.g.: "/"!
output_path = "", output_path = "",
}) })
-- setup mapping -- setup mapping
vim.keymap.set("n", "<Space>,", function() vim.keymap.set("n", "<Space>,", function()
require('md-pdf').convert_md_to_pdf() require('md-pdf').convert_md_to_pdf()
end) end)
-- Set up nvim-cmp. -- Set up nvim-cmp.
local cmp = require'cmp' local cmp = require'cmp'
@@ -393,76 +396,76 @@ end)
-- require(lspconfig) is deprecated -- require(lspconfig) is deprecated
-- -- Set up lspconfig. -- -- Set up lspconfig.
-- local capabilities = require('cmp_nvim_lsp').default_capabilities() -- local capabilities = require('cmp_nvim_lsp').default_capabilities()
-- -- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled. -- -- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled.
-- require('lspconfig')['texlab'].setup { -- require('lspconfig')['texlab'].setup {
-- capabilities = capabilities -- capabilities = capabilities
-- } -- }
--require'lspconfig'.clangd.setup{} --require'lspconfig'.clangd.setup{}
--lspconfig = require("lspconfig") --lspconfig = require("lspconfig")
--lspconfig.pylsp.setup { --lspconfig.pylsp.setup {
--on_attach = custom_attach, --on_attach = custom_attach,
--settings = { --settings = {
-- pylsp = { -- pylsp = {
-- plugins = { -- plugins = {
-- -- formatter options -- -- formatter options
-- black = { enabled = true }, -- black = { enabled = true },
-- autopep8 = { enabled = false }, -- autopep8 = { enabled = false },
-- yapf = { enabled = false }, -- yapf = { enabled = false },
-- -- linter options -- -- linter options
-- pylint = { enabled = true, executable = "pylint" }, -- pylint = { enabled = true, executable = "pylint" },
-- pyflakes = { enabled = false }, -- pyflakes = { enabled = false },
-- pycodestyle = { enabled = false }, -- pycodestyle = { enabled = false },
-- -- type checker -- -- type checker
-- pylsp_mypy = { enabled = true }, -- pylsp_mypy = { enabled = true },
-- -- auto-completion options -- -- auto-completion options
-- jedi_completion = { fuzzy = true }, -- jedi_completion = { fuzzy = true },
-- -- import sorting -- -- import sorting
-- pyls_isort = { enabled = true }, -- pyls_isort = { enabled = true },
-- }, -- },
-- }, -- },
--}, --},
--flags = { --flags = {
-- debounce_text_changes = 200, -- debounce_text_changes = 200,
--}, --},
--capabilities = capabilities, --capabilities = capabilities,
--} --}
---- lua-lsp ---- lua-lsp
--require'lspconfig'.lua_ls.setup{} --require'lspconfig'.lua_ls.setup{}
-- --
--new version --new version
-- ============================ -- ============================
-- LSP CONFIGURATION (Neovim 0.11+) -- LSP CONFIGURATION (Neovim 0.11+)
-- ============================ -- ============================
-- Set up capabilities for nvim-cmp LSP completion -- Set up capabilities for nvim-cmp LSP completion
local capabilities = require('cmp_nvim_lsp').default_capabilities() local capabilities = require('cmp_nvim_lsp').default_capabilities()
-- Optional: custom on_attach function if you have keymaps -- Optional: custom on_attach function if you have keymaps
-- local custom_attach = function(client, bufnr) -- local custom_attach = function(client, bufnr)
-- -- your on_attach code here -- -- your on_attach code here
-- end -- end
-- Utility function to simplify server setup -- Utility function to simplify server setup
local function setup_lsp(server_name, opts) local function setup_lsp(server_name, opts)
vim.lsp.config(server_name, opts or {}) vim.lsp.config(server_name, opts or {})
end end
-- ======== LSP SERVERS ======== -- ======== LSP SERVERS ========
-- TeXLab -- TeXLab
setup_lsp("texlab", { setup_lsp("texlab", {
capabilities = capabilities, capabilities = capabilities,
}) })
-- Clangd (C/C++) -- Clangd (C/C++)
setup_lsp("clangd", { setup_lsp("clangd", {
capabilities = capabilities, capabilities = capabilities,
}) })
-- Python LSP (pylsp) -- Python LSP (pylsp)
setup_lsp("pylsp", { setup_lsp("pylsp", {
on_attach = custom_attach, on_attach = custom_attach,
capabilities = capabilities, capabilities = capabilities,
flags = { flags = {
@@ -488,16 +491,16 @@ setup_lsp("pylsp", {
}, },
}, },
}, },
}) })
-- Lua LSP -- Lua LSP
setup_lsp("lua_ls", { setup_lsp("lua_ls", {
capabilities = capabilities, capabilities = capabilities,
}) })
-- dashboard config -- dashboard config
require('dashboard').setup { require('dashboard').setup {
theme = 'hyper', theme = 'hyper',
config = { config = {
header = { header = {
@@ -517,7 +520,7 @@ require('dashboard').setup {
" \"\"**\"\" ", " \"\"**\"\" ",
"", "",
"" ""
}, },
shortcut = { shortcut = {
{ desc = " Open File Tree", group = "", key = 't', action = 'NvimTreeOpen' }, { desc = " Open File Tree", group = "", key = 't', action = 'NvimTreeOpen' },
-- action can be a function type -- action can be a function type
@@ -529,18 +532,18 @@ require('dashboard').setup {
project = { enable = true, limit = 8, icon = ' New file', label = "", action = 'Telescope find_files cwd=' }, project = { enable = true, limit = 8, icon = ' New file', label = "", action = 'Telescope find_files cwd=' },
mru = { limit = 10, icon = ' History', label = "", cwd_only = false }, mru = { limit = 10, icon = ' History', label = "", cwd_only = false },
footer = {}, -- footer footer = {}, -- footer
} }
} }
-- lualine config https://github.com/nvim-lualine/lualine.nvim/blob/master/examples/bubbles.lua -- lualine config https://github.com/nvim-lualine/lualine.nvim/blob/master/examples/bubbles.lua
require('lualine').setup { require('lualine').setup {
options = { theme = "gruvbox_dark" }, options = { theme = "gruvbox_dark" },
} }
local builtin = require('telescope.builtin') local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' }) 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>fg', builtin.live_grep, { desc = 'Telescope live grep' })
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' }) vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' }) vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
''; '';
}; };
+4 -2
View File
@@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
programs.oh-my-posh = { programs.oh-my-posh = {
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
+5 -3
View File
@@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
programs.zsh.oh-my-zsh = { programs.zsh.oh-my-zsh = {
enable = true; enable = true;
theme = "jonathan"; theme = "jonathan";
@@ -16,6 +18,6 @@
"rclone" "rclone"
"safe-paste" "safe-paste"
"sudo" "sudo"
]; ];
}; };
} }
+5 -2
View File
@@ -1,6 +1,9 @@
{ config, pkgs, agenix, ... }:
{ {
config,
pkgs,
agenix,
...
}: {
programs.rclone = { programs.rclone = {
enable = true; enable = true;
}; };
+4 -3
View File
@@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
programs.ripgrep = { programs.ripgrep = {
enable = true; enable = true;
arguments = [ arguments = [
@@ -13,5 +15,4 @@
programs.ripgrep-all = { programs.ripgrep-all = {
enable = true; enable = true;
}; };
} }
+5 -3
View File
@@ -1,8 +1,10 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
programs.rofi = { programs.rofi = {
enable = true; enable = true;
theme = "gruvbox-dark-hard"; theme = "gruvbox-dark-hard";
}; };
} }
+17 -7
View File
@@ -1,13 +1,23 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
programs.ssh = { programs.ssh = {
enable = true; enable = true;
#agentKeys = [ matchBlocks."*" = {
# "/home/tomasr/.ssh/id_ed25519" # 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; services.ssh-agent.enable = true;
} }
+33 -31
View File
@@ -1,38 +1,40 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
programs.swaylock = { programs.swaylock = {
enable = true; enable = true;
settings = { settings = {
color="1e1e2e"; color = "1e1e2e";
bs-hl-color="f5e0dc"; bs-hl-color = "f5e0dc";
caps-lock-bs-hl-color="f5e0dc"; caps-lock-bs-hl-color = "f5e0dc";
caps-lock-key-hl-color="a6e3a1"; caps-lock-key-hl-color = "a6e3a1";
inside-color="00000000"; inside-color = "00000000";
inside-clear-color = "00000000"; inside-clear-color = "00000000";
inside-caps-lock-color="00000000"; inside-caps-lock-color = "00000000";
inside-ver-color="00000000"; inside-ver-color = "00000000";
inside-wrong-color="00000000"; inside-wrong-color = "00000000";
key-hl-color="a6e3a1"; key-hl-color = "a6e3a1";
layout-bg-color="00000000"; layout-bg-color = "00000000";
layout-border-color="00000000"; layout-border-color = "00000000";
layout-text-color="cdd6f4"; layout-text-color = "cdd6f4";
line-color="00000000"; line-color = "00000000";
line-clear-color="00000000"; line-clear-color = "00000000";
line-caps-lock-color="00000000"; line-caps-lock-color = "00000000";
line-ver-color="00000000"; line-ver-color = "00000000";
line-wrong-color="00000000"; line-wrong-color = "00000000";
ring-color="b4befe"; ring-color = "b4befe";
ring-clear-color="f5e0dc"; ring-clear-color = "f5e0dc";
ring-caps-lock-color="fab387"; ring-caps-lock-color = "fab387";
ring-ver-color="89b4fa"; ring-ver-color = "89b4fa";
ring-wrong-color="eba0ac"; ring-wrong-color = "eba0ac";
separator-color="00000000"; separator-color = "00000000";
text-color="cdd6f4"; text-color = "cdd6f4";
text-clear-color="f5e0dc"; text-clear-color = "f5e0dc";
text-caps-lock-color="fab387"; text-caps-lock-color = "fab387";
text-ver-color="89b4fa"; text-ver-color = "89b4fa";
text-wrong-color="eba0ac"; text-wrong-color = "eba0ac";
};
}; };
};
} }
+4 -2
View File
@@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
services.swaync = { services.swaync = {
enable = true; enable = true;
}; };
+149 -148
View File
@@ -1,7 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
programs.waybar = { programs.waybar = {
enable = true; enable = true;
settings = [ settings = [
@@ -63,7 +64,7 @@
}; };
"group/connection" = { "group/connection" = {
orientation = "inherit"; orientation = "inherit";
modules = [ "group/network" ]; modules = ["group/network"];
}; };
"group/gcpu" = { "group/gcpu" = {
orientation = "inherit"; orientation = "inherit";
@@ -270,7 +271,7 @@
"default" = ""; "default" = "";
}; };
persistent-workspaces = { persistent-workspaces = {
"*" = [ 1 2 3 4 5 6 7 8 9 10 ]; "*" = [1 2 3 4 5 6 7 8 9 10];
}; };
}; };
idle_inhibitor = { idle_inhibitor = {
@@ -288,9 +289,9 @@
network = { network = {
format = "{icon}"; format = "{icon}";
format-icons = { format-icons = {
wifi = [ "󰤨" ]; wifi = ["󰤨"];
ethernet = [ "󰈀" ]; ethernet = ["󰈀"];
disconnected = [ "󰖪" ]; disconnected = ["󰖪"];
}; };
format-wifi = "󰤨"; format-wifi = "󰤨";
format-ethernet = "󰈀"; format-ethernet = "󰈀";
@@ -369,30 +370,30 @@
} }
]; # home-manager wants the whole config as a list of bars ]; # home-manager wants the whole config as a list of bars
style = '' style = ''
@define-color foreground #c5c5c5; @define-color foreground #c5c5c5;
@define-color background #191919; @define-color background #191919;
@define-color cursor #c5c5c5; @define-color cursor #c5c5c5;
@define-color color0 #191919; @define-color color0 #191919;
@define-color color1 #3a3632; @define-color color1 #3a3632;
@define-color color2 #582c1e; @define-color color2 #582c1e;
@define-color color3 #423f39; @define-color color3 #423f39;
@define-color color4 #50473c; @define-color color4 #50473c;
@define-color color5 #634723; @define-color color5 #634723;
@define-color color6 #BAA470; @define-color color6 #BAA470;
@define-color color7 #8c8c8c; @define-color color7 #8c8c8c;
@define-color color8 #525252; @define-color color8 #525252;
@define-color color9 #4e4843; @define-color color9 #4e4843;
@define-color color10 #763b28; @define-color color10 #763b28;
@define-color color11 #59554c; @define-color color11 #59554c;
@define-color color12 #6b5f51; @define-color color12 #6b5f51;
@define-color color13 #855f2f; @define-color color13 #855f2f;
@define-color color14 #796d62; @define-color color14 #796d62;
@define-color color15 #c5c5c5; @define-color color15 #c5c5c5;
@define-color active @color6; @define-color active @color6;
* { * {
font-size: 23px; font-size: 23px;
font-family: "0xProto Nerd Font"; font-family: "0xProto Nerd Font";
min-width: 8px; min-width: 8px;
@@ -404,9 +405,9 @@
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
} }
window#waybar { window#waybar {
transition-property: background-color; transition-property: background-color;
transition-duration: 0.5s; transition-duration: 0.5s;
border-radius: 8px; border-radius: 8px;
@@ -414,283 +415,283 @@ window#waybar {
background: @background; background: @background;
background: alpha(@background, 0.7); background: alpha(@background, 0.7);
color: lighter(@active); color: lighter(@active);
} }
menu, menu,
tooltip { tooltip {
border-radius: 8px; border-radius: 8px;
padding: 2px; padding: 2px;
border: 1px solid lighter(@active); border: 1px solid lighter(@active);
background: alpha(@background, 0.6); background: alpha(@background, 0.6);
color: lighter(@active); color: lighter(@active);
} }
menu label, menu label,
tooltip label { tooltip label {
font-size: 20px; font-size: 20px;
color: lighter(@active); color: lighter(@active);
} }
#submap, #submap,
#tray>.needs-attention { #tray>.needs-attention {
animation-name: blink-active; animation-name: blink-active;
animation-duration: 1s; animation-duration: 1s;
animation-timing-function: linear; animation-timing-function: linear;
animation-iteration-count: infinite; animation-iteration-count: infinite;
animation-direction: alternate; animation-direction: alternate;
} }
.modules-right { .modules-right {
margin: 0px 6px 6px 6px; margin: 0px 6px 6px 6px;
border-radius: 4px; border-radius: 4px;
background: alpha(@background, 0.4); background: alpha(@background, 0.4);
color: lighter(@active); color: lighter(@active);
} }
.modules-left { .modules-left {
transition-property: background-color; transition-property: background-color;
transition-duration: 0.5s; transition-duration: 0.5s;
margin: 6px 6px 6px 6px; margin: 6px 6px 6px 6px;
border-radius: 4px; border-radius: 4px;
background: alpha(@background, 0.4); background: alpha(@background, 0.4);
color: lighter(@active); color: lighter(@active);
} }
#gcpu, #gcpu,
#custom-github, #custom-github,
#memory, #memory,
#disk, #disk,
#together, #together,
#submap, #submap,
#custom-weather { #custom-weather {
font-size: 17px; font-size: 17px;
} }
#custom-recorder, #custom-recorder,
#connection, #connection,
#cnoti, #cnoti,
#brightness, #brightness,
#power, #power,
#custom-updates, #custom-updates,
#tray, #tray,
#audio, #audio,
#privacy, #privacy,
#sound { #sound {
border-radius: 4px; border-radius: 4px;
margin: 2px 2px 4px 2px; margin: 2px 2px 4px 2px;
background: alpha(darker(@active), 0.3); background: alpha(darker(@active), 0.3);
} }
#custom-notifications { #custom-notifications {
padding-left: 4px; padding-left: 4px;
} }
#custom-hotspot, #custom-hotspot,
#custom-github, #custom-github,
#custom-notifications { #custom-notifications {
font-size: 20px; font-size: 20px;
} }
#custom-hotspot { #custom-hotspot {
padding-right: 2px; padding-right: 2px;
} }
#custom-vpn, #custom-vpn,
#custom-hotspot { #custom-hotspot {
background: alpha(darker(@active), 0.3); background: alpha(darker(@active), 0.3);
} }
#privacy-item { #privacy-item {
padding: 6px 0px 6px 6px; padding: 6px 0px 6px 6px;
} }
#gcpu { #gcpu {
padding: 8px 0px 8px 0px; padding: 8px 0px 8px 0px;
} }
#custom-cpu-icon { #custom-cpu-icon {
font-size: 36px; font-size: 36px;
} }
#custom-cputemp, #custom-cputemp,
#temperature { #temperature {
font-size: 17px; font-size: 17px;
} }
#disk, #disk,
#memory, #memory,
#cpu { #cpu {
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
} }
#custom-github { #custom-github {
padding-top: 2px; padding-top: 2px;
padding-right: 4px; padding-right: 4px;
} }
#custom-dmark { #custom-dmark {
color: alpha(@foreground, 0.3); color: alpha(@foreground, 0.3);
} }
#submap { #submap {
margin-bottom: 0px; margin-bottom: 0px;
} }
#hyprland.window { #hyprland.window {
margin-left: 20px; margin-left: 20px;
} }
#workspaces { #workspaces {
margin: 0px 2px; margin: 0px 2px;
padding: 4px 0px 0px 0px; padding: 4px 0px 0px 0px;
border-radius: 8px; border-radius: 8px;
} }
#workspaces button { #workspaces button {
transition-property: background-color; transition-property: background-color;
transition-duration: 0.5s; transition-duration: 0.5s;
color: @foreground; color: @foreground;
background: transparent; background: transparent;
border-radius: 4px; border-radius: 4px;
color: alpha(@foreground, 0.3); color: alpha(@foreground, 0.3);
} }
#workspaces button.urgent { #workspaces button.urgent {
font-weight: bold; font-weight: bold;
color: @foreground; color: @foreground;
} }
#workspaces button.active { #workspaces button.active {
padding: 4px 2px; padding: 4px 2px;
background: alpha(@active, 0.4); background: alpha(@active, 0.4);
color: lighter(@active); color: lighter(@active);
border-radius: 4px; border-radius: 4px;
} }
#network.wifi { #network.wifi {
padding-right: 4px; padding-right: 4px;
} }
#submap { #submap {
min-width: 0px; min-width: 0px;
margin: 4px 6px 4px 6px; margin: 4px 6px 4px 6px;
} }
#tray { #tray {
padding: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;
} }
#bluetooth { #bluetooth {
padding-top: 2px; padding-top: 2px;
} }
#window { #window {
border-radius: 8px; border-radius: 8px;
padding: 4px 14px; padding: 4px 14px;
margin: 4px 2px 4px 2px; margin: 4px 2px 4px 2px;
} }
#battery { #battery {
font-size: 17px; font-size: 17px;
border-radius: 8px; border-radius: 8px;
padding: 4px 0px; padding: 4px 0px;
margin: 4px 2px 4px 2px; margin: 4px 2px 4px 2px;
} }
#battery.discharging.warning { #battery.discharging.warning {
animation-name: blink-yellow; animation-name: blink-yellow;
animation-duration: 1s; animation-duration: 1s;
animation-timing-function: linear; animation-timing-function: linear;
animation-iteration-count: infinite; animation-iteration-count: infinite;
animation-direction: alternate; animation-direction: alternate;
} }
#battery.discharging.critical { #battery.discharging.critical {
animation-name: blink-red; animation-name: blink-red;
animation-duration: 1s; animation-duration: 1s;
animation-timing-function: linear; animation-timing-function: linear;
animation-iteration-count: infinite; animation-iteration-count: infinite;
animation-direction: alternate; animation-direction: alternate;
} }
#battery.powerdraw { #battery.powerdraw {
font-size: 17px; font-size: 17px;
padding: 0; padding: 0;
margin-right: -20px; margin-right: -20px;
margin-left: -20px; margin-left: -20px;
} }
#battery.w { #battery.w {
font-size: 17px; font-size: 17px;
padding: 0; padding: 0;
margin-left: -20px; margin-left: -20px;
margin-right: -20px; margin-right: -20px;
} }
#clock { #clock {
font-weight: bold; font-weight: bold;
padding: 4px 2px 2px 2px; padding: 4px 2px 2px 2px;
} }
#pulseaudio.mic { #pulseaudio.mic {
border-radius: 4px; border-radius: 4px;
color: @background; color: @background;
background: alpha(darker(@foreground), 0.6); background: alpha(darker(@foreground), 0.6);
padding-left: 4px; padding-left: 4px;
} }
#backlight-slider slider, #backlight-slider slider,
#pulseaudio-slider slider { #pulseaudio-slider slider {
background-color: transparent; background-color: transparent;
box-shadow: none; box-shadow: none;
} }
#backlight-slider trough, #backlight-slider trough,
#pulseaudio-slider trough { #pulseaudio-slider trough {
margin-top: 4px; margin-top: 4px;
min-width: 6px; min-width: 6px;
min-height: 60px; min-height: 60px;
border-radius: 8px; border-radius: 8px;
background-color: alpha(@background, 0.6); background-color: alpha(@background, 0.6);
} }
#backlight-slider highlight, #backlight-slider highlight,
#pulseaudio-slider highlight { #pulseaudio-slider highlight {
border-radius: 8px; border-radius: 8px;
background-color: lighter(@active); background-color: lighter(@active);
} }
#bluetooth.discoverable, #bluetooth.discoverable,
#bluetooth.discovering, #bluetooth.discovering,
#bluetooth.pairable { #bluetooth.pairable {
border-radius: 8px; border-radius: 8px;
animation-name: blink-active; animation-name: blink-active;
animation-duration: 1s; animation-duration: 1s;
animation-timing-function: linear; animation-timing-function: linear;
animation-iteration-count: infinite; animation-iteration-count: infinite;
animation-direction: alternate; animation-direction: alternate;
} }
@keyframes blink-active { @keyframes blink-active {
to { to {
background-color: @active; background-color: @active;
color: @foreground; color: @foreground;
} }
} }
@keyframes blink-red { @keyframes blink-red {
to { to {
background-color: #c64d4f; background-color: #c64d4f;
color: @foreground; color: @foreground;
} }
} }
@keyframes blink-yellow { @keyframes blink-yellow {
to { to {
background-color: #cf9022; background-color: #cf9022;
color: @foreground; color: @foreground;
} }
} }
''; '';
}; };
} }
+40 -38
View File
@@ -1,5 +1,8 @@
{ config, pkgs, ... }: {
let config,
pkgs,
...
}: let
wallpaper = ../../assets/wallpaper1.jpg; wallpaper = ../../assets/wallpaper1.jpg;
lock = ../../assets/lock.png; lock = ../../assets/lock.png;
lock-hover = ../../assets/lock-hover.png; lock-hover = ../../assets/lock-hover.png;
@@ -9,8 +12,7 @@ let
logout-hover = ../../assets/logout-hover.png; logout-hover = ../../assets/logout-hover.png;
reboot = ../../assets/restart.png; reboot = ../../assets/restart.png;
reboot-hover = ../../assets/restart-hover.png; reboot-hover = ../../assets/restart-hover.png;
in in {
{
programs.wlogout = { programs.wlogout = {
enable = true; enable = true;
layout = [ layout = [
@@ -40,14 +42,14 @@ in
} }
]; ];
style = '' style = ''
window { window {
font-family: OxProto Nerd Font; font-family: OxProto Nerd Font;
font-size: 14pt; font-size: 14pt;
color: #000000; /* text */ color: #000000; /* text */
background-color: rgba(40, 40, 40, 0.76); background-color: rgba(40, 40, 40, 0.76);
} }
button { button {
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
background-size: 50%; background-size: 50%;
@@ -60,58 +62,58 @@ button {
transition: transition:
box-shadow 0.3s ease-in-out, box-shadow 0.3s ease-in-out,
background-color 0.3s ease-in-out; background-color 0.3s ease-in-out;
} }
button:hover { button:hover {
background-color: rgba(250, 137, 26, 0.3); background-color: rgba(250, 137, 26, 0.3);
color: #282828; color: #282828;
} }
button:focus { button:focus {
background-color: #ebdbb2; background-color: #ebdbb2;
color: #282828; color: #282828;
} }
#lock { #lock {
background-image: image(url("${lock}")); background-image: image(url("${lock}"));
} }
#lock:focus { #lock:focus {
background-image: image(url("${lock-hover}")); background-image: image(url("${lock-hover}"));
} }
#lock:hover { #lock:hover {
background-image: image(url("${lock-hover}")); background-image: image(url("${lock-hover}"));
} }
#logout { #logout {
background-image: image(url("${logout}")); background-image: image(url("${logout}"));
} }
#logout:focus { #logout:focus {
background-image: image(url("${logout-hover}")); background-image: image(url("${logout-hover}"));
} }
#logout:hover { #logout:hover {
background-image: image(url("${logout-hover}")); background-image: image(url("${logout-hover}"));
} }
#shutdown { #shutdown {
background-image: image(url("${shutdown}")); background-image: image(url("${shutdown}"));
} }
#shutdown:focus { #shutdown:focus {
background-image: image(url("${shutdown-hover}")); background-image: image(url("${shutdown-hover}"));
} }
#shutdown:hover { #shutdown:hover {
background-image: image(url("${shutdown-hover}")); background-image: image(url("${shutdown-hover}"));
} }
#reboot { #reboot {
background-image: image(url("${reboot}")); background-image: image(url("${reboot}"));
} }
#reboot:focus { #reboot:focus {
background-image: image(url("${reboot-hover}")); background-image: image(url("${reboot-hover}"));
} }
#reboot:hover { #reboot:hover {
background-image: image(url("${reboot-hover}")); background-image: image(url("${reboot-hover}"));
} }
''; '';
}; };
} }
+4 -2
View File
@@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
programs.zoxide = { programs.zoxide = {
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
+8 -7
View File
@@ -1,21 +1,22 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
autosuggestion.enable = true; autosuggestion.enable = true;
initContent = '' initContent = ''
# Safe cat that uses colorize plugin ccat # Safe cat that uses colorize plugin ccat
custom-cat() { custom-cat() {
if [[ -t 1 ]]; then if [[ -t 1 ]]; then
ccat "$@" ccat "$@"
else else
command cat "$@" command cat "$@"
fi fi
} }
fastfetch''\n'' fastfetch''\n'';
;
shellAliases = { shellAliases = {
".." = "z .."; ".." = "z ..";
grep = "rg"; grep = "rg";
+32 -31
View File
@@ -1,56 +1,57 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
(pkgs.anki.withAddons [ (pkgs.anki.withAddons [
(pkgs.ankiAddons.recolor.withConfig { (pkgs.ankiAddons.recolor.withConfig {
config = { config = {
# we must specify all the colors or it crashes as this overwrite the whole colors set # we must specify all the colors or it crashes as this overwrite the whole colors set
colors = { colors = {
# ===== Foregrounds ===== # ===== Foregrounds =====
FG = [ "Foreground" "#ebdbb2" "#ebdbb2" "" ]; FG = ["Foreground" "#ebdbb2" "#ebdbb2" ""];
FG_SUBTLE = [ "Subtle FG" "#d5c4a1" "#d5c4a1" "" ]; FG_SUBTLE = ["Subtle FG" "#d5c4a1" "#d5c4a1" ""];
FG_FAINT = [ "Faint FG" "#a89984" "#a89984" "" ]; FG_FAINT = ["Faint FG" "#a89984" "#a89984" ""];
FG_DISABLED = [ "Disabled FG" "#928374" "#928374" "" ]; FG_DISABLED = ["Disabled FG" "#928374" "#928374" ""];
# ===== Main Background Layers ===== # ===== Main Background Layers =====
BG = [ "Background" "#1d2021" "#1d2021" "" ]; BG = ["Background" "#1d2021" "#1d2021" ""];
MAIN_BG = [ "Main Background" "#1d2021" "#1d2021" "" ]; MAIN_BG = ["Main Background" "#1d2021" "#1d2021" ""];
VIEW_BG = [ "View Background" "#282828" "#282828" "" ]; VIEW_BG = ["View Background" "#282828" "#282828" ""];
EDITOR_BG = [ "Editor Background" "#282828" "#282828" "" ]; EDITOR_BG = ["Editor Background" "#282828" "#282828" ""];
CANVAS = [ "Canvas" "#282828" "#282828" "" ]; CANVAS = ["Canvas" "#282828" "#282828" ""];
CANVAS_ELEVATED = [ "Elevated Canvas" "#32302f" "#32302f" "" ]; CANVAS_ELEVATED = ["Elevated Canvas" "#32302f" "#32302f" ""];
# ===== Tables & Lists ===== # ===== Tables & Lists =====
TABLE_BG = [ "Table Background" "#282828" "#282828" "" ]; TABLE_BG = ["Table Background" "#282828" "#282828" ""];
TABLE_ALT_BG = [ "Table Alt Background" "#32302f" "#32302f" "" ]; TABLE_ALT_BG = ["Table Alt Background" "#32302f" "#32302f" ""];
HEADER_BG = [ "Header Background" "#3c3836" "#3c3836" "" ]; HEADER_BG = ["Header Background" "#3c3836" "#3c3836" ""];
SELECTED_BG = [ "Selected Background" "#504945" "#504945" "" ]; SELECTED_BG = ["Selected Background" "#504945" "#504945" ""];
# ===== Borders ===== # ===== Borders =====
BORDER = [ "Border" "#504945" "#504945" "" ]; BORDER = ["Border" "#504945" "#504945" ""];
FAINT_BORDER = [ "Faint Border" "#3c3836" "#3c3836" "" ]; FAINT_BORDER = ["Faint Border" "#3c3836" "#3c3836" ""];
# ===== Buttons ===== # ===== Buttons =====
BUTTON_GRADIENT_START = [ "Button Start" "#3c3836" "#3c3836" "" ]; BUTTON_GRADIENT_START = ["Button Start" "#3c3836" "#3c3836" ""];
BUTTON_GRADIENT_END = [ "Button End" "#3c3836" "#3c3836" "" ]; BUTTON_GRADIENT_END = ["Button End" "#3c3836" "#3c3836" ""];
BUTTON_HOVER = [ "Button Hover" "#665c54" "#665c54" "" ]; BUTTON_HOVER = ["Button Hover" "#665c54" "#665c54" ""];
# ===== Accent & Links ===== # ===== Accent & Links =====
ACCENT = [ "Accent" "#458588" "#458588" "" ]; ACCENT = ["Accent" "#458588" "#458588" ""];
LINK = [ "Link" "#83a598" "#83a598" "" ]; LINK = ["Link" "#83a598" "#83a598" ""];
LINK_HOVER = [ "Link Hover" "#8ec07c" "#8ec07c" "" ]; LINK_HOVER = ["Link Hover" "#8ec07c" "#8ec07c" ""];
# ===== Status ===== # ===== Status =====
WARNING = [ "Warning" "#fe8019" "#fe8019" "" ]; WARNING = ["Warning" "#fe8019" "#fe8019" ""];
ERROR = [ "Error" "#fb4934" "#fb4934" "" ]; ERROR = ["Error" "#fb4934" "#fb4934" ""];
SUCCESS = [ "Success" "#8ec07c" "#8ec07c" "" ]; SUCCESS = ["Success" "#8ec07c" "#8ec07c" ""];
}; };
}; };
# version = { major = 3; minor = 1; }; # version = { major = 3; minor = 1; };
# let nixpkgs handle the version # let nixpkgs handle the version
}) })
]) ])
]; ];
} }
+11 -16
View File
@@ -1,27 +1,22 @@
# https://discourse.nixos.org/t/what-is-the-best-option-for-power-management/63406/2 # https://discourse.nixos.org/t/what-is-the-best-option-for-power-management/63406/2
{ {...}:
...
}:
# we just activate tlp unconditonally # we just activate tlp unconditonally
#let #let
# cfg = config.custom; # cfg = config.custom;
#hasBattery = #hasBattery =
# lib.any (x: lib.strings.hasPrefix "BAT" x) # lib.any (x: lib.strings.hasPrefix "BAT" x)
# (builtins.attrNames (builtins.readDir "/sys/class/power_supply")); # (builtins.attrNames (builtins.readDir "/sys/class/power_supply"));
#in #in
{ {
# options.custom = { # options.custom = {
# battery.enable = lib.mkOption { # battery.enable = lib.mkOption {
# default = hasBattery; # default = hasBattery;
# description = "Enable better battery support"; # description = "Enable better battery support";
# type = lib.types.bool; # type = lib.types.bool;
# }; # };
# }; # };
# config = lib.mkIf cfg.battery.enable { # config = lib.mkIf cfg.battery.enable {
powerManagement.powertop.enable = true; # enable powertop auto tuning on startup. powerManagement.powertop.enable = true; # enable powertop auto tuning on startup.
services.system76-scheduler.settings.cfsProfiles.enable = true; # Better scheduling for CPU cycles - thanks System76!!! 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.thermald.enable = true; # Enable thermald, the temperature management daemon. (only necessary if on Intel CPUs)
@@ -40,8 +35,8 @@
PLATFORM_PROFILE_ON_AC = "performance"; PLATFORM_PROFILE_ON_AC = "performance";
PLATFORM_PROFILE_ON_BAT = "balanced"; PLATFORM_PROFILE_ON_BAT = "balanced";
START_CHARGE_THRESH_BAT1 = 75; START_CHARGE_THRESH_BAT1 = 75;
STOP_CHARGE_THRESH_BAT1= 85; STOP_CHARGE_THRESH_BAT1 = 85;
}; };
}; };
# }; # };
} }
+1 -3
View File
@@ -1,6 +1,4 @@
{ ...}: {...}: {
{
services.displayManager.ly = { services.displayManager.ly = {
enable = true; enable = true;
settings = { settings = {
+17 -18
View File
@@ -1,27 +1,26 @@
{... }: {...}: {
{
# a minimal ly config as the big config (ly.nix) didnt worked # a minimal ly config as the big config (ly.nix) didnt worked
services.displayManager.ly = { services.displayManager.ly = {
enable = true; enable = true;
settings = { settings = {
# Core animation # Core animation
animation = "colormix"; # none or doom or matrix or gameoflife or a dur file animation = "colormix"; # 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. # 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. # 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: # Here are the possible styling options:
# TB_BOLD 0x01000000 # TB_BOLD 0x01000000
# TB_UNDERLINE 0x02000000 # TB_UNDERLINE 0x02000000
# TB_REVERSE 0x04000000 # TB_REVERSE 0x04000000
# TB_ITALIC 0x08000000 # TB_ITALIC 0x08000000
# TB_BLINK 0x10000000 # TB_BLINK 0x10000000
# TB_HI_BLACK 0x20000000 # TB_HI_BLACK 0x20000000
# TB_BRIGHT 0x40000000 # TB_BRIGHT 0x40000000
# TB_DIM 0x80000000 # TB_DIM 0x80000000
# Programmatically, you'd apply them using the bitwise OR operator (|), but because Ly's # 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. # 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 # 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 # 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). # the styling option TB_HI_BLACK (the RGB values are ignored when using this option).
# Basic TUI settings # Basic TUI settings
clear_password = true; clear_password = true;
default_input = "password"; default_input = "password";
+124 -122
View File
@@ -1,136 +1,138 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
# udev are setup for controlling the framework 16 laptop's keyboard # udev are setup for controlling the framework 16 laptop's keyboard
services.udev.extraRules = '' services.udev.extraRules = ''
## https://github.com/qmk/qmk_firmware/blob/master/util/udev/50-qmk.extraRules ## https://github.com/qmk/qmk_firmware/blob/master/util/udev/50-qmk.extraRules
## Atmel DFU ## Atmel DFU
#### ATmega16U2 #### ATmega16U2
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2fef", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2fef", TAG+="uaccess"
#### ATmega32U2 #### ATmega32U2
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess"
#### ATmega16U4 #### ATmega16U4
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff3", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff3", TAG+="uaccess"
#### ATmega32U4 #### ATmega32U4
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess"
#### AT90USB64 #### AT90USB64
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff9", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff9", TAG+="uaccess"
#### AT90USB162 #### AT90USB162
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffa", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffa", TAG+="uaccess"
#### AT90USB128 #### AT90USB128
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess"
# #
## Input Club ## Input Club
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess"
# #
## STM32duino ## STM32duino
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess"
## STM32 DFU ## STM32 DFU
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess"
# #
## BootloadHID ## BootloadHID
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess"
# #
## USBAspLoader ## USBAspLoader
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", TAG+="uaccess"
# #
## USBtinyISP ## USBtinyISP
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="1782", ATTRS{idProduct}=="0c9f", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="1782", ATTRS{idProduct}=="0c9f", TAG+="uaccess"
# #
## ModemManager should ignore the following devices ## ModemManager should ignore the following devices
## Atmel SAM-BA (Massdrop) ## Atmel SAM-BA (Massdrop)
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
# #
## Caterina (Pro Micro) ## Caterina (Pro Micro)
### pid.codes shared PID ### pid.codes shared PID
#### Keyboardio Atreus 2 Bootloader #### Keyboardio Atreus 2 Bootloader
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2302", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2302", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
### Spark Fun Electronics ### Spark Fun Electronics
#### Pro Micro 3V3/8MHz #### Pro Micro 3V3/8MHz
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
#### Pro Micro 5V/16MHz #### Pro Micro 5V/16MHz
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
#### LilyPad 3V3/8MHz (and some Pro Micro clones) #### LilyPad 3V3/8MHz (and some Pro Micro clones)
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9207", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9207", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
### Pololu Electronics ### Pololu Electronics
#### A-Star 32U4 #### A-Star 32U4
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="1ffb", ATTRS{idProduct}=="0101", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="1ffb", ATTRS{idProduct}=="0101", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
### Arduino SA ### Arduino SA
#### Leonardo #### Leonardo
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
#### Micro #### Micro
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
### Adafruit Industries LLC ### Adafruit Industries LLC
#### Feather 32U4 #### Feather 32U4
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000c", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000c", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
#### ItsyBitsy 32U4 3V3/8MHz #### ItsyBitsy 32U4 3V3/8MHz
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000d", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000d", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
#### ItsyBitsy 32U4 5V/16MHz #### ItsyBitsy 32U4 5V/16MHz
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000e", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000e", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
### dog hunter AG ### dog hunter AG
#### Leonardo #### Leonardo
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
#### Micro #### Micro
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
# #
## hid_listen ## hid_listen
#KERNEL=="hidraw*", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl" #KERNEL=="hidraw*", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl"
# #
## hid bootloaders ## hid bootloaders
### QMK HID ### QMK HID
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2067", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2067", TAG+="uaccess"
### PJRC's HalfKay ### PJRC's HalfKay
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0478", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0478", TAG+="uaccess"
# #
## APM32 DFU ## APM32 DFU
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="314b", ATTRS{idProduct}=="0106", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="314b", ATTRS{idProduct}=="0106", TAG+="uaccess"
# #
## GD32V DFU ## GD32V DFU
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="28e9", ATTRS{idProduct}=="0189", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="28e9", ATTRS{idProduct}=="0189", TAG+="uaccess"
# #
## WB32 DFU ## WB32 DFU
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="342d", ATTRS{idProduct}=="dfa0", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="342d", ATTRS{idProduct}=="dfa0", TAG+="uaccess"
# #
## AT32 DFU ## AT32 DFU
# SUBSYSTEMS=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", TAG+="uaccess" # SUBSYSTEMS=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", TAG+="uaccess"
# and # https://community.frame.work/t/guide-updated-after-firmware-updates-udev-rules-for-https-keyboard-frame-work/78708 # and # https://community.frame.work/t/guide-updated-after-firmware-updates-udev-rules-for-https-keyboard-frame-work/78708
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0010", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0010", TAG+="uaccess"
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0012", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0012", TAG+="uaccess"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0013", TAG+="uaccess" SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0013", TAG+="uaccess"
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0014", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0014", TAG+="uaccess"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0018", TAG+="uaccess" SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0018", TAG+="uaccess"
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0019", TAG+="uaccess" #SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0019", TAG+="uaccess"
# USB [VendorID]:[ProductID] “[Manufacturer][Product name]” # USB [VendorID]:[ProductID] “[Manufacturer][Product name]”
# 32ac:0012 “Framework Laptop 16 Keyboard Module - ANSI” # 32ac:0012 “Framework Laptop 16 Keyboard Module - ANSI”
# 32ac:0013 “Framework Laptop 16 RGB Macropad” # 32ac:0013 “Framework Laptop 16 RGB Macropad”
# 32ac:0014 “Framework Laptop 16 Numpad Module” # 32ac:0014 “Framework Laptop 16 Numpad Module”
# 32ac:0018 “Framework Laptop 16 Keyboard Module - ISO” # 32ac:0018 “Framework Laptop 16 Keyboard Module - ISO”
# 32ac:0019 “Framework Laptop 16 Keyboard Module - JIS” # 32ac:0019 “Framework Laptop 16 Keyboard Module - JIS”
##https://github.com/ublue-os/config/blob/main/files/etc/udev/rules.d/50-framework16.rules ##https://github.com/ublue-os/config/blob/main/files/etc/udev/rules.d/50-framework16.rules
## Audio Expansion Card ## Audio Expansion Card
#ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="32ac", ATTR{idProduct}=="0010", ATTR{power/autosuspend}="10", ATTR{power/control}="auto", GOTO="rules_end" #ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="32ac", ATTR{idProduct}=="0010", ATTR{power/autosuspend}="10", ATTR{power/control}="auto", GOTO="rules_end"
# #
## Framework Laptop 16 Keyboard Module - ANSI ## Framework Laptop 16 Keyboard Module - ANSI
#ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="32ac", ATTR{idProduct}=="0012", ATTR{power/autosuspend}="-1", ATTR{power/control}="on", ATTR{power/wakeup}="disabled", GOTO="rules_end" #ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="32ac", ATTR{idProduct}=="0012", ATTR{power/autosuspend}="-1", ATTR{power/control}="on", ATTR{power/wakeup}="disabled", GOTO="rules_end"
# #
## Framework Laptop 16 RGB Macropad ## Framework Laptop 16 RGB Macropad
# #
## Framework Laptop 16 Numpad Module ## Framework Laptop 16 Numpad Module
#ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="32ac", ATTR{idProduct}=="0014", ATTR{power/autosuspend}="-1", ATTR{power/control}="on", ATTR{power/wakeup}="disabled", GOTO="rules_end" #ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="32ac", ATTR{idProduct}=="0014", ATTR{power/autosuspend}="-1", ATTR{power/control}="on", ATTR{power/wakeup}="disabled", GOTO="rules_end"
# #
## Framework Laptop 16 Keyboard Module ## Framework Laptop 16 Keyboard Module
#ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="32ac", ATTR{idProduct}=="0018", ATTR{power/autosuspend}="-1", ATTR{power/control}="on", ATTR{power/wakeup}="disabled", GOTO="rules_end" #ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="32ac", ATTR{idProduct}=="0018", ATTR{power/autosuspend}="-1", ATTR{power/control}="on", ATTR{power/wakeup}="disabled", GOTO="rules_end"
# #
#LABEL="rules_end" #LABEL="rules_end"
''; '';
} }
+10 -8
View File
@@ -1,14 +1,16 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
# udev with only the necessary rules. See udev.nix to get all the rules # udev with only the necessary rules. See udev.nix to get all the rules
services.udev.extraRules = '' services.udev.extraRules = ''
# adapted from here https://wiki.nixos.org/wiki/Keychron_M6 # adapted from here https://wiki.nixos.org/wiki/Keychron_M6
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="32ac", MODE="0660", GROUP="users", TAG+="uaccess" KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="32ac", MODE="0660", GROUP="users", TAG+="uaccess"
# taken from here # taken from here
SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0013", TAG+="uaccess" SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0013", TAG+="uaccess"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0018", TAG+="uaccess" SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0018", TAG+="uaccess"
''; '';
} }
@@ -1,8 +1,8 @@
{ writeShellApplication {
, libnotify writeShellApplication,
, systemd libnotify,
systemd,
}: }:
writeShellApplication { writeShellApplication {
name = "custom-olddeprecatedbatterynotify"; name = "custom-olddeprecatedbatterynotify";
+21 -17
View File
@@ -1,9 +1,13 @@
# taken and adapted https://github.com/miniMinn24/Battery_Notify with MIT License # taken and adapted https://github.com/miniMinn24/Battery_Notify with MIT License
{ writeShellApplication, mplayer, brightnessctl, ... }: {
let writeShellApplication,
mplayer,
brightnessctl,
...
}: let
NotifySound = ../../assets/battery_notify.mp3; NotifySound = ../../assets/battery_notify.mp3;
in in
writeShellApplication { writeShellApplication {
name = "custom-batterynotify"; name = "custom-batterynotify";
runtimeInputs = [ runtimeInputs = [
mplayer mplayer
@@ -11,29 +15,29 @@ writeShellApplication {
]; ];
text = '' text = ''
# Delay for startup # Delay for startup
sleep 5 sleep 5
# Change your sound path here # Change your sound path here
playsound() { playsound() {
mplayer ${NotifySound} mplayer ${NotifySound}
} }
adjustBrightness() { adjustBrightness() {
local adjustment="$1" local adjustment="$1"
brightnessctl set "$adjustment" brightnessctl set "$adjustment"
} }
sendNotification() { sendNotification() {
local title="$1" local title="$1"
local message="$2" local message="$2"
notify-send -h string:x-canonical-private-synchronous:sys-notify -e -u low "$title" "$message" notify-send -h string:x-canonical-private-synchronous:sys-notify -e -u low "$title" "$message"
} }
# Runs full time in background # Runs full time in background
x=0 x=0
while true; do while true; do
Battery_Status="$(cat /sys/class/power_supply/BAT*/status)" Battery_Status="$(cat /sys/class/power_supply/BAT*/status)"
Battery_Capacity=$(cat /sys/class/power_supply/BAT*/capacity) Battery_Capacity=$(cat /sys/class/power_supply/BAT*/capacity)
@@ -64,6 +68,6 @@ while true; do
esac esac
sleep 1 sleep 1
done done
''; '';
} }
+18 -14
View File
@@ -1,9 +1,13 @@
# taken and adapted https://github.com/miniMinn24/Battery_Notify with MIT License # taken and adapted https://github.com/miniMinn24/Battery_Notify with MIT License
{ writeShellApplication, mplayer, brightnessctl, ... }: {
let writeShellApplication,
mplayer,
brightnessctl,
...
}: let
NotifySound = ../../assets/battery_notify.mp3; NotifySound = ../../assets/battery_notify.mp3;
in in
writeShellApplication { writeShellApplication {
name = "custom-batterywarning"; name = "custom-batterywarning";
runtimeInputs = [ runtimeInputs = [
mplayer mplayer
@@ -11,23 +15,23 @@ writeShellApplication {
]; ];
text = '' text = ''
# Delay for startup # Delay for startup
sleep 5 sleep 5
# Change your sound path here # Change your sound path here
playsound() { playsound() {
mplayer ${NotifySound} mplayer ${NotifySound}
} }
sendNotification() { sendNotification() {
local message="$1" local message="$1"
notify-send -h string:x-canonical-private-synchronous:sys-notify -e -u critical "Battery Low!" "$message" notify-send -h string:x-canonical-private-synchronous:sys-notify -e -u critical "Battery Low!" "$message"
} }
notify_count=0 notify_count=0
while true; do while true; do
Battery_Status="$(cat /sys/class/power_supply/BAT*/status)" Battery_Status="$(cat /sys/class/power_supply/BAT*/status)"
Battery_Capacity=$(cat /sys/class/power_supply/BAT*/capacity) Battery_Capacity=$(cat /sys/class/power_supply/BAT*/capacity)
@@ -48,6 +52,6 @@ while true; do
notify_count=0 notify_count=0
sleep 120 sleep 120
fi fi
done done
''; '';
} }
+7 -3
View File
@@ -1,5 +1,9 @@
{ writeShellApplication, kitty, bottom,... }: {
writeShellApplication,
kitty,
bottom,
...
}:
writeShellApplication { writeShellApplication {
name = "custom-bottom"; name = "custom-bottom";
runtimeInputs = [ runtimeInputs = [
@@ -8,5 +12,5 @@ writeShellApplication {
]; ];
text = '' text = ''
kitty --class "custom-bottom" -o font_size=10 --name "custom-bottom" -e btm --theme gruvbox --disable-click --disable_advanced_kill --enable_cache_memory -g -R -T kitty --class "custom-bottom" -o font_size=10 --name "custom-bottom" -e btm --theme gruvbox --disable-click --disable_advanced_kill --enable_cache_memory -g -R -T
''; '';
} }
+34 -31
View File
@@ -1,13 +1,16 @@
# useless # useless
# used to come from my old dotfiles which were copied from fedora-hyprdots # used to come from my old dotfiles which were copied from fedora-hyprdots
# just use hyprpicker | tee >(wl-copy) | cliphist store # just use hyprpicker | tee >(wl-copy) | cliphist store
# because hyprpicker and cliphist are inside my configuration.nix # because hyprpicker and cliphist are inside my configuration.nix
# no need to verify their existence # no need to verify their existence
{
writeShellApplication,
{ writeShellApplication, hyprpicker, libnotify, toybox, wl-clipboard, ... }: hyprpicker,
libnotify,
toybox,
wl-clipboard,
...
}:
writeShellApplication { writeShellApplication {
name = "custom-colorpicker-useless"; name = "custom-colorpicker-useless";
runtimeInputs = [ runtimeInputs = [
@@ -17,30 +20,30 @@ writeShellApplication {
wl-clipboard wl-clipboard
]; ];
text = '' text = ''
check() { check() {
command -v "$1" 1>/dev/null command -v "$1" 1>/dev/null
} }
notify() { notify() {
check notify-send && { check notify-send && {
notify-send -a "Color Picker" "$@" notify-send -a "Color Picker" "$@"
return return
} }
echo "$@" echo "$@"
} }
loc="$HOME/.cache/colorpicker" loc="$HOME/.cache/colorpicker"
[ -d "$loc" ] || mkdir -p "$loc" [ -d "$loc" ] || mkdir -p "$loc"
[ -f "$loc/colors" ] || touch "$loc/colors" [ -f "$loc/colors" ] || touch "$loc/colors"
limit=10 limit=10
[[ $# -eq 1 && $1 = "-l" ]] && { [[ $# -eq 1 && $1 = "-l" ]] && {
cat "$loc/colors" cat "$loc/colors"
exit exit
} }
[[ $# -eq 1 && $1 = "-j" ]] && { [[ $# -eq 1 && $1 = "-j" ]] && {
text="$(head -n 1 "$loc/colors")" text="$(head -n 1 "$loc/colors")"
mapfile -t allcolors < <(tail -n +2 "$loc/colors") mapfile -t allcolors < <(tail -n +2 "$loc/colors")
@@ -53,27 +56,27 @@ limit=10
done done
cat <<EOF cat <<EOF
{ "text":"<span color='$text'>󰸌</span>", "tooltip":"$tooltip"} { "text":"<span color='$text'>󰸌</span>", "tooltip":"$tooltip"}
EOF EOF
exit exit
} }
check hyprpicker || { check hyprpicker || {
notify "hyprpicker is not installed" notify "hyprpicker is not installed"
exit exit
} }
killall -q hyprpicker killall -q hyprpicker
color=$(hyprpicker) color=$(hyprpicker)
check wl-copy && { check wl-copy && {
echo "$color" | sed -z 's/\n//g' | wl-copy echo "$color" | sed -z 's/\n//g' | wl-copy
} }
prevColors=$(head -n $((limit - 1)) "$loc/colors") prevColors=$(head -n $((limit - 1)) "$loc/colors")
echo "$color" >"$loc/colors" echo "$color" >"$loc/colors"
echo "$prevColors" >>"$loc/colors" echo "$prevColors" >>"$loc/colors"
sed -i '/^$/d' "$loc/colors" sed -i '/^$/d' "$loc/colors"
pkill -RTMIN+1 waybar pkill -RTMIN+1 waybar
''; '';
} }
+65 -62
View File
@@ -1,67 +1,70 @@
{ writeShellApplication, cowsay, ... }: {
writeShellApplication,
cowsay,
...
}:
writeShellApplication { writeShellApplication {
name = "custom-cowsay"; name = "custom-cowsay";
runtimeInputs = [ cowsay ]; runtimeInputs = [cowsay];
text = '' text = ''
cows=("actually" "alpaca" "bud-frogs" "daemon" "elephant-in-snake" "moofasa" "skeleton" "three-eyes" "supermilker" "tux" "vader" "www") cows=("actually" "alpaca" "bud-frogs" "daemon" "elephant-in-snake" "moofasa" "skeleton" "three-eyes" "supermilker" "tux" "vader" "www")
declare -a sentences=( declare -a sentences=(
"Sharing knowledge is the most fundamental act of friendship. Because it is a way you can give something without loosing something. -Richard Stallman" "Sharing knowledge is the most fundamental act of friendship. Because it is a way you can give something without loosing something. -Richard Stallman"
"Free software' is a matter of liberty, not price. To understand the concept, you should think of 'free' as in 'free speech,' not as in 'free beer'. -Richard Stallman" "Free software' is a matter of liberty, not price. To understand the concept, you should think of 'free' as in 'free speech,' not as in 'free beer'. -Richard Stallman"
"Programming is not a science. Programming is a craft. -Richard Stallman" "Programming is not a science. Programming is a craft. -Richard Stallman"
"I did write some code in Java once, but that was the island in Indonesia. -Richard Stallman" "I did write some code in Java once, but that was the island in Indonesia. -Richard Stallman"
"Facebook is not your friend, it is a surveillance engine. -Richard Stallman" "Facebook is not your friend, it is a surveillance engine. -Richard Stallman"
"People said I should accept the world. Bullshit! I don't accept the world. -Richard Stallman" "People said I should accept the world. Bullshit! I don't accept the world. -Richard Stallman"
"You can use any editor you want, but remember that vi vi vi is the text editor of the beast. -Richard Stallman" "You can use any editor you want, but remember that vi vi vi is the text editor of the beast. -Richard Stallman"
"The idea of copyright did not exist in ancient times, when authors frequently copied other authors at length in works of non-fiction. This practice was useful, and is the only way many authors' works have survived even in part. -Richard Stallman" "The idea of copyright did not exist in ancient times, when authors frequently copied other authors at length in works of non-fiction. This practice was useful, and is the only way many authors' works have survived even in part. -Richard Stallman"
"Idiots can be defeated but they never admit it. -Richard Stallman" "Idiots can be defeated but they never admit it. -Richard Stallman"
"Open source is a development methodology; free software is a social movement. -Richard Stallman" "Open source is a development methodology; free software is a social movement. -Richard Stallman"
"People sometimes ask me if it is a sin in the Church of Emacs to use vi. Using a free version of vi is not a sin; it is a penance. So happy hacking. -Richard Stallman" "People sometimes ask me if it is a sin in the Church of Emacs to use vi. Using a free version of vi is not a sin; it is a penance. So happy hacking. -Richard Stallman"
"A computer is like air conditioning - it becomes useless when you open Windows -Linus Torvald" "A computer is like air conditioning - it becomes useless when you open Windows -Linus Torvald"
"Intelligence is the ability to avoid doing work, yet getting the work done. -Linus Torvald" "Intelligence is the ability to avoid doing work, yet getting the work done. -Linus Torvald"
"Software is like sex: It's better when it's free. -Linus Torvald" "Software is like sex: It's better when it's free. -Linus Torvald"
"All operating systems sucks, but Linux just sucks less -Linus Torvald" "All operating systems sucks, but Linux just sucks less -Linus Torvald"
"I like offending people, because I think people who get offended should be offended. -Linus Torval" "I like offending people, because I think people who get offended should be offended. -Linus Torval"
"Talk is cheap. Show me the code. -Linus Torval" "Talk is cheap. Show me the code. -Linus Torval"
"Most of the good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program. -Linus Torvald" "Most of the good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program. -Linus Torvald"
"Bad programmers worry about the code. Good programmers worry about data structures and their relationships. -Linus Torvald" "Bad programmers worry about the code. Good programmers worry about data structures and their relationships. -Linus Torvald"
"If Microsoft ever does applications for Linux it means I've won. -Linus Torvald" "If Microsoft ever does applications for Linux it means I've won. -Linus Torvald"
"Avoiding complexity reduces bugs. -Linus Torvald" "Avoiding complexity reduces bugs. -Linus Torvald"
"Backups are for wimps. Real men upload their data to an FTP site and have everyone else mirror it. -Linus Torvald" "Backups are for wimps. Real men upload their data to an FTP site and have everyone else mirror it. -Linus Torvald"
"Nobody actually creates perfect code the first time around, except me. But there's only one of me. -Linus Torvald" "Nobody actually creates perfect code the first time around, except me. But there's only one of me. -Linus Torvald"
"Microsoft isn't evil, they just make really crappy operating systems. -Linus Torvald" "Microsoft isn't evil, they just make really crappy operating systems. -Linus Torvald"
"When you say 'I wrote a program that crashed Windows,' people just stare at you blankly and say 'Hey, I got those with the system, for free.' -Linus Torval" "When you say 'I wrote a program that crashed Windows,' people just stare at you blankly and say 'Hey, I got those with the system, for free.' -Linus Torval"
"C++ is a horrible language. It's made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it. -Linus Torvald" "C++ is a horrible language. It's made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it. -Linus Torvald"
"If you think your users are idiots, only idiots will use it. -Linus Torvald" "If you think your users are idiots, only idiots will use it. -Linus Torvald"
"My name is Linus, and I am your God. -Linus Torvald" "My name is Linus, and I am your God. -Linus Torvald"
"An infinite number of monkeys typing into GNU emacs would never make a good program. -Linus Torvald" "An infinite number of monkeys typing into GNU emacs would never make a good program. -Linus Torvald"
"Object-oriented programming is an exceptionally bad idea which could only have originated in California. -Edgser Dijkstra" "Object-oriented programming is an exceptionally bad idea which could only have originated in California. -Edgser Dijkstra"
"If debugging is the process of removing software bugs, then programming must be the process of putting them in. -Edgser Dijkstra" "If debugging is the process of removing software bugs, then programming must be the process of putting them in. -Edgser Dijkstra"
"The art of programming is the art of organizing complexity. -Edgser Dijkstra" "The art of programming is the art of organizing complexity. -Edgser Dijkstra"
"Program testing can be used to show the presence of bugs, but never to show their absence! -Edgser Dijkstra" "Program testing can be used to show the presence of bugs, but never to show their absence! -Edgser Dijkstra"
"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. -Edgser Dijkstra" "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. -Edgser Dijkstra"
"The effort of using machines to mimic the human mind has always struck me as rather silly. I would rather use them to mimic something better. -Edgser Dijkstra" "The effort of using machines to mimic the human mind has always struck me as rather silly. I would rather use them to mimic something better. -Edgser Dijkstra"
"Computer science is no more about computers than astronomy is about telescopes. -Edgser Dijkstra" "Computer science is no more about computers than astronomy is about telescopes. -Edgser Dijkstra"
"Programming in Basic causes brain damage. -Edgser Dijkstra" "Programming in Basic causes brain damage. -Edgser Dijkstra"
"The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague. -Edgser Dijkstra" "The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague. -Edgser Dijkstra"
"If in physics there's something you don't understand, you can always hide behind the uncharted depths of nature. You can always blame God. You didn't make it so complex yourself. But if your program doesn't work, there is no one to hide behind. You cannot hide behind an obstinate nature. If it doesn't work, you've messed up. -Edgser Dijkstra" "If in physics there's something you don't understand, you can always hide behind the uncharted depths of nature. You can always blame God. You didn't make it so complex yourself. But if your program doesn't work, there is no one to hide behind. You cannot hide behind an obstinate nature. If it doesn't work, you've messed up. -Edgser Dijkstra"
"Teaching COBOL ought to be regarded as a criminal act. -Edgser Dijkstra" "Teaching COBOL ought to be regarded as a criminal act. -Edgser Dijkstra"
"If you want more effective programmers, you will discover that they should not waste their time debugging, they should not introduce the bugs to start with. -Edgser Dijkstra" "If you want more effective programmers, you will discover that they should not waste their time debugging, they should not introduce the bugs to start with. -Edgser Dijkstra"
"If we wish to count lines of code, we should not regard them as 'lines produced' but as 'lines spent.' -Edgser Dijkstra" "If we wish to count lines of code, we should not regard them as 'lines produced' but as 'lines spent.' -Edgser Dijkstra"
"In almost every computation a great variety of arrangements for the succession of the processes is possible, and various considerations must influence the selections amongst them for the purposes of a calculating engine. One essential object is to choose that arrangement which shall tend to reduce to a minimum the time necessary for completing the calculation. -Ada Lovelace" "In almost every computation a great variety of arrangements for the succession of the processes is possible, and various considerations must influence the selections amongst them for the purposes of a calculating engine. One essential object is to choose that arrangement which shall tend to reduce to a minimum the time necessary for completing the calculation. -Ada Lovelace"
"Im making an operating system myself, so I know what its like to be God. -Terry Davis" "Im making an operating system myself, so I know what its like to be God. -Terry Davis"
"Im schizophrenic and so am I. -Terry Davis" "Im schizophrenic and so am I. -Terry Davis"
"If I was a dog, I would bark. -Terry Davis" "If I was a dog, I would bark. -Terry Davis"
"Who has a better kernel? Debian? No. -Terry Davis" "Who has a better kernel? Debian? No. -Terry Davis"
"Computers are fast, programmers keep it slow. -A random Reddit user" "Computers are fast, programmers keep it slow. -A random Reddit user"
"Before software can be reusable it first has to be usable. -Ralph Johnson" "Before software can be reusable it first has to be usable. -Ralph Johnson"
"The best thing about a Boolean is that even if you are wrong, you're only off by a bit. -Anonymous" "The best thing about a Boolean is that even if you are wrong, you're only off by a bit. -Anonymous"
"It's not a bug, it's a feature. -Programmers" "It's not a bug, it's a feature. -Programmers"
"NVIDIA, fuck you -Linus Torvald" "NVIDIA, fuck you -Linus Torvald"
) )
while true while true
do do
echo echo
echo echo
echo echo
@@ -74,7 +77,7 @@ do
cowsay -f "''${cows[index]}" "''${sentences[SIndex]}" cowsay -f "''${cows[index]}" "''${sentences[SIndex]}"
sleep 10 sleep 10
clear clear
done done
''; '';
# reduce terminal size for actually # reduce terminal size for actually
} }
+7 -3
View File
@@ -1,7 +1,11 @@
{ writeShellApplication, hyprland, jq, ...}: {
writeShellApplication,
hyprland,
jq,
...
}:
writeShellApplication { writeShellApplication {
name = "custom-dontkillsteam"; name = "custom-dontkillsteam";
runtimeInputs = [ runtimeInputs = [
hyprland hyprland
jq jq
+13 -9
View File
@@ -1,5 +1,9 @@
{ writeShellApplication, git, libnotify, ... }: {
writeShellApplication,
git,
libnotify,
...
}:
writeShellApplication { writeShellApplication {
name = "custom-gitnotify"; name = "custom-gitnotify";
runtimeInputs = [ runtimeInputs = [
@@ -7,18 +11,18 @@ writeShellApplication {
libnotify libnotify
]; ];
text = '' text = ''
# Check if git is installed # Check if git is installed
if ! command -v git >/dev/null 2>&1; then if ! command -v git >/dev/null 2>&1; then
exit 0 exit 0
fi fi
NAME=$(git config --global user.name) NAME=$(git config --global user.name)
EMAIL=$(git config --global user.email) EMAIL=$(git config --global user.email)
if [[ -z "$NAME" || -z "$EMAIL" ]]; then if [[ -z "$NAME" || -z "$EMAIL" ]]; then
notify-send \ notify-send \
"Git not configured" \ "Git not configured" \
"Set your identity\n or remove this warning by removing the custom-gitnotify line in\n ~/nixos/modules/home-manager/hyprland.nix" "Set your identity\n or remove this warning by removing the custom-gitnotify line in\n ~/nixos/modules/home-manager/hyprland.nix"
fi fi
''; '';
} }
+7 -3
View File
@@ -1,5 +1,9 @@
{ writeShellApplication, hyprland, jq, ... }: {
writeShellApplication,
hyprland,
jq,
...
}:
writeShellApplication { writeShellApplication {
name = "custom-killall"; name = "custom-killall";
runtimeInputs = [ runtimeInputs = [
@@ -15,5 +19,5 @@ writeShellApplication {
| select(.focusHistoryID!=0) | select(.focusHistoryID!=0)
| .pid" | | .pid" |
xargs -r kill xargs -r kill
''; '';
} }
+9 -7
View File
@@ -1,15 +1,17 @@
# used for the terminal autostart. Needs to get cleared and recall fastfetch so that the bar from oh-my-zsh get resized # used for the terminal autostart. Needs to get cleared and recall fastfetch so that the bar from oh-my-zsh get resized
{
{ writeShellApplication, zsh, ... }: writeShellApplication,
zsh,
...
}:
writeShellApplication { writeShellApplication {
name = "custom-launch"; name = "custom-launch";
runtimeInputs = [ runtimeInputs = [
zsh zsh
]; ];
text = '' text = ''
sleep 2 sleep 2
clear clear
zsh zsh
''; '';
} }
+18 -13
View File
@@ -1,5 +1,10 @@
{ writeShellApplication, zsh, kitty, fzf,... }: {
writeShellApplication,
zsh,
kitty,
fzf,
...
}:
writeShellApplication { writeShellApplication {
name = "custom-librewolfprofiles"; name = "custom-librewolfprofiles";
runtimeInputs = [ runtimeInputs = [
@@ -7,21 +12,21 @@ writeShellApplication {
fzf fzf
]; ];
text = '' text = ''
# List of profiles # List of profiles
profiles=("work" "other") profiles=("work" "other")
# Use fzf to select # Use fzf to select
selected=$(printf "%s\n" "''${profiles[@]}" | fzf --height 6 --reverse --prompt="Select LibreWolf profile:") selected=$(printf "%s\n" "''${profiles[@]}" | fzf --height 6 --reverse --prompt="Select LibreWolf profile:")
# If user cancels, exit # If user cancels, exit
[[ -z "$selected" ]] && exit 0 [[ -z "$selected" ]] && exit 0
# Launch LibreWolf detached, keeping environment # Launch LibreWolf detached, keeping environment
setsid librewolf -P "$selected" --no-remote >/dev/null 2>&1 & setsid librewolf -P "$selected" --no-remote >/dev/null 2>&1 &
pkill -f "kitty.*Select LibreWolf profile" pkill -f "kitty.*Select LibreWolf profile"
# Exit the kitty terminal after selection # Exit the kitty terminal after selection
exit exit
''; '';
} }
+23 -20
View File
@@ -1,10 +1,13 @@
{ writeShellApplication, man, ripgrep, fzf, ... }: {
writeShellApplication,
let man,
ripgrep,
fzf,
...
}: let
cacheTime = "10"; cacheTime = "10";
in in
writeShellApplication {
writeShellApplication {
name = "custom-man"; name = "custom-man";
runtimeInputs = [ runtimeInputs = [
man man
@@ -12,32 +15,32 @@ writeShellApplication {
fzf fzf
]; ];
text = '' text = ''
CACHE_DIR="''${XDG_CACHE_HOME:-$HOME/.cache}" CACHE_DIR="''${XDG_CACHE_HOME:-$HOME/.cache}"
CACHE_FILE="$CACHE_DIR/custom-man-options.txt" CACHE_FILE="$CACHE_DIR/custom-man-options.txt"
mkdir -p "$CACHE_DIR" mkdir -p "$CACHE_DIR"
REGENERATE=0 REGENERATE=0
# check if -r flag was passed # check if -r flag was passed
if [ "''${1:-}" = "-r" ]; then if [ "''${1:-}" = "-r" ]; then
REGENERATE=1 REGENERATE=1
fi fi
# regenerate if file does not exist or is older than cacheTime days # regenerate if file does not exist or is older than cacheTime days
if [ ! -f "$CACHE_FILE" ] || [ "$(find "$CACHE_FILE" -mtime +${cacheTime} -print)" ]; then if [ ! -f "$CACHE_FILE" ] || [ "$(find "$CACHE_FILE" -mtime +${cacheTime} -print)" ]; then
REGENERATE=1 REGENERATE=1
fi fi
if [ $REGENERATE -eq 1 ]; then if [ $REGENERATE -eq 1 ]; then
echo "(Re)building custom-manix cache..." echo "(Re)building custom-manix cache..."
mkdir -p "$(dirname "$CACHE_FILE")" mkdir -p "$(dirname "$CACHE_FILE")"
man -k . > "$CACHE_FILE" man -k . > "$CACHE_FILE"
fi fi
# read from cache and pipe into fzf # read from cache and pipe into fzf
cat "$CACHE_FILE" \ cat "$CACHE_FILE" \
| fzf --preview "man {1}" \ | fzf --preview "man {1}" \
| xargs man | xargs man
''; '';
} }
+23 -20
View File
@@ -1,10 +1,13 @@
{ writeShellApplication, manix, ripgrep, fzf, ... }: {
writeShellApplication,
let manix,
ripgrep,
fzf,
...
}: let
cacheTime = "10"; cacheTime = "10";
in in
writeShellApplication {
writeShellApplication {
name = "custom-manix"; name = "custom-manix";
runtimeInputs = [ runtimeInputs = [
manix manix
@@ -12,32 +15,32 @@ writeShellApplication {
fzf fzf
]; ];
text = '' text = ''
CACHE_DIR="''${XDG_CACHE_HOME:-$HOME/.cache}" CACHE_DIR="''${XDG_CACHE_HOME:-$HOME/.cache}"
CACHE_FILE="$CACHE_DIR/custom-manix-options.txt" CACHE_FILE="$CACHE_DIR/custom-manix-options.txt"
mkdir -p "$CACHE_DIR" mkdir -p "$CACHE_DIR"
REGENERATE=0 REGENERATE=0
# check if -r flag was passed # check if -r flag was passed
if [ "''${1:-}" = "-r" ]; then if [ "''${1:-}" = "-r" ]; then
REGENERATE=1 REGENERATE=1
fi fi
# regenerate if file does not exist or is older than cacheTime days # regenerate if file does not exist or is older than cacheTime days
if [ ! -f "$CACHE_FILE" ] || [ "$(find "$CACHE_FILE" -mtime +${cacheTime} -print)" ]; then if [ ! -f "$CACHE_FILE" ] || [ "$(find "$CACHE_FILE" -mtime +${cacheTime} -print)" ]; then
REGENERATE=1 REGENERATE=1
fi fi
if [ $REGENERATE -eq 1 ]; then if [ $REGENERATE -eq 1 ]; then
echo "(Re)building custom-manix cache..." echo "(Re)building custom-manix cache..."
mkdir -p "$(dirname "$CACHE_FILE")" mkdir -p "$(dirname "$CACHE_FILE")"
manix "" | rg -N '^(?:\x1b\[[0-9;]*m)*# ' | sed 's/\x1b\[[0-9;]*m//g; s/^# //' | rg -Nv '^(<|.*https?://)' > "$CACHE_FILE" manix "" | rg -N '^(?:\x1b\[[0-9;]*m)*# ' | sed 's/\x1b\[[0-9;]*m//g; s/^# //' | rg -Nv '^(<|.*https?://)' > "$CACHE_FILE"
fi fi
# read from cache and pipe into fzf # read from cache and pipe into fzf
cat "$CACHE_FILE" \ cat "$CACHE_FILE" \
| fzf --preview "manix {}" \ | fzf --preview "manix {}" \
| xargs manix | xargs manix
''; '';
} }
+12 -8
View File
@@ -1,5 +1,9 @@
{ writeShellApplication, rclone, libnotify, ... }: {
writeShellApplication,
rclone,
libnotify,
...
}:
writeShellApplication { writeShellApplication {
name = "custom-mountkdrive"; name = "custom-mountkdrive";
runtimeInputs = [ runtimeInputs = [
@@ -7,16 +11,16 @@ writeShellApplication {
libnotify libnotify
]; ];
text = '' text = ''
REMOTE_NAME="kdrive" REMOTE_NAME="kdrive"
MOUNT_POINT="$HOME/kdrive" MOUNT_POINT="$HOME/kdrive"
if rclone listremotes | rg "^''${REMOTE_NAME}:"; then if rclone listremotes | rg "^''${REMOTE_NAME}:"; then
echo "Mounting ''${REMOTE_NAME}..." echo "Mounting ''${REMOTE_NAME}..."
rclone mount "''${REMOTE_NAME}:" "$MOUNT_POINT" --vfs-cache-mode writes & rclone mount "''${REMOTE_NAME}:" "$MOUNT_POINT" --vfs-cache-mode writes &
else else
notify-send "rclone mount failed" \ 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." "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." echo "Remote ''${REMOTE_NAME} not found. Configure rclone or comment out the exec line in hyprland.nix."
fi fi
''; '';
} }
+11 -7
View File
@@ -1,7 +1,11 @@
# used for the terminal autostart. Needs to get cleared and recall fastfetch so that the bar from oh-my-zsh get resized # used for the terminal autostart. Needs to get cleared and recall fastfetch so that the bar from oh-my-zsh get resized
{
{ writeShellApplication, hyprland, gawk, libnotify, ... }: writeShellApplication,
hyprland,
gawk,
libnotify,
...
}:
writeShellApplication { writeShellApplication {
name = "custom-performance"; name = "custom-performance";
runtimeInputs = [ runtimeInputs = [
@@ -10,8 +14,8 @@ writeShellApplication {
"libnotify" "libnotify"
]; ];
text = '' text = ''
HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}') HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}')
if [ "$HYPRGAMEMODE" = 1 ] ; then if [ "$HYPRGAMEMODE" = 1 ] ; then
hyprctl --batch "\ hyprctl --batch "\
keyword animations:enabled 0;\ keyword animations:enabled 0;\
keyword animation borderangle,0; \ keyword animation borderangle,0; \
@@ -24,10 +28,10 @@ if [ "$HYPRGAMEMODE" = 1 ] ; then
keyword decoration:rounding 0" keyword decoration:rounding 0"
notify-send -u critical -t 5000 "Performance mode [ON]" notify-send -u critical -t 5000 "Performance mode [ON]"
exit exit
else else
notify-send -u critical -t 5000 "Performance mode [OFF]" notify-send -u critical -t 5000 "Performance mode [OFF]"
hyprctl reload hyprctl reload
exit 0 exit 0
fi fi
''; '';
} }
+7 -3
View File
@@ -1,5 +1,9 @@
{ writeShellApplication, kitty, tomato-c,... }: {
writeShellApplication,
kitty,
tomato-c,
...
}:
writeShellApplication { writeShellApplication {
name = "custom-tomato"; name = "custom-tomato";
runtimeInputs = [ runtimeInputs = [
@@ -8,5 +12,5 @@ writeShellApplication {
]; ];
text = '' text = ''
kitty --class "custom-pomodoro" --name "custom-pomodoro" -e tomato kitty --class "custom-pomodoro" --name "custom-pomodoro" -e tomato
''; '';
} }
+11 -9
View File
@@ -1,21 +1,23 @@
{ writeShellApplication, socat, swww, ... }: {
writeShellApplication,
let socat,
swww,
...
}: let
wallpaper1 = ../../assets/wallpaper1.jpg; wallpaper1 = ../../assets/wallpaper1.jpg;
wallpaper2 = ../../assets/wallpaper2.jpg; wallpaper2 = ../../assets/wallpaper2.jpg;
wallpaper3 = ../../assets/wallpaper3.jpg; wallpaper3 = ../../assets/wallpaper3.jpg;
wallpaper4 = ../../assets/wallpaper4.jpg; wallpaper4 = ../../assets/wallpaper4.jpg;
wallpaper5 = ../../assets/wallpaper5.jpg; wallpaper5 = ../../assets/wallpaper5.jpg;
in in
writeShellApplication {
writeShellApplication {
name = "custom-wallpaper"; name = "custom-wallpaper";
runtimeInputs = [ runtimeInputs = [
socat socat
swww swww
]; ];
text = '' text = ''
handle() { handle() {
case $1 in case $1 in
workspace*) workspace*)
str=$1 str=$1
@@ -40,8 +42,8 @@ handle() {
esac esac
;; ;;
esac esac
} }
socat -U - UNIX-CONNECT:"$XDG_RUNTIME_DIR"/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock | while read -r line; do handle "$line"; done socat -U - UNIX-CONNECT:"$XDG_RUNTIME_DIR"/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock | while read -r line; do handle "$line"; done
''; '';
} }
+7 -4
View File
@@ -1,14 +1,17 @@
{ writeShellApplication, curl, ... }: {
writeShellApplication,
curl,
...
}:
writeShellApplication { writeShellApplication {
name = "custom-weather"; name = "custom-weather";
runtimeInputs = [ runtimeInputs = [
curl curl
]; ];
text = '' text = ''
while true; do while true; do
curl "https://wttr.in/?0&d&q&F&lang=fr" curl "https://wttr.in/?0&d&q&F&lang=fr"
sleep 7200 sleep 7200
done done
''; '';
} }
+15 -12
View File
@@ -1,20 +1,23 @@
{ writeShellApplication, curl, ... }: {
writeShellApplication,
curl,
...
}:
writeShellApplication { writeShellApplication {
name = "custom-weatherwaybar"; name = "custom-weatherwaybar";
runtimeInputs = [ runtimeInputs = [
curl curl
]; ];
text = '' text = ''
PATTERN="C" PATTERN="C"
PATTERN2=" " PATTERN2=" "
TEXT1="''$(curl -s "https://wttr.in/?format=%c")" TEXT1="''$(curl -s "https://wttr.in/?format=%c")"
TEXT1=''${TEXT1/$PATTERN2/} TEXT1=''${TEXT1/$PATTERN2/}
TEXT2="''$(curl -s "https://wttr.in/?format=%t")" TEXT2="''$(curl -s "https://wttr.in/?format=%t")"
TEXT2=''${TEXT2/$PATTERN/} TEXT2=''${TEXT2/$PATTERN/}
TEXT3="''$(curl -s "https://wttr.in/?format=%f")" TEXT3="''$(curl -s "https://wttr.in/?format=%f")"
TEXT3=''${TEXT3/$PATTERN/} TEXT3=''${TEXT3/$PATTERN/}
printf '{"text":" %s\\n %s\\n %s", "tooltip": false, "class": "weather"}\\n' \ printf '{"text":" %s\\n %s\\n %s", "tooltip": false, "class": "weather"}\\n' \
"$TEXT1" "$TEXT2" "$TEXT3" "$TEXT1" "$TEXT2" "$TEXT3"
''; '';
} }