dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit f8f3874317057d51b5fc9c1f2ae4febfdf739306
parent 321d96cf825de2c5179d590ede1255cbc4d65152
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Wed, 19 Dec 2018 17:29:49 +0100

Set nolist for vim, show battery time in custom i3blocks power status

Diffstat:
Mlinks/.config/i3/i3blocks | 14+++++++-------
Mlinks/.config/i3/i3scripts/i3battery | 3++-
Mlinks/.vim/plugin/00-general.vim | 2+-
3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/links/.config/i3/i3blocks b/links/.config/i3/i3blocks @@ -103,17 +103,17 @@ signal=10 #interval=10 #signal=11 -# [i3battery BAT0] -# label=BAT -# interval=30 -# signal=12 - [i3battery BAT0] -label=⚡ -command=/usr/lib/i3blocks/battery +label=PWR interval=30 signal=12 +# [i3battery BAT0] +# label=⚡ +# command=/usr/lib/i3blocks/battery +# interval=30 +# signal=12 + [i3internet] label= signal=15 diff --git a/links/.config/i3/i3scripts/i3battery b/links/.config/i3/i3scripts/i3battery @@ -13,6 +13,7 @@ esac capacity=$(cat /sys/class/power_supply/"$1"/capacity) || exit status=$(cat /sys/class/power_supply/"$1"/status) +time=" ($(acpi -b | egrep -o '[0-9][0-9]:[0-9][0-9]'))" if [ "$capacity" -ge 80 ]; then color="#b8bb26" @@ -31,4 +32,4 @@ fi [ "$status" = "Charging" ] && color="#FFF" -printf "<span color='%s'>%s%s%s</span>" "$color" "$(echo "$status" | sed -e "s/,//g;s/Discharging/🔋/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/')" +printf "<span color='%s'>%s%s%s</span>%s" "$color" "$(echo "$status" | sed -e "s/,//g;s/Discharging/🔋/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/')" "$time" diff --git a/links/.vim/plugin/00-general.vim b/links/.vim/plugin/00-general.vim @@ -9,7 +9,7 @@ set ignorecase " case-insensitive search set incsearch " search as you type set laststatus=2 " always show the statusline set lbr " break lines between words -set list " enable rendering of invisible characters +set nolist " disable rendering of invisible characters set listchars=tab:▸\ ,eol:¬ " Use symbols for tab and end-of-line set nojoinspaces " disable double spaces after periods set pastetoggle=<F2> " toggle paste mode