Rename "dwm" to "PolytreeWM"
This commit is contained in:
parent
77616c75b2
commit
df6d5c8598
10 changed files with 114 additions and 112 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,4 +1,4 @@
|
|||
*.o
|
||||
|
||||
/dwm
|
||||
/dwm-*.tar.gz
|
||||
/polytreewm
|
||||
/polytreewm-*.tar.gz
|
||||
|
|
46
Makefile
46
Makefile
|
@ -1,4 +1,4 @@
|
|||
# dwm - dynamic window manager
|
||||
# PolytreeWM - tiling window manager
|
||||
# See LICENSE file for copyright and license details.
|
||||
|
||||
include config.mk
|
||||
|
@ -6,10 +6,10 @@ include config.mk
|
|||
SRC = atoms.c drw.c dwm.c settings.c tags.c util.c
|
||||
OBJ = ${SRC:.c=.o}
|
||||
|
||||
all: options dwm
|
||||
all: options polytreewm
|
||||
|
||||
options:
|
||||
@echo dwm build options:
|
||||
@echo PolytreeWM build options:
|
||||
@echo "CFLAGS = ${CFLAGS}"
|
||||
@echo "LDFLAGS = ${LDFLAGS}"
|
||||
@echo "CC = ${CC}"
|
||||
|
@ -19,43 +19,43 @@ options:
|
|||
|
||||
${OBJ}: atoms.h drw.h config.def.h config.mk settings.h tags.h util.h
|
||||
|
||||
dwm: ${OBJ}
|
||||
polytreewm: ${OBJ}
|
||||
${CC} -o $@ ${OBJ} ${LDFLAGS}
|
||||
|
||||
clean:
|
||||
rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
|
||||
rm -f polytreewm ${OBJ} polytreewm-${VERSION}.tar.gz
|
||||
|
||||
dist: clean
|
||||
mkdir -p dwm-${VERSION}
|
||||
cp -R LICENSE Makefile README config.def.h config.mk \
|
||||
dwm.1 drw.h util.h ${SRC} dwm.png dwm-${VERSION}
|
||||
tar -cf dwm-${VERSION}.tar dwm-${VERSION}
|
||||
gzip dwm-${VERSION}.tar
|
||||
rm -rf dwm-${VERSION}
|
||||
mkdir -p polytreewm-${VERSION}
|
||||
cp -R LICENSE Makefile README.md config.def.h config.mk \
|
||||
polytreewm.1 drw.h util.h ${SRC} polytreewm.png polytreewm-${VERSION}
|
||||
tar -cf polytreewm-${VERSION}.tar polytreewm-${VERSION}
|
||||
gzip polytreewm-${VERSION}.tar
|
||||
rm -rf polytreewm-${VERSION}
|
||||
|
||||
install: all
|
||||
mkdir -p ${DESTDIR}${PREFIX}/bin
|
||||
cp -f dwm ${DESTDIR}${PREFIX}/bin
|
||||
chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
|
||||
cp -f polytreewm ${DESTDIR}${PREFIX}/bin
|
||||
chmod 755 ${DESTDIR}${PREFIX}/bin/polytreewm
|
||||
|
||||
mkdir -p ${DESTDIR}${MANPREFIX}/man1
|
||||
sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
|
||||
chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
|
||||
sed "s/VERSION/${VERSION}/g" < polytreewm.1 > ${DESTDIR}${MANPREFIX}/man1/polytreewm.1
|
||||
chmod 644 ${DESTDIR}${MANPREFIX}/man1/polytreewm.1
|
||||
|
||||
xinstall: install
|
||||
mkdir -p ${DESTDIR}${ICONSPREFIX}
|
||||
cp -f dwm.png ${DESTDIR}${ICONSPREFIX}
|
||||
chmod 644 ${DESTDIR}${ICONSPREFIX}/dwm.png
|
||||
cp -f polytreewm.png ${DESTDIR}${ICONSPREFIX}
|
||||
chmod 644 ${DESTDIR}${ICONSPREFIX}/polytreewm.png
|
||||
|
||||
mkdir -p ${DESTDIR}${XSESSIONSPREFIX}
|
||||
cp -f dwm.desktop ${DESTDIR}${XSESSIONSPREFIX}
|
||||
chmod 644 ${DESTDIR}${XSESSIONSPREFIX}/dwm.desktop
|
||||
cp -f polytreewm.desktop ${DESTDIR}${XSESSIONSPREFIX}
|
||||
chmod 644 ${DESTDIR}${XSESSIONSPREFIX}/polytreewm.desktop
|
||||
|
||||
uninstall:
|
||||
rm -f \
|
||||
${DESTDIR}${PREFIX}/bin/dwm \
|
||||
${DESTDIR}${MANPREFIX}/man1/dwm.1 \
|
||||
${DESTDIR}${ICONSPREFIX}/dwm.png \
|
||||
${DESTDIR}${XSESSIONSPREFIX}/dwm.desktop
|
||||
${DESTDIR}${PREFIX}/bin/polytreewm \
|
||||
${DESTDIR}${MANPREFIX}/man1/polytreewm.1 \
|
||||
${DESTDIR}${ICONSPREFIX}/polytreewm.png \
|
||||
${DESTDIR}${XSESSIONSPREFIX}/polytreewm.desktop
|
||||
|
||||
.PHONY: all options clean dist install uninstall
|
||||
|
|
48
README
48
README
|
@ -1,48 +0,0 @@
|
|||
dwm - dynamic window manager
|
||||
============================
|
||||
dwm is an extremely fast, small, and dynamic window manager for X.
|
||||
|
||||
|
||||
Requirements
|
||||
------------
|
||||
In order to build dwm you need the Xlib header files.
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
Edit config.mk to match your local setup (dwm is installed into
|
||||
the /usr/local namespace by default).
|
||||
|
||||
Afterwards enter the following command to build and install dwm (if
|
||||
necessary as root):
|
||||
|
||||
make clean install
|
||||
|
||||
|
||||
Running dwm
|
||||
-----------
|
||||
Add the following line to your .xinitrc to start dwm using startx:
|
||||
|
||||
exec dwm
|
||||
|
||||
In order to connect dwm to a specific display, make sure that
|
||||
the DISPLAY environment variable is set correctly, e.g.:
|
||||
|
||||
DISPLAY=foo.bar:1 exec dwm
|
||||
|
||||
(This will start dwm on display :1 of the host foo.bar.)
|
||||
|
||||
In order to display status info in the bar, you can do something
|
||||
like this in your .xinitrc:
|
||||
|
||||
while xsetroot -name "`date` `uptime | sed 's/.*,//'`"
|
||||
do
|
||||
sleep 1
|
||||
done &
|
||||
exec dwm
|
||||
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
The configuration of dwm is done by creating a custom config.h
|
||||
and (re)compiling the source code.
|
50
README.md
50
README.md
|
@ -1,3 +1,53 @@
|
|||
PolytreeWM - tiling window manager
|
||||
==================================
|
||||
|
||||
PolytreeWM is an extremely fast, small, and dynamic window manager for X.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
In order to build PolytreeWM you need the Xlib header files.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Edit config.mk to match your local setup (PolytreeWM is installed into the
|
||||
/usr/local namespace by default).
|
||||
|
||||
Afterwards enter the following command to build and install PolytreeWM (if
|
||||
necessary as root):
|
||||
|
||||
make clean install
|
||||
|
||||
Running
|
||||
-------
|
||||
|
||||
Add the following line to your .xinitrc to start PolytreeWM using startx:
|
||||
|
||||
exec polytreewm
|
||||
|
||||
In order to connect PolytreeWM to a specific display, make sure that the DISPLAY
|
||||
environment variable is set correctly, e.g.:
|
||||
|
||||
DISPLAY=foo.bar:1 exec polytreewm
|
||||
|
||||
(This will start PolytreeWM on display :1 of the host foo.bar.)
|
||||
|
||||
In order to display status info in the bar, you can do something
|
||||
like this in your .xinitrc:
|
||||
|
||||
while xsetroot -name "`date` `uptime | sed 's/.*,//'`"
|
||||
do
|
||||
sleep 1
|
||||
done &
|
||||
exec polytreewm
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
The configuration of PolytreeWM is done by creating a custom config.h and
|
||||
(re)compiling the source code.
|
||||
|
||||
Applied patches
|
||||
---------------
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# dwm version
|
||||
# PolytreeWM version
|
||||
VERSION = 6.2
|
||||
|
||||
# Customize below to fit your system
|
||||
|
|
40
dwm.c
40
dwm.c
|
@ -1,12 +1,12 @@
|
|||
/* See LICENSE file for copyright and license details.
|
||||
*
|
||||
* dynamic window manager is designed like any other X client as well. It is
|
||||
* driven through handling X events. In contrast to other X clients, a window
|
||||
* manager selects for SubstructureRedirectMask on the root window, to receive
|
||||
* events about window (dis-)appearance. Only one X connection at a time is
|
||||
* allowed to select for this event mask.
|
||||
* Polytree tiling window manager is designed like any other X client as well.
|
||||
* It is driven through handling X events. In contrast to other X clients, a
|
||||
* window manager selects for SubstructureRedirectMask on the root window, to
|
||||
* receive events about window (dis-)appearance. Only one X connection at a time
|
||||
* is allowed to select for this event mask.
|
||||
*
|
||||
* The event handlers of dwm are organized in an array which is accessed
|
||||
* The event handlers of PolytreeWM are organized in an array which is accessed
|
||||
* whenever a new event has been fetched. This allows event dispatching
|
||||
* in O(1) time.
|
||||
*
|
||||
|
@ -1481,13 +1481,13 @@ nametag(const Arg *arg) {
|
|||
|
||||
errno = 0; // popen(3p) says on failure it "may" set errno
|
||||
if(!(f = popen("dmenu < /dev/null", "r"))) {
|
||||
fprintf(stderr, "dwm: popen 'dmenu < /dev/null' failed%s%s\n", errno ? ": " : "", errno ? strerror(errno) : "");
|
||||
fprintf(stderr, "polytreewm: popen 'dmenu < /dev/null' failed%s%s\n", errno ? ": " : "", errno ? strerror(errno) : "");
|
||||
return;
|
||||
}
|
||||
if (!(p = fgets(name, TAGS_CUSTOM_NAME_SIZE, f)) && (i = errno) && ferror(f))
|
||||
fprintf(stderr, "dwm: fgets failed: %s\n", strerror(i));
|
||||
fprintf(stderr, "polytreewm: fgets failed: %s\n", strerror(i));
|
||||
if (pclose(f) < 0)
|
||||
fprintf(stderr, "dwm: pclose failed: %s\n", strerror(errno));
|
||||
fprintf(stderr, "polytreewm: pclose failed: %s\n", strerror(errno));
|
||||
if(!p)
|
||||
return;
|
||||
if((p = strchr(name, '\n')))
|
||||
|
@ -1994,7 +1994,7 @@ setup(void)
|
|||
updategeom();
|
||||
/* init atoms */
|
||||
atoms = atoms_create(dpy);
|
||||
if (atoms == NULL) die("dwm: fatal: cannot allocate atoms");
|
||||
if (atoms == NULL) die("polytreewm: fatal: cannot allocate atoms");
|
||||
/* init cursors */
|
||||
cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
|
||||
cursor[CurResize] = drw_cur_create(drw, XC_sizing);
|
||||
|
@ -2013,7 +2013,7 @@ setup(void)
|
|||
XChangeProperty(dpy, wmcheckwin, atoms->netatom[NetWMCheck], XA_WINDOW, 32,
|
||||
PropModeReplace, (unsigned char *) &wmcheckwin, 1);
|
||||
XChangeProperty(dpy, wmcheckwin, atoms->netatom[NetWMName], atoms->utf8string, 8,
|
||||
PropModeReplace, (unsigned char *) "dwm", 3);
|
||||
PropModeReplace, (unsigned char *) "polytreewm", 3);
|
||||
XChangeProperty(dpy, root, atoms->netatom[NetWMCheck], XA_WINDOW, 32,
|
||||
PropModeReplace, (unsigned char *) &wmcheckwin, 1);
|
||||
/* EWMH support per view */
|
||||
|
@ -2081,7 +2081,7 @@ spawn(const Arg *arg)
|
|||
close(ConnectionNumber(dpy));
|
||||
setsid();
|
||||
execvp(((char **)arg->v)[0], (char **)arg->v);
|
||||
fprintf(stderr, "dwm: execvp %s", ((char **)arg->v)[0]);
|
||||
fprintf(stderr, "polytreewm: execvp %s", ((char **)arg->v)[0]);
|
||||
perror(" failed");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
@ -2298,7 +2298,7 @@ updatebars(void)
|
|||
.background_pixmap = ParentRelative,
|
||||
.event_mask = ButtonPressMask|ExposureMask
|
||||
};
|
||||
XClassHint ch = {"dwm", "dwm"};
|
||||
XClassHint ch = {"polytreewm", "polytreewm"};
|
||||
for (m = mons; m; m = m->next) {
|
||||
if (m->barwin)
|
||||
continue;
|
||||
|
@ -2484,7 +2484,7 @@ void
|
|||
updatestatus(void)
|
||||
{
|
||||
if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext))) {
|
||||
strcpy(stext, "dwm-"VERSION);
|
||||
strcpy(stext, "polytreewm-"VERSION);
|
||||
}
|
||||
|
||||
for (Monitor *m = mons; m; m = m->next) {
|
||||
|
@ -2579,7 +2579,7 @@ updatesystray(void)
|
|||
XSync(dpy, False);
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "dwm: unable to obtain system tray.\n");
|
||||
fprintf(stderr, "polytreewm: unable to obtain system tray.\n");
|
||||
free(systray);
|
||||
systray = NULL;
|
||||
return;
|
||||
|
@ -2791,7 +2791,7 @@ xerror(Display *dpy, XErrorEvent *ee)
|
|||
|| (ee->request_code == X_GrabKey && ee->error_code == BadAccess)
|
||||
|| (ee->request_code == X_CopyArea && ee->error_code == BadDrawable))
|
||||
return 0;
|
||||
fprintf(stderr, "dwm: fatal error: request code=%d, error code=%d\n",
|
||||
fprintf(stderr, "polytreewm: fatal error: request code=%d, error code=%d\n",
|
||||
ee->request_code, ee->error_code);
|
||||
return xerrorxlib(dpy, ee); /* may call exit */
|
||||
}
|
||||
|
@ -2807,7 +2807,7 @@ xerrordummy(Display *dpy, XErrorEvent *ee)
|
|||
int
|
||||
xerrorstart(Display *dpy, XErrorEvent *ee)
|
||||
{
|
||||
die("dwm: another window manager is already running");
|
||||
die("polytreewm: another window manager is already running");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -2845,11 +2845,11 @@ int
|
|||
main(int argc, char *argv[])
|
||||
{
|
||||
if (argc == 2 && !strcmp("-v", argv[1])) {
|
||||
die("dwm-"VERSION);
|
||||
die("polytreewm-"VERSION);
|
||||
}
|
||||
|
||||
if (argc != 1) {
|
||||
die("usage: dwm [-v]");
|
||||
die("usage: polytreewm [-v]");
|
||||
}
|
||||
|
||||
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale()) {
|
||||
|
@ -2857,7 +2857,7 @@ main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
if (!(dpy = XOpenDisplay(NULL))) {
|
||||
die("dwm: cannot open display");
|
||||
die("polytreewm: cannot open display");
|
||||
}
|
||||
|
||||
checkotherwm();
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=dwm
|
||||
Comment=Dynamic Window Manager
|
||||
Exec=dwm
|
||||
Icon=dwm
|
||||
Type=XSession
|
|
@ -1,13 +1,13 @@
|
|||
.TH DWM 1 dwm\-VERSION
|
||||
.TH POLYTREEWM 1 polytreewm\-VERSION
|
||||
.SH NAME
|
||||
dwm \- dynamic window manager
|
||||
PolytreeWM \- Polytree tiling window manager
|
||||
.SH SYNOPSIS
|
||||
.B dwm
|
||||
.B polytreewm
|
||||
.RB [ \-v ]
|
||||
.SH DESCRIPTION
|
||||
dwm is a dynamic window manager for X. It manages windows in tiled, monocle
|
||||
and floating layouts. Either layout can be applied dynamically, optimising the
|
||||
environment for the application in use and the task performed.
|
||||
PolytreeWM is a tiling window manager for X. It manages windows in monocle,
|
||||
floating and tiled layouts. Either layout can be applied dynamically, optimising
|
||||
the environment for the application in use and the task performed.
|
||||
.P
|
||||
In tiled layouts windows are managed in a master and stacking area. The master
|
||||
area on the left contains one window by default, and the stacking area on the
|
||||
|
@ -29,7 +29,7 @@ color. The tags of the focused window are indicated with a filled square in the
|
|||
top left corner. The tags which are applied to one or more windows are
|
||||
indicated with an empty square in the top left corner.
|
||||
.P
|
||||
dwm draws a small border around windows to indicate the focus state.
|
||||
PolytreeWM draws a small border around windows to indicate the focus state.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-v
|
||||
|
@ -141,7 +141,7 @@ View all windows with any tag.
|
|||
Add/remove all windows with nth tag to/from the view.
|
||||
.TP
|
||||
.B Mod1\-Shift\-q
|
||||
Quit dwm.
|
||||
Quit PolytreeWM.
|
||||
.SS Mouse commands
|
||||
.TP
|
||||
.B Mod1\-Button1
|
||||
|
@ -153,8 +153,8 @@ Toggles focused window between floating and tiled state.
|
|||
.B Mod1\-Button3
|
||||
Resize focused window while dragging. Tiled windows will be toggled to the floating state.
|
||||
.SH CUSTOMIZATION
|
||||
dwm is customized by creating a custom config.h and (re)compiling the source
|
||||
code. This keeps it fast, secure and simple.
|
||||
PolytreeWM is customized by creating a custom config.h and (re)compiling the
|
||||
source code. This keeps it fast, secure and simple.
|
||||
.SH SEE ALSO
|
||||
.BR dmenu (1),
|
||||
.BR st (1)
|
||||
|
@ -173,4 +173,4 @@ or
|
|||
XToolkit/XAWT backend can recognize) or when using OpenJDK setting the environment variable
|
||||
.BR _JAVA_AWT_WM_NONREPARENTING=1 .
|
||||
.SH BUGS
|
||||
Send all bug reports with a patch to hackers@suckless.org.
|
||||
Send all bug reports with a patch to kotovalexarian@gmail.com.
|
7
polytreewm.desktop
Normal file
7
polytreewm.desktop
Normal file
|
@ -0,0 +1,7 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=PolytreeWM
|
||||
Comment=Polytree window manager
|
||||
Exec=polytreewm
|
||||
Icon=polytreewm
|
||||
Type=XSession
|
Before Width: | Height: | Size: 373 B After Width: | Height: | Size: 373 B |
Loading…
Reference in a new issue