From e577a61b24250c447e917fb1440a17b481e22faf Mon Sep 17 00:00:00 2001 From: Tyler Kelley Date: Fri, 17 May 2024 16:03:33 -0500 Subject: [PATCH] make wallsetter better and add swappy config --- hosts/familypc/home.nix | 14 +++++++++++++- scripts/wallsetter.nix | 3 +++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/hosts/familypc/home.nix b/hosts/familypc/home.nix index 320c39a..761505f 100644 --- a/hosts/familypc/home.nix +++ b/hosts/familypc/home.nix @@ -13,7 +13,6 @@ let gitUsername gitEmail theme - browser ; in { @@ -79,6 +78,19 @@ in separator=" $(color 4)>" stdout="off" ''; + home.file.".config/swappy/config".text = '' + [Default] + save_dir=/home/${username}/Pictures/Screenshots + save_filename_format=swappy-%Y%m%d-%H%M%S.png + show_panel=false + line_size=5 + text_size=20 + text_font=Ubuntu + paint_mode=brush + early_exit=true + fill_shape=false + ''; + # Install & Configure Git programs.git = { diff --git a/scripts/wallsetter.nix b/scripts/wallsetter.nix index 79c7756..55e5356 100644 --- a/scripts/wallsetter.nix +++ b/scripts/wallsetter.nix @@ -3,6 +3,9 @@ pkgs.writeShellScriptBin "wallsetter" '' WALLPAPER=$(find /home/${username}/Pictures/Wallpapers -name '*' | awk '!/.git/' | tail -n +2 | shuf -n 1) PREVIOUS=$WALLPAPER + if [ "$WALLPAPER" == "$PREVIOUS" ]; then + WALLPAPER=$(find /home/${username}/Pictures/Wallpapers -name '*' | awk '!/.git/' | tail -n +2 | shuf -n 1) + fi if [ -d /home/${username}/Pictures/Wallpapers ]; then num_files=$(ls -1 /home/${username}/Pictures/Wallpapers | wc -l)