diff --git a/README.md b/README.md index 926d84fe..730dc319 100644 --- a/README.md +++ b/README.md @@ -50,9 +50,9 @@ Nix allows for easy-to-manage, collaborative, reproducible deployments. This mea ## Hyprland + AstroNvim -![](./_img/hyprland_2023-07-26.webp) +![](./_img/hyprland_2023-07-29_1.webp) -![](./_img/hyprland_2023-07-27.webp) +![](./_img/hyprland_2023-07-29_2.webp) ## I3 + AstroNvim diff --git a/_img/hyprland_2023-07-26.webp b/_img/hyprland_2023-07-26.webp deleted file mode 100644 index 01ef7a4b..00000000 Binary files a/_img/hyprland_2023-07-26.webp and /dev/null differ diff --git a/_img/hyprland_2023-07-27.webp b/_img/hyprland_2023-07-27.webp deleted file mode 100644 index 7660192a..00000000 Binary files a/_img/hyprland_2023-07-27.webp and /dev/null differ diff --git a/_img/hyprland_2023-07-29_1.webp b/_img/hyprland_2023-07-29_1.webp new file mode 100644 index 00000000..5651c91e Binary files /dev/null and b/_img/hyprland_2023-07-29_1.webp differ diff --git a/_img/hyprland_2023-07-29_2.webp b/_img/hyprland_2023-07-29_2.webp new file mode 100644 index 00000000..20f51613 Binary files /dev/null and b/_img/hyprland_2023-07-29_2.webp differ diff --git a/flake.nix b/flake.nix index a4c051dd..3834b11e 100644 --- a/flake.nix +++ b/flake.nix @@ -20,12 +20,16 @@ nix-darwin, home-manager, nixos-generators, + wallpapers, ... }: let username = "ryan"; userfullname = "Ryan Yin"; useremail = "xiaoyin_c@qq.com"; + # https://github.com/ryan4yin/wallpapers + wallpaper = "${wallpapers}/anime-girls_seagulls_smoking_nature-occupation.jpg"; + x64_system = "x86_64-linux"; x64_darwin = "x86_64-darwin"; allSystems = [x64_system x64_darwin]; @@ -77,7 +81,7 @@ system = x64_system; specialArgs = { - inherit username userfullname useremail; + inherit username userfullname useremail wallpaper; # use unstable branch for some packages to get the latest updates pkgs-unstable = import nixpkgs-unstable { system = x64_system; # refer the `system` parameter form outer scope recursively @@ -210,6 +214,12 @@ flake = false; }; + # my wallpapers + wallpapers = { + url = "github:ryan4yin/wallpapers"; + flake = false; + }; + # color scheme - catppuccin catppuccin-btop = { url = "github:catppuccin/btop"; diff --git a/home/linux/hyprland/default.nix b/home/linux/hyprland/default.nix index 5cb2b0e4..3d96992e 100644 --- a/home/linux/hyprland/default.nix +++ b/home/linux/hyprland/default.nix @@ -1,4 +1,4 @@ -{pkgs, catppuccin-hyprland, ...}: { +{pkgs, catppuccin-hyprland, wallpaper, ...}: { imports = [ ./wayland-apps.nix ]; @@ -16,7 +16,7 @@ }; home.file.".config/hypr-themes".source = "${catppuccin-hyprland}/themes"; - home.file.".config/hypr/wallpapers/wallpaper.png".source = ../wallpapers/wallpaper.png; + home.file.".config/hypr/wallpapers/wallpaper".source = wallpaper; # gtk's theme settings, generate files: # 1. ~/.gtkrc-2.0 diff --git a/home/linux/hyprland/hypr-conf/scripts/startup b/home/linux/hyprland/hypr-conf/scripts/startup index 253df8f0..9670793d 100755 --- a/home/linux/hyprland/hypr-conf/scripts/startup +++ b/home/linux/hyprland/hypr-conf/scripts/startup @@ -11,7 +11,7 @@ for _prs in "${_ps[@]}"; do done # Set wallpaper -swaybg --output '*' --mode fill --image ~/.config/hypr/wallpapers/wallpaper.png & +swaybg --output '*' --mode fill --image ~/.config/hypr/wallpapers/wallpaper & # Lauch notification daemon (mako) ~/.config/hypr/scripts/notifications & diff --git a/home/linux/i3/config b/home/linux/i3/config index 0b43f6cf..b317f1f3 100644 --- a/home/linux/i3/config +++ b/home/linux/i3/config @@ -262,7 +262,7 @@ exec --no-startup-id ~/.screenlayout/monitor.sh # set wallpaper # exec --no-startup-id sleep 2 && nitrogen --restore -exec --no-startup-id sleep 1 && feh --bg-fill ~/.config/i3/wallpaper.png +exec --no-startup-id sleep 1 && feh --bg-fill ~/.config/i3/wallpaper # set powersavings for display: exec --no-startup-id xset s 480 dpms 600 600 600 diff --git a/home/linux/i3/default.nix b/home/linux/i3/default.nix index d8ea76d0..e17a6f45 100644 --- a/home/linux/i3/default.nix +++ b/home/linux/i3/default.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, wallpaper, ...}: { # i3 window manager's config, based on https://github.com/endeavouros-team/endeavouros-i3wm-setup imports = [ @@ -7,7 +7,7 @@ home.file = { # wallpaper, binary file - ".config/i3/wallpaper.png".source = ../wallpapers/wallpaper.png; + ".config/i3/wallpaper".source = wallpaper; ".config/i3/config".source = ./config; ".config/i3/i3blocks.conf".source = ./i3blocks.conf; ".config/i3/scripts" = { diff --git a/home/linux/wallpapers/convert_to_png.nu b/home/linux/wallpapers/convert_to_png.nu deleted file mode 100644 index b78b70ca..00000000 --- a/home/linux/wallpapers/convert_to_png.nu +++ /dev/null @@ -1,22 +0,0 @@ -# convert all images to png - -def to_png [old_path: string, old_format: string] { - # 将后缀改为 .png 得到新图片的 path - let webp_path = ($old_path | split row $old_format | append ".png" | str join) - # 使用 ffmpeg 进行格式转换 - ffmpeg -y -i $old_path $webp_path - # 删除旧图片 - rm $old_path -} - -def convert_format [old_format: string] { - # 递归找出所有大于 10kib 的图片 - let old_paths = (ls $"**/*($old_format)" | where size > 10kb | each {|it| $it.name}) - $old_paths | to md - - # 1. 执行图片格式转换与压缩,同时删除原图片 - $old_paths | each { |it| to_png $it $old_format } -} - -convert_format ".webp" -# convert_format ".jpg" diff --git a/home/linux/wallpapers/jiaocha_anime-girls_long-hair_sky.jpg b/home/linux/wallpapers/jiaocha_anime-girls_long-hair_sky.jpg deleted file mode 100644 index 30f50e2f..00000000 Binary files a/home/linux/wallpapers/jiaocha_anime-girls_long-hair_sky.jpg and /dev/null differ diff --git a/home/linux/wallpapers/jiaocha_anime-girls_seagulls.jpg b/home/linux/wallpapers/jiaocha_anime-girls_seagulls.jpg deleted file mode 100644 index 78cdff19..00000000 Binary files a/home/linux/wallpapers/jiaocha_anime-girls_seagulls.jpg and /dev/null differ diff --git a/home/linux/wallpapers/jiaocha_anime-girls_street.jpg b/home/linux/wallpapers/jiaocha_anime-girls_street.jpg deleted file mode 100644 index 493be40c..00000000 Binary files a/home/linux/wallpapers/jiaocha_anime-girls_street.jpg and /dev/null differ diff --git a/home/linux/wallpapers/rolling_girls.png b/home/linux/wallpapers/rolling_girls.png deleted file mode 100644 index b1140344..00000000 Binary files a/home/linux/wallpapers/rolling_girls.png and /dev/null differ diff --git a/home/linux/wallpapers/wallpaper.png b/home/linux/wallpapers/wallpaper.png deleted file mode 120000 index 62baf407..00000000 --- a/home/linux/wallpapers/wallpaper.png +++ /dev/null @@ -1 +0,0 @@ -jiaocha_anime-girls_seagulls.jpg \ No newline at end of file