summaryrefslogtreecommitdiff
path: root/.local/bin/setbg
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2025-03-30 01:00:51 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2025-03-30 01:00:51 -0400
commitf4c4550e327d9090c82a735d39d104d0bedb602d (patch)
treefcfa762512155c132a66d3adbb56067ca2d5d61b /.local/bin/setbg
parent43dbb32d741e11f8e06341f515944ec757d4578f (diff)
Loads of laptop shit
Diffstat (limited to '.local/bin/setbg')
-rwxr-xr-x.local/bin/setbg2
1 files changed, 1 insertions, 1 deletions
diff --git a/.local/bin/setbg b/.local/bin/setbg
index bfde81e..942c4e6 100755
--- a/.local/bin/setbg
+++ b/.local/bin/setbg
@@ -5,7 +5,7 @@
[ ! -f "$1" ] && exit
[ -z "$(file "$1" | grep -o 'image data')" ] && exit
-displays=$(xrandr | grep " connected" | sed 's/^\([a-Z,0-9,-]*\).*/\1/')
+displays=$(wlr-randr --json | jq -r '.[] | select(.active) | .name')
# Same as above but use dmenu only if there are multiple displays
if [ "$(echo "$displays" | wc -l)" -gt 1 ]; then