removed unnecessary files
This commit is contained in:
parent
5df9833edd
commit
d2195ba06f
6 changed files with 0 additions and 95 deletions
|
@ -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
|
|
@ -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
|
|
@ -1,7 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ $(acpi -a | awk '{print $3}') == "on-line" ]]; then
|
||||
swaylock
|
||||
else
|
||||
systemctl suspend-then-hibernate
|
||||
fi
|
|
@ -1,7 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
swaylock &
|
||||
|
||||
sleep 0.1
|
||||
|
||||
hyprctl dispatch dpms off
|
|
@ -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
|
Loading…
Add table
Reference in a new issue