Merge branch 'master' of gitlab.cs.fau.de:ik15ydit/config

This commit is contained in:
Sheppy
2017-04-09 09:39:56 +02:00
3 changed files with 19 additions and 2 deletions

View File

@@ -58,6 +58,8 @@ if [[ $HOST =~ atlantis* ]]; then
hc keybind $Mod-l spawn i3lock -i ~/.config/i3lock/bg.png -t
else
hc keybind $Mod-l spawn xlock
hc keybind $Mod-Shift-x spawn xlock -mode blank -geometry 1x1
hc keybind $Mod-x spawn xlock -mode blank -geometry 1x1
fi
hc keybind $Mod-p spawn pavucontrol
hc keybind $Mod-Shift-l spawn libreoffice

View File

@@ -76,6 +76,8 @@ def battery():
if hl_utils.is_laptop():
try:
bat = hl_utils.shexec("acpi -b")
if bat == '':
return color_panel("BATTERY FAILURE",RED)
bat = re.compile(r'Battery [0-9]+: ').sub('',bat)
plain = int(bat.split('%')[0][-3:].rstrip('%').lstrip(','))