From 1256fd962bd4b53d5d47357d04a4ac613f72ac3c Mon Sep 17 00:00:00 2001 From: Alec Goncharow Date: Mon, 5 Dec 2022 13:44:04 -0600 Subject: Cleanup nushell script --- bin/wallpaper-shuffle | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/wallpaper-shuffle b/bin/wallpaper-shuffle index 8108a10..820bfeb 100755 --- a/bin/wallpaper-shuffle +++ b/bin/wallpaper-shuffle @@ -2,10 +2,11 @@ let wallpapers_path = "~/wallpapers/low-poly" swaymsg -t get_outputs | rg name | - split row "\n" | + str trim -a | + split row "," | split column ":" | get column2 | - str trim | str trim -c "," | str trim -c '"' | + str trim | str trim -c '"' | each {|output| swaymsg $"output ($output) bg `find ($wallpapers_path) -type f | shuf -n 1` fill" } -- cgit v1.2.3-70-g09d2