Kaynağa Gözat

add setting to disable/enable tagpreview

siduck76 3 yıl önce
ebeveyn
işleme
e8e2b3e026
2 değiştirilmiş dosya ile 4 ekleme ve 2 silme
  1. 2 0
      chadwm/config.def.h
  2. 2 2
      chadwm/dwm.c

+ 2 - 0
chadwm/config.def.h

@@ -27,6 +27,8 @@ static const int vertpadtab         = 33;
 static const int horizpadtabi       = 15;
 static const int horizpadtabo       = 15;
 static const int scalepreview       = 4;
+static       int tag_preview        = 0;        /* 1 means enable, 0 is off */
+
 static const char *fonts[]          = { "JetBrainsMono Nerd Font:style:medium:size=10",
                                         "Material Design Icons-Regular:size=10",
                                       };

+ 2 - 2
chadwm/dwm.c

@@ -2872,7 +2872,7 @@ void showhide(Client *c) {
 void
 showtagpreview(int tag)
 {
-	if (!selmon->previewshow) {
+	if (!selmon->previewshow  || !tag_preview ) {
 		XUnmapWindow(dpy, selmon->tagwin);
 		return;
 	}
@@ -2932,7 +2932,7 @@ void switchtag(void) {
  				XFreePixmap(dpy, selmon->tagmap[i]);
  				selmon->tagmap[i] = 0;
  			}
-			if (occ & 1 << i) {
+			if (occ & 1 << i && tag_preview) {
                           	image = imlib_create_image(sw, sh);
 				imlib_context_set_image(image);
 				imlib_context_set_display(dpy);