removed swapping

This commit is contained in:
Anselm R. Garbe 2006-05-19 17:38:45 +02:00
parent 5a261f68bb
commit fa43df527d
21 changed files with 79 additions and 333 deletions

View File

@ -43,12 +43,12 @@ install: all
chmod 755 ${DESTDIR}${PREFIX}/bin/`basename $$i`; \ chmod 755 ${DESTDIR}${PREFIX}/bin/`basename $$i`; \
done done
@echo installed executable files to ${DESTDIR}${PREFIX}/bin @echo installed executable files to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${CONFPREFIX}/wmii-3 @mkdir -p ${DESTDIR}${CONFPREFIX}/wmii-4
@cd rc; for i in *; do \ @cd rc; for i in *; do \
sed 's|CONFPREFIX|${CONFPREFIX}|g' <$$i >${DESTDIR}${CONFPREFIX}/wmii-3/$$i; \ sed 's|CONFPREFIX|${CONFPREFIX}|g' <$$i >${DESTDIR}${CONFPREFIX}/wmii-4/$$i; \
chmod 755 ${DESTDIR}${CONFPREFIX}/wmii-3/$$i; \ chmod 755 ${DESTDIR}${CONFPREFIX}/wmii-4/$$i; \
done done
@echo installed rc scripts to ${DESTDIR}${CONFPREFIX}/wmii-3 @echo installed rc scripts to ${DESTDIR}${CONFPREFIX}/wmii-4
@mkdir -p ${DESTDIR}${MANPREFIX}/man1 @mkdir -p ${DESTDIR}${MANPREFIX}/man1
@cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1 @cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1
@sed 's|CONFPREFIX|${CONFPREFIX}|g' <cmd/wm/wmii.1 >${DESTDIR}${MANPREFIX}/man1/wmii.1 @sed 's|CONFPREFIX|${CONFPREFIX}|g' <cmd/wm/wmii.1 >${DESTDIR}${MANPREFIX}/man1/wmii.1
@ -64,4 +64,4 @@ uninstall:
for i in ${MAN1}; do \ for i in ${MAN1}; do \
rm -f ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \ rm -f ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \
done done
rm -rf ${DESTDIR}${CONFPREFIX}/wmii-3 rm -rf ${DESTDIR}${CONFPREFIX}/wmii-4

4
README
View File

@ -41,8 +41,8 @@ Configuration
------------- -------------
The configuration of wmii is done by customizing the sh script wmiirc, The configuration of wmii is done by customizing the sh script wmiirc,
which remotely controls the window manager and handles various events. which remotely controls the window manager and handles various events.
Copy the file from PREFIX/etc/wmii-3/ (usually /usr/local/etc/wmii-3/) Copy the file from PREFIX/etc/wmii-4/ (usually /usr/local/etc/wmii-4/)
to $HOME/.wmii-3/ and edit it to fit your needs. to $HOME/.wmii-4/ and edit it to fit your needs.
Credits Credits

View File

@ -2,7 +2,6 @@ Ordered list of TODOs:
- introduce empty views - introduce empty views
- apply the focuscolor patch by Stefan Tibus - apply the focuscolor patch by Stefan Tibus
- remove swapping action, merge vertical swapping into moving - is this a good idea?
- UTF8 fixes with iconv? - UTF8 fixes with iconv?
- move /<view> to /tags/<name|sel>/ - move /<view> to /tags/<name|sel>/
- add /tags/sel/index (for column reverse-addressing) - add /tags/sel/index (for column reverse-addressing)

View File

