diff --git a/modules/home/scripts/default.nix b/modules/home/scripts/default.nix index c5e7b77..095f75c 100644 --- a/modules/home/scripts/default.nix +++ b/modules/home/scripts/default.nix @@ -8,6 +8,7 @@ music = pkgs.writeShellScriptBin "music" (builtins.readFile ./scripts/music.sh); toogle_blur = pkgs.writeScriptBin "toogle_blur" (builtins.readFile ./scripts/toogle_blur.sh); toogle_oppacity = pkgs.writeScriptBin "toogle_oppacity" (builtins.readFile ./scripts/toogle_oppacity.sh); + maxfetch = pkgs.writeScriptBin "maxfetch" (builtins.readFile ./scripts/maxfetch.sh); in { home.packages = with pkgs; [ wall-change @@ -22,5 +23,7 @@ in { toogle_blur toogle_oppacity + + maxfetch ]; } diff --git a/modules/home/scripts/scripts/maxfetch.sh b/modules/home/scripts/scripts/maxfetch.sh new file mode 100644 index 0000000..c8b32d1 --- /dev/null +++ b/modules/home/scripts/scripts/maxfetch.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash + +unicode=" ■" +version="1.2.0" + +_black=$(tput setaf 0) +red=$(tput setaf 1) +green=$(tput setaf 2) +yellow=$(tput setaf 3) +blue=$(tput setaf 4) +magenta=$(tput setaf 5) +cyan=$(tput setaf 6) +_white=$(tput setaf 7) +_bright=$(tput bold) +normal=$(tput sgr0) +_underline=$(tput smul) + +up=$(uptime | sed -E 's/^[^,]*up *//; s/mins/minutes/; s/hrs?/hours/; + s/([[:digit:]]+):0?([[:digit:]]+)/\1 hours, \2 minutes/; + s/^1 hours/1 hour/; s/ 1 hours/ 1 hour/; + s/min,/minutes,/; s/ 0 minutes,/ less than a minute,/; s/ 1 minutes/ 1 minute/; + s/ / /; s/, *[[:digit:]]* users?.*//') + +fetch() { + echo "${blue} _ ___ ____ ${normal}" + echo "${blue} / | / (_) __/ __ \_____${normal}" + echo "${blue} / |/ / / |/_/ / / / ___/${normal}" + echo "${blue} / /| / />