aboutsummaryrefslogtreecommitdiff
path: root/functions/utilities.zsh
diff options
context:
space:
mode:
authorBen Hilburn <bhilburn@gmail.com>2018-03-07 05:12:09 +0300
committerGitHub <noreply@github.com>2018-03-07 05:12:09 +0300
commit6529b4f2a785b0f38355124f1f237b9a8102f283 (patch)
tree8b89045b4003a6fb58094633fcd361e7f79d9620 /functions/utilities.zsh
parent27e256e8af61b4af7d9122e9cf2d2b0c580822e0 (diff)
parent80176c263f0d4343a043e3284082299d9bfc5b8d (diff)
Merge pull request #758 from sambadevi/next
Add icons for more distros in os_icon segment
Diffstat (limited to 'functions/utilities.zsh')
-rwxr-xr-x[-rw-r--r--]functions/utilities.zsh47
1 files changed, 46 insertions, 1 deletions
diff --git a/functions/utilities.zsh b/functions/utilities.zsh
index b4bfb838..1f4df9bc 100644..100755
--- a/functions/utilities.zsh
+++ b/functions/utilities.zsh
@@ -103,7 +103,52 @@ case $(uname) in
;;
Linux)
OS='Linux'
- OS_ICON=$(print_icon 'LINUX_ICON')
+ os_release_id="$(grep -E '^ID=([a-zA-Z]*)' /etc/os-release | cut -d '=' -f 2)"
+ case "$os_release_id" in
+ "arch")
+ OS_ICON=$(print_icon 'LINUX_ARCH_ICON')
+ ;;
+ "debian")
+ OS_ICON=$(print_icon 'LINUX_DEBIAN_ICON')
+ ;;
+ "ubuntu")
+ OS_ICON=$(print_icon 'LINUX_UBUNTU_ICON')
+ ;;
+ "elementary")
+ OS_ICON=$(print_icon 'LINUX_ELEMENTARY_ICON')
+ ;;
+ "fedora")
+ OS_ICON=$(print_icon 'LINUX_FEDORA_ICON')
+ ;;
+ "coreos")
+ OS_ICON=$(print_icon 'LINUX_COREOS_ICON')
+ ;;
+ "gentoo")
+ OS_ICON=$(print_icon 'LINUX_GENTOO_ICON')
+ ;;
+ "mageia")
+ OS_ICON=$(print_icon 'LINUX_MAGEIA_ICON')
+ ;;
+ "centos")
+ OS_ICON=$(print_icon 'LINUX_CENTOS_ICON')
+ ;;
+ "opensuse"|"tumbleweed")
+ OS_ICON=$(print_icon 'LINUX_OPENSUSE_ICON')
+ ;;
+ "sabayon")
+ OS_ICON=$(print_icon 'LINUX_SABAYON_ICON')
+ ;;
+ "slackware")
+ OS_ICON=$(print_icon 'LINUX_SLACKWARE_ICON')
+ ;;
+ "linuxmint")
+ OS_ICON=$(print_icon 'LINUX_MINT_ICON')
+ ;;
+ *)
+ OS='Linux'
+ OS_ICON=$(print_icon 'LINUX_ICON')
+ ;;
+ esac
# Check if we're running on Android
case $(uname -o 2>/dev/null) in