From 87663a7609be26cebad3f238fbeeafab657dd9c9 Mon Sep 17 00:00:00 2001 From: speedie Date: Fri, 2 Dec 2022 10:07:42 +0100 Subject: [PATCH] warning cleanup with gcc and battery fix --- modules/module_bat | 2 +- options.h | 2 +- speedwm.c | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/module_bat b/modules/module_bat index 3142900..c757ae7 100755 --- a/modules/module_bat +++ b/modules/module_bat @@ -37,7 +37,7 @@ CLICK() { # get icon GETICON() { [ "$BATTERYPERC_0" -gt "99" ] && ICON="$ITEM11_ICON_FULL" - [ "$BATTERYPERC_0" -lt "76" ] && ICON="$ITEM11_ICON_75" + [ "$BATTERYPERC_0" -lt "100" ] && ICON="$ITEM11_ICON_75" [ "$BATTERYPERC_0" -lt "51" ] && ICON="$ITEM11_ICON_50" [ "$BATTERYPERC_0" -lt "26" ] && ICON="$ITEM11_ICON_25" [ "$BATTERYPERC_0" -lt "6" ] && ICON="$ITEM11_ICON_5" diff --git a/options.h b/options.h index 4673ed5..4bdf114 100644 --- a/options.h +++ b/options.h @@ -61,7 +61,7 @@ static int automove = 1; /* Allow clients to automatic static int autoresize = 1; /* Allow resizing clients automatically when they request it. */ /* Font options */ -static char font[] = "Noto Sans Regular 8"; /* Font to draw the bar with */ +static char font[] = "Noto Sans Regular 9"; /* Font to draw the bar with */ /* Status options */ static char defaultstatus[] = ""; /* What to print when a status bar is not running */ diff --git a/speedwm.c b/speedwm.c index 41dc533..80f8c6d 100644 --- a/speedwm.c +++ b/speedwm.c @@ -1,5 +1,3 @@ -/* See LICENSE file for copyright and license details. */ -#include #include #include #include @@ -2334,6 +2332,7 @@ dragmfact(const Arg *arg) unsigned int n; int py, px; int ax, ay, aw, ah; + int layout = 0; int center = 0, horizontal = 0, mirror = 0, fixed = 0; double fact; Monitor *m; @@ -2353,7 +2352,7 @@ dragmfact(const Arg *arg) if (!n) return; else if (m->lt[m->sellt]->arrange == &tile) { - int layout = m->ltaxis[layout]; + layout = m->ltaxis[layout]; if (layout < 0) { mirror = 1; layout *= -1; @@ -2488,13 +2487,13 @@ dragmfact(const Arg *arg) void drawbaritems(Monitor *m) { - int x = 0, w = 0, tw = 0, scm; + int x = 0, w = 0, tw = 0, scm = 0; int stw = 0; /* systray width */ int plt = 0; /* powerline title */ unsigned int i, occ = 0, urg = 0, n = 0; /* powerline */ - Clr *prevscheme, *nxtscheme; /* powerline schemes */ + Clr *prevscheme, *nxtscheme = scheme[SchemeBar]; /* powerline schemes */ if (!selmon->hidetagpowerline || !selmon->hidetitlepowerline) { plw = drw->font->h / 2 + 1; @@ -6499,8 +6498,9 @@ unmanage(Client *c, int destroyed) Monitor *m = c->mon; XWindowChanges wc; - if (c == mark) + if (c == mark) { setmark(0); + } if (c->swallowing) { unswallow(c);