M. Yas. Davoodeh 49d1a7fb76 Add customizability feature to icons via .zprofile
By changing CF_ICONS variable you can edit icons all across your system.
For example if you want to use material-design-icons-git (AUR) all you
need to do is to change the variable like below:

export CF_ICONS="/home=󱂵:/mnt=󰡰:android=󰀲:bat-charging=󰂄:\
    bat-discharging=󰂌:bat-f=󱈑:bat-unknown=󰂃:bat=󰁹:\
    batt=󰭟:btc=󰠓:cb=📋:clock-00=󱑖:clock-01=󱑋:clock-02=󱑌:\
    clock-03=󱑍:clock-04=󱑎:clock-05=󱑏:\
    clock-06=󱑐:clock-07=󱑑:clock-08=󱑒:clock-09=󱑓:clock-10=󱑔:\
    clock-11=󱑕:clock-12=󱑖:cpu=󰻠:crypto=󰆬:disk=󰑹:\
    down=󰜮:eth=󰡪:f-move=󰪹:help=󰘥:\
    hib=󰤁:internet=󰖈:lan-x=󰌙:lan=󰌘:lbc=󰺃:leave=󰠜:lock=󰌾:\
    mail=󰇮:mem=󰍛:music=󰎇:news=󰎕:pause=󰏤:pc=󰟀:\
    pkg-down=󰏔:pkg=󰏗:q-add=󱊘:reboot=󱄋:\
    rec-cam=󰤙:rec-screen=󰊓:rec-voice=󰗋:renew=󰑓:sheets=󱈆:\
    shutdown=󰐥:sync=󰃨:temp=󰏈:tick-clock=󰾨:tick-cloud=󰅠:\
    time=󰃰:tor=󱎖:torrent-add=󰶡:torrent-seed-x=󱏽:torrent-idle=󰹢:\
    torrent-seed=󰹦:up=󰜷:usb=󰕓:vol-0=󰕿:vol-1=󰖀:\
    vol-2=󰕾:vol-m=󰕾:vol-x=󰖁:vol=󰕾:vpn=󰌆:weather-h=󰖙:\
    weather-l=󰜗:weather-perc=󰖗:weather=󰔎:\
    wifi-x=󰤮:wifi=󰤨:🌑=󰽤:🌒=󰽧:🌓=󰽡:🌔=󰽨:🌕=󰽢:🌖=󰽦:🌗=󰽣:🌘=󰽥:"
2020-08-27 01:54:35 +04:30

30 lines
953 B
Bash
Executable File

#!/bin/sh
# Displays number of upgradeable packages.
# For this to work, have a `pacman -Sy` command run in the background as a
# cronjob every so often as root. This script will then read those packages.
# When clicked, it will run an upgrade via pacman.
#
# Add the following text as a file in /usr/share/libalpm/hooks/statusbar.hook:
#
# [Trigger]
# Operation = Upgrade
# Type = Package
# Target = *
#
# [Action]
# Description = Updating statusbar...
# When = PostTransaction
# Exec = /usr/bin/pkill -RTMIN+8 dwmblocks # Or i3blocks if using i3.
case $BLOCK_BUTTON in
1) setsid -f "$TERMINAL" -e popupgrade ;;
2) notify-send "$(/usr/bin/pacman -Qu)" ;;
3) notify-send "$(ico pkg-down) Upgrade module" "$(ico pkg): number of upgradable packages
- Left click to upgrade packages
- Middle click to show upgradable packages" ;;
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
pacman -Qu | grep -Fcv "[ignored]" | sed "s/^/$(ico pkg)/;s/^$(ico pkg)0$//g"