sb-task: shorten status block
This commit is contained in:
parent
e4d5f1914f
commit
301eb176f0
1 changed files with 14 additions and 14 deletions
|
@ -3,9 +3,9 @@
|
||||||
|
|
||||||
icon=
|
icon=
|
||||||
|
|
||||||
get_context() {
|
# get_context() {
|
||||||
task context show | awk "NR==1 { gsub(\"'\", \"\"); print \$2 }"
|
# task context show | awk "NR==1 { gsub(\"'\", \"\"); print \$2 }"
|
||||||
}
|
# }
|
||||||
|
|
||||||
get_active() {
|
get_active() {
|
||||||
num_active=$(task export active | jq length)
|
num_active=$(task export active | jq length)
|
||||||
|
@ -23,4 +23,4 @@ get_active() {
|
||||||
task export active | jq -r '.[0].description'
|
task export active | jq -r '.[0].description'
|
||||||
}
|
}
|
||||||
|
|
||||||
printf "%s %s: %s\n" "$icon" "$(get_context)" "$(get_active)"
|
printf "%s %s\n" "$icon" "$(get_active)"
|
||||||
|
|
Loading…
Add table
Reference in a new issue