From 83e63b5d8326505493a99ddc1669333e9a24dadb Mon Sep 17 00:00:00 2001 From: Niklas Kapelle Date: Sun, 8 Sep 2024 21:53:29 +0200 Subject: [PATCH] moved desktop scripts to nix package --- .local/bin/macho | 1 - .local/share/scripts/save-screenshot.sh | 20 -------------------- .local/share/scripts/select-bg.sh | 10 ---------- .local/share/scripts/set-bg.sh | 18 ------------------ .local/share/scripts/take-screenshot.sh | 16 ---------------- .local/share/scripts/wal.sh | 15 --------------- 6 files changed, 80 deletions(-) delete mode 120000 .local/bin/macho delete mode 100755 .local/share/scripts/save-screenshot.sh delete mode 100755 .local/share/scripts/select-bg.sh delete mode 100755 .local/share/scripts/set-bg.sh delete mode 100755 .local/share/scripts/take-screenshot.sh delete mode 100755 .local/share/scripts/wal.sh diff --git a/.local/bin/macho b/.local/bin/macho deleted file mode 120000 index 19b2892..0000000 --- a/.local/bin/macho +++ /dev/null @@ -1 +0,0 @@ -../share/scripts/macho.sh \ No newline at end of file diff --git a/.local/share/scripts/save-screenshot.sh b/.local/share/scripts/save-screenshot.sh deleted file mode 100755 index a84a4c4..0000000 --- a/.local/share/scripts/save-screenshot.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env sh - -# Make a screenshots and save it in ~/pictures/screenshots - -set -e - -SCRIPT=$(readlink -f "$0") -SCRIPTPATH=$(dirname "$SCRIPT") - -SCREENSHOT_DIR="$HOME/pictures/screenshots" - -screenshotFile=$($SCRIPTPATH/take-screenshot.sh) - -mkdir -p "$SCREENSHOT_DIR" - -mv "$screenshotFile" "$SCREENSHOT_DIR" -rm -rf "$(dirname $screenshotFile)" - -printf "%s\n" "$SCREENSHOT_DIR/$(basename $screenshotFile)" - diff --git a/.local/share/scripts/select-bg.sh b/.local/share/scripts/select-bg.sh deleted file mode 100755 index 834367d..0000000 --- a/.local/share/scripts/select-bg.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env sh -# required packages: -# - sxiv - -SELECT=$(sxiv -N "floatme" -t -o ~/pictures/wallpapers ) -SCRIPT=$(readlink -f "$0") -SCRIPTPATH=$(dirname "$SCRIPT") - -$SCRIPTPATH/set-bg.sh "$SELECT" - diff --git a/.local/share/scripts/set-bg.sh b/.local/share/scripts/set-bg.sh deleted file mode 100755 index 880be87..0000000 --- a/.local/share/scripts/set-bg.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env sh - -set -e - -SCRIPT=$(readlink -f "$0") -SCRIPTPATH=$(dirname "$SCRIPT") - -[ -z "$1" ] && exit 0 - -LAST_BG_LOCATION="$XDG_CACHE_HOME/last-bg" - -#echo "$(realpath $1)" > $LAST_BG_LOCATION -ln -sf $1 $LAST_BG_LOCATION - -swww img $1 - -$SCRIPTPATH/wal.sh "$1" - diff --git a/.local/share/scripts/take-screenshot.sh b/.local/share/scripts/take-screenshot.sh deleted file mode 100755 index bd681ea..0000000 --- a/.local/share/scripts/take-screenshot.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env sh - -# Make a selection of the screen and take a screenshot. Save it to tmp and print its path. - -set -e - -TMPDIR=$(mktemp -d) - -GRIM_DEFAULT_DIR="$TMPDIR" grim -g "$(slurp)" - -filename="$(date +"%d-%m-%y-%H-%M-%Z").png" - -mv $TMPDIR/* "$TMPDIR/$filename" - -printf "%s\n" "$TMPDIR/$filename" - diff --git a/.local/share/scripts/wal.sh b/.local/share/scripts/wal.sh deleted file mode 100755 index ef46317..0000000 --- a/.local/share/scripts/wal.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env sh - -set -e - -IMAGE="$1" - -if [ -z $IMAGE ]; then - echo "Provide a image" - exit 1 -fi - -wal -i "$IMAGE" -n - -killall -SIGUSR2 waybar -