diff --git a/bin/lock.sh b/bin/lock.sh deleted file mode 100755 index 69f552a..0000000 --- a/bin/lock.sh +++ /dev/null @@ -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 diff --git a/bin/polybar/openweathermap-simple.sh b/bin/polybar/openweathermap-simple.sh deleted file mode 100755 index 3386fda..0000000 --- a/bin/polybar/openweathermap-simple.sh +++ /dev/null @@ -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 - diff --git a/bin/polybar/pulseaudio-tail.sh b/bin/polybar/pulseaudio-tail.sh deleted file mode 100755 index aa0dbc3..0000000 --- a/bin/polybar/pulseaudio-tail.sh +++ /dev/null @@ -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 diff --git a/bin/polybar/system-usb-udev.sh b/bin/polybar/system-usb-udev.sh deleted file mode 100755 index 38990e0..0000000 --- a/bin/polybar/system-usb-udev.sh +++ /dev/null @@ -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 - diff --git a/bin/polybar/updates.sh b/bin/polybar/updates.sh deleted file mode 100755 index cad8cba..0000000 --- a/bin/polybar/updates.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -updates_arch=$(checkupdates | wc -l) - -if [ "$updates_arch" -gt 0 ]; then - echo " $updates_arch" -else - echo "" -fi diff --git a/bin/polybar/vpn_running.sh b/bin/polybar/vpn_running.sh deleted file mode 100755 index 8c20338..0000000 --- a/bin/polybar/vpn_running.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -if [ "$(pgrep openvpn)" ]; then - echo "" -else - echo -fi \ No newline at end of file diff --git a/bin/setup.sh b/bin/setup.sh deleted file mode 100755 index ca9df12..0000000 --- a/bin/setup.sh +++ /dev/null @@ -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 diff --git a/bin/startup/start_conky.sh b/bin/startup/start_conky.sh deleted file mode 100755 index 88382f1..0000000 --- a/bin/startup/start_conky.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -(sleep 10 && conky -dc $HOME/.conky/FuzzyClock/conkyrc) diff --git a/bin/startup/start_keepassxc.sh b/bin/startup/start_keepassxc.sh deleted file mode 100755 index f32b896..0000000 --- a/bin/startup/start_keepassxc.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -secret-tool lookup keepassxc master | keepassxc --pw-stdin ~/Documents/Important/passwords.kdbx diff --git a/bin/xrandr/switch_monitors.sh b/bin/xrandr/switch_monitors.sh deleted file mode 100755 index 810e83d..0000000 --- a/bin/xrandr/switch_monitors.sh +++ /dev/null @@ -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 \ No newline at end of file