mirror of
https://github.com/kristoferssolo/solorice.git
synced 2026-02-04 06:32:03 +00:00
Use dotter
This commit is contained in:
21
config/eww/scripts/change-active-workspace
Executable file
21
config/eww/scripts/change-active-workspace
Executable 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
|
||||
8
config/eww/scripts/get-active-workspace
Executable file
8
config/eww/scripts/get-active-workspace
Executable 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
5
config/eww/scripts/get-music
Executable 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
5
config/eww/scripts/get-network
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
line=$(nmcli connection show | rg wlan0)
|
||||
echo $line
|
||||
|
||||
2
config/eww/scripts/get-window-title
Executable file
2
config/eww/scripts/get-window-title
Executable 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}'
|
||||
11
config/eww/scripts/get-workspaces
Executable file
11
config/eww/scripts/get-workspaces
Executable 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
12
config/eww/scripts/getvol
Executable 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
4
config/eww/scripts/github
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
notifications="$(gh api notifications 2> /dev/null | jq '. | length')"
|
||||
[ -z notifications ] && echo "" || echo "$notifications"
|
||||
Reference in New Issue
Block a user