sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

dwm-viewontag-20210312-61bb8b2.diff (1285B)


      1 From 03d3c172ff736cb80e12f7bb7cab4e1f250af9dd Mon Sep 17 00:00:00 2001
      2 From: Marco Fleres <mafleres@gmail.com>
      3 Date: Fri, 12 Mar 2021 22:25:53 -0300
      4 Subject: [PATCH] Modification on viewontag patch: windows will not be followed
      5  to the "all" tag
      6 
      7 ---
      8  config.def.h | 1 +
      9  dwm.c        | 2 ++
     10  2 files changed, 3 insertions(+)
     11 
     12 diff --git a/config.def.h b/config.def.h
     13 index 1c0b587..d7dfb6d 100644
     14 --- a/config.def.h
     15 +++ b/config.def.h
     16 @@ -5,6 +5,7 @@ static const unsigned int borderpx  = 1;        /* border pixel of windows */
     17  static const unsigned int snap      = 32;       /* snap pixel */
     18  static const int showbar            = 1;        /* 0 means no bar */
     19  static const int topbar             = 1;        /* 0 means bottom bar */
     20 +static const Bool viewontag         = True;     /* Switch view on tag switch */
     21  static const char *fonts[]          = { "monospace:size=10" };
     22  static const char dmenufont[]       = "monospace:size=10";
     23  static const char col_gray1[]       = "#222222";
     24 diff --git a/dwm.c b/dwm.c
     25 index 664c527..8ca2f98 100644
     26 --- a/dwm.c
     27 +++ b/dwm.c
     28 @@ -1660,6 +1660,8 @@ tag(const Arg *arg)
     29  		selmon->sel->tags = arg->ui & TAGMASK;
     30  		focus(NULL);
     31  		arrange(selmon);
     32 +		if(viewontag && ((arg->ui & TAGMASK) != TAGMASK))
     33 +			view(arg);
     34  	}
     35  }
     36  
     37 -- 
     38 2.30.1
     39