You are not logged in.

#151 2010-09-19 17:42:56

foobarch
Member
Registered: 2009-10-13
Posts: 66

Re: The dwm thread

Hi.

I use dwm 5.8.2 and Firefox 3.6.10. Lately I have an ugly problem with firefox. Firefox stays in foreground and full size, but it should behave like every other window in dwm. For example:

When I press [Shift]+[Alt]+[Enter] a new terminal opens and is selected, but I cannot see it, since firefox doesn't resize..

Anyone knows how to solve this?

Offline

#152 2010-09-19 18:28:55

RedScare
Member
Registered: 2009-03-28
Posts: 91

Re: The dwm thread

foobarch wrote:

Hi.

I use dwm 5.8.2 and Firefox 3.6.10. Lately I have an ugly problem with firefox. Firefox stays in foreground and full size, but it should behave like every other window in dwm. For example:

When I press [Shift]+[Alt]+[Enter] a new terminal opens and is selected, but I cannot see it, since firefox doesn't resize..

Anyone knows how to solve this?

Try to select your firefox window (perhaps using your mouse), then hit your MODKEY+shift+space with the default config.h. That combo makes windows managed/unmanaged.

Offline

#153 2010-09-19 18:33:15

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,051
Website

Re: The dwm thread

Thread on the suckless ML about this issue: http://lists.suckless.org/dev/1009/6019.html


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#154 2010-09-19 18:36:51

foobarch
Member
Registered: 2009-10-13
Posts: 66

Re: The dwm thread

Try to select your firefox window (perhaps using your mouse), then hit your MODKEY+shift+space with the default config.h. That combo makes windows managed/unmanaged.

That's it. Thank you!!

Offline

#155 2010-10-07 22:00:49

burn
Member
Registered: 2010-04-13
Posts: 21

Re: The dwm thread

steve___ wrote:

Hi All,
With a rule of:

{ "MPlayer",    NULL,       NULL,       0,              True },

Mplayer floats and is centered.  With a rule of:

{ NULL,         NULL,       "popup",    0,             True },

A term titled 'popup' floats but is not centered.  The window is in the top left of the screen.  Does anyone know why this is?

should i be ashamed of quoting a post from 2008? D:

anyway, how can i force a floating terminal to spawn in the top right corner instead of the top left corner?

Offline

#156 2010-10-08 09:25:07

0mark
Member
From: earth
Registered: 2010-06-09
Posts: 139
Website

Re: The dwm thread

burn wrote:

anyway, how can i force a floating terminal to spawn in the top right corner instead of the top left corner?

When a client floats, size and position hints are accepted. Use the -geometry option:

       -geometry geometry
               This option specifies the preferred size and position of the VT102 window; see X().

For example:

xterm -geometry 50x10+1000+300

opens a xterm 50 chars wide and 10 chars high at position 1000:300.


Ceterum autem censeo Systemdinem esse delendam

Offline

#157 2010-10-08 11:07:42

burn
Member
Registered: 2010-04-13
Posts: 21

Re: The dwm thread

thats it! thanks 0mark.

Offline

#158 2010-10-08 18:31:46

steve___
Member
Registered: 2008-02-24
Posts: 439

Re: The dwm thread

Hooray for 0mark  wink

Offline

#159 2010-10-10 06:07:20

edma2
Member
Registered: 2009-08-20
Posts: 66

Re: The dwm thread

thought i'd share something i found today
http://dwm.suckless.org/patches/focusatom

use this with lsw (@suckless) to print open uzbl windows to dmenu via script
bind 'S' or something similar in your uzbl to launch this script and select the "tab" you want to see
works like a charm with monocle mode if you don't have tabbing support built in (which is really unstable for uzbl imo)

Offline

#160 2010-10-25 17:44:25

na12
Member
From: /home/serbia
Registered: 2008-12-23
Posts: 749

Re: The dwm thread

I using dwm with pango patch,and tried to add flextile patch but I got this output:

 patch -p1 < flextile-5.8.2.diff
patching file config.def.h
patching file dwm.c
Hunk #1 succeeded at 137 (offset 15 lines).
Hunk #2 succeeded at 613 (offset 12 lines).
Hunk #3 succeeded at 1469 (offset -9 lines).
Hunk #4 succeeded at 1487 (offset -9 lines).
Hunk #5 FAILED at 1541.
Hunk #6 succeeded at 1614 (offset -7 lines).
Hunk #7 succeeded at 1635 (offset -7 lines).
Hunk #8 succeeded at 1927 (offset -7 lines).
1 out of 8 hunks FAILED -- saving rejects to file dwm.c.rej
patching file flextile.h

and,this is dwm.c.rej

