Use dotter

This commit is contained in:
Kristofers Solo
2024-08-28 09:02:07 +03:00
parent d888080cc7
commit a42ded1119
1200 changed files with 1231 additions and 2261 deletions

View File

@@ -0,0 +1,21 @@
#!/bin/bash
function clamp {
min=$1
max=$2
val=$3
python -c "print(max($min, min($val, $max)))"
}
direction=$1
current=$2
if test "$direction" = "down"
then
target=$(clamp 1 10 $(($current+1)))
echo "jumping to $target"
hyprctl dispatch workspace $target
elif test "$direction" = "up"
then
target=$(clamp 1 10 $(($current-1)))
echo "jumping to $target"
hyprctl dispatch workspace $target
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - |
stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'
# socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'

5
config/eww/scripts/get-music Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
title="$(sp metadata | rg title| cut -d'|' -f2)"
artist="$(sp metadata | rg artist | cut -d'|' -f2)"
echo "$artist" - "$title"

5
config/eww/scripts/get-network Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
line=$(nmcli connection show | rg wlan0)
echo $line

View File

@@ -0,0 +1,2 @@
#!/bin/sh
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | stdbuf -o0 awk -F '>>|,' '/^activewindow>>/{print $3}'

View File

@@ -0,0 +1,11 @@
#!/bin/bash
spaces (){
windows=$(hyprctl workspaces -j | jq 'map({id: .id}) | sort_by(.id)')
echo $windows
}
spaces
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
spaces
done

12
config/eww/scripts/getvol Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
if command -v pamixer &>/dev/null; then
if [ true == $(pamixer --get-mute) ]; then
echo 0
exit
else
pamixer --get-volume
fi
else
amixer -D pulse sget Master | awk -F '[^0-9]+' '/Left:/{print $3}'
fi

4
config/eww/scripts/github Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
notifications="$(gh api notifications 2> /dev/null | jq '. | length')"
[ -z notifications ] && echo "" || echo "$notifications"