소스 검색

clean bar script | rm transparent borders

siduck76 3 년 전
부모
커밋
347b90491f
3개의 변경된 파일9개의 추가작업 그리고 12개의 파일을 삭제
  1. 7 11
      .dwm/bar
  2. 0 1
      chadwm/config.def.h
  3. 2 0
      chadwm/drw.c

+ 7 - 11
.dwm/bar

@@ -10,38 +10,34 @@ cpu() {
 }
 
 update_icon() {
-  icon=""
-
-  printf "^c#94af7d^ $icon ^d^%s"
-  printf "^c#94af7d^"
+  printf "^c#94af7d^  "
 }
 
 # only for void users!
 xbps_updates() {
-
   updates=$(xbps-install -un | cut -d' ' -f2 | sort | uniq -c | xargs)
 
   if [ -z "$updates" ]; then
-    echo "Fully Updated"
+    printf "^c#94af7d^ Fully Updated"
   else
-    echo "$updates""s"
+    printf "^c#94af7d^ $updates""s"
   fi
 }
 
 # battery
 batt() {
-  printf "^c#81A1C1^   ^d^%s" "$(acpi | sed "s/,//g" | awk '{if ($3 == "Discharging"){print $4; exit} else {print $4""}}' | tr -d "\n")"
+  printf "^c#81A1C1^  "
+  printf "^c#81A1C1^ $(acpi | sed "s/,//g" | awk '{if ($3 == "Discharging"){print $4; exit} else {print $4""}}' | tr -d "\n")"
 }
 
 brightness() {
 
   backlight() {
     backlight="$(xbacklight -get)"
-    echo -e "$backlight" #| cut -c 1-2
+    echo -e "$backlight"
   }
 
-  icon="   "
-  printf "^c#BF616A^$icon"
+  printf "^c#BF616A^   "
   printf "^c#BF616A^%.0f\n" $(backlight)
 }
 

+ 0 - 1
chadwm/config.def.h

@@ -105,7 +105,6 @@ static const Layout layouts[] = {
     { "|M|",      centeredmaster },
     { ">M>",      centeredfloatingmaster },
     { "><>",      NULL },    /* no layout function means floating behavior */
-    { NULL,       NULL },
 };
 
 /* key definitions */

+ 2 - 0
chadwm/drw.c

@@ -203,6 +203,8 @@ drw_clr_create(Drw *drw, Clr *dest, const char *clrname)
 	                       DefaultColormap(drw->dpy, drw->screen),
 	                       clrname, dest))
 		die("error, cannot allocate color '%s'", clrname);
+
+        	dest->pixel |= 0xff << 24;
 }
 
 /* Wrapper to create color schemes. The caller has to call free(3) on the