{ config, lib, pkgs, ... }: { options = { homeconfig.scripts.enable = lib.options.mkOption { type = lib.types.bool; default = true; }; }; config = lib.mkIf config.homeconfig.scripts.enable { home.packages = [ #scripts (pkgs.writeShellScriptBin "_systemRebuild" '' ${pkgs.nh}/bin/nh os switch --ask echo //////Enter to close////// read '') (pkgs.writeShellScriptBin "randWallpaper" '' file=$(ls /home/nathan/Pictures/Wallpaper/ | shuf -n 1) setWallpaper /home/nathan/Pictures/Wallpaper/$file '') (pkgs.writeShellScriptBin "setWallpaper" '' img=''$(realpath ''${1:-~/.config/background}) chmod 600 ~/.config/background ${pkgs.hyprpanel}/bin/hyprpanel sw ''$img changeColors ''$img ''$2 '') (pkgs.writeShellScriptBin "changeColors" '' if [[ $(ls ~/.config/ | grep bga) != bga ]]; then echo 100 > ~/.config/bga fi alpha=''${2:-`cat ~/.config/bga`} img=''$(realpath ''${1:-~/.config/background}) if [[ $alpha -lt 0 ]]; then $alpha=0 fi if [[ $alpha -gt 100 ]]; then $alpha=100 fi ${pkgs.pywal16}/bin/wal -i $img -a $alpha --cols16 -n echo $alpha > ~/.config/bga sleep 0.4 ${pkgs.pywalfox-native}/bin/pywalfox update & [[ $(pidof cava) != "" ]] && pkill -USR1 cava & for i in $(ls /run/user/1000 | grep nvim); do ${pkgs.neovim-remote}/bin/nvr -s --servername /run/user/1000/$i --remote-send 'colorscheme pywal'; done pkill -USR1 kitty '') (pkgs.writeShellScriptBin "onSystemStart" '' if [[ ! -f ${config.home.homeDirectory}/.config/background ]]; then hyprctl dispatch exec "randWallpaper && chmod 600 ${config.home.homeDirectory}/.config/background" fi hyprctl dispatch exec ${pkgs.pyprland}/bin/pypr hyprctl dispatch exec ${pkgs.netbird-ui}/bin/netbird-ui hyprctl dispatch exec ${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent hyprctl setcursor Bibata-Modern-Classic 16 sleep 3 hyprctl reload #tmux new-session -s hyprland '') (pkgs.writeShellScriptBin "colorPrefix" '' exec -a "$0" "$@" & sleep 0.4 && changeColors & '') ] ++ (if config.homeconfig.standalone.enable then [ (pkgs.writeShellScriptBin "_homeRebuild" '' ${pkgs.nh}/bin/nh home switch --ask /home/nathan/Projects/Olympus echo //////Enter to close////// read '') ] else []); }; }