Advertisement
image28

VLC/Steam Header script

Jul 6th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.38 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. IFS=$'\n'
  4.  
  5. # VLC
  6. line="VLC - Music\n"
  7. line=$line$(exec wmctrl -l | grep VLC | awk '{$1=$2=$3=""}1' | sed -e 's/^[ \t]*//')
  8. line="$line\n"
  9. # STEAM
  10. line="$line\nSTEAM - GAME(S)\n"
  11. IFS=$'\n';
  12. for e in `basename \`ps ax | grep "steamapps/common" | grep -v grep | awk -F' ' '{for(i=5;i<=NF;i++){ printf("%s ", $i); }}'\``;
  13. do
  14.     line="$line$e\n"
  15. done
  16.  
  17. echo -e "$line";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement