dotfiles

:)
git clone https://git.sr.ht/~ashymad/dotfiles
Log | Files | Refs | Submodules | LICENSE

commit d17c29695c4418346da15463f49dfb67e01a0621
parent 3fa81de0c563ebb79910612c2f825baba93c583a
Author: Ashymad <czilukim@o2.pl>
Date:   Sun, 25 Mar 2018 01:45:09 +0100

msg utility functions

Diffstat:
Mfish/.config/fish/functions/aur-cleanup.fish | 19++++---------------
Mfish/.config/fish/functions/aur-vcsync.fish | 13+++----------
Afish/.config/fish/utils/pacmsg.fish | 26++++++++++++++++++++++++++
3 files changed, 33 insertions(+), 25 deletions(-)

diff --git a/fish/.config/fish/functions/aur-cleanup.fish b/fish/.config/fish/functions/aur-cleanup.fish @@ -1,25 +1,14 @@ function aur-cleanup - set_color -o blue - echo -n ":: " - set_color -o white - echo "Cleaning pacman cache..." - set_color normal + source ~/.config/fish/utils/pacmsg.fish + msg1 "Cleaning pacman cache..." sudo pacman -Sc --noconfirm - set_color -o blue - echo -n ":: " - set_color -o white - echo "Updating custom repositories..." - set_color normal + msg1 "Updating custom repositories..." for repo in /var/cache/pacman/*custom* cd $repo repose -zvf (basename $repo) end sudo pacman -Sy - set_color -o blue - echo -n ":: " - set_color -o white - echo "Cleaning aur sync cache..." - set_color normal + msg1 "Cleaning aur sync cache..." cd ~/.cache/aurutils/sync for dir in * set pkgname (bash -c "source $dir/PKGBUILD;"'echo $pkgname') diff --git a/fish/.config/fish/functions/aur-vcsync.fish b/fish/.config/fish/functions/aur-vcsync.fish @@ -1,22 +1,15 @@ function aur-vcsync + source ~/.config/fish/utils/pacmsg.fish set vcs_list git hg cvs svn bzr echo -n "" > /tmp/vcs.tmp - set_color -o blue - echo -n ":: " - set_color -o white - echo "Checking newest commit of repositories..." - set_color normal + msg1 "Checking newest commit of repositories..." for vcs in $vcs_list set repos ~/.cache/aurutils/sync/*-$vcs for repo in $repos aur srcver $repo >> /tmp/vcs.tmp end end - set_color -o blue - echo -n ":: " - set_color -o white - echo "Comparing to locally installed versions..." - set_color normal + msg1 "Comparing to locally installed versions..." set updates (aur vercmp -p /tmp/vcs.tmp -d custom-aur) for update in $updates echo Updating $update... diff --git a/fish/.config/fish/utils/pacmsg.fish b/fish/.config/fish/utils/pacmsg.fish @@ -0,0 +1,26 @@ +function msg1 + set_color -o blue + echo -n ":: " + set_color normal + set_color -o + echo $argv + set_color normal +end + +function msg2 + set_color -o green + echo -n "==> " + set_color normal + set_color -o + echo $argv + set_color normal +end + +function msg3 + set_color -o brblue + echo -n " -> " + set_color normal + set_color -o + echo $argv + set_color normal +end