Skip to content

Instantly share code, notes, and snippets.

View eigan's full-sized avatar

Einar Gangsø eigan

  • PlusOffice
  • Norway
View GitHub Profile
@pschmitt
pschmitt / sway-maximize.sh
Last active March 20, 2025 16:26
sway ipc script to maximize the currently focused window
#!/usr/bin/env bash
usage() {
echo "Usage: $(basename "$0") [-d DEFAULT_BORDER_PX] [-m MAXIMIZED_BORDER_PX]"
}
get_waybar_height() {
# Waybar's config is JSONC, ie it contains comments. We need to strip
# these for jq.
grep -v '//' ~/.config/waybar/config | jq -er '.height'