Remove unnecessary files

This commit is contained in:
Mathis 2020-01-21 10:39:12 +01:00
parent abf0e0bb5c
commit 80e20aa00f
10 changed files with 0 additions and 284 deletions

View File

@ -1,23 +0,0 @@
#!/bin/bash
letterEnteredColor=00af46ff
letterRemovedColor=d23c3dff
passwordCorrect=00000000
passwordIncorrect=d23c3dff
background=00000000
foreground=ffffffff
qdbus org.keepassxc.KeePassXC.MainWindow /keepassxc org.keepassxc.MainWindow.lockAllDatabases
i3lock \
-t -i "$1" \
--timepos="110:h-70" \
--datepos="135:h-45" \
--clock --datestr "Type password to unlock..." \
--insidecolor=$background --ringcolor=$foreground --line-uses-inside \
--keyhlcolor=$letterEnteredColor --bshlcolor=$letterRemovedColor --separatorcolor=$background \
--insidevercolor=$passwordCorrect --insidewrongcolor=$passwordIncorrect \
--ringvercolor=$foreground --ringwrongcolor=$foreground --indpos="x+280:h-70" \
--radius=20 --ring-width=4 --veriftext="" --wrongtext="" \
--verifcolor="$foreground" --timecolor="$foreground" --datecolor="$foreground" \
--noinputtext="" --force-clock $lockargs

View File

@ -1,57 +0,0 @@
#!/bin/sh
get_icon() {
case $1 in
01d) icon="";;
01n) icon="";;
02d) icon="";;
02n) icon="";;
03*) icon="";;
04*) icon="";;
09d) icon="";;
09n) icon="";;
10d) icon="";;
10n) icon="";;
11d) icon="";;
11n) icon="";;
13d) icon="";;
13n) icon="";;
50d) icon="";;
50n) icon="";;
*) icon="";
esac
echo $icon
}
KEY=`secret-tool lookup openweathermap api_key`
BRNO_CZ="3078610"
ZVOLEN_SK="3056459"
CITY=$BRNO_CZ
UNITS="metric"
SYMBOL="°"
if [ ! -z $CITY ]; then
weather=$(curl -sf "http://api.openweathermap.org/data/2.5/weather?APPID=$KEY&id=$CITY&units=$UNITS")
# weather=$(curl -sf "http://api.openweathermap.org/data/2.5/forecast?APPID=$KEY&id=$CITY&units=$UNITS&cnt=1")
else
location=$(curl -sf https://location.services.mozilla.com/v1/geolocate?key=geoclue)
if [ ! -z "$location" ]; then
location_lat="$(echo "$location" | jq '.location.lat')"
location_lon="$(echo "$location" | jq '.location.lng')"
weather=$(curl -sf "http://api.openweathermap.org/data/2.5/weather?appid=$KEY&lat=$location_lat&lon=$location_lon&units=$UNITS")
fi
fi
if [ ! -z "$weather" ]; then
weather_temp=$(echo "$weather" | jq ".main.temp" | cut -d "." -f 1)
weather_icon=$(echo "$weather" | jq -r ".weather[].icon")
echo "$(get_icon "$weather_icon")" "$weather_temp$SYMBOL"
fi

View File

@ -1,56 +0,0 @@
#!/bin/sh
sink=0
volume_up() {
pactl set-sink-volume $sink +1%
}
volume_down() {
pactl set-sink-volume $sink -1%
}
volume_mute() {
pactl set-sink-mute $sink toggle
}
volume_print() {
icon=""
muted=$(pamixer --sink $sink --get-mute)
if [ "$muted" = true ]; then
echo "$icon --"
else
echo "$icon $(pamixer --sink $sink --get-volume)"
fi
}
listen() {
volume_print
pactl subscribe | while read -r event; do
if echo "$event" | grep -q "#$sink"; then
volume_print
fi
done
}
case "$1" in
--up)
volume_up
;;
--down)
volume_down
;;
--mute)
volume_mute
;;
--show)
show_active
;;
*)
listen
;;
esac

