blob: 1138929ab9963242abc2a23340fd217958ccc472 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/bin/bash
# Other icons that could be used:
# Git:
# Config:
# Dotfiles tracker for dwmblocks (using yadm)
# This block aims to never show up (to be out of sight, out of mind)
# If the following situation occurs, the following icons will be shown:
#
# - : There are uncommitted changes
# - : There are staged changes
# - : Unpushed changes
# - : Upstream has changes that are not pulled
#
# These icons will sit next the this block's base icon
#
# Only one icon will be shown at a time, and the order of priority is:
# uncommitted > staged > unpushed > upstream
status=$(yadm status --porcelain 2>/dev/null)
[ -z "$status" ] && exit 0
case "$status" in
*M*) icon=" " ;;
*A*) icon=" " ;;
*U*) icon=" " ;;
*D*) icon=" " ;;
esac
printf " %s" "$icon"
|