Skip to content

Instantly share code, notes, and snippets.

@shemig
shemig / matrix.sh
Last active August 20, 2023 16:03
Treat hyprland workspaces as a 3x3 matrix
matrix_size=3
##Utility functions
matrix_max=$(($matrix_size - 1))
function clamp() {
n=$(($1 < 0 ? 0 : $1))
n=$(($n > $matrix_max ? $matrix_max : $n))
echo $n