diff --git a/herbstluftwm/autostart b/herbstluftwm/autostart index 6309914..5b93ef1 100755 --- a/herbstluftwm/autostart +++ b/herbstluftwm/autostart @@ -129,6 +129,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 @@ -147,6 +148,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 cd9d31f..15f9859 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 @@ -65,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; diff --git a/zshrc b/zshrc index 77800e8..c3d33c9 100644 --- a/zshrc +++ b/zshrc @@ -264,3 +264,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