From 26f5100c6c0797ae9e976b63bd3ffc8f1581ef25 Mon Sep 17 00:00:00 2001 From: Sheppy Date: Thu, 22 Jun 2017 15:41:07 +0200 Subject: [PATCH 1/3] fixed negative guthaben --- herbstluftwm/hl_panel_content.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/herbstluftwm/hl_panel_content.py b/herbstluftwm/hl_panel_content.py index cd9d31f..ea15a72 100755 --- a/herbstluftwm/hl_panel_content.py +++ b/herbstluftwm/hl_panel_content.py @@ -27,8 +27,10 @@ def color_panel(s,hex_code,seper=True): def get_color(nr,start,end): if nr == 88: return hex(GREEN) - if end == start or nr >= end: + elif end == start or nr >= end: return hex(GREEN) + elif nr <= 0: + return hex(RED) else: r,g,b = 0,0,0 interval = 256 + 256 From cafa0e880e678cc65e4ec4085a1b5025662cba26 Mon Sep 17 00:00:00 2001 From: Sheppy Date: Mon, 17 Jul 2017 15:25:01 +0200 Subject: [PATCH 2/3] small fixes --- herbstluftwm/autostart | 3 +++ herbstluftwm/hl_panel_content.py | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/herbstluftwm/autostart b/herbstluftwm/autostart index b537cde..bf91300 100755 --- a/herbstluftwm/autostart +++ b/herbstluftwm/autostart @@ -128,6 +128,7 @@ hc add "6" hc add "7" hc add "8" hc add "9" +hc add "0" hc keybind $Mod-1 use_index 0 hc keybind $Mod-Shift-1 move_index 0 hc keybind $Mod-2 use_index 1 @@ -146,6 +147,8 @@ hc keybind $Mod-8 use_index 7 hc keybind $Mod-Shift-8 move_index 7 hc keybind $Mod-9 use_index 8 hc keybind $Mod-Shift-9 move_index 8 +hc keybind $Mod-0 use_index 9 +hc keybind $Mod-Shift-0 move_index 9 # cycle through tags diff --git a/herbstluftwm/hl_panel_content.py b/herbstluftwm/hl_panel_content.py index ea15a72..15f9859 100755 --- a/herbstluftwm/hl_panel_content.py +++ b/herbstluftwm/hl_panel_content.py @@ -67,11 +67,11 @@ def get_color(nr,start,end): def guthaben(): guthaben = '' if hl_utils.is_cip(): - tmp = -1 + raw = "" with open(hl_utils.hlpath("pracct.log")) as f: - tmp = float(f.read()); - guthaben = "Druckerguthaben: " + str(tmp) + " Euro" - col = get_color(tmp,0,COLOR_BORDER) + raw = f.read(); + guthaben = "Druckerguthaben: " + raw + " Euro" + col = get_color(float(raw),0,COLOR_BORDER) guthaben = color_panel(guthaben,col) return guthaben; From 36023c921ac7aed8ffc9849d2fb0a971a53e1cc0 Mon Sep 17 00:00:00 2001 From: Sheppy Date: Mon, 17 Jul 2017 15:25:14 +0200 Subject: [PATCH 3/3] hack to set LDpreload for zsh itself --- zshrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zshrc b/zshrc index 6e0ca03..bdfd28f 100644 --- a/zshrc +++ b/zshrc @@ -263,3 +263,10 @@ source ~/.config/other/zsh-history-substring-search.zsh bindkey '^[[5~' history-substring-search-up bindkey '^[[6~' history-substring-search-down alias genserverkey='openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 100000' +if [[ $FIRST_RUN == "FALSE" ]]; then + ; +else + FIRST_RUN="FALSE" + export FIRST_RUN + exec zsh +fi