renamed 'media' folder to 'assets' because it sounds cooler

This commit is contained in:
pagedmov
2024-10-21 22:03:39 -04:00
parent fe006e1004
commit 4711456fb1
45 changed files with 165 additions and 46 deletions

View File

@@ -0,0 +1,118 @@
{
self,
pkgs,
...
}:
{
home.file.".config/neofetch/config".text = ''
username=$(whoami)
name_length=''${#username}
total_width=40
side_length=$(( (total_width - name_length - 2) / 2 ))
top_line=$(printf "%.0s" $(seq 1 $side_length))
top_line="$top_line $username "
top_line+=$(printf "%.0s" $(seq 1 $side_length))
if (( (total_width - name_length) % 2 != 0 )); then
top_line+=""
fi
print_info() {
prin "$top_line"
info " " distro
info " " kernel
info " " wm
info " " shell
info " " term
info " " term_font
info " 󰏗 " packages
prin ""
info cols
prin "\n \n \n \n \n ''${cl3} \n \n ''${cl5} \n \n ''${cl2} \n \n ''${cl6} \n \n ''${cl4} \n \n ''${cl1} \n \n ''${cl7} \n \n ''${cl0}"
}
kernel_shorthand="on"
distro_shorthand="on"
os_arch="off"
uptime_shorthand="on"
memory_percent="on"
package_managers="off"
shell_path="off"
shell_version="on"
speed_type="bios_limit"
speed_shorthand="on"
gtk_shorthand="on"
gtk2="on"
gtk3="on"
colors=(distro)
bold="on"
underline_enabled="on"
underline_char="-"
separator=" "
color_blocks="off"
block_range=(0 15) # Colorblocks
# Colors for custom colorblocks
magenta="\033[1;35m"
green="\033[1;32m"
white="\033[1;37m"
blue="\033[1;34m"
red="\033[1;31m"
black="\033[1;40;30m"
yellow="\033[1;33m"
cyan="\033[1;36m"
reset="\033[0m"
bgyellow="\033[1;43;33m"
bgwhite="\033[1;47;37m"
cl0="''${reset}"
cl1="''${magenta}"
cl2="''${green}"
cl3="''${white}"
cl4="''${blue}"
cl5="''${red}"
cl6="''${yellow}"
cl7="''${cyan}"
cl8="''${black}"
cl9="''${bgyellow}"
cl10="''${bgwhite}"
block_width=4
block_height=1
bar_char_elapsed="-"
bar_char_total="="
bar_border="on"
bar_length=15
bar_color_elapsed="distro"
bar_color_total="distro"
cpu_display="on"
memory_display="on"
battery_display="on"
disk_display="on"
image_backend="kitty"
image_source="${self}/assets/images/nixos-logo.png"
image_size="250px"
image_loop="off"
aascii_distro="auto"
ascii_colors=(distro)
ascii_bold="on"
crop_mode="normal"
crop_offset="center"
gap=2
yoffset=0
xoffset=0
stdout="off"
'';
movfetch = pkgs.writeShellScriptBin "movfetch" ''
neofetch --config $HOME/.config/neofetch/config
'';
}

View File

@@ -14,6 +14,7 @@ pkgs.writeShellScriptBin "chscheme" ''
printf "\033[48;2;%d;%d;%dm %-20s %s \033[0m\n" $r $g $b $key $clean_value; \
fi; \
done' | xargs -I {} sed -i '/base16scheme \=/s/\".*\"/\"{}\"/' "$HOME"/.sysflake/flake.nix && \
[[ $? -ne 0 ]] && echo "Aborting color scheme change." && exit 0
echo "Successfully changed system color scheme. Rebuild now?" && \
select choice in "Yes" "No"; do
case $choice in

View File

@@ -10,7 +10,7 @@ pkgs.writeShellScriptBin "garbage-collect" ''
echo -e "\033[1;4;38;2;243;139;168mThis process is irreversible.\033[0m Are you sure?"
select yn in "Yes" "No"; do
case $yn in
Yes ) echo "Sweeping system...";scheck && runbg aplay "$HOME/media/sound/sys/collectgarbage.wav";break;;
Yes ) echo "Sweeping system...";scheck && runbg aplay "$HOME/assets/sound/sys/collectgarbage.wav";break;;
No ) echo "Canceling garbage collection."; return;;
esac
done
@@ -28,5 +28,5 @@ pkgs.writeShellScriptBin "garbage-collect" ''
fi
total_freed=$(echo "$nix_freed + $rm_freed" | bc)
echo -e "System cleaning complete, freed \033[1;4;38;2;166;227;161m$total_freed MiB\033[0m in total"
scheck && runbg aplay "$HOME/media/sound/sys/rm.wav"
scheck && runbg aplay "$HOME/assets/sound/sys/rm.wav"
''

View File

@@ -6,13 +6,13 @@
pkgs.writeShellScriptBin "rebuild" ''
#!/run/current-system/sw/bin/bash
scheck && runbg aplay ${self}/media/sound/nixswitch-start.wav
scheck && runbg aplay ${self}/assets/sound/nixswitch-start.wav
set -e
nh os switch -H ${host} $HOME/.sysflake
sudo nixos-rebuild switch --flake "$HOME/.sysflake#${host}"
if [ $? -eq 0 ]; then
scheck && runbg aplay ${self}/media/sound/update.wav
scheck && runbg aplay ${self}/assets/sound/update.wav
else
scheck && runbg aplay ${self}/media/sound/error.wav
scheck && runbg aplay ${self}/assets/sound/error.wav
fi
''