Remove unused scripts

This commit is contained in:
Marko Korhonen 2025-02-13 12:18:30 -06:00
parent aea4e45d2a
commit 2dd4ec52b9
6 changed files with 0 additions and 127 deletions

View file

@ -1,22 +0,0 @@
#!/bin/bash
function rotate_ms {
case $1 in
"normal")
swaymsg output eDP-1 transform 0
;;
"right-up")
swaymsg output eDP-1 transform 90
;;
"bottom-up")
swaymsg output eDP-1 transform 180
;;
"left-up")
swaymsg output eDP-1 transform 270
;;
esac
}
while IFS='$\n' read -r line; do
rotation="$(echo $line | sed -En "s/^.*orientation changed: (.*)/\1/p")"
[[ ! -z $rotation ]] && rotate_ms $rotation
done < <(stdbuf -oL monitor-sensor)

View file

@ -1,12 +0,0 @@
#!/bin/sh
checkupdates -d
CODE=$?
if [ $CODE -eq 2 ]; then
echo "No updates available"
exit 0
fi
exit $CODE

View file

@ -1,23 +0,0 @@
#!/bin/bash
NEWMAILDIR=~/.mail/$1/INBOX/new
COUNT=$(ls $NEWMAILDIR | wc -l)
ICON=/usr/share/icons/Papirus-Dark/64x64/apps/email.svg
SOUND=/usr/share/sounds/Oxygen-Im-Message-In.ogg
if [ $COUNT -ne 0 ]; then
mpv $SOUND &
fi
if [ $COUNT -gt 1 ]; then
fromaddress=$(cat $NEWMAILDIR/$(ls $NEWMAILDIR | sort -R | tail -1) | formail -x From | tail -1)
notify-send.sh -i $ICON "$COUNT new messages in $1" "From $fromaddress and others"
elif [ $COUNT -eq 1 ]; then
mailsubject=$(cat $NEWMAILDIR/* | formail -x Subject)
fromaddress=$(cat $NEWMAILDIR/* | formail -x From | tail -1)
notify-send.sh -i $ICON "New message in $1" "$fromaddress $mailsubject"
else
echo "No new mail"
fi

View file

@ -1,29 +0,0 @@
#!/bin/bash
if [ $# -eq 1 ]; then
DIR=/tmp/images
IMGNAME=$(basename $1)
if [ ! -d $DIR ]; then
mkdir $DIR
fi
if [ ! -f $DIR/$IMGNAME ]; then
wget $1 -O $DIR/$IMGNAME
fi
mimeo $DIR/$IMGNAME
else
DIR=/tmp/images/$(basename $1)
if [ ! -d $]; then
mkdir -p $DIR
fi
if [ ! -f $DIR/$IMGNAME ]; then
wget -P $DIR $@
fi
mimeo $DIR/*
fi

View file

@ -1,11 +0,0 @@
#!/bin/bash
ALBUMNAME=$(basename $1)
ALBUMDIR=/tmp/imgur/$ALBUMNAME
if [ ! -d $ALBUMDIR ]; then
mkdir -p $ALBUMDIR
imgur-album-downloader $1 $ALBUMDIR
fi
mimeo $ALBUMDIR

View file

@ -1,30 +0,0 @@
#!/usr/bin/env bash
notify="notify-send -i mpv -a mpv"
url="$1"
# NOTE: You need to configure mpv to
# enable ipc server on this path (see my mpv config for an example)
MPVSOCKET="/tmp/mpvsocket"
# See if MPV is already running
if [ -z "$(pidof mpv)" ]; then
# mpv is not running
# pause other players
playerctl pause
# start mpv
/usr/bin/mpv --no-terminal "$url" & disown
# Wait for mpv to be up before adding anything else to playlist
while [ -z "$(pidof mpv)" ]; do
sleep 1
done
$notify "Playing $url"
else
# mpv is running, so add stuff to playlist
$notify "Adding $url"
echo "{\"command\": [\"loadfile\", \"$url\", \"append\"]}" | socat - /tmp/mpvsocket
fi