diff --git a/ewwScripts/monitors.sh b/ewwScripts/monitors.sh deleted file mode 100755 index 6696090..0000000 --- a/ewwScripts/monitors.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - - - -unset id name horizontal vertical scale activeWorkspace - -i=0 - -while read -r k n h v s t; do - id[i]="$k" - name[i]="$n" - horizontal[i]="$h" - vertical[i]="$v" - scale[i]="$s" - if [[ $((t%2)) == 1 ]]; then - temp=${vertical[$i]} - vertical[i]=${horizontal[$i]} - horizontal[i]=$temp - fi - ((i=i+1)) -done < <(hyprctl monitors -j | jq -r '.[]|"\(.id) \(.name) \(.width) \(.height) \(.scale) \(.transform)"') - -eww close-all --config ../eww - -sleep 2 - -for ((i = 0; i < ${#id[@]}; i++)); do - scale_value=$(echo "${scale[$i]}" | bc -l) - - new_width_float=$(echo "(${horizontal[$i]} / ${scale_value}) -10" | bc) - - new_width=$(echo "$new_width_float / 1" | bc) - - monitorID=$(xrandr --listactivemonitors | grep +"${name[$i]}" | awk '{sub(/.$/,"",$1); print $1}') - - eww open bar --id bar"${monitorID}" --arg monitor="${monitorID}" --arg width="${new_width}" --arg height=30 --config ../eww - sleep 2 -done diff --git a/ewwScripts/test.sh b/ewwScripts/test.sh deleted file mode 100755 index f40915a..0000000 --- a/ewwScripts/test.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -getIcon() { - local desktop="" - - # Search for desktop files by WM class - if [ -n "$1" ]; then - desktop=$(grep -l "StartupWMClass.*$1$" /run/current-system/sw/share/applications/*.desktop) - [ -z "$desktop" ] && desktop=$(grep -Pl "Name\s*=\s*$1$" /run/current-system/sw/share/applications/*.desktop) - [ -z "$desktop" ] && desktop=$(ls /run/current-system/sw/share/applications/"${1}".desktop 2>/dev/null) - fi - - # If not found by WM class, search by process name - if [ -z "$desktop" ] && [ -n "$2" ]; then - process=$(ps -p "${2}" -o comm=) - desktop=$(grep -Pl "$process" /run/current-system/sw/share/applications/*.desktop) - [ -n "$desktop" ] - fi - - # If not found by WM class or process name, search by name or description - if [ -z "$desktop" ] && [ -n "$1" ]; then - desktop=$(grep -Pl "$1" /run/current-system/sw/share/applications/*.desktop) - fi - - echo "$desktop" -} - -desktop=$(getIcon "$1" "$2") -if [ -n "$desktop" ]; then - desktop=$(echo "$desktop" | awk 'NR==1') - icon=$(awk -F'[[:space:]]*=[[:space:]]*' '/Icon[[:space:]]*=/ && !seen[$2]++ {print $2; exit}' "$desktop") - echo -n "${icon}.svg" -fi diff --git a/scripts/idle.sh b/scripts/idle.sh deleted file mode 100755 index 36435af..0000000 --- a/scripts/idle.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -if [[ $(acpi -a | awk '{print $3}') == "on-line" ]]; then - swaylock -else - systemctl suspend-then-hibernate -fi \ No newline at end of file diff --git a/scripts/lock.sh b/scripts/lock.sh deleted file mode 100755 index d936785..0000000 --- a/scripts/lock.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -swaylock & - -sleep 0.1 - -hyprctl dispatch dpms off \ No newline at end of file diff --git a/scripts/scale.sh b/scripts/scale.sh deleted file mode 100755 index fba2355..0000000 --- a/scripts/scale.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -while read -r f s; do - if [[ $f == true && $(awk -v s="$s" 'BEGIN{ if (s > 1.5) print 1; else print 0; }') == 1 ]]; then - export GDK_SCALE=2 - export QT_SCALE_FACTOR=2 - fi -done < <(hyprctl monitors -j | jq -r '.[]|"\(.focused) \(.scale)"') - -wofi --show drun \ No newline at end of file diff --git a/scripts/startup.sh b/scripts/startup.sh deleted file mode 100644 index e69de29..0000000