You are not logged in.

#876 2012-10-17 15:40:30

rix
Member
Registered: 2012-07-25
Posts: 238

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

I'd like to know your color scheme and font too. So do you mind sharing? smile
Thanks.


@ Trilby:

rix wrote:

I just know C base syntax and have already tried, but I've been succeed just in remove tags and layout from bar.
Any suggestion will be appreciate.

Offline

#877 2012-10-17 15:50:08

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

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

Unia wrote:
OK100 wrote:
Unia wrote:

I played around more with the layout symbol, but I really can't get it to work. I bet it's supersimple... I tried adding a second spacing, SPACING2, but that doesn't move the actual symbol. It just shows a gap (with the size of SPACING2) before the title. Here's a scrot of the patch and the effect:

http://ompldr.org/tZnd6dg

Offtopic:
Nice colors by the way smile but consider switching to vim big_smile

I rarely program, so for my editing needs nano suffices big_smile I can share the colors, if you want?

Sure tongue
Vim has a lot of very useful features even if you don't code, plugins etc. it's really worth to learn.

Offline

#878 2012-10-17 16:17:47

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

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

URxvt*font:              xft:Droid Sans Mono:pixelsize=10.5:antialias=true:hinting=true
URxvt*boldFont:          xft:Droid Sans Mono:pixelsize=10.5:antialias=true:hinting=true

URxvt*background:        #222222
URxvt.foreground:        #8C8C8C
URxvt.cursorColor:       #8C8C8C
!URxvt*fading:            20
!URxvt*fadeColor:        #002b36

!black
*color0: #0F2328
*color8: #073642

!red
*color1: #DC322F
*color9: #F54844

!green
*color2: #93C724
*color10: #B7CE42

!yellow
*color3: #FFA905
*color11: #F2B643

!blue
*color4: #00335D
*color12: #16596A

!magenta
*color5: #ED2087
*color13: #DE6EA4

!cyan
!*color6: #404040
*color6: #605D5D
*color14: #834394

!white
*color7: #F2F1F0
*color15: #F9F9F9

If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#879 2012-10-17 17:14:36

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

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

^ thx
By the way, ttf-droid-monovar from AUR contains variants with dotted and slashed zero.

Last edited by OK100 (2012-10-17 17:18:47)

Offline

#880 2012-10-18 09:15:44

rix
Member
Registered: 2012-07-25
Posts: 238

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

Anyone know how to invert order of tags/layouts name and status in the bar (tags/layouts on the right and status on the left)?
I've tried but I can just make tags disappears.
Thanks.

Offline

#881 2012-10-18 09:19:27

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

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

rix, you asked this in this same thread yesterday.

Please don't do that; people have seen your question, if they can help--as some already have--they will.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#882 2012-10-18 09:29:26

rix
Member
Registered: 2012-07-25
Posts: 238

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

jasonwryan wrote:

rix, you asked this [...]

I've thought it'd be better give the post more relevance this way (as an "up" for threads).

jasonwryan wrote:

[...] Please don't do that [...]

Got it, sorry.

jasonwryan wrote:

[...] as some already have [...]

Who have already did?

Last edited by rix (2012-10-18 09:29:59)

Offline

#883 2012-10-18 14:53:49

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,422
Website

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

There is no need to "up" threads.  As I understand it that is against the forum guidelines here.

Your quoting your response to me is similar.  I did see it the first time.  While I am happy to try to help others who want to learn some programming (particularly in C) and occasionally will offer code samples/examples on doing such things it is odd to *expect* others to do this for you.

Perhaps if you start another thread (in Programming and Scripting) specifically for the topic of reversing the order of these elements in the status bar it would create a place where those who are willing and able to contribute ideas or provide feedback on your initial attempts.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#884 2012-10-18 18:53:15

rix
Member
Registered: 2012-07-25
Posts: 238

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

Trilby wrote:

There is no need to "up" threads. [...]

Points of view I think.

Trilby wrote:

[...] As I understand it that is against the forum guidelines here. [...]

My fault about this one.

Trilby wrote:

[...]  I did see it the first time.  [...]

I thought you didn't.

Trilby wrote:

[...] While I am happy to try to help others who want to learn some programming (particularly in C) and occasionally will offer code samples/examples on doing such things [...]

Glad to know. Thanks.

Trilby wrote:

[...] it is odd to *expect* others to do this for you. [...]

Please, don't confuse me with those people whom just refuse to learn and expect others do stuff for him/her.
I'm really sorry if I've gave you this impression.
I've not "offered" a samples of mine, only in this case, because no ones deserved to do that.
I've just inverted the order of some pieces of code. Nothing such important.
I've just obtained in the statusbar stuff like the following:
[nothing][space][status]
[layouts][space][status]
[tags][space][status]
[layouts][layouts][layouts]...[space][status]
[tags][space][layouts][status]
[tags][space][a mix of layouts and status]
You see...

Trilby wrote:

[...] Perhaps if you start another thread [...]

I'd like to change something in Dwm statusbar so I've thought that a thread about Dwm where the last post was about how to change something in the statusbar would be better then a brand new thread just for a single little question such is mine.
Anyway I'll do that way. Thanks for suggestion.

