some nice updates
This commit is contained in:
parent
d85c6ef4a2
commit
820d644846
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
programs.yt-dlp.enable = true;
|
programs.yt-dlp.enable = true;
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
flac
|
||||||
|
];
|
||||||
|
|
||||||
home.file.".local/bin/ytdlp-music" = {
|
home.file.".local/bin/ytdlp-music" = {
|
||||||
source = ./yt-dlp/ytdlp-music.sh;
|
source = ./yt-dlp/ytdlp-music.sh;
|
||||||
|
@ -1,6 +1,24 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
echo "Name:" && read name
|
printf "YT URL: " && read url
|
||||||
echo "URL:" && read url
|
printf "Title: " && read title
|
||||||
|
printf "Artist: " && read artist
|
||||||
|
|
||||||
yt-dlp -x --no-playlist --embed-thumbnail --no-embed-metadata --audio-quality 0 --audio-format flac -o "$name" "$url"
|
# Download file from youtube
|
||||||
|
yt-dlp -x --no-playlist --embed-thumbnail --no-embed-metadata --audio-quality 0 --audio-format flac -o "$title.flac" "$url"
|
||||||
|
|
||||||
|
# Set metadata flags
|
||||||
|
metaflac --set-tag="TITLE=$title" --set-tag="ARTIST=$artist" "$title.flac"
|
||||||
|
|
||||||
|
# Export thumbnail
|
||||||
|
metaflac --export-picture-to="$title.png" "$title.flac"
|
||||||
|
|
||||||
|
# Convert png to jpg
|
||||||
|
mogrify -format jpg "$title.png"
|
||||||
|
rm -rf "$title.png"
|
||||||
|
|
||||||
|
# Convert to square
|
||||||
|
convert "$title.jpg" -gravity center -crop 1:1 "$title.jpg"
|
||||||
|
|
||||||
|
# Move the files to the correct directory
|
||||||
|
mv "$title.flac" "$title.jpg" $HOME/Music/iPod
|
||||||
|
@ -7,11 +7,20 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Setup bootloader
|
# Setup bootloader
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot = {
|
||||||
|
enable = true;
|
||||||
|
consoleMode = "max";
|
||||||
|
};
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||||
boot.initrd.systemd.enable = true;
|
boot.initrd.systemd.enable = true;
|
||||||
|
|
||||||
|
# Plymouth
|
||||||
|
boot.plymouth = {
|
||||||
|
enable = true;
|
||||||
|
#logo = ./plymouth/logo.png;
|
||||||
|
};
|
||||||
|
|
||||||
# Setup crypto keyfile
|
# Setup crypto keyfile
|
||||||
boot.initrd.secrets = {
|
boot.initrd.secrets = {
|
||||||
"/crypto_keyfile.bin" = null;
|
"/crypto_keyfile.bin" = null;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
nerdfonts
|
nerdfonts
|
||||||
font-awesome
|
font-awesome
|
||||||
|
source-sans
|
||||||
source-han-sans
|
source-han-sans
|
||||||
source-han-serif
|
source-han-serif
|
||||||
source-han-code-jp
|
source-han-code-jp
|
||||||
|
BIN
systems/mdesktop/plymouth/logo.png
Normal file
BIN
systems/mdesktop/plymouth/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
Loading…
Reference in New Issue
Block a user