From a18421f315ca94d9ce5838d6c210c0a6fd43f43b Mon Sep 17 00:00:00 2001 From: Sheppy Date: Tue, 28 Mar 2017 09:50:04 +0200 Subject: [PATCH 1/3] added check for missing or broken battery --- herbstluftwm/panel_content.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/herbstluftwm/panel_content.py b/herbstluftwm/panel_content.py index 2b0e06d..af70b66 100755 --- a/herbstluftwm/panel_content.py +++ b/herbstluftwm/panel_content.py @@ -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][-2:].rstrip('%')) From ebdc59f0f18883771f2328ee28bf73f46dcac9fd Mon Sep 17 00:00:00 2001 From: Sheppy Date: Sat, 1 Apr 2017 13:18:55 +0200 Subject: [PATCH 2/3] added quickfind alias/function and moved pcolor to gerneal --- zshrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index d874c2d..39bfb89 100644 --- a/zshrc +++ b/zshrc @@ -88,9 +88,13 @@ if [[ $HOST =~ atlantis* ]]; then alias x='startx' else - alias pcolor='for i in {0..255} ; do printf "\x1b[38;5;${i}mcolour${i} "; if [[ $(((($i+3)/6)*6)) -eq $(($i+3)) ]]; then echo; fi; done' alias telegram='/proj/ciptmp/ik15ydit/Zeug/Telegram/tg/bin/telegram-cli -k tg-server.pub' fi +alias rehash="source ~/.config/zshrc" +function qfind { + find . -name "$1" +} +alias pcolor='for i in {0..255} ; do printf "\x1b[38;5;${i}mcolour${i} "; if [[ $(((($i+3)/6)*6)) -eq $(($i+3)) ]]; then echo; fi; done' alias "ipconf"="ip addr show" ## General ## From 75329c2a4a87a83d3807cf3c5d99ff719904cd26 Mon Sep 17 00:00:00 2001 From: Sheppy Date: Wed, 5 Apr 2017 21:47:17 +0200 Subject: [PATCH 3/3] ssh agent now only started if it is not running already --- herbstluftwm/autostart | 2 ++ zshrc | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/herbstluftwm/autostart b/herbstluftwm/autostart index 8efd255..57779a1 100755 --- a/herbstluftwm/autostart +++ b/herbstluftwm/autostart @@ -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 diff --git a/zshrc b/zshrc index 39bfb89..7f49171 100644 --- a/zshrc +++ b/zshrc @@ -68,6 +68,13 @@ alias ..='cd ..' ## Anti-LD-Preload Chromium Wrapper ## alias chromium="export TMP_PRELD=$LD_PRELOAD && /bin/bash -c 'unset LD_PRELOAD && chromium' && export LD_PRELOAD=$TMP_PRELD" +## GIT ## +alias gstat="git status" +alias gpull="git pull" +alias gpush="git push" +alias gcom="git commit -a" +alias gadd="git add" + ## LOCKS ## if [[ $HOST =~ atlantis* ]]; then alias i3lock="i3lock --image=/home/ik15ydit/.config/i3lock/bg.png" @@ -188,7 +195,9 @@ alias l="ls -lh --color=auto" ## SSH-KEYS ## gitssh=~/.ssh/gitrsa function key(){ - eval `ssh-agent` + if [[ -z $SSH_AUTH_SOCK ]]; then + eval `ssh-agent` + fi ssh-add $gitssh }