added maps for icons and monitors
This commit is contained in:
parent
618c02c14b
commit
7a315e3f38
7 changed files with 176 additions and 178 deletions
|
@ -12,8 +12,9 @@ getIcon() {
|
|||
|
||||
# If not found by WM class, search by process name
|
||||
if [ -z "$desktop" ] && [ -n "$2" ]; then
|
||||
desktop=$(pgrep -fl "$2" | awk '{print $2}' | grep -m1 -o '[^/]*\.desktop' | head -n1)
|
||||
[ -n "$desktop" ] && desktop="/usr/share/applications/$desktop"
|
||||
process=$(ps -p ${2} -o comm=)
|
||||
desktop=$(grep -Pl "$process" /usr/share/applications/*.desktop)
|
||||
[ -n "$desktop" ] && desktop="$desktop"
|
||||
fi
|
||||
|
||||
# If not found by WM class or process name, search by name or description
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue