made barclick to select the specific tag
This commit is contained in:
parent
9cd686c93a
commit
6458d72572
6 changed files with 36 additions and 4 deletions
14
bar.c
14
bar.c
|
@ -5,6 +5,20 @@
|
|||
|
||||
#include "dwm.h"
|
||||
|
||||
void
|
||||
barclick(XButtonPressedEvent *e)
|
||||
{
|
||||
int x = 0;
|
||||
Arg a;
|
||||
for(a.i = 0; a.i < TLast; a.i++) {
|
||||
x += textw(tags[a.i]) + dc.font.height;
|
||||
if(e->x < x) {
|
||||
view(&a);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
draw_bar()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue