mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2024-12-22 23:08:01 +00:00
[polybar] Add new icons to task_manager
This commit is contained in:
parent
5ab17fe438
commit
b60133df94
@ -8,12 +8,15 @@ get_icon_by_name()
|
|||||||
{
|
{
|
||||||
name=$(echo "$1" | tr '[:upper:]' '[:lower:]')
|
name=$(echo "$1" | tr '[:upper:]' '[:lower:]')
|
||||||
declare -A ICON_MAP=(
|
declare -A ICON_MAP=(
|
||||||
[firefox]=
|
|
||||||
[code]=
|
|
||||||
[tilix]=
|
[tilix]=
|
||||||
|
[code]=
|
||||||
|
[firefox]=
|
||||||
|
[chromium]=
|
||||||
[nautilus]=
|
[nautilus]=
|
||||||
[gnome-calculator]=
|
[gnome-calculator]=
|
||||||
[gnome-calendar]=
|
[gnome-calendar]=
|
||||||
|
[eog]=
|
||||||
|
[keepassxc]=
|
||||||
)
|
)
|
||||||
|
|
||||||
if [ ${ICON_MAP[$name]+_} ]; then
|
if [ ${ICON_MAP[$name]+_} ]; then
|
||||||
@ -51,14 +54,14 @@ show_tasks()
|
|||||||
|
|
||||||
print_task_name()
|
print_task_name()
|
||||||
{
|
{
|
||||||
name=$(sed "${1}q;d" $STATUS_FILE | cut -f 1 -d " ")
|
name=$(sed "${1}q;d" $STATUS_FILE | cut -f 1 -d " " | tr '[:upper:]' '[:lower:]')
|
||||||
icon=$(get_icon_by_name "$name")
|
icon=$(get_icon_by_name "$name")
|
||||||
|
|
||||||
if [ -n "$icon" ]; then
|
if [ -n "$icon" ]; then
|
||||||
name="$name "
|
name="$name "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "%s%s" "$name" "$icon"
|
printf "%s%s" "${name^}" "$icon"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_task_id()
|
get_task_id()
|
||||||
|
Loading…
Reference in New Issue
Block a user