Add bin scripts

This commit is contained in:
statzitz 2024-08-03 16:07:30 +02:00
parent 4cb5d5b6ed
commit 2c52cc4c20
4 changed files with 38 additions and 0 deletions

11
dotconfig/bin/gen_shared_laptop Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
doas ip a add 192.168.2.2/24 dev eth0
doas sv u sshd
hyprctl output create headless
sleep 1
wayvnc -L debug -f 120 -k fr

View file

@ -0,0 +1,23 @@
#!/bin/sh
a=$(hyprctl workspaces | grep "workspace ID" | cut -d " " -f 3)
active=$(hyprctl monitors | grep "active workspace:" | tr -s ' ' | cut -d " " -f 3)
a=$(echo $a | tr " " "\n" | sort -g)
b="(box :space-evenly false "
for i in $a
do
if [ "${i}" == "${active}" ]
then
b="${b}(button :class 'active' :onclick 'hyprctl dispatch workspace ${i}' '${i}')"
else
b="${b}(button :class 'btw' :onclick 'hyprctl dispatch workspace ${i}' '${i}')"
fi
done
b="${b} )"
echo "$b"

3
dotconfig/bin/get_network Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
if iwctl station wlan0 show | grep -q "Connected network" ; then echo $(iwctl station wlan0 show | grep "AverageRSSI" | tr -s ' ' | cut -d " " -f 3); else echo "Disconnected"; fi

View file

@ -3,3 +3,4 @@
eww open system
eww open clock
eww open perf
eww open bar