fixed chscheme and chpaper to work with new colorscheme and wallpaper variable locations

This commit is contained in:
pagedmov
2024-11-06 00:35:37 -05:00
parent 6ccc57f95e
commit 115384a926
10 changed files with 32 additions and 20 deletions

View File

@@ -2,7 +2,7 @@
pkgs.writeShellScriptBin "chpaper" ''
paper="$\{self}/assets/wallpapers/$(find "$FLAKEPATH"/assets/wallpapers -exec basename {} \; | rg "\.\w+$" | fzf --preview "chafa -s 30x40 $FLAKEPATH/assets/wallpapers/{}")"
[ "$paper" = "$\{self}/assets/wallpapers/" ] && echo "Cancelling wallpaper change" && exit 1
echo "$paper" | xargs -I {} sed -i '/wallpaper =/s|"[^"]*"|"{}"|' "$FLAKEPATH"/flake.nix
echo "$paper" | xargs -I {} sed -i '/wallpaper =/s|"[^"]*"|"{}"|' "$FLAKEPATH"/modules/sys/environment/stylix.nix
echo "Successfully changed wallpaper. Rebuild now?" && \
select choice in "Yes" "No"; do
case $choice in

View File

@@ -18,7 +18,7 @@ pkgs.writeShellScriptBin "chscheme" ''
exit 1
fi
echo "$selected_scheme" | xargs -I {} sed -i '/base16scheme\s*=\s*"/s/"[^"]*"/"{}"/' "$FLAKEPATH"/flake.nix
echo "$selected_scheme" | xargs -I {} sed -i '/^[[:space:]]*scheme\s*=\s*"/s/"[^"]*"/"{}"/' "$FLAKEPATH"/modules/sys/environment/stylix.nix
if [ $? -ne 0 ]; then
echo "Failed to change color scheme."
exit 1

View File

@@ -23,7 +23,7 @@ pkgs.writeShellScriptBin "keyring" ''
echo "Password copied. Clearing clipboard in 10 seconds."
# start a timer for 10 seconds, clear clipboard, resume cliphist tracking
nohup bash <<- EOF &
nohup bash <<-EOF > /dev/null &
sleep 10
wl-copy -c
pkill -CONT wl-paste