summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2021-07-27 04:35:01 -0700
committerxyz <gky44px1999@gmail.com>2021-07-27 04:35:01 -0700
commita1955da6d7bf41458a06398e52ddd491a8992d16 (patch)
tree79e52e4d8a543c9e18f75588c7509db7590f7307
parentc30307136a4a7a02646f2e06500edc9aeace65bb (diff)
add chmod default dirs and files, shuffle wallpaper scripts
-rwxr-xr-x.local/bin/chmodef4
-rwxr-xr-x.local/bin/shufwall8
2 files changed, 12 insertions, 0 deletions
diff --git a/.local/bin/chmodef b/.local/bin/chmodef
new file mode 100755
index 00000000..8163d300
--- /dev/null
+++ b/.local/bin/chmodef
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+find "$@" -type d -execdir chmod 755 -- '{}' \+
+find "$@" -type f -execdir chmod 644 -- '{}' \+
diff --git a/.local/bin/shufwall b/.local/bin/shufwall
new file mode 100755
index 00000000..086dd54d
--- /dev/null
+++ b/.local/bin/shufwall
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -z "$1" ]; then
+ xwallpaper --maximize "$(find -L ~/pictures/wallpapers -type f | shuf -n 1)"
+else
+ xwallpaper --maximize "$(find -L "$@" -maxdepth 1 -type f | shuf -n 1)"
+fi
+