From 3ee75e0a67a207137a3d4707e3f51018b102da42 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Sun, 22 Nov 2020 22:07:28 +0100 Subject: [PATCH] Stuff --- polybar/config | 6 ++++++ polybar/scripts/updates.sh | 20 ++++++++++++++++++++ termite/config | 3 ++- vimrc | 4 ++-- 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100755 polybar/scripts/updates.sh diff --git a/polybar/config b/polybar/config index d122851..550f23f 100644 --- a/polybar/config +++ b/polybar/config @@ -174,6 +174,12 @@ click-left = ~/.config/polybar/scripts/pavolume.sh --togmute scroll-up = ~/.config/polybar/scripts/pavolume.sh --up scroll-down = ~/.config/polybar/scripts/pavolume.sh --down +[module/updates] +type = custom/script +exec = ~/.config/polybar/scripts/updates.sh +interval = 300 +label = %output% + [module/date] type = internal/date label =  %date% diff --git a/polybar/scripts/updates.sh b/polybar/scripts/updates.sh new file mode 100755 index 0000000..cea1e8d --- /dev/null +++ b/polybar/scripts/updates.sh @@ -0,0 +1,20 @@ +#!/bin/sh +#source https://github.com/x70b1/polybar-scripts + + +if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then + updates_arch=0 +fi + +# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then +if ! updates_aur=$(yay -Su --aur --quiet | wc -l); then + updates_aur=0 +fi + +updates=$(("$updates_arch" + "$updates_aur")) + +if [ "$updates" -gt 0 ]; then + echo " $updates" +else + echo "0" +fi diff --git a/termite/config b/termite/config index 4b33062..e3d1487 100644 --- a/termite/config +++ b/termite/config @@ -1,5 +1,6 @@ [options] -font = Source Code Pro 10 +font = Ubuntu Mono 12 +# font = Source Code Pro 11 size_hints = true [colors] diff --git a/vimrc b/vimrc index 184da62..0dd7a6e 100644 --- a/vimrc +++ b/vimrc @@ -58,10 +58,10 @@ vnoremap "hy:%s/h//gc " Theme set t_Co=256 colorscheme base16-default-dark -color hybrid_material +" color hybrid_material let &showbreak = '↳ ' -" hi Normal guibg=NONE ctermbg=NONE +hi Normal guibg=NONE ctermbg=NONE highlight clear LineNr highlight LineNr ctermfg=grey ctermbg=NONE