You are not logged in.

#1251 2013-06-19 09:01:57

illusionist
Member
From: localhost
Registered: 2012-04-03
Posts: 498

Re: DWM Hackers Unite! Share (or request) dwm patches.

@ ctruett
Just to make sure, Have you changed both the occurrence of 'height' in tcl.h ? Because gaping is fine on my system.


  Never argue with stupid people,They will drag you down to their level and then beat you with experience.--Mark Twain
@github

Offline

#1252 2013-06-19 14:37:26

ctruett
Member
Registered: 2010-05-27
Posts: 28

Re: DWM Hackers Unite! Share (or request) dwm patches.

Looking on another computer it appears to be rendering correctly. I guess it was just the monitor settings or something on my other laptop. Thanks for the help, @illusionist!


Supergirl: But fortunately I printed out everything I could find, not just the beginner's guide.
Supergirl: I printed out internet.

Offline

#1253 2013-06-24 17:22:04

fawkes5
Member
From: Canada
Registered: 2012-12-23
Posts: 84

Re: DWM Hackers Unite! Share (or request) dwm patches.

REQUEST:

The following notation will be used: [MASTER][STACK]. If you have n tiled windows, i will number them 1,2,...,n . The notation [1][2|3] means window 2 and 3 are in the stack, windows 1 is in master.

I wish for two functions :

1) Move focus between master and stack. Suppose you currently have 3 tiled windows, [1][2|3]. If your current focus is 2, then this function would move you to 1, applciation again would land you at 2. It would never go to 3, only moving between master and stack. If you started at 1, it would be most natural to land at 2, then back again after re-application [some choice would have to be made, but it doesnt really matter]

2) Move focus up and down the stack, never to master. So suppose you had [1][2|3|4]. and you start at 3. Then you'd move  3->4->2->3 [of course the function could take arguments so you could move 3->2->4->3]. Never to 1. Only within the stack.

Any help in making these would be appreciated

Thanks!

Last edited by fawkes5 (2013-06-24 17:46:08)

Offline

#1254 2013-06-24 18:04:14

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

Re: DWM Hackers Unite! Share (or request) dwm patches.

How does this differ from Mod-{j,k}? If you are just moving focus; this accomplishes what you are asking. If you want to move a window from master to stack, look at the push patch.


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#1255 2013-06-24 18:09:08

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,232
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

It sounds like going back and forth between *one* window in the stack and master.  I did this with ttwm (and now alopex).  You could check out of the window() function for "focus alternate" for the implementation.  It does require a global window or client pointer to specify which stack window last had the focus.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#1256 2013-06-24 18:28:45

pks
Member
From: Germany
Registered: 2012-07-20
Posts: 110

Re: DWM Hackers Unite! Share (or request) dwm patches.

Does anybody know of a patch which enables you to swap all clients between two tags or two monitors?

Offline

#1257 2013-06-24 22:03:48

fawkes5
Member
From: Canada
Registered: 2012-12-23
Posts: 84

Re: DWM Hackers Unite! Share (or request) dwm patches.

jasonwryan wrote:

How does this differ from Mod-{j,k}? If you are just moving focus; this accomplishes what you are asking. If you want to move a window from master to stack, look at the push patch.

I'm trying to emulate vim like movement in my window management. So horizonal movement would be movement between the master and stack. Vertical movement would be movement within the stack only. This makes sense in the default tiling mode.

Mod--{j,k} cycles your focus between all windows, regardless if the window is in stack or master. I would like the more specific movement as outlined in my previous post.

Last edited by fawkes5 (2013-06-24 22:47:49)

Offline

#1258 2013-06-25 01:24:05

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: DWM Hackers Unite! Share (or request) dwm patches.

^^ I can appreciate wanting to hold to vim-like muscle memory, but this won't save you any keystrokes, so you'd in effect be writing new code and learning two new keybindings without any improvement in comfort or efficiency.  Maybe I'm mistaking your intent (though Trillby's idea seems to make sense), but here's what I'm seeing:

Say you've got three windows on-screen---two in the stack and one in master.  Moving to the bottom window in the stack would require either one keystroke moving counter-clockwise, or two keystrokes moving clockwise.  The simplest implementation of what you want would require you to perform one keystroke to switch from master to stack (or vice versa), and another to move down to the last window in the stack since, again, this is the simplest implementation (a single "master-stack switch" keybinding to one point in the stack), rather than just cycling to it counter-clockwise.  Add a fourth window to the screen (third in the stack), and getting to the middle window would require two keystrokes, and the bottom one three keystrokes.  You could of course make it so the switch between master and stack moves either clockwise to the top or counter-clockwise to the bottom depending on your keybinding, but now you're using the same operation as the default tag cycling with the same number of keystrokes, but now those keystrokes are divided between two-to-four different keybindings.  Your fingers are doing the same amount of work (or arguably more), while you've added extra mental hurdles to your workflow.

Incidentally, what you're looking for sort of exists in tmux, but again requires keybindings that can occasionally get tedious, especially relative to DWM.

Offline

#1259 2013-06-25 12:23:59

fawkes5
Member
From: Canada
Registered: 2012-12-23
Posts: 84

Re: DWM Hackers Unite! Share (or request) dwm patches.

ANOKNUSA wrote:

^^ I can appreciate wanting to hold to vim-like muscle memory, but this won't save you any keystrokes, so you'd in effect be writing new code and learning two new keybindings without any improvement in comfort or efficiency.  Maybe I'm mistaking your intent (though Trillby's idea seems to make sense), but here's what I'm seeing:

Say you've got three windows on-screen---two in the stack and one in master.  Moving to the bottom window in the stack would require either one keystroke moving counter-clockwise, or two keystrokes moving clockwise.  The simplest implementation of what you want would require you to perform one keystroke to switch from master to stack (or vice versa), and another to move down to the last window in the stack since, again, this is the simplest implementation (a single "master-stack switch" keybinding to one point in the stack), rather than just cycling to it counter-clockwise.  Add a fourth window to the screen (third in the stack), and getting to the middle window would require two keystrokes, and the bottom one three keystrokes.  You could of course make it so the switch between master and stack moves either clockwise to the top or counter-clockwise to the bottom depending on your keybinding, but now you're using the same operation as the default tag cycling with the same number of keystrokes, but now those keystrokes are divided between two-to-four different keybindings.  Your fingers are doing the same amount of work (or arguably more), while you've added extra mental hurdles to your workflow.

Incidentally, what you're looking for sort of exists in tmux, but again requires keybindings that can occasionally get tedious, especially relative to DWM.

You make a good point!

I guess in most situations [i rarely have more then 3 windows open at a time], the
behavior would be more or less the same as Mod--{j,k} (sry jasonwryan).

However, in the 4 [or more generally, even numberd] window case, you could have the
function move you to the middle window in the stack and it would be a max of 2
keystrokes to get wherever you wanted from master. Thats the same as it is now, but
perhaps a tad more elegent in this case?

Last edited by fawkes5 (2013-06-25 13:07:58)

Offline

#1260 2013-07-12 13:26:44

Lucas8
Member
Registered: 2013-07-12
Posts: 6
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

I've made a little patch which allow you to send command to dwm through a fifo pipe, in order to use another keybinder. You can create your commands like you do with normals keys, in config.h :

/* FIFO commands */
char* fifoPath = "/tmp/dwm.fifo";
Command fifos[] = {
    /* command name     function        argument */
    {  "quit",                      quit,             {0}},
    {  "term",                    spawn,         {.v = termcmd } },
};

Then you have to send the commands to the fifo file to have them executed by dwm.
The code is in the fifo branch at https://github.com/lucas8/dwmfifo.


My GitHub.

Offline

#1261 2013-07-30 03:27:32

doug piston
Member
From: Seattle
Registered: 2011-09-11
Posts: 387
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

Asking for a bit of help here, recent upgrade to urxvt-unicode-patched made think it's time to ditch it for something with fontconfig. Termite was the option I went with, my issue is that I cannot seem to get scratchpad or mutt working. To be honest I got scratchpad working while using urxvt with some Goolefu and was always pleased with it.

I found this, but I believe I maybe a bit to much of a novice to get it.

Here is my current non-working setup

static const char scratchpadname[] = "scratchpad";
static const char *scratchpadcmd[] = { "termite", "-name", scratchpadname, "-geometry", "100x25", NULL };

I am assuming the '-name' was something exclusive to using urxvt and I think I am missing the 'WM_NAME'

In my Google search I was able to find a config using termite and the work around I am seeing is to still use urxvt for things such as scratchpad and mutt. Which I can do but was hoping to make a full switch.
https://bitbucket.org/jasonwryan/dwm-pa … a3fed1789a



Thanks for reading. Cheers.

Last edited by doug piston (2013-07-30 04:17:56)

Offline

#1262 2013-07-30 03:35:16

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

Re: DWM Hackers Unite! Share (or request) dwm patches.

From Simon's post it would seem that you would want:

static const char *scratchpadcmd[] = { "termite", "-r", "scratchpad", "--geometry", "100x25", NULL };

Untested...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#1263 2013-07-30 04:24:45

doug piston
Member
From: Seattle
Registered: 2011-09-11
Posts: 387
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

I tried what you had suggested and it did not work. I am willing to search through this whole thread but is Simon a user name here or the real name to the to vodik? I remember a user by the nick simon.awe Sorry on my confusion as I don't know any of them on a real name basis but I do thank you for the input.

Cheers.

Last edited by doug piston (2013-07-30 04:26:03)

Offline

#1264 2013-07-30 07:01:07

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

Re: DWM Hackers Unite! Share (or request) dwm patches.

This works for me:

static const char    *padcmd[] = { "termite", "--name=scratchpad", "--geometry", "600x200-30+40", NULL };

Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#1265 2013-07-30 19:43:50

j0y
Member
Registered: 2010-06-22
Posts: 3

Re: DWM Hackers Unite! Share (or request) dwm patches.

Would anyone have a patch, or would be kind enough to write one, to make my tasks have my separator used by my statusbar?
I got stumped trying to do this, help would be greatly appreciated.
Example screenshot
Example 2: tags<task1<task2<task3<statusbar<tray
Hopefully that makes sense.

Thanks.


..and here's Bob with the weather.
My blog

Offline

#1266 2013-07-30 21:30:15

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

Re: DWM Hackers Unite! Share (or request) dwm patches.

In all seriousness, you should probably just go with awesome. Stuff like that is why it was forked in the first place...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#1267 2013-07-31 01:19:15

j0y
Member
Registered: 2010-06-22
Posts: 3

Re: DWM Hackers Unite! Share (or request) dwm patches.

jasonwryan wrote:

In all seriousness, you should probably just go with awesome. Stuff like that is why it was forked in the first place...

Thanks for the recommendation, I think I will be doing that. smile


..and here's Bob with the weather.
My blog

Offline

#1268 2013-07-31 09:37:21

ivoarch
Member
From: the six feet under the ground
Registered: 2011-03-31
Posts: 436

Re: DWM Hackers Unite! Share (or request) dwm patches.

j0y wrote:
jasonwryan wrote:

In all seriousness, you should probably just go with awesome. Stuff like that is why it was forked in the first place...

Thanks for the recommendation, I think I will be doing that. smile

try this patch
https://github.com/SushiDesu/dwm/blob/m … theme.diff
https://github.com/SushiDesu/dwm/blob/master/config.h


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.
Github )||( Weblog

Offline

#1269 2013-08-01 10:15:20

F34R
Member
From: /dev/loliland
Registered: 2012-02-05
Posts: 239

Re: DWM Hackers Unite! Share (or request) dwm patches.

ivoarch wrote:
j0y wrote:
jasonwryan wrote:

In all seriousness, you should probably just go with awesome. Stuff like that is why it was forked in the first place...

Thanks for the recommendation, I think I will be doing that. smile

try this patch
https://github.com/SushiDesu/dwm/blob/m … theme.diff
https://github.com/SushiDesu/dwm/blob/master/config.h

Nauh, Jason mean only awesome-wm can show all doing in workplace and switchable just a click.

Offline

#1270 2013-08-09 03:41:16

at0m5k
Member
Registered: 2013-07-22
Posts: 40
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

ivoarch wrote:
j0y wrote:
jasonwryan wrote:

In all seriousness, you should probably just go with awesome. Stuff like that is why it was forked in the first place...

Thanks for the recommendation, I think I will be doing that. smile

try this patch
https://github.com/SushiDesu/dwm/blob/m … theme.diff
https://github.com/SushiDesu/dwm/blob/master/config.h

That's my patch smile. Just letting you know that SushiDesu will no longer be maintained. Further updates will be on my Github.

Offline

#1271 2013-08-27 09:43:15

ivoarch
Member
From: the six feet under the ground
Registered: 2011-03-31
Posts: 436

Re: DWM Hackers Unite! Share (or request) dwm patches.

invisibleman__ wrote:

How do you hide the focused window name from being displayed on the status bar? I know its in dwm.c somewhere.
I managed to hide the squares from being added  next to tags with open windows by commenting out the drawsquare functions, but how about the focused window title?

Try with this.

dwm.c

void drawbar ()
...
if(m->sel && showtitle) {
col = m == selmon ? dc.sel : dc.norm; 
...

config.h

static const Bool showtitle   = False; /* True means Show title in status bar */

Last edited by ivoarch (2013-08-27 09:47:43)


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.
Github )||( Weblog

Offline

#1272 2013-08-27 20:58:05

invisibleman__
Member
Registered: 2013-08-19
Posts: 9

Re: DWM Hackers Unite! Share (or request) dwm patches.

What exactly does this mean? Am I supposed to add this to the dwm.c and config.h?

Offline

#1273 2013-08-27 21:44:45

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: DWM Hackers Unite! Share (or request) dwm patches.

Yes, you're supposed to alter dwm.c and config.h.  Find the relevent spot in dwm.c (ivoarch hinted at it) and make the appropriate alterations; then add the "static" bit to config.h.  Incidentally, the way that ivoarch wrote the dwm.c instructions is very close to how .diff files look; so if you ever have to manually apply a more complex patch to DWM, this'll be a good bit of practice. wink

Offline

#1274 2013-08-27 21:55:28

at0m5k
Member
Registered: 2013-07-22
Posts: 40
Website

Re: DWM Hackers Unite! Share (or request) dwm patches.

You can also try Unia's notitle patch if you wanna get rid of the title completely. It's a little bit cleaner implementation if you don't need \ want the ability to toggle the title.

Offline

#1275 2013-08-28 00:27:17

invisibleman__
Member
Registered: 2013-08-19
Posts: 9

Re: DWM Hackers Unite! Share (or request) dwm patches.

So basically, all a diff is, like when I read it the green field is added text, and the red is removed text? So essentially, I could apply this myself by modifying the dwm.c?

sorry, dwm has just always been a little confusing.

Offline

Board footer

Powered by FluxBB