aboutsummaryrefslogtreecommitdiff
path: root/scripts/random_background_sway
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2022-10-12 13:37:45 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2022-10-12 13:37:45 +0200
commit48a7bdbb5586906d4eeee31116a17fe4556114c1 (patch)
tree7a135effd91e49ca336a8aace3149af38cc6b7cb /scripts/random_background_sway
parentce5198e0a8762b8566b9458b5e9a6f666bc201db (diff)
downloaddotfiles-48a7bdbb5586906d4eeee31116a17fe4556114c1.tar.gz
random_background
Diffstat (limited to 'scripts/random_background_sway')
-rwxr-xr-xscripts/random_background_sway14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/random_background_sway b/scripts/random_background_sway
new file mode 100755
index 0000000..9cf9e9f
--- /dev/null
+++ b/scripts/random_background_sway
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+#Screen background feh
+shopt -s nullglob
+
+pics=(~/vimconfig/pictures/b_*)
+#echo $pics
+len=${#pics[*]}
+ran=$(($RANDOM % len))
+
+
+echo ${pics[$ran]}
+killall swaybg
+swaybg -i ${pics[$ran]} &