1. Evan Gates
  2. dwm-emg

Commits

Evan Gates  committed b574a25

add 'set fullscreen' keybinding

  • Participants
  • Parent commits c91c9a0
  • Branches default

Comments (0)

Files changed (2)

File config.h

View file
 	{ MODKEY,                       XK_period, focusmon,       {.i = +1 } },
 	{ MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },
 	{ MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },
+	{ MODKEY|ShiftMask,             XK_m,      setfullscreen_manual, {0} },
 	TAGKEYS(                        XK_a,                      0)
 	TAGKEYS(                        XK_s,                      1)
 	TAGKEYS(                        XK_d,                      2)

File dwm.c

View file
 static void setclientstate(Client *c, long state);
 static void setfocus(Client *c);
 static void setfullscreen(Client *c, Bool fullscreen);
+static void setfullscreen_manual(const Arg *arg);
 static void setlayout(const Arg *arg);
 static void setmfact(const Arg *arg);
 static void setup(void);
 }
 
 void
+setfullscreen_manual(const Arg *arg) {
+	if (!selmon->sel)
+		return;
+
+	setfullscreen(selmon->sel, !selmon->sel->isfullscreen);
+}
+
+void
 setlayout(const Arg *arg) {
 	if(!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
 		selmon->sellt ^= 1;