Last edited by rix (2012-10-18 19:11:44)

Offline

#885 2012-10-19 15:24:13

Pranavg1890
Member
From: Nagpur,India
Registered: 2012-09-07
Posts: 114

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

can anyone tell me how should i fullscreen a window in dwm? it maximizes the window but there is no fuction for fullscreen of a window? i tried the setfullscreen fuction given dwm.c but it closes dwm. so can anyone tell me how to set it up? I am very new to dwm but i am starting to love it. Please help.


Using Openbox + Tint2 + Idesk

Offline

#886 2012-10-19 15:25:52

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

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

Pranavg1890 wrote:

can anyone tell me how should i fullscreen a window in dwm? it maximizes the window but there is no fuction for fullscreen of a window? i tried the setfullscreen fuction given dwm.c but it closes dwm. so can anyone tell me how to set it up? I am very new to dwm but i am starting to love it. Please help.

Monocle mode?  Does exactly what you want unless I'm misunderstanding.


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

Offline

#887 2012-10-19 15:34:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,422
Website

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

Perhaps monocle and hide the statusbar.  If you wanted, you could write a simple function to do both with a single key binding.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#888 2012-10-19 15:35:19

madders
Member
From: Reading, UK
Registered: 2012-04-01
Posts: 13

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

Also you can hide the bar with the togglebar function. Try Alt+b.

Offline

#889 2012-10-20 09:36:28

Pranavg1890
Member
From: Nagpur,India
Registered: 2012-09-07
Posts: 114

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

Thanks everyone for your replies.

Sorry, if you are mistaken, but i posted this cause i saw the difference in google-chrome. when i use monocle it just maximizes the window and not the exact fullscreen option which google-chrome provides.(by pressing F11).

