Re: [dev] [dwm] dwm-hg, layouts, setfocus and pertag patch

2011-05-14 Thread Bogdan Ionuț
On Sat, May 14, 2011 at 20:40, Andrew Hills  wrote:

> No, I mean, if you display both tag 1 (tile layout) and tag 9 (monocle
> layout) at the same time--not one after the other--which layout does
> it choose?
>
> --Andrew Hills
>

I already said that.. it uses the layout (tile in my case) from tag 1.


Re: [dev] [dwm] dwm-hg, layouts, setfocus and pertag patch

2011-05-14 Thread Andrew Hills
No, I mean, if you display both tag 1 (tile layout) and tag 9 (monocle
layout) at the same time--not one after the other--which layout does
it choose?

--Andrew Hills



On Sat, May 14, 2011 at 9:31 AM, Bogdan Ionuț  wrote:
> On Sat, May 14, 2011 at 20:25, Andrew Hills  wrote:
>>
>> Just out of curiosity, what happens when you display a tiled and
>> monocled tag simultaneously if you set your layout per tag?
>>
>> --Andrew Hills
>>
>
> it switch from tag 1 to tag 9 ('cause of the full square shows this) , and
> it's still using the layout from tag 1 in tag 9.
>



Re: [dev] [dwm] dwm-hg, layouts, setfocus and pertag patch

2011-05-14 Thread Bogdan Ionuț
On Sat, May 14, 2011 at 20:25, Andrew Hills  wrote:

> Just out of curiosity, what happens when you display a tiled and
> monocled tag simultaneously if you set your layout per tag?
>
> --Andrew Hills
>
>
it switch from tag 1 to tag 9 ('cause of the full square shows this) , and
it's still using the layout from tag 1 in tag 9.


Re: [dev] [dwm] dwm-hg, layouts, setfocus and pertag patch

2011-05-14 Thread Andrew Hills
Just out of curiosity, what happens when you display a tiled and
monocled tag simultaneously if you set your layout per tag?

--Andrew Hills



On Sat, May 14, 2011 at 7:53 AM, Bogdan Ionuț  wrote:
> Hello guys,
>
> I'm using dwm-hg aka dwm 5.9 with dwm-5.8.2-pertag_without_bar.diff, and I
> have a problem with layouts and setfocus "feature" (commit 7e2a8fec8d6c).
> Firefox by default is using tag 9, so go to tag 9 and set monocle layout,
> after go to tag 1 and start firefox from this tag using tile layout. Now
> firefox should start and tags switched from 1 to 9, but 'cause of the
> setfocus feature is using the layout from the old tag (tile) in the new tag
> (which should be monocle), but if you switch tags using the keyboard (eg.
> mod+1, mod+9), the correct layout is shown in tag 9. Sorry for the long
> story, but this is getting more and more annoying as I use ~2-3 apps in
> monocle layout all the time in the `web` tag. Any workaround for this?
>



[dev] [dwm] dwm-hg, layouts, setfocus and pertag patch

2011-05-14 Thread Bogdan Ionuț
Hello guys,

I'm using dwm-hg aka dwm 5.9 with dwm-5.8.2-pertag_without_bar.diff, and I
have a problem with layouts and setfocus "feature" (commit 7e2a8fec8d6c).
Firefox by default is using tag 9, so go to tag 9 and set monocle layout,
after go to tag 1 and start firefox from this tag using tile layout. Now
firefox should start and tags switched from 1 to 9, but 'cause of the
setfocus feature is using the layout from the old tag (tile) in the new tag
(which should be monocle), but if you switch tags using the keyboard (eg.
mod+1, mod+9), the correct layout is shown in tag 9. Sorry for the long
story, but this is getting more and more annoying as I use ~2-3 apps in
monocle layout all the time in the `web` tag. Any workaround for this?


Re: [dev] dwm xsetroot colorful fonts howto?

2011-05-14 Thread Le Tian
On Sat, May 14, 2011 at 6:15 PM, Kobi  wrote:

> On 14-05-2011, 17:08:00 Le Tian  wrote:
>
>  On Sat, May 14, 2011 at 1:52 PM, Le Tian  wrote:
>>
>>
>>>
>>> On Sat, May 14, 2011 at 6:45 AM, Anders Andersson >> >wrote:
>>>
>>>  On Fri, May 13, 2011 at 11:11 PM, Bogdan Ionuț 
 wrote:
 > On Sat, May 14, 2011 at 00:01, Le Tian  wrote:
 >>
 >> I'm sorry, maybe its been discussed like a lot of times, but can
 anybody
 >> tell me how to color taskbar fonts in dwm? There is a patch
 >> (http://dwm.suckless.org/patches/statuscolors) but that I don't
 like,
 I need
 >> fonts to be colored not a colorful bg or fg in the taskbar, and maybe
 its
 >> possible to change the colors on-the-fly (when monitoring high CPU
 temps)?
 >> Maybe somebody has it implemented already.
 >>
 >> --
 >> Tian

 Why don't you set something up that throttles the CPU and eventually
 turns it off in case it gets too hot? What use is there to show the
 temperature on the status bar? Will the computer break if you're not
 there to turn it off in case it gets too hot?

 I just think things like this ruins the clean experience that dwm is.


  cpu temp is not that useful, its agreeable, when hdd temp is very
>>> useful,
>>> its crucial for laptop users like me to keep their hdd temperature under
>>> proper control. If I was using a desktop pc, I wouldn't bother myself
>>> with
>>> these tweaks, but as long as summer is coming, I think it come useful for
>>> my
>>> laptop.
>>>
>>> --
>>> Tian
>>>
>>> Hi again, I managed to color taskbar output, but I need the cpu values to
>>>
>> be colored on-the-fly, so when my temp is more than 50C then the values
>> should be red etc. can somebody help me to correct my script?
>> I understand that I must add a "if else" condition, but it doesn't work,
>> when I do, simply because I don't know correct syntax, and try to learn
>> on-the-fly).
>>
>> here is my original script:
>> ***
>> while true
>> do
>>
>> cpu_temp=$(cat /proc/acpi/ibm/thermal | awk '{printf("\x04 cpu: "$3"*"$4"
>> ")}')
>>
>> root_vol=$(df -h / | awk 'END {printf("\x01| root: "$5)}' | sed
>> 's/Use%//')
>> home_vol=$(df -h /home| awk 'END {printf("\x01home: "$5)}' | sed
>> 's/Use%//')
>> vol=$(aumix -q | awk '/vol/ {printf("\x01|\x03vol:"$3)}')
>> date=$(date | awk 'END {printf("\x01| \x01"$1" "$2" "$3)}')
>> uptime=$(uptime | awk 'BEGIN {FS = ":"}; END {printf("\x01|"$1":"$2)}')
>> taskbar_info=$(echo -e $cpu_temp $root_vol $home_vol $vol $date $uptime)
>>
>> xsetroot -name "$taskbar_info"
>> sleep 5
>> done
>> 
>>
>> There should be "if $cpu_temp > 60 then; "do the command again with red
>> colors", and how can I check the range of "if" condition? For example:
>> when cpu temp is [50-55] then it should be blue, when it goes up to
>> [60-65]
>> then red, so "if $cpu_temp == [50-55]; then "do command", but it doesn't
>> work(. Can somebody help me with syntax? Forgive me my ignorance, but I
>> will
>> be very thankful if somebody will help with it.
>>
>> Tian
>>
>
> I've sorted this with a script: http://wklej.org/id/529183/
> and here's my ~/.xinitrc http://wklej.org/id/529182/
>
> The colors are defined in config.h:
>
> static const char colors[NUMCOLORS][ColLast][8] = {
>//  border   foreground background
>{ "#33", "#cc", "#22" },  // 0 = normal
>{ "#88", "#ff", "#55" },  // 1 = selected
>{ "#33", "#3399ff", "#22" },  // 2 = light blue
>{ "#33", "#ff", "#22" },  // 3 = red
>{ "#33", "#8afb17", "#22" },  // 4 = green
>{ "#33", "#fdd017", "#22" },  // 5 = yellow
>{ "#33", "#ff", "#22" },  // 6 = white
>{ "#33", "#ff9900", "#22" },  // 7 = orange
> };
>
>

Спасибо большое, thanks!)
-- 
Tian


Re: [dev] dwm xsetroot colorful fonts howto?

2011-05-14 Thread Kobi

On 14-05-2011, 17:08:00 Le Tian  wrote:


On Sat, May 14, 2011 at 1:52 PM, Le Tian  wrote:




On Sat, May 14, 2011 at 6:45 AM, Anders Andersson  
wrote:



On Fri, May 13, 2011 at 11:11 PM, Bogdan Ionuț 
wrote:
> On Sat, May 14, 2011 at 00:01, Le Tian  wrote:
>>
>> I'm sorry, maybe its been discussed like a lot of times, but can
anybody
>> tell me how to color taskbar fonts in dwm? There is a patch
>> (http://dwm.suckless.org/patches/statuscolors) but that I don't  
like,

I need
>> fonts to be colored not a colorful bg or fg in the taskbar, and  
maybe

its
>> possible to change the colors on-the-fly (when monitoring high CPU
temps)?
>> Maybe somebody has it implemented already.
>>
>> --
>> Tian

Why don't you set something up that throttles the CPU and eventually
turns it off in case it gets too hot? What use is there to show the
temperature on the status bar? Will the computer break if you're not
there to turn it off in case it gets too hot?

I just think things like this ruins the clean experience that dwm is.


cpu temp is not that useful, its agreeable, when hdd temp is very  
useful,

its crucial for laptop users like me to keep their hdd temperature under
proper control. If I was using a desktop pc, I wouldn't bother myself  
with
these tweaks, but as long as summer is coming, I think it come useful  
for my

laptop.

--
Tian

Hi again, I managed to color taskbar output, but I need the cpu values  
to

be colored on-the-fly, so when my temp is more than 50C then the values
should be red etc. can somebody help me to correct my script?
I understand that I must add a "if else" condition, but it doesn't work,
when I do, simply because I don't know correct syntax, and try to learn
on-the-fly).

here is my original script:
***
while true
do

cpu_temp=$(cat /proc/acpi/ibm/thermal | awk '{printf("\x04 cpu: "$3"*"$4"
")}')

root_vol=$(df -h / | awk 'END {printf("\x01| root: "$5)}' | sed  
's/Use%//')
home_vol=$(df -h /home| awk 'END {printf("\x01home: "$5)}' | sed  
's/Use%//')

vol=$(aumix -q | awk '/vol/ {printf("\x01|\x03vol:"$3)}')
date=$(date | awk 'END {printf("\x01| \x01"$1" "$2" "$3)}')
uptime=$(uptime | awk 'BEGIN {FS = ":"}; END {printf("\x01|"$1":"$2)}')
taskbar_info=$(echo -e $cpu_temp $root_vol $home_vol $vol $date $uptime)

xsetroot -name "$taskbar_info"
sleep 5
done


There should be "if $cpu_temp > 60 then; "do the command again with red
colors", and how can I check the range of "if" condition? For example:
when cpu temp is [50-55] then it should be blue, when it goes up to  
[60-65]

then red, so "if $cpu_temp == [50-55]; then "do command", but it doesn't
work(. Can somebody help me with syntax? Forgive me my ignorance, but I  
will

be very thankful if somebody will help with it.

Tian


I've sorted this with a script: http://wklej.org/id/529183/
and here's my ~/.xinitrc http://wklej.org/id/529182/

The colors are defined in config.h:

static const char colors[NUMCOLORS][ColLast][8] = {
//  border   foreground background
{ "#33", "#cc", "#22" },  // 0 = normal
{ "#88", "#ff", "#55" },  // 1 = selected
{ "#33", "#3399ff", "#22" },  // 2 = light blue
{ "#33", "#ff", "#22" },  // 3 = red
{ "#33", "#8afb17", "#22" },  // 4 = green
{ "#33", "#fdd017", "#22" },  // 5 = yellow
{ "#33", "#ff", "#22" },  // 6 = white
{ "#33", "#ff9900", "#22" },  // 7 = orange
};



Re: [dev] dwm xsetroot colorful fonts howto?

2011-05-14 Thread Le Tian
On Sat, May 14, 2011 at 1:52 PM, Le Tian  wrote:

>
>
> On Sat, May 14, 2011 at 6:45 AM, Anders Andersson wrote:
>
>> On Fri, May 13, 2011 at 11:11 PM, Bogdan Ionuț 
>> wrote:
>> > On Sat, May 14, 2011 at 00:01, Le Tian  wrote:
>> >>
>> >> I'm sorry, maybe its been discussed like a lot of times, but can
>> anybody
>> >> tell me how to color taskbar fonts in dwm? There is a patch
>> >> (http://dwm.suckless.org/patches/statuscolors) but that I don't like,
>> I need
>> >> fonts to be colored not a colorful bg or fg in the taskbar, and maybe
>> its
>> >> possible to change the colors on-the-fly (when monitoring high CPU
>> temps)?
>> >> Maybe somebody has it implemented already.
>> >>
>> >> --
>> >> Tian
>>
>> Why don't you set something up that throttles the CPU and eventually
>> turns it off in case it gets too hot? What use is there to show the
>> temperature on the status bar? Will the computer break if you're not
>> there to turn it off in case it gets too hot?
>>
>> I just think things like this ruins the clean experience that dwm is.
>>
>>
> cpu temp is not that useful, its agreeable, when hdd temp is very useful,
> its crucial for laptop users like me to keep their hdd temperature under
> proper control. If I was using a desktop pc, I wouldn't bother myself with
> these tweaks, but as long as summer is coming, I think it come useful for my
> laptop.
>
> --
> Tian
>
> Hi again, I managed to color taskbar output, but I need the cpu values to
be colored on-the-fly, so when my temp is more than 50C then the values
should be red etc. can somebody help me to correct my script?
I understand that I must add a "if else" condition, but it doesn't work,
when I do, simply because I don't know correct syntax, and try to learn
on-the-fly).

here is my original script:
***
while true
do

cpu_temp=$(cat /proc/acpi/ibm/thermal | awk '{printf("\x04 cpu: "$3"*"$4"
")}')

root_vol=$(df -h / | awk 'END {printf("\x01| root: "$5)}' | sed 's/Use%//')
home_vol=$(df -h /home| awk 'END {printf("\x01home: "$5)}' | sed 's/Use%//')
vol=$(aumix -q | awk '/vol/ {printf("\x01|\x03vol:"$3)}')
date=$(date | awk 'END {printf("\x01| \x01"$1" "$2" "$3)}')
uptime=$(uptime | awk 'BEGIN {FS = ":"}; END {printf("\x01|"$1":"$2)}')
taskbar_info=$(echo -e $cpu_temp $root_vol $home_vol $vol $date $uptime)

xsetroot -name "$taskbar_info"
sleep 5
done


There should be "if $cpu_temp > 60 then; "do the command again with red
colors", and how can I check the range of "if" condition? For example:
when cpu temp is [50-55] then it should be blue, when it goes up to [60-65]
then red, so "if $cpu_temp == [50-55]; then "do command", but it doesn't
work(. Can somebody help me with syntax? Forgive me my ignorance, but I will
be very thankful if somebody will help with it.

Tian


Re: [dev] [dwm] move windows via keyboard

2011-05-14 Thread Rob
On 14 May 2011 12:39, ilf  wrote:
> I find myself using this mouse thing for moving floating windows around. Is
> there any way to do this via keyboard?
>
> I don't need to so this pixel by pixel, but rather from corner to corner.
>
> --
> ilf

Here's what I use, it's a modified version of moveresize.c
Add something like this to config.h:

{ MODKEY|ControlMask,  XK_q, jumpto, {.i = 0}},
{ MODKEY|ControlMask,  XK_e, jumpto, {.i = 1}},
{ MODKEY|ControlMask,  XK_a, jumpto, {.i = 2}},
{ MODKEY|ControlMask,  XK_d, jumpto, {.i = 3}},

Rob.
void moveresize(const Arg *arg) {
	XEvent ev;
	Monitor *m = selmon;
	const int *param = arg->v;

	if(!(m->sel && arg && arg->v))
		return;
	/*
	 * if monitor->tag[monitor->selectedtag]->has_arrange_function
	 * and the selected client isn't floating...
	 */
	if(m->lt[m->sellt]->arrange && !m->sel->isfloating)
		m->sel->isfloating = True;

	resize(m->sel,
			m->sel->x + param[0],
			m->sel->y + param[1],
			m->sel->w + param[2],
			m->sel->h + param[3],
			True);

	arrange(m);

	while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
}

void jumpto(const Arg *arg) {
	Monitor *m = selmon;
	XEvent ev;

	if(!m->sel || !arg)
		return;

	{
#define LEFT   (m->wx)
#define RIGHT  (m->wx + m->ww - m->sel->w)
#define TOP(m->wy)
#define BOTTOM (m->wy + m->wh - m->sel->h)
		struct
		{
			int x, y;
		} jumps[] = {
			{ LEFT,  TOP},
			{ RIGHT, TOP},
			{ LEFT,  BOTTOM },
			{ RIGHT, BOTTOM }
		};

		if(!(0 <= arg->i && arg->i < LENGTH(jumps)))
			return;

		if(m->lt[m->sellt]->arrange && !m->sel->isfloating)
			m->sel->isfloating = True;

		resize(m->sel,
jumps[arg->i].x,
jumps[arg->i].y,
m->sel->w,
m->sel->h,
True);

		arrange(m);

		while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
	}
}


[dev] [dwm] move windows via keyboard

2011-05-14 Thread ilf
I find myself using this mouse thing for moving floating windows around. 
Is there any way to do this via keyboard?


I don't need to so this pixel by pixel, but rather from corner to 
corner.


--
ilf

Über 80 Millionen Deutsche benutzen keine Konsole. Klick dich nicht weg!
-- Eine Initiative des Bundesamtes für Tastaturbenutzung


signature.asc
Description: Digital signature


Re: [dev] dwm xsetroot colorful fonts howto?

2011-05-14 Thread Le Tian
On Sat, May 14, 2011 at 6:45 AM, Anders Andersson wrote:

> On Fri, May 13, 2011 at 11:11 PM, Bogdan Ionuț  wrote:
> > On Sat, May 14, 2011 at 00:01, Le Tian  wrote:
> >>
> >> I'm sorry, maybe its been discussed like a lot of times, but can anybody
> >> tell me how to color taskbar fonts in dwm? There is a patch
> >> (http://dwm.suckless.org/patches/statuscolors) but that I don't like, I
> need
> >> fonts to be colored not a colorful bg or fg in the taskbar, and maybe
> its
> >> possible to change the colors on-the-fly (when monitoring high CPU
> temps)?
> >> Maybe somebody has it implemented already.
> >>
> >> --
> >> Tian
>
> Why don't you set something up that throttles the CPU and eventually
> turns it off in case it gets too hot? What use is there to show the
> temperature on the status bar? Will the computer break if you're not
> there to turn it off in case it gets too hot?
>
> I just think things like this ruins the clean experience that dwm is.
>
>
cpu temp is not that useful, its agreeable, when hdd temp is very useful,
its crucial for laptop users like me to keep their hdd temperature under
proper control. If I was using a desktop pc, I wouldn't bother myself with
these tweaks, but as long as summer is coming, I think it come useful for my
laptop.

-- 
Tian