From 62d4de036040d281440700200b024f23e24ac883 Mon Sep 17 00:00:00 2001 From: ant Date: Sat, 24 Aug 2024 17:49:02 +0200 Subject: [PATCH] Big update --- additional-software.nix | 27 +++++---- bar.nix | 42 +++++++++++--- flake.lock | 65 +++++++++++++++++++++ flake.nix | 22 ++++++-- gui-software.nix | 15 ++++- home.nix | 25 +++++--- hyprland.nix | 122 ++++++++++++++++++++++++---------------- lf.nix | 2 +- terminal-software.nix | 7 ++- ui.nix | 104 +++++++++++++++++++++++++++++----- 10 files changed, 328 insertions(+), 103 deletions(-) create mode 100644 flake.lock diff --git a/additional-software.nix b/additional-software.nix index 3be6968..1276cb8 100644 --- a/additional-software.nix +++ b/additional-software.nix @@ -1,14 +1,19 @@ -{ lib, config, pkgs, ... }: { - options = { - config.downloadSoftwares = lib.mkEnableOption "Enable qbittorrent, aria2 and yt-dlp"; - }; - +{ lib, config, pkgs, variant, ... }: { config = { - home.packages = with pkgs; [ - yt-dlp - qbittorrent - aria2 - pipewire - ]; + home.packages = + if variant == "default" then + with pkgs; [ + yt-dlp + qbittorrent + aria2 + pipewire + discord + feather # monero wallet + litecoin + # librewolf + spotify + ungoogled-chromium + ] + else []; }; } diff --git a/bar.nix b/bar.nix index 96b34f7..fcb81b4 100644 --- a/bar.nix +++ b/bar.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, ... }: { +{ lib, config, pkgs, variant, username, ... }: { home.packages = with pkgs; [ material-design-icons @@ -7,6 +7,20 @@ playerctl ]; + systemd.user.services.loopback = { + Unit = { + Description = "Simple audio loopback"; + }; + Install = { + WantedBy = [ ]; + }; + Service = { + ExecStart = "${pkgs.writeShellScript "start loopback" '' + ${pkgs.pipewire}/bin/pw-loopback + ''}"; + }; + }; + programs.waybar = { enable = true; # systemd.enable = true; @@ -26,6 +40,8 @@ "modules-center" = [ "hyprland/window" ]; "modules-right" = [ "network" + "custom/nvidia-load" + "custom/nvidia-mem" "group/disks" "group/hardware" "tray" @@ -38,6 +54,7 @@ "hyprland/workspaces" "pulseaudio#speaker" "pulseaudio#microphone" + "custom/loopback" "idle_inhibitor" "bluetooth" "backlight" @@ -100,18 +117,19 @@ "on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /"; }; - "disk#2" = { + + "disk#2" = lib.attrsets.optionalAttrs (variant == "default") { interval = 1; format = "󰋊 {free}"; path = "/home/ant/disk1"; - "on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /home/ant/disk1"; + "on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /home/${username}/disk1"; }; - "disk#3" = { + "disk#3" = lib.attrsets.optionalAttrs (variant == "default") { interval = 1; format = "󰋊 {free}"; path = "/home/ant/disk2"; - "on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /home/ant/disk2"; + "on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /home/${username}/disk2"; }; memory = { @@ -168,6 +186,10 @@ "on-click" = "$TERMINAL --class floating -e htop"; }; + temperature = { + hwmon-path = "/sys/class/hwmon/hwmon1/temp1_input"; + }; + battery = { interval = 30; states = { @@ -233,12 +255,16 @@ "format-source-muted" = "󰍭"; "on-click" = "pamixer --default-source -t"; "on-scroll-up" = "pamixer --default-source -i 5"; - "on-scroll-down" = - - "pamixer --default-source -d 5"; + "on-scroll-down" = "pamixer --default-source -d 5"; "scroll-step" = 5; }; + "custom/loopback" = lib.attrsets.optionalAttrs (variant == "default") { + exec = "if systemctl --user is-active --quiet loopback; then echo oui; else echo non; fi"; + on-click = "if systemctl --user is-active --quiet loopback; then systemctl --user stop loopback; else systemctl --user start loopback; fi"; + format = "TEST {}"; + }; + "hyprland/submap" = { format = "(l)ock, (e)xit, (s)uspend, (h)ibernate, (r)eboot, (S)hutdown"; }; diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..b2ad0fb --- /dev/null +++ b/flake.lock @@ -0,0 +1,65 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1724412708, + "narHash": "sha256-tLr1k+UZLVumyqXRU8E5lBtLjsvHSy8e2NiamfkjpYg=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "b18f3ebc4029c22d437e3424014c8597a8b459a0", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1724224976, + "narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "c374d94f1536013ca8e92341b540eba4c22f9c62", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-24_05": { + "locked": { + "lastModified": 1724316499, + "narHash": "sha256-Qb9MhKBUTCfWg/wqqaxt89Xfi6qTD3XpTzQ9eXi3JmE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "797f7dc49e0bc7fab4b57c021cdf68f595e47841", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs", + "nixpkgs-24_05": "nixpkgs-24_05" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index 69ec848..887339d 100644 --- a/flake.nix +++ b/flake.nix @@ -2,24 +2,34 @@ description = "Home Manager configuration"; inputs = { - # Specify the source of Home Manager and Nixpkgs. nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs-24_05.url = "github:nixos/nixpkgs/nixos-24.05"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { nixpkgs, home-manager, ... }: + outputs = { ... }@inputs: let system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; + pkgs = inputs.nixpkgs.legacyPackages.${system}; + pkgs-24_05 = inputs.nixpkgs-24_05.legacyPackages.${system}; + + username = "ant"; + variant = "default"; in { - homeConfigurations."ant" = home-manager.lib.homeManagerConfiguration { + homeConfigurations.${username} = inputs.home-manager.lib.homeManagerConfiguration { inherit pkgs; - # Specify your home configuration modules here, for example, - # the path to your home.nix. + extraSpecialArgs = { + # configure here + variant = variant; + username = username; + + pkgs-24_05 = pkgs-24_05; + }; + modules = [ ./home.nix ]; diff --git a/gui-software.nix b/gui-software.nix index 135b868..0f87471 100644 --- a/gui-software.nix +++ b/gui-software.nix @@ -1,11 +1,12 @@ -{ lib, cnfig, pkgs, ... }: { +{ lib, cnfig, pkgs, pkgs-24_05, ... }: +{ home.packages = with pkgs; [ - betterbird + # betterbird nsxiv libreoffice warpinator keepassxc - ]; + ] ++ [ pkgs-24_05.betterbird ]; programs.mpv = { enable = true; config = { @@ -35,4 +36,12 @@ programs.firefox.enable = true; programs.zathura.enable = true; + + xdg.mimeApps.defaultApplications = { + "WebBrowser" = "firefox.desktop"; + }; + + home.sessionVariables = { + BROWSER = "firefox"; + }; } diff --git a/home.nix b/home.nix index d07dd85..c49e645 100644 --- a/home.nix +++ b/home.nix @@ -1,4 +1,4 @@ -{ inputs, config, lib, pkgs, flakes-pkgs, ... }: +{ inputs, config, lib, pkgs, username, ... }: { imports = [ @@ -8,11 +8,12 @@ ./terminal-software.nix ./gui-software.nix ./gaming.nix + ./additional-software.nix ]; # Home Manager needs a bit of information about you and the paths it should # manage. - home.username = "ant"; + home.username = username; home.homeDirectory = "/home/${config.home.username}"; home.stateVersion = "23.05"; # Please read the comment before changing. @@ -105,7 +106,7 @@ fi ''; - ".bin/dark".source = (import ./bin/dark.nix) pkgs; + ".bin/dark".source = (import ./bin/dark.nix) pkgs; # deprecated, prefer darkman }; @@ -115,9 +116,6 @@ ]; home.sessionVariables = { - # EDITOR = "nvim"; - # TERMINAL = "kitty"; - # TERM = "kitty"; GOPATH = "${config.home.homeDirectory}/.local/share/go"; GOMODCACHE = "${config.home.homeDirectory}/.cache/go/pkg/mod"; @@ -151,12 +149,21 @@ mimeApps = { enable = true; - defaultApplications = { - "text/plain" = "nvim.desktop"; - }; }; }; + services.darkman = { + enable = true; + lightModeScripts = { + rm-file-indicator = "rm $XDG_STATE_HOME/darkmode"; + }; + + darkModeScripts = { + set-file-indicator = "touch $XDG_STATE_HOME/darkmode"; + }; + }; + + services.gnome-keyring.enable = true; services.syncthing.enable = true; services.kdeconnect.enable = true; diff --git a/hyprland.nix b/hyprland.nix index 26b8863..92234a9 100644 --- a/hyprland.nix +++ b/hyprland.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: { +{ config, lib, pkgs, pkgs-24_05, variant, ... }: { home.packages = with pkgs; [ xdg-desktop-portal-hyprland ]; home.sessionVariables = { @@ -10,30 +10,17 @@ XDG_SESSION_TYPE = "wayland"; XDG_SESSION_DESKTOP = "Hyprland"; QT_AUTO_SCREEN_SCALE_FACTOR = "1"; - WLR_NO_HARDWARE_CURSORS = "1"; XCURSOR_SIZE = "24"; + DXVK_FILTER_DEVICE_NAME="NVIDIA"; }; wayland.windowManager.hyprland = { enable = true; + package = if variant == "allegro" then pkgs-24_05.hyprland else pkgs.hyprland; xwayland.enable = true; - # plugins = [ - # "${flakes-pkgs.hyprfocus}/lib/libhyprfocus.so" - # ]; systemd.enable = true; - systemd.variables = [ - "GDK_BACKEND=wayland,x11" - "QT_QPA_PLATFORM=\"wayland;xcb\"" - "SDL_VIDEODRIVER=wayland" - "CLUTTER_BACKEND=wayland" - "XDG_CURRENT_DESKTOP=Hyprland" - "XDG_SESSION_TYPE=wayland" - "XDG_SESSION_DESKTOP=Hyprland" - "QT_AUTO_SCREEN_SCALE_FACTOR=1" - "WLR_NO_HARDWARE_CURSORS=1" - "XCURSOR_SIZE=24" - ]; + systemd.variables = [ "--all" ]; settings = { @@ -102,8 +89,8 @@ enable_swallow = true; mouse_move_enables_dpms = true; key_press_enables_dpms = true; - # swallow_regex = "^(Alacritty)(.*)$"; - swallow_regex = "^(kitty)(.*)$"; + swallow_regex = "^(Alacritty)(.*)$"; + # swallow_regex = "^(kitty)(.*)$"; }; @@ -120,24 +107,23 @@ "$mod, Tab, togglesplit" "$mod, P, pseudo" "$mod, f, fullscreen" - "$mod SHIFT, f, fakefullscreen" - "$mod, Return, exec, kitty" + "$mod, Return, exec, $TERMINAL" "$mod SHIFT, e, exec, rofimoji" "$mod, c, exec, rofi -show calc -modi calc -no-show-match -no-sort" "$mod, e, exec, $TERMINAL -e lf" - "$mod SHIFT, Return, exec, kitty --working-directory \"$(window_dir)\"" - "$mod, w, exec, firefox" + "$mod SHIFT, Return, exec, $TERMINAL --working-directory \"$(window_dir)\"" + "$mod, w, exec, $BROWSER" "$mod SHIFT, w, exec, firefox --private-window" - "$mod SHIFT, s, exec, TMP=$(rofi -dmenu -p \"nix search\" -l 0) && firefox \"https://search.nixos.org/packages?channel=unstable&query=$TMP\"" + "$mod SHIFT, s, exec, TMP=$(rofi -dmenu -p \"nix search\" -l 0) && $BROWSER \"https://search.nixos.org/packages?channel=unstable&query=$TMP\"" "$mod SHIFT, e, exec, $(rofi -dmenu -p \"command\" -l 0)" - "$mod, m, exec, kitty --class floating -e pulsemixer" + "$mod, m, exec, $TERMINAL --class floating -e pulsemixer" "$mod, d, exec, ~/.bin/runmenu" "$mod, x, exec, keepmenu" - "$mod, z, exec, tmux new -spopup_terminal -d; kitty --class floating -e tmux a -t popup_terminal" + "$mod, z, exec, tmux new -spopup_terminal -d; $TERMINAL --class floating -e tmux a -t popup_terminal" "$mod, f11, exec, ocrzone" - "$mod, f12, exec, kitty --class floating -e nmtui" - "$mod, f2, exec, dark" + "$mod, f12, exec, $TERMINAL --class floating -e nmtui" + "$mod, f2, exec, darkman toggle" "$mod, f3, exec, hyprctl reload" "$mod, f4, exec, rofi-udisk" "$mod, f5, exec, mount-android" @@ -164,10 +150,10 @@ "$mod, Up, movefocus, u" "$mod, Down, movefocus, d" - # "$mod SHIFT, h, movewindow, l" - # "$mod SHIFT, l, movewindow, r" - # "$mod SHIFT, k, movewindow, u" - # "$mod SHIFT, j, movewindow, d" + "$mod SHIFT, h, movewindow, l" + "$mod SHIFT, l, movewindow, r" + "$mod SHIFT, k, movewindow, u" + "$mod SHIFT, j, movewindow, d" # "$mod SHIFT, Left, movewindow, l" # "$mod SHIFT, Right, movewindow, r" @@ -197,6 +183,18 @@ "$mod SHIFT, underscore, movetoworkspacesilent, 9" "$mod SHIFT, ccedilla, movetoworkspacesilent, 10" "$mod SHIFT, rarenright, movetoworkspacesilent, 11" + + "$mod ALT, twosuperior, focusworkspaceoncurrentmonitor, 1" + "$mod ALT, ampersand, focusworkspaceoncurrentmonitor, 2" + "$mod ALT, eacute, focusworkspaceoncurrentmonitor, 3" + "$mod ALT, quotedbl, focusworkspaceoncurrentmonitor, 4" + "$mod ALT, apostrophe, focusworkspaceoncurrentmonitor, 5" + "$mod ALT, parenleft, focusworkspaceoncurrentmonitor, 6" + "$mod ALT, minus, focusworkspaceoncurrentmonitor, 7" + "$mod ALT, egrave, focusworkspaceoncurrentmonitor, 8" + "$mod ALT, underscore, focusworkspaceoncurrentmonitor, 9" + "$mod ALT, ccedilla, focusworkspaceoncurrentmonitor, 10" + "$mod ALT, rarenright, focusworkspaceoncurrentmonitor, 11" ]; bindm = [ @@ -205,10 +203,10 @@ ]; binde = [ - "$mod SHIFT, h, moveactive, -60 0" - "$mod SHIFT, l, moveactive, 60 0" - "$mod SHIFT, k, moveactive, 0 -60" - "$mod SHIFT, j, moveactive, 0 60" + "$mod CTRL SHIFT, h, moveactive, -60 0" + "$mod CTRL SHIFT, l, moveactive, 60 0" + "$mod CTRL SHIFT, k, moveactive, 0 -60" + "$mod CTRL SHIFT, j, moveactive, 0 60" "$mod CTRL, h, resizeactive, -60 0" "$mod CTRL, l, resizeactive, 60 0" "$mod CTRL, k, resizeactive, 0 -60" @@ -299,21 +297,49 @@ # -p pkgs.rubyPackages.gdk_pixbuf2 \ # --run "${pkgs.swaybg}/bin/swaybg -m fill -i $bg" ''); + monitors = if (variant == "default") then '' + monitor=,highrr,auto,1,vrr,1 + '' + else if variant == "moon" then '' + monitor=,preferred,auto,1 + '' + else if variant == "allegro" then '' + monitor=eDP-1, 1920x1080, 0x0, 1 + monitor= DP-3, 1920x1200, 1920x0, 1 + monitor= DP-4, 1920x1200, 3840x0, 1 + monitor=HDMI-1, 1920x1080, auto, 1, mirror, eDP-1 + monitor=HDMI-A-1, 1920x1080, auto, 1, mirror, eDP-1 + '' + else '' + ''; in '' - # env = GDK_BACKEND,wayland,x11 - # env = QT_QPA_PLATFORM,wayland;xcb - # env = SDL_VIDEODRIVER,wayland - # env = CLUTTER_BACKEND,wayland - # - # env = XDG_CURRENT_DESKTOP,Hyprland - # env = XDG_SESSION_TYPE,wayland - # env = XDG_SESSION_DESKTOP,Hyprland - # env = QT_AUTO_SCREEN_SCALE_FACTOR,1 + ${monitors} - monitor=,highrr,auto,1, - monitor=Unknown-1,disable - # monitor=HDMI-A-1,preferred,auto,1,mirror,eDP-1 + ${ # system specific configs + if variant == "default" then '' + env = GBM_BACKEND,nvidia-drm + env = __GLX_VENDOR_LIBRARY_NAME,nvidia + '' + else if variant == "allegro" then '' + env = WLR_DRM_DEVICES,/dev/dri/card0 + env = AQ_WLR_DEVICES,/dev/ri/card0 + env = AQ_DRM_DEVICES,/dev/dri/card0 + env = TERMINAL,alacritty + + env = NIXOS_OZONE_WL,1 + env = GDK_BACKEND,wayland,x11 + env = QT_QPA_PLATFORM,wayland;xcb + env = CLUTTER_BACKEND,wayland + env = XDG_CURRENT_DESKTOP,Hyprland + env = XDG_SESSION_TYPE,wayland + env = XDG_SESSION_DESKTOP,Hyprland + env = QT_AUTO_SCREEN_SCALE_FACTOR,1 + env = WLR_NO_HARDWARE_CURSORS,1 + env = XCURSOR_SIZE,24 + '' else '' + '' + } exec = pkill swaybg; ${swaybgScript} exec = pkill waybar; ${pkgs.waybar}/bin/waybar diff --git a/lf.nix b/lf.nix index e93bef6..1be7ddd 100644 --- a/lf.nix +++ b/lf.nix @@ -51,7 +51,7 @@ # read -p send-warpinator = ''%{{ set -f - ${pkgs.cinnamon.warpinator}/bin/warpinator-send $f + ${pkgs.warpinator}/bin/warpinator-send $f }}''; toggle_preview = ''%{{ if [ "$lf_preview" = "true" ]; then diff --git a/terminal-software.nix b/terminal-software.nix index 8ba3956..d46fe92 100644 --- a/terminal-software.nix +++ b/terminal-software.nix @@ -13,7 +13,6 @@ glances ]; - programs.neovim = { enable = true; viAlias = true; @@ -25,7 +24,7 @@ ocamlPackages.ocamlformat cargo nixd - nixpkgs-fmt + nixfmt lua-language-server ocaml ocamlPackages.ocaml-lsp @@ -34,16 +33,20 @@ ]; }; + xdg.mimeApps.defaultApplications = { "text/plain" = "nvim.desktop"; }; + programs.tmux = { enable = true; historyLimit = 600000; escapeTime = 10; keyMode = "vi"; mouse = true; + terminal = "tmux-256color"; extraConfig = '' unbind-key 'Space' bind-key 'Space' copy-mode set -g status-right "#{net_speed} #{cpu_percentage}" + set -g default-terminal "tmux-256color" run-shell ${pkgs.tmuxPlugins.net-speed}/share/tmux-plugins/net-speed/net_speed.tmux run-shell ${pkgs.tmuxPlugins.cpu}/share/tmux-plugins/cpu/cpu.tmux ''; diff --git a/ui.nix b/ui.nix index 1e51d47..2bfacac 100644 --- a/ui.nix +++ b/ui.nix @@ -1,4 +1,9 @@ { lib, config, pkgs, ... }: +let + defaultTerminal = "alacritty"; + alacrittyLightTheme = "${pkgs.alacritty-theme}/night_owlish_light.toml"; + alacrittyDarkTheme = "${pkgs.alacritty-theme}/monokai_charcoal.toml"; +in { imports = [ ./bar.nix @@ -6,6 +11,11 @@ ./gui-software.nix ]; + + home.sessionVariables = { + TERMINAL = defaultTerminal; + }; + home.packages = with pkgs; [ gentium (nerdfonts.override { fonts = [ "CascadiaCode" "Noto" "Hack" ]; }) @@ -38,13 +48,14 @@ serif = [ "Gentium Plus" ]; sansSerif = [ "Inter" ]; monospace = [ "CaskaydiaCove Nerd Font Mono" ]; + # monospace = [ "CascadiaCode" ]; # monospace = [ "Hack Nerd Font Mono" ]; emoji = [ "Noto Color Emoji" "OpenMoji Color" ]; }; programs.kitty = { enable = true; - font.name = "monospace"; + font.name = "CaskaydiaCove NFM Regular"; font.size = 12; settings = { cursor_shape = "block"; @@ -69,9 +80,34 @@ shellIntegration.mode = "no-cursor"; extraConfig = '' include colors.conf + bold_font CaskaydiaCove NFM Bold + italic_font CaskaydiaCove NFM Italic + bold_italic_font CaskaydiaCove NFM Bold Italic + text_composition_strategy 1.4 4 + font_features CaskaydiaCoveNF-Italic +calt +ss01 ''; }; + programs.alacritty = { + enable = true; + settings = { + font = { + size = 12.0; + }; + + import = [ + alacrittyLightTheme # default to white + "~/.config/alacritty/colors.toml" + ]; + }; + }; + + + + xdg = { + mimeApps.defaultApplications."TerminalEmulator" = "Alacritty.desktop"; + }; + services.swayidle = { enable = true; events = [ @@ -104,20 +140,6 @@ programs.swaylock = { enable = true; package = pkgs.swaylock-effects; - # --screenshots \ - # --clock \ - # --indicator \ - # --indicator-radius 100 \ - # --indicator-thickness 7 \ - # --effect-blur 7x5 \ - # --effect-vignette 0.5:0.5 \ - # --ring-color bb00cc \ - # --key-hl-color 880033 \ - # --line-color 00000000 \ - # --inside-color 00000088 \ - # --separator-color 00000000 \ - # --grace 2 \ - # --fade-in 0.2 settings = { screenshots = true; # clock = true; @@ -202,6 +224,58 @@ }; }; + services.darkman = { + lightModeScripts = { + gtk-theme = '' + ${pkgs.dconf}/bin/dconf write /org/gnome/desktop/interface/color-scheme "'prefer-light'" + ''; + set-background = '' + rm -f ~/.local/share/bg/* + ln -rs ~/.local/share/bg-light.* ~/.local/share/bg/ + ${pkgs.hyprland}/bin/hyprctl reload + ''; + set-rofi-colors = '' + rm -f ~/.config/rofi/colors-current.rasi + ln -rs ~/.config/rofi/colors-light.rasi ~/.config/rofi/colors-current.rasi + ''; + set-kitty-colors = '' + rm -f ~/.config/kitty/colors.conf + ln -rs ~/.config/kitty/light.conf ~/.config/kitty/colors.conf + kill -SIGUSR1 $(pgrep kitty) + ''; + set-alacritty-colors = '' + rm -f ~/.config/alacritty/colors.toml + ln -s ${alacrittyLightTheme} ~/.config/alacritty/colors.toml + ''; + notify = "${pkgs.libnotify}/bin/notify-send \"Light mode\""; + }; + + darkModeScripts = { + gtk-theme = '' + ${pkgs.dconf}/bin/dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'" + ''; + set-background = '' + rm -f ~/.local/share/bg/* + ln -rs ~/.local/share/bg-dark.* ~/.local/share/bg/ + ${pkgs.hyprland}/bin/hyprctl reload + ''; + set-rofi-colors = '' + rm -f ~/.config/rofi/colors-current.rasi + ln -rs ~/.config/rofi/colors-dark.rasi ~/.config/rofi/colors-current.rasi + ''; + set-kitty-colors = '' + rm -f ~/.config/kitty/colors.conf + ln -rs ~/.config/kitty/dark.conf ~/.config/kitty/colors.conf + kill -SIGUSR1 $(pgrep kitty) + ''; + set-alacritty-colors = '' + rm -f ~/.config/alacritty/colors.toml + ln -s ${alacrittyDarkTheme} ~/.config/alacritty/colors.toml + ''; + notify = "${pkgs.libnotify}/bin/notify-send \"Dark mode\""; + }; + }; + systemd.user.services = { battery-notify = { Unit = {