aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAlec Goncharow <algo@cloudflare.com>2022-12-05 13:44:04 -0600
committerAlec Goncharow <algo@cloudflare.com>2022-12-05 13:44:04 -0600
commit1256fd962bd4b53d5d47357d04a4ac613f72ac3c (patch)
tree3a96a7de9b4ed73329095ac4a2869a6bdea130f9 /bin
parentbd6155eef9232226ed8fb9b5bcf007f5662ddc10 (diff)
Cleanup nushell script
Diffstat (limited to 'bin')
-rwxr-xr-xbin/wallpaper-shuffle5
1 files changed, 3 insertions, 2 deletions
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"
}