Compare commits

..

No commits in common. "81e61cefd56f817b1c2fd9050eae07145ca17822" and "224e96b6038dc9cb96f9258bbdfb29aeadef76f8" have entirely different histories.

2 changed files with 3 additions and 9 deletions

View File

@ -1,12 +1,7 @@
#!/bin/sh #!/bin/sh
tput civis
trap 'tput cnorm && exit' SIGINT
bspc subscribe node_focus desktop_focus | while read -a msg ; do bspc subscribe node_focus desktop_focus | while read -a msg ; do
_output="$(show-windows "$@")" _output="$(show-windows)"
clear clear
echo "$_output" echo "$_output"
done done
tput cnorm

View File

@ -5,18 +5,17 @@ _ignore_desktop="$1"
_focused_node_id="$(bspc query -N -n .focused)" _focused_node_id="$(bspc query -N -n .focused)"
bspc query -D -d .occupied | while read _desktop_id ; do bspc query -D -d .occupied | while read _desktop_id ; do
_desktop_name="$(bspc query -D -d $_desktop_id --names)" _desktop_name="$(bspc query -D -d $_desktop_id --names)"
echo ""
if [ "$_ignore_desktop" != "$_desktop_name" ] ; then if [ "$_ignore_desktop" != "$_desktop_name" ] ; then
bspc query -N -d "$_desktop_id" -n .window | while read _node_id ; do bspc query -N -d "$_desktop_id" -n .window | while read _node_id ; do
_node_id="$(bspc query -N -n $_node_id)" _node_id="$(bspc query -N -n $_node_id)"
_title="$(xtitle $_node_id)" _title="$(xtitle $_node_id)"
_wm_class="$(xprop -id $_node_id | grep WM_CLASS | cut -d\" -f2)" _wm_class="$(xprop -id $_node_id | grep WM_CLASS | cut -d\" -f2)"
printf " %-6s %-15s " "$_desktop_name:" "$_wm_class" printf "%-6s %-15s " "$_desktop_name:" "$_wm_class"
if [ "$_focused_node_id" = "$_node_id" ] ; then if [ "$_focused_node_id" = "$_node_id" ] ; then
printf "\033[0;31m" printf "\033[0;31m"
fi fi
printf " %.55s\033[0m\n" "$_title" printf "%.55s\033[0m\n" "$_title"
_desktop_name='' _desktop_name=''
done done
echo "" echo ""