This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/bin/floating-term

22 lines
406 B
Bash
Executable file

#!/usr/bin/env bash
# TODO: geomoetry flags?
flags=("")
case "$TERMINAL" in
kitty )
flags=(-o remember_window_size=no -o initial_window_width=60c -o initial_window_height=12c --class floating_terminal)
;;
# TODO: rxvt?
esac
if is_wayland; then
# wayland only needs app_id or class set to "floating_terminal"
: # no-op
else
bspc rule -a '*' -o state=floating
fi
"$TERMINAL" "${flags[@]}" "$@"