Guest User

Untitled

a guest
Jun 22nd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. fn title {
  2. echo `{wmiir read /client/$1/label}}
  3.  
  4. fn focusclient {
  5. tag=`{wmiir read /client/$1/tags | cut -d+ -f1}
  6. wmiir xwrite /ctl view $tag
  7. wmiir xwrite /tag/$tag/ctl select client $1}
  8.  
  9. key $MODKEY-u || fn $key {
  10. ifs=$wi_nl {
  11. clients=`{wmiir ls /client | head -n -1 | sed 's/\/$//'}
  12. sel=`{{for(c in $clients) echo `{title $c}} | sort | uniq -u | wimenu -i}
  13. if(test $sel) {
  14. for(c in $clients) {
  15. if(~ $sel `{title $c})
  16. match=$c
  17. }
  18. if(test $match)
  19. focusclient $match}}}
Add Comment
Please, Sign In to add comment