View File

@ -1,88 +0,0 @@
#!/bin/sh
usb_print() {
devices=$(lsblk -Jplno NAME,TYPE,RM,SIZE,MOUNTPOINT,VENDOR)
output=""
counter=0
for unmounted in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == "1") | select(.mountpoint == null) | .name'); do
unmounted=$(echo "$unmounted" | tr -d "[:digit:]")
unmounted=$(echo "$devices" | jq -r '.blockdevices[] | select(.name == "'"$unmounted"'") | .vendor')
unmounted=$(echo "$unmounted" | tr -d ' ')
if [ $counter -eq 0 ]; then
space=""
else
space=" "
fi
counter=$((counter + 1))
output="$output$space#1 $unmounted"
done
for mounted in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == "1") | select(.mountpoint != null) | .size'); do
if [ $counter -eq 0 ]; then
space=""
else
space=" "
fi
counter=$((counter + 1))
output="$output$space#2 $mounted"
done
echo "$output"
}
usb_update() {
pid=$(pgrep -xf "/bin/sh /home/matus/bin/system-usb-udev.sh")
if [ "$pid" != "" ]; then
kill -10 "$pid"
fi
}
case "$1" in
--update)
usb_update
;;
--mount)
devices=$(lsblk -Jplno NAME,TYPE,RM,MOUNTPOINT)
for mount in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == "1") | select(.mountpoint == null) | .name'); do
# udisksctl mount --no-user-interaction -b "$mount"
# mountpoint=$(udisksctl mount --no-user-interaction -b $mount)
# mountpoint=$(echo $mountpoint | cut -d " " -f 4 | tr -d ".")
# terminal -e "bash -lc 'filemanager $mountpoint'"
mountpoint=$(udisksctl mount --no-user-interaction -b "$mount")
mountpoint=$(echo "$mountpoint" | cut -d " " -f 4 | tr -d ".")
termite -e "bash -lc 'mc $mountpoint'" &
done
usb_update
;;
--unmount)
devices=$(lsblk -Jplno NAME,TYPE,RM,MOUNTPOINT)
for unmount in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == "1") | select(.mountpoint != null) | .name'); do
udisksctl unmount --no-user-interaction -b "$unmount"
udisksctl power-off --no-user-interaction -b "$unmount"
done
usb_update
;;
*)
trap exit INT
trap "echo" USR1
while true; do
usb_print
sleep 60 &
wait
done
;;
esac

View File

@ -1,9 +0,0 @@
#!/bin/sh
updates_arch=$(checkupdates | wc -l)
if [ "$updates_arch" -gt 0 ]; then
echo " $updates_arch"
else
echo ""
fi

View File

@ -1,7 +0,0 @@
#!/bin/sh
if [ "$(pgrep openvpn)" ]; then
echo ""
else
echo
fi

View File

@ -1,17 +0,0 @@
#!/bin/sh
echo "Enter OpenWeatherMap API key"
read line
echo $line | secret-tool store --label='OpenWeatherMap API Key' openweathermap api_key
echo "Enter KeePassXC master password"
read line
echo $line | secret-tool store --label='KeePassXC master password' keepassxc master
echo "Enter git name"
read name
git config --global user.name $name
echo "Enter git email"
read email
git config --global user.email $email

View File

@ -1,3 +0,0 @@
#!/bin/bash
(sleep 10 && conky -dc $HOME/.conky/FuzzyClock/conkyrc)

View File

@ -1,3 +0,0 @@
#!/bin/sh
secret-tool lookup keepassxc master | keepassxc --pw-stdin ~/Documents/Important/passwords.kdbx

View File

@ -1,21 +0,0 @@
#!/bin/bash
intern=eDP-1
extern=HDMI-1
case $1 in
"-i")
m=$intern
;;
"-e")
m=$extern
;;
*)
echo "Wrong option"
esac
if xrandr --listactivemonitors | grep "$m"; then
xrandr --output "$m" --off
else
xrandr --output "$m" --auto
fi