warning cleanup with gcc and battery fix

This commit is contained in:
speedie 2022-12-02 10:07:42 +01:00
parent 8b0564a707
commit 87663a7609
3 changed files with 8 additions and 8 deletions

View file

@ -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"

View file

@ -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 */

View file

@ -1,5 +1,3 @@
/* See LICENSE file for copyright and license details. */
#include <assert.h>
#include <errno.h>
#include <locale.h>
#include <signal.h>
@ -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);