--- dwm-5.8.2-0/dwm.c    2010-06-10 22:47:51.669677000 +0200
+++ dwm.c    2010-06-10 22:55:53.128305000 +0200
@@ -1541,7 +1527,19 @@
     XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter);
     if(!dc.font.set)
         XSetFont(dpy, dc.gc, dc.font.xfont->fid);
-    /* init bars */
+    /* init tags, bars, layouts, axes, msplits and mfacts */
+    for(m = mons; m; m = m->next) {
+        m->curtag = m->prevtag = 1;
+        for(i=0; i < LENGTH(tags) + 1; i++) {
+            m->showbars[i] = m->showbar;
+            m->lts[i] = &layouts[0];
+            m->mfacts[i] = m->mfact;
+            m->ltaxes[i][0] = m->ltaxis[0];
+            m->ltaxes[i][1] = m->ltaxis[1];
+            m->ltaxes[i][2] = m->ltaxis[2];
+            m->msplits[i] = m->msplit;
+        }
+    }
     updatebars();
     updatestatus();
     /* EWMH support per view */

I have not yet compiled dwm,because I am not sure is this patch succeded.
Is this normal output?

Offline

#161 2010-10-25 18:36:10

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,051
Website

Re: The dwm thread

You need to hand patch the rejected chunk for it to compile...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#162 2010-10-25 19:06:14

na12
Member
From: /home/serbia
Registered: 2008-12-23
Posts: 749

Re: The dwm thread

jasonwryan wrote:

You need to hand patch the rejected chunk for it to compile...

I didn't understand this quite.

Offline

#163 2010-10-25 19:34:32

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,051
Website

Re: The dwm thread

The dwm.c.rej chunk needs to be manually added to dwm.c

When you applied the previous patches, it moved the code in dwm.c around suifficiently to mean that flextile couldn't be applied cleanly. If you want flextile, you need to complete the patch.


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#164 2010-10-25 20:22:09

na12
Member
From: /home/serbia
Registered: 2008-12-23
Posts: 749

Re: The dwm thread

It is too complicated for me,I am not so good with c.

Offline

#165 2010-10-25 20:50:07

steve___
Member
Registered: 2008-02-24
Posts: 439

Re: The dwm thread

This doesn't have much to do with C.  Please pastebin your patched dwm.c and someone here might be able to show you.

Offline

#166 2010-10-26 07:08:16

na12
Member
From: /home/serbia
Registered: 2008-12-23
Posts: 749

Re: The dwm thread

steve___ wrote:

This doesn't have much to do with C.  Please pastebin your patched dwm.c and someone here might be able to show you.

Here you go

http://pastebin.com/fYgY3rJT

Offline

#167 2010-10-26 07:13:58

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,051
Website

Re: The dwm thread

The rejected chunk goes in at line 1540.


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#168 2010-10-26 17:13:33

na12
Member
From: /home/serbia
Registered: 2008-12-23
Posts: 749

Re: The dwm thread

Thanks,everything works like a charm.
edit:
But I have problem with moveresize patch now,I compile it without errors but keys don't work.

Here is my config.h

/* See LICENSE file for copyright and license details. */

/* appearance */
static const char font[]            = "snap 8";
static const char normbordercolor[] = "#777777";
static const char normbgcolor[]     = "#3C3B37";
static const char normfgcolor[]     = "#cccccc";
static const char selbordercolor[]  = "#FE765E";
static const char selbgcolor[]      = "#3C3B37";
static const char selfgcolor[]      = "#FE765E";
static const unsigned int borderpx  = 1;        /* border pixel of windows */
static const unsigned int snap      = 32;       /* snap pixel */
static const Bool showbar           = True;     /* False means no bar */
static const Bool topbar            = True;     /* False means bottom bar */

/* tagging */
static const char *tags[] = { "main", "www", "dev", "misc" };

/* include(s) depending on the tags array */
#include "flextile.h"

static const Rule rules[] = {
    /* class      instance    title       tags mask     isfloating   monitor */
    { "Gimp",     NULL,       NULL,       0,            True,        -1 },
    { "Skype",     NULL,       NULL,       0,            True,        -1 },
    { "Pidgin",     NULL,       NULL,       0,            True,        -1 },
    { "Firefox",  NULL,       NULL,       1 << 8,       False,       -1 },
};

/* layout(s) */
static const float mfact      = 0.65; /* factor of master area size [0.05..0.95] */
static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
static const int layoutaxis[] = {
    1,    /* layout axis: 1 = x, 2 = y; negative values mirror the layout, setting the master area to the right / bottom instead of left / top */
    2,    /* master axis: 1 = x (from left to right), 2 = y (from top to bottom), 3 = z (monocle) */
    2,    /* stack axis:  1 = x (from left to right), 2 = y (from top to bottom), 3 = z (monocle) */
};
static const unsigned int mastersplit = 1;    /* number of tiled clients in the master area */

