mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
* Add omarchy CLI * Remove outdated or internal * Add bash completions for command * Add omarchy command documentation * Add missing docs * Correct to what's now right * Fix tests --------- Co-authored-by: David Heinemeier Hansson <david@hey.com>
35 lines
921 B
Bash
Executable File
35 lines
921 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Toggle to pop-out a tile to stay fixed on a display basis.
|
|
# omarchy:args=[width height x y]
|
|
|
|
width=${1:-1300}
|
|
height=${2:-900}
|
|
x=${3:-}
|
|
y=${4:-}
|
|
|
|
active=$(hyprctl activewindow -j)
|
|
pinned=$(echo "$active" | jq ".pinned")
|
|
addr=$(echo "$active" | jq -r ".address")
|
|
|
|
if [[ $pinned == "true" ]]; then
|
|
hyprctl -q --batch \
|
|
"dispatch pin address:$addr;" \
|
|
"dispatch togglefloating address:$addr;" \
|
|
"dispatch tagwindow -pop address:$addr;"
|
|
elif [[ -n $addr ]]; then
|
|
hyprctl dispatch togglefloating address:$addr
|
|
hyprctl dispatch resizeactive exact $width $height address:$addr
|
|
|
|
if [[ -n $x && -n $y ]]; then
|
|
hyprctl dispatch moveactive $x $y address:$addr
|
|
else
|
|
hyprctl dispatch centerwindow address:$addr
|
|
fi
|
|
|
|
hyprctl -q --batch \
|
|
"dispatch pin address:$addr;" \
|
|
"dispatch alterzorder top address:$addr;" \
|
|
"dispatch tagwindow +pop address:$addr;"
|
|
fi
|