#!/bin/bash cache="$HOME/.cache/via" if [[ "$1" == "-r" ]] || [[ ! -e "$cache" ]]; then cat "$HOME/.config/via/shortcuts" > "$cache" cat "$HOME/.config/via/websites" >> "$cache" find "$HOME" -mindepth 1 \( -name ".*" -o -path "$HOME/cell" -o -path "$HOME/phone/*" \) -prune -o -print | sort >> "$cache" fi wmctrl -xl | sed "s/^[^.]*\.//;s/ \+\S\+ \+/ /;s/^/w /;s/ \+/ /g" cat "$cache"