@ -113,7 +113,6 @@ update_client_grab(Client *c, Bool is_sel)
if(is_sel) { if(is_sel) {
ungrab_mouse(c->framewin, AnyModifier, AnyButton); ungrab_mouse(c->framewin, AnyModifier, AnyButton);
grab_mouse(c->framewin, def.mod, Button1); grab_mouse(c->framewin, def.mod, Button1);
grab_mouse(c->framewin, def.mod, Button2);
grab_mouse(c->framewin, def.mod, Button3); grab_mouse(c->framewin, def.mod, Button3);
} }
else else
@ -569,63 +568,6 @@ select_client(Client *c, char *arg)
flush_masked_events(EnterWindowMask); flush_masked_events(EnterWindowMask);
} }
void
swap_client(Client *c, char *arg)
{
Frame *f1 = c->frame.data[c->sel], *f2;
Area *o, *a = f1->area;
View *v = a->view;
int i = idx_of_area(a), j = idx_of_frame(f1);
if(i == -1 || j == -1)
return;
if(!strncmp(arg, "prev", 5) && i) {
if(i <= 1)
return;
else
o = v->area.data[i - 1];
goto Swaparea;
}
else if(!strncmp(arg, "next", 5) && i) {
if(i + 1 < v->area.size)
o = v->area.data[i + 1];
else
return;
Swaparea:
if(o == a)
return;
f2 = o->frame.data[o->sel];
f1->client = f2->client;
f2->client = c;
f1->client->frame.data[f1->client->sel] = f1;
f2->client->frame.data[f2->client->sel] = f2;
arrange_column(o, False);
}
else if(!strncmp(arg, "up", 3) && i) {
if(j)
i = j - 1;
else
return;
a->frame.data[j] = a->frame.data[i];
a->frame.data[i] = f1;
}
else if(!strncmp(arg, "down", 5) && i) {
if(j + 1 < a->frame.size)
i = j + 1;
else
return;
a->frame.data[j] = a->frame.data[i];
a->frame.data[i] = f1;
}
if(idx_of_area(a))
arrange_column(a, False);
focus_client(c, True);
flush_masked_events(EnterWindowMask);
}
void void
send_client_to(Client *c, char *arg) send_client_to(Client *c, char *arg)
{ {
@ -633,12 +575,12 @@ send_client_to(Client *c, char *arg)
Frame *f = c->frame.data[c->sel]; Frame *f = c->frame.data[c->sel];
Area *to, *a = f->area; Area *to, *a = f->area;
View *v = a->view; View *v = a->view;
int i = idx_of_area(a); int i = idx_of_area(a), j = idx_of_frame(f);
if(i == -1) if((i == -1) || (j == -1))
return; return;
if(!strncmp(arg, "prev", 5) && i) { if(i && !strncmp(arg, "prev", 5)) {
if(i > 1) if(i > 1)
to = v->area.data[i - 1]; to = v->area.data[i - 1];
else if(a->frame.size > 1) { else if(a->frame.size > 1) {
@ -647,8 +589,9 @@ send_client_to(Client *c, char *arg)
} }
else else
return; return;
send_to_area(to, a, c);
} }
else if(!strncmp(arg, "next", 5) && i) { else if(i && !strncmp(arg, "next", 5)) {
if(i < v->area.size - 1) if(i < v->area.size - 1)
to = v->area.data[i + 1]; to = v->area.data[i + 1];
else if(a->frame.size > 1) { else if(a->frame.size > 1) {
@ -657,6 +600,7 @@ send_client_to(Client *c, char *arg)
} }
else else
return; return;
send_to_area(to, a, c);
} }
else if(!strncmp(arg, "toggle", 7)) { else if(!strncmp(arg, "toggle", 7)) {
if(i) if(i)
@ -665,14 +609,37 @@ send_client_to(Client *c, char *arg)
to = c->revert; to = c->revert;
else else
to = v->area.data[1]; to = v->area.data[1];
send_to_area(to, a, c);
} }
else { else if(i && !strncmp(arg, "up", 3)) {
i = cext_strtonum(arg, 0, v->area.size - 1, &errstr); if(j)
i = j - 1;
else
return;
a->frame.data[j] = a->frame.data[i];
a->frame.data[i] = f;
arrange_column(a, False);
focus_client(c, True);
}
else if(i && !strncmp(arg, "down", 5)) {
if(j + 1 < a->frame.size)
i = j + 1;
else
return;
a->frame.data[j] = a->frame.data[i];
a->frame.data[i] = f;
arrange_column(a, False);
focus_client(c, True);
}
else if(i) {
j = cext_strtonum(arg, 0, v->area.size - 1, &errstr);
if(errstr) if(errstr)
return; return;
to = v->area.data[i]; to = v->area.data[j];
}
send_to_area(to, a, c); send_to_area(to, a, c);
}
else
return;
flush_masked_events(EnterWindowMask); flush_masked_events(EnterWindowMask);
} }

View File