@Trilby, can you also please tell me how to write a fuction that would hide the dwm bar and also monocle (or fullscreen) it? (I'm a noob to C programming and dwm source code)

(i dont use floating mode, it just commented it in config.h . so i just use tile and monocle and toggle between them as i am mainly a keyboard user)

Also, can anyone tell me why the setfullscreen function given in vanilla dwm.c doesn't work. do we have specify some arguments for it. I tried Keybinding the function , but it just closes dwm.

also, is there any function in dwm.c which can send a window to the next tag?


Using Openbox + Tint2 + Idesk

Offline

#890 2012-10-20 10:23:44

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

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

Pranavg1890 wrote:

also, is there any function in dwm.c which can send a window to the next tag?

Yes, natively:

config.h:

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

Last line defines those buttons.

EDIT: Also, I think fullscreen (F11) has to be supported by the application itself. For example, most web browsers have it, but my file manager (Thunar) hasn't. As Trilby suggested, you can 'simulate' F11-behaviour for such applications by using Monocle and hiding the statusbar.

Last edited by Unia (2012-10-20 10:25:13)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#891 2012-10-20 10:38:36

Army
Member
Registered: 2007-12-07
Posts: 1,784

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

Take a look at https://raw.github.com/UliArmy/dwm-hg-p … reen.patch Download it and apply it. In the config.h you should add this

{ Mod4Mask,                   XK_f,               togglefullscreen, {0} },

Then you can toggle fullscreen with MOD4+f

Offline

#892 2012-10-20 16:27:58

Pranavg1890
Member
From: Nagpur,India
Registered: 2012-09-07
Posts: 114

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

Thanks Friends ( Fellow Archers ) for Helping me out.

@Unia , I would like to clarify my question:

For eg. Suppose my selected window is in tag 1 and i want to move it to tag 2 only (Please note that I want the window to be moved to the next adjacent tag only and not any other tag) , so by pressing a keybinding such as (Mod4 + m) , i will move it to the next tag i.e.tag 2. So, basically, I want this functionality.

@Army, Many Thanks. The patch worked and it was the functionality that i wanted. Thanks again.


Using Openbox + Tint2 + Idesk

Offline

#893 2012-10-20 16:36:28

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

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

It seems like you want to rewrite DWM to provide functionality that already exists.  What Unia pointed out will do just that; all that's required of you is to know what tag you're currently looking at.  "Next tag" is a relative term, depending on whether you're talking about moving left or right, and you'd need to write code to account for that ambiguity (what happens when a client gets moved to the right-most tag, and you wish to move it again--do you then write extra code to wrap it around to the far left, or extra code to move back to the left one tag at a time?).  The names you assign tags are absolute, and the client will only be assigned to the tag you want it to be.

EDIT: Incidentally, I believe Awesome has this feature in its config by default.

Last edited by ANOKNUSA (2012-10-20 17:00:45)

Offline

#894 2012-10-20 17:05:27

Pranavg1890
Member
From: Nagpur,India
Registered: 2012-09-07
Posts: 114

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

Thanks for Replying,@ANOKNUSA, so can you please tell me the code to provide me the so called "ambiguity" i want (I am great noob at programming. I have just started to learn C.Also, C is one of the reason i use dwm.). suppose i want to my selected client to next adjacent tag( please note only next adjacent tag) by pressing MOD4+n, then how should i modify the required files?

EDIT: I'm also asking this cause this is a functionality which I have seen in awesome only.

Last edited by Pranavg1890 (2012-10-20 17:11:18)


Using Openbox + Tint2 + Idesk

Offline

#895 2012-10-20 17:31:33

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

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

Pranavg1890 wrote:

@Unia , I would like to clarify my question:

For eg. Suppose my selected window is in tag 1 and i want to move it to tag 2 only (Please note that I want the window to be moved to the next adjacent tag only and not any other tag) , so by pressing a keybinding such as (Mod4 + m) , i will move it to the next tag i.e.tag 2. So, basically, I want this functionality.

On the very first page a patch for just that was posted, called Cycle. The link is dead now though, so I'll keep on searching for you.

EDIT: well here's s start:

http://ap0calypse.agitatio.org/articles … n-dwm.html

EDIT2: Another one:

https://bbs.archlinux.org/viewtopic.php … 85#p699885

Last edited by Unia (2012-10-20 17:39:42)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#896 2012-10-20 19:35:12

Pranavg1890
Member
From: Nagpur,India
Registered: 2012-09-07
Posts: 114

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

By the way, I loved your dwm setup @Unia. I just downloaded it form your github and applied it. It looks great. Many thanks.
Also, Thanks for Helping me, @Unia.


Using Openbox + Tint2 + Idesk

Offline

#897 2012-10-20 19:37:25

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

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

Glad to help smile


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#898 2012-10-22 15:46:22

rix
Member
Registered: 2012-07-25
Posts: 238

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

Hi Archers,

I'd like to have (as in my previous posts), tags and layouts lists on the right and other piped infos on the left. Obviously in the Dwm statusbar.

I got this piece of code:

[...]

void
drawbar(Monitor *m) {
    int x;
    unsigned int i, occ = 0, urg = 0;
    unsigned long *col;
    Client *c;

    dc.x = -20;
    x = dc.x;

/*  if(m == selmon) {  // status is only drawn on selected monitor */
        dc.w = x + TEXTW(stext);
	dc.x = m->ww - dc.w;
	if(dc.x > x) {
		dc.x = x;
		dc.w = m->ww - x;
	}
	drawcoloredtext(stext);
/*}
	else
		dc.x = m->ww; */
	if((dc.w = dc.x - x) > bh) {
		dc.x = x;
		if(m->sel) {
			col = m == selmon ? dc.colors[1] : dc.colors[0];
			drawtext(m->sel->name, col, True);
			drawsquare(m->sel->isfixed, m->sel->isfloating, col);
		}
		else
			drawtext(NULL, dc.colors[0], False);
	}
	for(c = m->clients; c; c = c->next) {
		occ |= c->tags;
		if(c->isurgent)
			urg |= c->tags;
	}
	dc.x = 1210;
	dc.w = blw = TEXTW(m->ltsymbol);
	drawtext(m->ltsymbol, dc.colors[7], True);
	dc.x += dc.w;
	for(i = 0; i < LENGTH(tags); i++) {
		dc.w = TEXTW(tags[i]);
		col = dc.colors[ (m->tagset[m->seltags] & 1 << i ? 1:(urg & 1 << i ? 2:0))];
		drawtext(tags[i], col, True);
		drawsquare(m == selmon && selmon->sel && selmon->sel->tags & 1 << i, occ & 1 << i, col);
		dc.x += dc.w;
	}
	XCopyArea(dpy, dc.drawable, m->barwin, dc.gc, 0, 0, m->ww, bh, 0, 0);
	XSync(dpy, False);
}

[...]

and this way quite everything work, because the only issue appear to be that clients titles are disapper.
I think that positioning piped infos at -20(px) make such titles (which usually preceed piped infos) disappear on the left of the screen.

I think it's because

[...] drawcoloredtext(stext); [...]

stands both for titles and for the other stuff.
But I'm not so good in C.
In fact, I'm also not sure that add pixels space in

[...] dc.x = 1210; [...]

is the right way to make tags and layouts to display on the left.

Stuff order I'd like to have, should be the following:
<piped infos><space><space><clients titles><space><space><layouts><space><space><tags list>

Suggestions? Helps? Always really appreciate.
Thank so much.

Last edited by rix (2012-10-22 15:52:47)

Offline

#899 2012-10-24 22:50:09

Crunch
Member
From: -+-
Registered: 2011-02-17
Posts: 56

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

Unia wrote:

EDIT: Working! Hm... now I'm gonna see if I can also add a separator between tag names...

I also had that idea at one point, but gave up. I'm not too great with programming as I'm just learning. tongue

Would be nice though if you figure it out smile


Registered Linux user #536591.

Offline

#900 2012-10-25 08:30:10

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

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

Crunch wrote:
Unia wrote:

EDIT: Working! Hm... now I'm gonna see if I can also add a separator between tag names...

I also had that idea at one point, but gave up. I'm not too great with programming as I'm just learning. tongue

Would be nice though if you figure it out smile

For now I've kinda put that on hold. Didn't really succeed on my attempts big_smile


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

Board footer

Powered by FluxBB