From 157beed26e19fd0de921a5ed3bfe0127f2ba8469 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 28 Sep 2023 15:20:03 +0200 Subject: [linkhandler] use environment variables --- bin/guiscripts/linkhandler | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bin/guiscripts') diff --git a/bin/guiscripts/linkhandler b/bin/guiscripts/linkhandler index 084b952..aeec202 100755 --- a/bin/guiscripts/linkhandler +++ b/bin/guiscripts/linkhandler @@ -14,11 +14,14 @@ case "$url" in *mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtube.com/shorts*|*youtu.be*|*hooktube.com*|*bitchute.com*|*videos.lukesmith.xyz*|*odysee.com*) setsid -f mpv --quiet --ytdl --ytdl-raw-options="format-sort=res:720" "$url" > /dev/null 2>&1 ;; *png|*jpg|*jpe|*jpeg|*gif) - curl -sL "$url" > "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;; + curl -sL "$url" > "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")" && $IMAGE -a "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;; *pdf|*cbz|*cbr) - curl -sL "$url" > "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")" && evince "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;; + curl -sL "$url" > "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")" && $VIEWER "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;; *mp3|*flac|*opus|*mp3?source*) qndl "$url" 'curl -LO' >/dev/null 2>&1 ;; *) - [ -f "$url" ] && setsid -f "$TERMINAL" -e "$EDITOR" "$url" >/dev/null 2>&1 || setsid -f "$BROWSER" "$url" >/dev/null 2>&1 + if [ -f "$url" ] + then setsid -f "$TERMINAL" -e "$EDITOR" "$url" >/dev/null 2>&1 + else setsid -f "$BROWSER" "$url" >/dev/null 2>&1 + fi esac -- cgit v1.2.3 From a1172baeed7f86045035669b14b4168f1977d909 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 28 Sep 2023 15:20:41 +0200 Subject: [newwal] use print0 --- bin/guiscripts/newwal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/guiscripts') diff --git a/bin/guiscripts/newwal b/bin/guiscripts/newwal index b913552..32d3db6 100755 --- a/bin/guiscripts/newwal +++ b/bin/guiscripts/newwal @@ -10,8 +10,8 @@ res="1920x1080" # if no (valid) argument, use find any image with $res resolution # and take a random one test -f "${wal:=$(realpath "$1")}" || - wal="$(find "$walls" -type f | - xargs identify | + wal="$(find "$walls" -type f -print0 | + xargs -0 identify | grep "$res" | awk '{print $1}' | shuf -n 1)" -- cgit v1.2.3 From c7266e37ae575fad362890aa90d553df7b7dd827 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 4 Oct 2023 02:53:09 +0200 Subject: added fillpass --- bin/guiscripts/fillpass | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 bin/guiscripts/fillpass (limited to 'bin/guiscripts') diff --git a/bin/guiscripts/fillpass b/bin/guiscripts/fillpass new file mode 100755 index 0000000..87e74ca --- /dev/null +++ b/bin/guiscripts/fillpass @@ -0,0 +1,13 @@ +#!/bin/sh + +pass="$( + find "${PASSWORD_STORE_DIR:=~/src/password-store/}" -name "*.gpg" | + sed -e "s@$PASSWORD_STORE_DIR/@@" -e 's/\.gpg$//' | + commander -x -c)" +[ "$pass" ] || exit 1 + +login="$(pass show "$pass" | awk '/^login:/ {print $2}')" +password="$(pass show "$pass" | head -n 1)" + +printf '%s\t%s\n' "$login" "$password" | + ydotool type -f - -- cgit v1.2.3 From 6f0a7bc942e633d93f4d996a1bf3ee0792d1e3d2 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 8 Oct 2023 13:17:50 +0200 Subject: added check if there is a login --- bin/guiscripts/fillpass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bin/guiscripts') diff --git a/bin/guiscripts/fillpass b/bin/guiscripts/fillpass index 87e74ca..358afd1 100755 --- a/bin/guiscripts/fillpass +++ b/bin/guiscripts/fillpass @@ -9,5 +9,7 @@ pass="$( login="$(pass show "$pass" | awk '/^login:/ {print $2}')" password="$(pass show "$pass" | head -n 1)" -printf '%s\t%s\n' "$login" "$password" | - ydotool type -f - +if [ "$login" ] +then printf '%s\t%s\n' "$login" "$password" | ydotool type -f - +else printf '%s\n' "$password" | ydotool type -f - +fi -- cgit v1.2.3 From 6013769ff45c450f60be262f08b697c8b50f3657 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 10 Oct 2023 22:57:36 +0200 Subject: shut ouptut of pixelate --- bin/guiscripts/locker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/guiscripts') diff --git a/bin/guiscripts/locker b/bin/guiscripts/locker index b680484..7c42cda 100755 --- a/bin/guiscripts/locker +++ b/bin/guiscripts/locker @@ -9,7 +9,7 @@ for monitor in $monitors do file="/tmp/locker-$monitor.png" grim -l 0 -o "$monitor" "$file" - pixelate "$file" "$file" + pixelate "$file" "$file" > /dev/null 2>&1 # Create image command for swaylock img_opt="--image $monitor:$file $img_opt" files="$files $file" -- cgit v1.2.3