@ -413,27 +413,6 @@ drop_move(Frame *f, XRectangle *new, XPoint *pt)
} }
} }
void
drop_swap(Client *c, XPoint *pt)
{
Frame *f1 = c->frame.data[c->sel], *f2 = frame_of_point(pt);
if(!f2 || f1 == f2 || !idx_of_area(f1->area))
return;
f1->client = f2->client;
f2->client = c;
f1->client->frame.data[f1->client->sel] = f1;
f2->client->frame.data[f2->client->sel] = f2;
arrange_column(f1->area, False);
if(f1->area != f2->area)
arrange_column(f2->area, False);
focus_client(c, True);
flush_masked_events(EnterWindowMask);
}
void void
resize_column(Client *c, XRectangle *r, XPoint *pt) resize_column(Client *c, XRectangle *r, XPoint *pt)
{ {

View File

@ -100,11 +100,7 @@ handle_buttonpress(XEvent *e)
focus(c, True); focus(c, True);
switch(ev->button) { switch(ev->button) {
case Button1: case Button1:
do_mouse_move(c, False); do_mouse_move(c);
break;
case Button2:
if(idx_of_area(c->frame.data[c->sel]->area))
do_mouse_move(c, True);
break; break;
case Button3: case Button3:
{ {
@ -112,7 +108,7 @@ handle_buttonpress(XEvent *e)
if(align != CENTER) if(align != CENTER)
do_mouse_resize(c, align); do_mouse_resize(c, align);
else else
do_mouse_move(c, False); do_mouse_move(c);
} }
default: default:
break; break;

View File

@ -1347,8 +1347,6 @@ xwrite(IXPConn *c, Fcall *fcall)
kill_client(f->client); kill_client(f->client);
else if(!strncmp(buf, "sendto ", 7)) else if(!strncmp(buf, "sendto ", 7))
send_client_to(f->client, &buf[7]); send_client_to(f->client, &buf[7]);
else if(!strncmp(buf, "swap ", 5))
swap_client(f->client, &buf[5]);
break; break;
case FsDGclient: case FsDGclient:
if(!strncmp(buf, "kill", 5)) if(!strncmp(buf, "kill", 5))

View File

@ -178,7 +178,7 @@ draw_pseudo_border(XRectangle * r)
} }
void void
do_mouse_move(Client *c, Bool swap) do_mouse_move(Client *c)
{ {
int px = 0, py = 0, wex, wey, ex, ey, i; int px = 0, py = 0, wex, wey, ex, ey, i;
Window dummy; Window dummy;
@ -209,12 +209,8 @@ do_mouse_move(Client *c, Bool swap)
switch (ev.type) { switch (ev.type) {
case ButtonRelease: case ButtonRelease:
draw_pseudo_border(&frect); draw_pseudo_border(&frect);
if(idx_of_area(f->area)) { if(idx_of_area(f->area))
if(swap)
drop_swap(c, &pt);
else
resize_column(c, &frect, &pt); resize_column(c, &frect, &pt);
}
else else
resize_client(c, &frect, False); resize_client(c, &frect, False);
free(rects); free(rects);

View File

@ -237,7 +237,6 @@ void resize_client(Client *c, XRectangle *r, Bool ignore_xcall);
void select_client(Client *c, char *arg); void select_client(Client *c, char *arg);
void send_client_to(Client *c, char *arg); void send_client_to(Client *c, char *arg);
void resize_all_clients(); void resize_all_clients();
void swap_client(Client *c, char *arg);
Client *sel_client(); Client *sel_client();
int idx_of_client_id(unsigned short id); int idx_of_client_id(unsigned short id);
Client *client_of_win(Window w); Client *client_of_win(Window w);
@ -252,7 +251,6 @@ int column_mode_of_str(char *arg);
char *str_of_column_mode(int mode); char *str_of_column_mode(int mode);
Area *new_left_column(View *v); Area *new_left_column(View *v);
Area *new_right_column(View *v); Area *new_right_column(View *v);
void drop_swap(Client *c, XPoint *pt);
/* event.c */ /* event.c */
void init_x_event_handler(); void init_x_event_handler();
@ -283,7 +281,7 @@ unsigned long mod_key_of_str(char *val);
/* mouse.c */ /* mouse.c */
void do_mouse_resize(Client *c,BlitzAlign align); void do_mouse_resize(Client *c,BlitzAlign align);
void do_mouse_move(Client *c, Bool swap); void do_mouse_move(Client *c);
void grab_mouse(Window w, unsigned long mod, unsigned int button); void grab_mouse(Window w, unsigned long mod, unsigned int button);
void ungrab_mouse(Window w, unsigned long mod, unsigned int button); void ungrab_mouse(Window w, unsigned long mod, unsigned int button);

View File

@ -3,12 +3,12 @@
wmiiwm -c || exit 1 wmiiwm -c || exit 1
PATH=$PATH:$HOME/.wmii-3:CONFPREFIX/wmii-3 export PATH PATH=$PATH:$HOME/.wmii-4:CONFPREFIX/wmii-4 export PATH
WMII_ADDRESS=unix!/tmp/ns.$USER.$DISPLAY/wmii export WMII_ADDRESS WMII_ADDRESS=unix!/tmp/ns.$USER.$DISPLAY/wmii export WMII_ADDRESS
mkdir -m 700 /tmp/ns.$USER.$DISPLAY 2>/dev/null mkdir -m 700 /tmp/ns.$USER.$DISPLAY 2>/dev/null
wmiiwm -a $WMII_ADDRESS & wmiiwm -a $WMII_ADDRESS &
wmiiwmpid=$! wmiiwmpid=$!
mkdir $HOME/.wmii-3 2>/dev/null && welcome & mkdir $HOME/.wmii-4 2>/dev/null && welcome &
wmiirc & wmiirc &
wait $wmiiwmpid wait $wmiiwmpid

View File

@ -1,4 +1,4 @@
.TH WMII 1 wmii-3 .TH WMII 1 wmii-4
.SH NAME .SH NAME
wmii \- window manager improved 2 wmii \- window manager improved 2
.SH SYNOPSIS .SH SYNOPSIS
@ -15,7 +15,7 @@ An action is a shell script in the default setup, but it can actually be
any executable file. It is executed usually by selecting it from the any executable file. It is executed usually by selecting it from the
actions menu. actions menu.
You can customize an action by copying it from the global action You can customize an action by copying it from the global action
directory CONFPREFIX/wmii-3 to $HOME/.wmii-3 and then editing the copy to directory CONFPREFIX/wmii-4 to $HOME/.wmii-4 and then editing the copy to
fit your needs. Of course you can also create your own actions there; make fit your needs. Of course you can also create your own actions there; make
sure that they are executable. sure that they are executable.
.P .P
@ -45,10 +45,10 @@ bindings, the bar labels, etc.
/tmp/ns.$USER.$DISPLAY/wmii /tmp/ns.$USER.$DISPLAY/wmii
The wmii socket file which provides a 9P service. The wmii socket file which provides a 9P service.
.TP .TP
CONFPREFIX/wmii-3 CONFPREFIX/wmii-4
Global action directory. Global action directory.
.TP .TP
$HOME/.wmii-3 $HOME/.wmii-4
User-specific action directory. Actions are first searched here. User-specific action directory. Actions are first searched here.
.SH ENVIRONMENT .SH ENVIRONMENT
.TP .TP

View File

@ -1,4 +1,4 @@
.TH WMIIWM 1 wmii-3 .TH WMIIWM 1 wmii-4
.SH NAME .SH NAME
wmiiwm \- window manager improved 2 (core) wmiiwm \- window manager improved 2 (core)
.SH SYNOPSIS .SH SYNOPSIS

View File

@ -1,4 +1,4 @@
.TH WMIIMENU 1 wmii-3 .TH WMIIMENU 1 wmii-4
.SH NAME .SH NAME
wmiimenu \- window manager improved 2 menu wmiimenu \- window manager improved 2 menu
.SH SYNOPSIS .SH SYNOPSIS

View File

@ -1,4 +1,4 @@
.TH WMIIR 1 wmii-3 .TH WMIIR 1 wmii-4
.SH NAME .SH NAME
wmiir \- window manager improved 2 remote wmiir \- window manager improved 2 remote
.SH SYNOPSIS .SH SYNOPSIS

View File

@ -5,6 +5,7 @@
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
static char version[] = "wmiisetsid - " VERSION ", (C)opyright MMVI Anselm R. Garbe\n"; static char version[] = "wmiisetsid - " VERSION ", (C)opyright MMVI Anselm R. Garbe\n";

View File

@ -1,7 +1,7 @@
%TODO: please mention the /def/rules mechanism! %TODO: please mention the /def/rules mechanism!
%guide to wmii-3 %guide to wmii-4
%Copyright (C) 2005, 2006 by Steffen Liebergeld, Salva Peir\'o %Copyright (C) 2005, 2006 by Steffen Liebergeld, Salva Peir\'o
%This program is free software; you can redistribute it and/or %This program is free software; you can redistribute it and/or
@ -25,7 +25,7 @@
\usepackage{hyperref} % option [dvipdfm] disables clickable refs \usepackage{hyperref} % option [dvipdfm] disables clickable refs
\hypersetup{pdftex, colorlinks=true, linkcolor=blue, filecolor=blue, \hypersetup{pdftex, colorlinks=true, linkcolor=blue, filecolor=blue,
pagecolor=blue, urlcolor=blue, pdfauthor={Steffen Liebergeld, Salva Pei\'ro}, pagecolor=blue, urlcolor=blue, pdfauthor={Steffen Liebergeld, Salva Pei\'ro},
pdftitle={A Guide to wmii-3}} pdftitle={A Guide to wmii-4}}
\usepackage{indentfirst,moreverb} \usepackage{indentfirst,moreverb}
% remove this if you want, it's just a matter of imposed imperialist cultures % remove this if you want, it's just a matter of imposed imperialist cultures
% so if I'm given the chance to choose I choose to indent the first paragraph % so if I'm given the chance to choose I choose to indent the first paragraph
@ -53,7 +53,7 @@ Steffen\\Liebergeld \\\\
Salvador\\Peir\'o Salvador\\Peir\'o
} }
\title{A Guide to wmii-3% \title{A Guide to wmii-4%
\thanks{Thanks to the wmii community, in particular all the \thanks{Thanks to the wmii community, in particular all the
people mentioned at \href{http://wmii.de/index.php/WMII/People}{WMII/people}.} people mentioned at \href{http://wmii.de/index.php/WMII/People}{WMII/people}.}
} }
@ -72,14 +72,14 @@ people mentioned at \href{http://wmii.de/index.php/WMII/People}{WMII/people}.}
\subsection{The purpose of this document} \subsection{The purpose of this document}
This document tries to be a good starting point for people new to This document tries to be a good starting point for people new to
\wmii-3. People who have used wmi, \wmii-2.5 or even ion will get \wmii-4. People who have used wmi, \wmii-2.5 or even ion will get
to know what is new and different in \wmii-3, and people who have to know what is new and different in \wmii-4, and people who have
never used a tiling window manager before will fall in love with never used a tiling window manager before will fall in love with
the new concept. the new concept.
\subsection{wmii---the second generation of window manager improved} \subsection{wmii---the second generation of window manager improved}
\wmii-3 is a new kind of window manager. It is designed to have a \wmii-4 is a new kind of window manager. It is designed to have a
small memory footprint, be extremely modularised and have as small memory footprint, be extremely modularised and have as
little code as possible, thus ensuring as few bugs as possible. In little code as possible, thus ensuring as few bugs as possible. In
fact, one of our official goals is to not exceed $10 k$ lines of fact, one of our official goals is to not exceed $10 k$ lines of
@ -90,7 +90,7 @@ people mentioned at \href{http://wmii.de/index.php/WMII/People}{WMII/people}.}
\wmii{} tries to be very portable and to give the user as much \wmii{} tries to be very portable and to give the user as much
freedom as possible. freedom as possible.
\wmii-3 is the third major release of the second generation of the \wmii-4 is the third major release of the second generation of the
window manager improved~\footnote{ the ii is actually the roman window manager improved~\footnote{ the ii is actually the roman
numeral for 2.}. \wmii{} first introduced a new paradigm in version numeral for 2.}. \wmii{} first introduced a new paradigm in version
2.5, namely dynamic window management, that overcomes the 2.5, namely dynamic window management, that overcomes the
@ -103,15 +103,15 @@ people mentioned at \href{http://wmii.de/index.php/WMII/People}{WMII/people}.}
the basic terminology and concepts like files and editors. the basic terminology and concepts like files and editors.
I hope you are open minded towards new ideas, and willing to spend some I hope you are open minded towards new ideas, and willing to spend some
time learning \wmii-3~\footnote{remember the refrain: ``nobody time learning \wmii-4~\footnote{remember the refrain: ``nobody
can teach you what you don't want to know''.}. can teach you what you don't want to know''.}.
If you only want to know how to operate \wmii-3 and are not If you only want to know how to operate \wmii-4 and are not
interested in the inner workings or in scripting, you may read interested in the inner workings or in scripting, you may read
sections \ref{sec:conf&install}, \ref{sec:terms} and subsection sections \ref{sec:conf&install}, \ref{sec:terms} and subsection
\ref{subsec:firststeps} and skip the rest. \ref{subsec:firststeps} and skip the rest.
However, to get the most out of \wmii-3 you should probably read However, to get the most out of \wmii-4 you should probably read
the whole document ``sequentially'', i.e. from beginning to end. the whole document ``sequentially'', i.e. from beginning to end.
Another possibility is to read/consume the guide ``on demand'' as Another possibility is to read/consume the guide ``on demand'' as
you notice you need more information or details to understand you notice you need more information or details to understand
@ -157,8 +157,8 @@ people mentioned at \href{http://wmii.de/index.php/WMII/People}{WMII/people}.}
\item Unpack it: \item Unpack it:
\begin{verbatim} \begin{verbatim}
tar xzf wmii-3.tar.gz tar xzf wmii-4.tar.gz
cd wmii-3 cd wmii-4
\end{verbatim} \end{verbatim}
\item Edit the configuration: \item Edit the configuration:
@ -167,7 +167,7 @@ people mentioned at \href{http://wmii.de/index.php/WMII/People}{WMII/people}.}
\end{verbatim} \end{verbatim}
The most important variable to set is the \verb+PREFIX+, which The most important variable to set is the \verb+PREFIX+, which
states, where you want \wmii-3 to be installed to. If you are unsure, keep the states, where you want \wmii-4 to be installed to. If you are unsure, keep the
default, it won't break your system. default, it won't break your system.
\item Run make and make install: \item Run make and make install:
@ -594,17 +594,17 @@ people mentioned at \href{http://wmii.de/index.php/WMII/People}{WMII/people}.}
your local or in the default \wmii{} configuration your local or in the default \wmii{} configuration
directory~\footnote{ \texttt{\$CONFPREFIX} is set in directory~\footnote{ \texttt{\$CONFPREFIX} is set in
\emph{config.mk} which points to \texttt{/usr/local/etc} \emph{config.mk} which points to \texttt{/usr/local/etc}
or \texttt{\$HOME/.wmii-3} by default}. or \texttt{\$HOME/.wmii-4} by default}.
Through pressing \emph{MOD-a} you can open the actions menu. It works Through pressing \emph{MOD-a} you can open the actions menu. It works
similar to the program menu, but only displays actions. similar to the program menu, but only displays actions.
You might want to add your own actions through writing shell scripts in the You might want to add your own actions through writing shell scripts in the
default \wmii{} configuration directory or in the \texttt{\$HOME/.wmii-3}. default \wmii{} configuration directory or in the \texttt{\$HOME/.wmii-4}.
This works, because in the \wmii{} controlling script exports the variable This works, because in the \wmii{} controlling script exports the variable
\verb+$PATH+ as\\ \verb+$PATH=~/.wmii-3:$CONFPREFIX/wmii:$PATH+ before \verb+$PATH+ as\\ \verb+$PATH=~/.wmii-4:$CONFPREFIX/wmii:$PATH+ before
launching the wmiiwm, this way local user actions under launching the wmiiwm, this way local user actions under
\verb+~/.wmii-3+ take precedence over the defaults from \verb+~/.wmii-4+ take precedence over the defaults from
\verb+$CONFPREFIX/wmii+ of the default actions. \verb+$CONFPREFIX/wmii+ of the default actions.
You may edit this file on the fly, which means you don't need to You may edit this file on the fly, which means you don't need to
@ -634,7 +634,7 @@ people mentioned at \href{http://wmii.de/index.php/WMII/People}{WMII/people}.}
\subsection{Changing the style} \subsection{Changing the style}
The style of \wmii-3 is defined through font and colour values, which are The style of \wmii-4 is defined through font and colour values, which are
unobtrusively exported with the following \emph{environment variables}. unobtrusively exported with the following \emph{environment variables}.
\begin{verbatim} \begin{verbatim}
@ -749,7 +749,7 @@ people mentioned at \href{http://wmii.de/index.php/WMII/People}{WMII/people}.}
echo -n view web | wmiir write /ctl echo -n view web | wmiir write /ctl
\end{verbatim} \end{verbatim}
As the development of \wmii-3 progressed, it became clear that this As the development of \wmii-4 progressed, it became clear that this
action is so common, that it got its own keybinding. By default action is so common, that it got its own keybinding. By default
\emph{MOD-t} brings up a menu to choose a view and \emph{MOD-t} brings up a menu to choose a view and
\emph{MOD-Shift-t} brings up a menu enabling you to assign new \emph{MOD-Shift-t} brings up a menu enabling you to assign new
@ -985,7 +985,7 @@ people mentioned at \href{http://wmii.de/index.php/WMII/People}{WMII/people}.}
\section{Copyright notice} \section{Copyright notice}
guide to wmii-3\\ guide to wmii-4\\
Copyright (C) 2005, 2006 by Steffen Liebergeld, Salva Peir\'o Copyright (C) 2005, 2006 by Steffen Liebergeld, Salva Peir\'o
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify

View File

@ -1,15 +0,0 @@
#!/usr/local/plan9/bin/rc
# clean the environment and execute the given command
path=$OLD_PATH
old_path=()
apid=()
cmd=()
home=()
ifs=()
pid=()
prompt=()
rcname=()
status=()
exec $*

View File

@ -1,2 +0,0 @@
#!/usr/local/plan9/bin/rc
echo -n quit | wmiir write /ctl

View File

@ -1,10 +0,0 @@
#!/usr/local/plan9/bin/rc
# periodically print date and load average to the bar
wmiir remove /bar/status 2>/dev/null && sleep 2
wmiir create /bar/status
xwrite /bar/status/colors $WMII_NORMCOLORS
while(text=`{date | sed 's/GMT .*//'} xwrite /bar/status/data $"text){
sleep 1
}

View File

@ -1,149 +0,0 @@
#!/usr/local/plan9/bin/rc
# configure wmii
fn xwrite {a=$1; shift; echo -n $* | wmiir write $a}
fn proglist {ls -lpL $* | awk '!/^d/ && $1 ~ /x/ {print $NF}'| sort -u}
MODKEY=Mod1
UP=k
DOWN=j
LEFT=h
RIGHT=l
WMII_FONT='fixed'
WMII_SELCOLORS='#ffffff #285577 #4c7899'
WMII_NORMCOLORS='#222222 #eeeeee #666666'
# dark background
#WMII_NORMCOLORS='#e0e0e0 #0a0a0a #202020'
# WM CONFIGURATION
xwrite /def/border 2
xwrite /def/font $WMII_FONT
xwrite /def/selcolors $WMII_SELCOLORS
xwrite /def/normcolors $WMII_NORMCOLORS
# TAGGING RULES
wmiir write /def/rules <<END
/XMMS.*/ -> ~
/Gimp.*/ -> ~
/MPlayer.*/ -> ~
/.*/ -> !
/.*/ -> 1
END
# MISC
xsetroot -solid '#333333'
status &
PROGS_FILE=/tmp/.wmiimenu.$USER.progs
proglist `{echo $PATH | tr : ' '} >$PROGS_FILE &
# SHORTCUTS
xwrite /def/grabmod $MODKEY
wmiir write /def/keys <<END
$MODKEY-$LEFT
$MODKEY-$RIGHT
$MODKEY-$DOWN
$MODKEY-$UP
$MODKEY-space
$MODKEY-d
$MODKEY-f
$MODKEY-s
$MODKEY-m
$MODKEY-a
$MODKEY-p
$MODKEY-t
$MODKEY-0
$MODKEY-1
$MODKEY-2
$MODKEY-3
$MODKEY-4
$MODKEY-5
$MODKEY-6
$MODKEY-7
$MODKEY-8
$MODKEY-9
$MODKEY-Return
$MODKEY-Shift-$LEFT
$MODKEY-Shift-$RIGHT
$MODKEY-Shift-space
$MODKEY-Shift-c
$MODKEY-Shift-t
$MODKEY-Shift-0
$MODKEY-Shift-1
$MODKEY-Shift-2
$MODKEY-Shift-3
$MODKEY-Shift-4
$MODKEY-Shift-5
$MODKEY-Shift-6
$MODKEY-Shift-7
$MODKEY-Shift-8
$MODKEY-Shift-9
$MODKEY-Control-$LEFT
$MODKEY-Control-$RIGHT
$MODKEY-Control-$DOWN
$MODKEY-Control-$UP
END
# EVENT LOOP
wmiir read /event |
while(e=`{read}) {
switch($e(1)) {
case Start
if(~ $e(2) wmiirc)
exit
case BarClick
xwrite /ctl view $e(2)
case Key
switch($e(2)) {
case $MODKEY-$LEFT
xwrite /view/ctl select prev
case $MODKEY-$RIGHT
xwrite /view/ctl select next
case $MODKEY-$DOWN
xwrite /view/sel/ctl select next
case $MODKEY-$UP
xwrite /view/sel/ctl select prev
case $MODKEY-space
xwrite /view/ctl select toggle
case $MODKEY-d
xwrite /view/sel/mode default
case $MODKEY-s
xwrite /view/sel/mode stack
case $MODKEY-m
xwrite /view/sel/mode max
case $MODKEY-f
xwrite /view/0/sel/geom 0 0 east south
case $MODKEY-a
PATH=$HOME/.wmii-3:CONFPREFIX/wmii-3:$PATH `{proglist CONFPREFIX/wmii-3 $HOME/.wmii-3 | wmiimenu} &
case $MODKEY-p
`{wmiimenu <$PROGS_FILE}&
case $MODKEY-t
xwrite /ctl view `{wmiir read /tags | wmiimenu} &
case $MODKEY-[0-9]
xwrite /ctl view `{echo $e(2) | sed 's/.*-//'}
case $MODKEY-Return
xterm &
case $MODKEY-Shift-$LEFT
xwrite /view/sel/sel/ctl sendto prev
case $MODKEY-Shift-$RIGHT
xwrite /view/sel/sel/ctl sendto next
case $MODKEY-Shift-space
xwrite /view/sel/sel/ctl sendto toggle
case $MODKEY-Shift-c
xwrite /view/sel/sel/ctl kill
case $MODKEY-Shift-t
xwrite /view/sel/sel/tags `{wmiir read /tags | wmiimenu} &
case $MODKEY-Shift-[0-9]
xwrite /view/sel/sel/tags `{echo $e(2) | sed 's/.*-//'}
case $MODKEY-Control-$LEFT
xwrite /view/sel/sel/ctl swap prev
case $MODKEY-Control-$RIGHT
xwrite /view/sel/sel/ctl swap next
case $MODKEY-Control-$DOWN
xwrite /view/sel/sel/ctl swap down
case $MODKEY-Control-$UP
xwrite /view/sel/sel/ctl swap up
}
}
} &

View File

@ -97,10 +97,6 @@ $MODKEY-Shift-6
$MODKEY-Shift-7 $MODKEY-Shift-7
$MODKEY-Shift-8 $MODKEY-Shift-8
$MODKEY-Shift-9 $MODKEY-Shift-9
$MODKEY-Control-$LEFT
$MODKEY-Control-$RIGHT
$MODKEY-Control-$DOWN
$MODKEY-Control-$UP
EOF EOF
# EVENT LOOP # EVENT LOOP
@ -138,7 +134,7 @@ do
$MODKEY-f) $MODKEY-f)
xwrite /view/0/sel/geom 0 0 east south;; xwrite /view/0/sel/geom 0 0 east south;;
$MODKEY-a) $MODKEY-a)
PATH=$HOME/.wmii-3:CONFPREFIX/wmii-3:$PATH `proglist CONFPREFIX/wmii-3 $HOME/.wmii-3 | wmiimenu` &;; PATH=$HOME/.wmii-4:CONFPREFIX/wmii-4:$PATH `proglist CONFPREFIX/wmii-4 $HOME/.wmii-4 | wmiimenu` &;;
$MODKEY-p) $MODKEY-p)
wmiisetsid `wmiimenu <$PROGS_FILE` &;; wmiisetsid `wmiimenu <$PROGS_FILE` &;;
$MODKEY-t) $MODKEY-t)
@ -152,9 +148,9 @@ do
$MODKEY-Shift-$RIGHT) $MODKEY-Shift-$RIGHT)
xwrite /view/sel/sel/ctl sendto next;; xwrite /view/sel/sel/ctl sendto next;;
$MODKEY-Shift-$DOWN) $MODKEY-Shift-$DOWN)
xwrite /view/sel/sel/ctl swap down;; xwrite /view/sel/sel/ctl sendto down;;
$MODKEY-Shift-$UP) $MODKEY-Shift-$UP)
xwrite /view/sel/sel/ctl swap up;; xwrite /view/sel/sel/ctl sendto up;;
$MODKEY-Shift-space) $MODKEY-Shift-space)
xwrite /view/sel/sel/ctl sendto toggle;; xwrite /view/sel/sel/ctl sendto toggle;;
$MODKEY-Shift-c) $MODKEY-Shift-c)
@ -163,14 +159,6 @@ do
xwrite /view/sel/sel/tags ''"`wmiir read /tags | wmiimenu`"'' &;; xwrite /view/sel/sel/tags ''"`wmiir read /tags | wmiimenu`"'' &;;
$MODKEY-Shift-[0-9]) $MODKEY-Shift-[0-9])
xwrite /view/sel/sel/tags `echo $1 | sed 's/.*-//'`;; xwrite /view/sel/sel/tags `echo $1 | sed 's/.*-//'`;;
$MODKEY-Control-$LEFT)
xwrite /view/sel/sel/ctl swap prev;;
$MODKEY-Control-$RIGHT)
xwrite /view/sel/sel/ctl swap next;;
$MODKEY-Control-$DOWN)
xwrite /view/sel/sel/ctl swap down;;
$MODKEY-Control-$UP)
xwrite /view/sel/sel/ctl swap up;;
esac;; esac;;
esac esac
done & done &