static const Layout layouts[] = {
    /* symbol     arrange function */
    { "[]=",      tile },    /* first entry is default */
    { "><>",      NULL },    /* no layout function means floating behavior */
    { "[M]",      monocle },
};

/* key definitions */
#define MODKEY Mod1Mask
#define TAGKEYS(KEY,TAG) \
    { MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
    { MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
    { MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
    { MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },

/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }

/* commands */
static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *termcmd[]  = { "uxterm", NULL };

static Key keys[] = {
    /* modifier                     key        function        argument */
    { MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
    { MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
    { MODKEY,                       XK_b,      togglebar,      {0} },
    { MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
    { MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
    { MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
    { MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
    { MODKEY,                       XK_Return, zoom,           {0} },
    { MODKEY,                       XK_Tab,    view,           {0} },
    { MODKEY|ShiftMask,             XK_c,      killclient,     {0} },
    { MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
    { MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
    { MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
    { MODKEY,                       XK_space,  setlayout,      {0} },
    { MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
    { MODKEY,                       XK_0,      view,           {.ui = ~0 } },
    { MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
    { MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
    { MODKEY,                       XK_period, focusmon,       {.i = +1 } },
    { MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },
    { MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },
    TAGKEYS(                        XK_1,                      0)
    TAGKEYS(                        XK_2,                      1)
    TAGKEYS(                        XK_3,                      2)
    TAGKEYS(                        XK_4,                      3)
    TAGKEYS(                        XK_5,                      4)
    TAGKEYS(                        XK_6,                      5)
    TAGKEYS(                        XK_7,                      6)
    TAGKEYS(                        XK_8,                      7)
    TAGKEYS(                        XK_9,                      8)
    { MODKEY|ShiftMask,             XK_q,      quit,           {0} },
    { MODKEY|ControlMask,           XK_t,      rotatelayoutaxis, {.i = 0} },    /* 0 = layout axis */
    { MODKEY|ControlMask,           XK_Tab,    rotatelayoutaxis, {.i = 1} },    /* 1 = master axis */
    { MODKEY|ControlMask|ShiftMask, XK_Tab,    rotatelayoutaxis, {.i = 2} },    /* 2 = stack axis */
    { MODKEY|ControlMask,           XK_Return, mirrorlayout,     {0} },
    { MODKEY|ControlMask,           XK_h,      shiftmastersplit, {.i = -1} },   /* reduce the number of tiled clients in the master area */
    { MODKEY|ControlMask,           XK_l,      shiftmastersplit, {.i = +1} },   /* increase the number of tiled clients in the master area */
        { MODKEY,                       XK_Down,   moveresize,     {.v = (int []){ 0, 25, 0, 0 }}},
        { MODKEY,                       XK_Up,     moveresize,     {.v = (int []){ 0, -25, 0, 0 }}},
        { MODKEY,                       XK_Right,  moveresize,     {.v = (int []){ 25, 0, 0, 0 }}},
        { MODKEY,                       XK_Left,   moveresize,     {.v = (int []){ -25, 0, 0, 0 }}},
        { MODKEY|ShiftMask,             XK_Down,   moveresize,     {.v = (int []){ 0, 0, 0, 25 }}},
        { MODKEY|ShiftMask,             XK_Up,     moveresize,     {.v = (int []){ 0, 0, 0, -25 }}},
        { MODKEY|ShiftMask,             XK_Right,  moveresize,     {.v = (int []){ 0, 0, 25, 0 }}},
        { MODKEY|ShiftMask,             XK_Left,   moveresize,     {.v = (int []){ 0, 0, -25, 0 }}},
};

/* button definitions */
/* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
    /* click                event mask      button          function        argument */
    { ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
    { ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
    { ClkWinTitle,          0,              Button2,        zoom,           {0} },
    { ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
    { ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
    { ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
    { ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
    { ClkTagBar,            0,              Button1,        view,           {0} },
    { ClkTagBar,            0,              Button3,        toggleview,     {0} },
    { ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
    { ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
};

Last edited by na12 (2010-10-26 18:06:31)

Offline

#169 2010-11-16 01:53:08

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641
Website

Re: The dwm thread

this patch seems to work for me

--- dwm-5.8.2.orig/dwm.c    2010-11-16 03:36:02.396000221 +0200
+++ dwm-5.8.2/dwm.c    2010-11-16 03:11:47.000000000 +0200
@@ -181,6 +181,7 @@
 static void maprequest(XEvent *e);
 static void monocle(Monitor *m);
 static void movemouse(const Arg *arg);
+static void moveresize(const Arg *arg);
 static Client *nexttiled(Client *c);
 static Monitor *ptrtomon(int x, int y);
 static void propertynotify(XEvent *e);
@@ -1286,6 +1287,25 @@
     }
 }
 
+void
+moveresize(const Arg *arg) {
+    XEvent ev;
+    Monitor *m = selmon;
+
+    if(!(m->sel && arg && arg->v))
+        return;
+    if(m->lt[m->sellt]->arrange && !m->sel->isfloating)
+        togglefloating(NULL);
+
+    resize(m->sel, m->sel->x + ((int *)arg->v)[0],
+        m->sel->y + ((int *)arg->v)[1],
+        m->sel->w + ((int *)arg->v)[2],
+        m->sel->h + ((int *)arg->v)[3],
+        True);
+
+    while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
+}
+
 Client *
 nexttiled(Client *c) {
     for(; c && (c->isfloating || !ISVISIBLE(c)); c = c->next);

config.h

    { MODKEY|Mod1Mask,              XK_Down,   moveresize,     {.v = (int []){ 0, 25, 0, 0 }}},
    { MODKEY|Mod1Mask,              XK_Up,     moveresize,     {.v = (int []){ 0, -25, 0, 0 }}},
    { MODKEY|Mod1Mask,              XK_Right,  moveresize,     {.v = (int []){ 25, 0, 0, 0 }}},
    { MODKEY|Mod1Mask,              XK_Left,   moveresize,     {.v = (int []){ -25, 0, 0, 0 }}},
    { MODKEY|Mod1Mask|ControlMask,  XK_Down,   moveresize,     {.v = (int []){ 0, 0, 0, 25 }}},
    { MODKEY|Mod1Mask|ControlMask,  XK_Up,     moveresize,     {.v = (int []){ 0, 0, 0, -25 }}},
    { MODKEY|Mod1Mask|ControlMask,  XK_Right,  moveresize,     {.v = (int []){ 0, 0, 25, 0 }}},
    { MODKEY|Mod1Mask|ControlMask,  XK_Left,   moveresize,     {.v = (int []){ 0, 0, -25, 0 }}},

Offline

#170 2010-11-17 01:35:02

vanvalium
Member
From: Austria
Registered: 2010-10-09
Posts: 86

Re: The dwm thread

Some questions,
is it possible to use a second modkey?
Also, this doesn't anything to with dwm I guess, more an X thing. I'd like to use capslock as a metakey or something like that. What is the best way to do that. I remember reading something about that in a dwm thread.

Offline

#171 2010-11-17 01:46:44

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,051
Website

Re: The dwm thread

A second modkey? No idea, sorry.

Using CapsLock (or another key as your modkey)? http://dwm.suckless.org/customisation/windows_key


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#172 2010-11-17 01:59:33

Meyithi
Member
From: Wirral, UK
Registered: 2009-06-21
Posts: 550
Website

Re: The dwm thread

vanvalium wrote:

Some questions,
is it possible to use a second modkey?
Also, this doesn't anything to with dwm I guess, more an X thing. I'd like to use capslock as a metakey or something like that. What is the best way to do that. I remember reading something about that in a dwm thread.

https://wiki.archlinux.org/index.php/Dw … ows_Key.29

You'll need to fiddle with xmodmap but the process is the same.


The mind roams more freely in empty rooms.
dwm - colours - ncmpcpp - system
irc://irc.freenode.net:meyithi

Offline

#173 2010-11-17 02:00:13

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: The dwm thread

Depending on what you're trying to do you can also remap a second key so that X recognizes it as the first key; in effect giving you two modkeys.  That's what I do; I remapped my Right Alt key to be the same as my Windows key so I can use either for dwm.


thayer williams ~ cinderwick.ca

Offline

#174 2010-11-19 01:05:51

vanvalium
Member
From: Austria
Registered: 2010-10-09
Posts: 86

Re: The dwm thread

already knew about those things, but thanks
I'm gonna try and map capslock to a combination of ctrl + alt + shift + modkey. Should be usable like a second, different modkey.

Offline

#175 2010-12-24 21:22:11

inch
Member
Registered: 2010-12-21
Posts: 49

Re: The dwm thread

Hi! Just started with my first arch experience and tried to get into dwm - and already hit the first barrier. I installed dwm via the wiki and everything went fine, edited the xinitrc (contains the sh header and exec dwm). dwm starts and everything is fine until I want to do something (like opening a terminal), ALT + Shift + Enter doesn't open anything, ALT + Shift + Q doesn't exit dwm and so on. (config.h wasn't changed by me)

No keybinds work at all, what am I doing wrong?

Last edited by inch (2010-12-24 21:23:58)

Offline

Board footer

Powered by FluxBB