A collection of scripts that I prepared for i3wm that help me with my workflow
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
563 B

# This is a script this I wrote to programatiacally get the for_window criteria for i3 configurations.
# Check if xprop is available
command -v xprop > /dev/null || (echo "xprop is missing" && exit 1)
echo "Click a window"
# Run xprop, transform its output into i3 criteria. Handle fallback to
# WM_NAME when _NET_WM_NAME isn't set
xprop | sed -nr \
-e "s/^WM_CLASS\(STRING\) = ($quoted_string_regex), ($quoted_string_regex)$/instance=\1\nclass=\3/p" \
| tr "\n" " " | sed -r 's/^(.*) $/[\1]\n/'