revert last commit partially

This commit is contained in:
speedie 2022-11-02 12:23:08 +01:00
parent 7e379baf13
commit d575bb2098
5 changed files with 23 additions and 31 deletions

View file

@ -38,7 +38,6 @@ endif
clean:
rm -f speedwm *.o speedwm-${VERSION}.tar.gz
rm -f speedwm-ipc
rm -f speedwm_run
echo "Cleaned!"
dist: clean
@ -49,8 +48,7 @@ dist: clean
tar -cf speedwm-${VERSION}.tar speedwm-${VERSION}
gzip speedwm-${VERSION}.tar
rm -rf speedwm-${VERSION} speedwm
rm -rf speedwm-ipc
rm -rf speedwm_run
rm -rf speedwm-${VERSION} speedwm-ipc
[ -f .speedwm/options.h_settings.patch ] && mv .speedwm/*.patch .. && mv .speedwm/*.def* ../docs/ && rm -rf .speedwm || :
install_only_bin: all

View file

@ -97,7 +97,7 @@ static Key keys[] = {
/* speedwm general binds */
{ MODIFIER1, -1, XK_f, togglefullscr, {0} },
{ MODIFIER1, -1, XK_b, togglebar, {0} },
{ MODIFIER1, -1, XK_r, resetmastercount, {0} },
{ MODIFIER1, -1, XK_r, resetmastercount, {0} },
{ MODIFIER1, -1, XK_m, focusmaster, {0} },
{ MODIFIER1, -1, XK_j, focusstackvis, {.i = +1 } },
{ MODIFIER1, -1, XK_k, focusstackvis, {.i = -1 } },

View file

@ -27,8 +27,8 @@ static const Rule rules[] = {
{ TERMINAL_CLASS, NULL, "nvim", 0, 0, 0, 1, 1, -1, 0, 0, 0 },
{ TERMINAL_CLASS, NULL, "cmus", 0, 0, 0, 0, 1, -1, 0, 0, 0 },
{ TERMINAL_CLASS, NULL, notitle, 0, 0, 0, 0, 1, -1, 0, 0, 0 },
{ "Navigator", NULL, NULL, 0, 0, 0, 0, 0, -1, 0, 0, 0 },
{ "qutebrowser", NULL, NULL, 0, 0, 0, 0, 0, -1, 0, 0, 0 },
{ "Navigator", NULL, NULL, 0, 0, 0, 0, 0, -1, 0, 0, 0 },
{ "mpv", NULL, NULL, 0, 0, 0, 0, 0, -1, 0, 0, 0 },
{ "tabbed", NULL, NULL, 0, 0, 0, 0, 1, -1, 0, 0, 0 },
{ "trayer", NULL, NULL, 0, 1, 1, 0, 1, -1, 1, 0, 0 },

View file

@ -114,7 +114,7 @@ CHECKEXISTINGWM() {
START_SPEEDWM() {
if [ "$ISSFLAG" = "" ]; then
while true; do
pgrep -x speedwm > /dev/null || speedwm -runspeedwm > /tmp/speedwm-log
pgrep -x speedwm > /dev/null || speedwm > /tmp/speedwm-log
done
fi
}

View file

@ -7125,7 +7125,7 @@ xerrordummy(Display *dpy, XErrorEvent *ee)
int
xerrorstart(Display *dpy, XErrorEvent *ee)
{
die("speedwm or another window manager is already running.");
die("speedwm: Do not start speedwm by running 'speedwm'. Your X session should run 'speedwm_run'. See 'speedwm-help -a' for more information.\nhttps://codeberg.org/speedie/speedwm");
return -1;
}
@ -7264,8 +7264,7 @@ main(int argc, char *argv[])
if (argc == 2 && !strcmp("-v", argv[1]))
die("speedwm-"VERSION);
else if (argc != 1 && strcmp("-s", argv[1]))
if (strcmp("-runspeedwm", argv[1]))
die("usage: speedwm [-v] [-s]");
die("usage: speedwm [-v] [-s]");
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
fputs("warning: no locale support\n", stderr);
if (!(dpy = XOpenDisplay(NULL)))
@ -7277,28 +7276,23 @@ main(int argc, char *argv[])
}
if (!(xcon = XGetXCBConnection(dpy)))
die("speedwm: cannot get xcb connection\n");
if (argc == 2 && !strcmp("-runspeedwm", argv[1])) {
checkotherwm();
autostart_exec();
XrmInitialize();
#if USEXRESOURCES
load_xresources();
#endif
setup();
#ifdef __OpenBSD__
if (pledge("stdio rpath proc exec ps", NULL) == -1)
die("pledge");
#endif /* __OpenBSD__ */
scan();
run();
if(restart) execvp(argv[0], argv);
cleanup();
XCloseDisplay(dpy);
return EXIT_SUCCESS;
} else {
printf("You are not supposed to run the speedwm executable. Run speedwm_run instead.\n");
return;
}
checkotherwm();
autostart_exec();
XrmInitialize();
#if USEXRESOURCES
load_xresources();
#endif
setup();
#ifdef __OpenBSD__
if (pledge("stdio rpath proc exec ps", NULL) == -1)
die("pledge");
#endif /* __OpenBSD__ */
scan();
run();
if(restart) execvp(argv[0], argv);
cleanup();
XCloseDisplay(dpy);
return EXIT_SUCCESS;
}