From ce9f79b96e41693fa7ded75337065255a63c0c15 Mon Sep 17 00:00:00 2001 From: Wiktor Zykubek Date: Tue, 19 Jan 2021 20:56:51 +0100 Subject: [PATCH] Update some scripts --- .local/bin/scripts/choosewall | 2 +- .local/bin/scripts/setwall | 8 +------- .local/bin/scripts/statusbar/sb-disk | 8 +++++++- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.local/bin/scripts/choosewall b/.local/bin/scripts/choosewall index eae7091..ffe2e90 100755 --- a/.local/bin/scripts/choosewall +++ b/.local/bin/scripts/choosewall @@ -8,4 +8,4 @@ elif [ "$(cat /etc/hostname)" = "laptop" ]; then res="1366x768" fi -find ~/.config/wallpapers/"$res"/* | shuf | sxiv - -tb +find ~/.config/wallpapers/"$res"/* | sxiv - -tb diff --git a/.local/bin/scripts/setwall b/.local/bin/scripts/setwall index 9aed4c7..2d8dd50 100755 --- a/.local/bin/scripts/setwall +++ b/.local/bin/scripts/setwall @@ -4,10 +4,4 @@ [ "$1" ] && { xwallpaper --zoom "$1" && exit 1; } -if [ "$(cat /etc/hostname)" = "pc" ]; then - res="1920x1080" -elif [ "$(cat /etc/hostname)" = "laptop" ]; then - res="1366x768" -fi - -xwallpaper --maximize /home/samedamci/.config/wallpapers/"$res"/wall15.png & +xwallpaper --maximize /home/samedamci/.config/wallpapers/1920x1080/wall30.png & diff --git a/.local/bin/scripts/statusbar/sb-disk b/.local/bin/scripts/statusbar/sb-disk index 198ff7b..db443b9 100755 --- a/.local/bin/scripts/statusbar/sb-disk +++ b/.local/bin/scripts/statusbar/sb-disk @@ -4,7 +4,13 @@ used() { df -h "$1" | awk 'NR==2 { print $3 "/" $2 " GB" }' | sed 's/G\//\//g;s/G / /g' } +server_used() { + ssh homeserver df -h | grep '/dev/mapper/md0-crypt' | \ + awk '{print $3 "/" $2 " GB" }' | sed 's/G\//\//g;s/G / /g' +} + root="$(used /)" home="$(used /home)" +server="$(server_used)" -echo "/ $root,  $home" +echo "/ $root,  $home,  $server"