[hackers] Re: [dwm][PATCH] Remove BUGS and TODO

2018-05-02 Thread Christopher Drelich
As an added note:

The included Man page already has a "BUGS" section. There is no
overlap between the bugs in the Man page and the bugs in the BUGS
file. I think keeping some Bugs in the Man page is a good idea,
particularly when there is a workaround. However, I think this is
another reason why there should be no BUGS file included in the source
repository.

On Wed, May 2, 2018 at 7:40 PM, Christopher Drelich  wrote:
> It is not clear if BUGS and TODO are up-to-date, and if people are
> already working on (or have solved these issues.) We also don't know
> much about an individuals setup. There are much better methods of
> keeping track of this information besides textfiles in the source
> tree. Issue trackers, wikis, etc.. are all viable options.
>
> It seems best to remove these files and discuss further options. It
> might even be useful to find a place to talk about wanted patches
> (Both thsoe that would and would not be included in the main code
> base.)
>
> ---
>
> diff --git a/BUGS b/BUGS
> deleted file mode 100644
> index 6c9574a..000
> --- a/BUGS
> +++ /dev/null
> @@ -1,44 +0,0 @@
> 
> -
> -18:17 < Biolunar> when i change my resolution in dwm (to a smaller
> one) and then back to the native, the top bar is not repainted. that's
> since 5.7.2, in 5.6 it worked fine
> -18:19 < Biolunar> is it just happening to me or a (known) bug?
> -18:24 < Biolunar> and in addition, mplayers fullscreen is limited to
> the small resolution after i changed it back to the native
> -
> -reproducible with xrandr -s but not with --output and --mode, strange
> -
> 
> -
> -yet another corner case:
> -open a terminal, focus another monitor, but without moving the mouse
> -pointer there
> -if there is no client on the other monitor to get the focus, then the
> -terminal will be unfocused but it will accept input
> -
> 
> -
> -Donald Allen reported this:
> -
> -starting emacs from dmenu in archlinux results in missing configure
> of emacs, but mod1-space or mod1-shift-space fix this problem. this
> problem is new and did not happen in 1.6 xorg servers
> -
> 
> -
> -voltaic reports this:
> -
> -When I use two monitors, one larger in resolution than the other, the
> -bar is drawn using the smaller x-dimension on both screens. I think
> -what's happening is that there are two bars drawn, but the short bar
> -is always on top of the long bar such that I can't see the information
> -under the short bar. If I switch to the small screen, hide the short
> -bar, and then switch to the large screen, the long bar is drawn
> -correctly.
> -
> -A similar problem occurs when I have started dwm on a small resolution
> -monitor (laptop screen) and then I switch to a large external display.
> -When I do this, the bar itself is drawn for the original smaller
> -resolution, but the information to be printed on the bar is
> -right-aligned for a longer bar. So what I see is a bar that has the
> -right hand side of it cut-off. See attached screenshot.
> -
> -I am using standard options for xrandr such as --output VGA1 --auto, etc.
> -
> 
> diff --git a/TODO b/TODO
> deleted file mode 100644
> index b33a08d..000
> --- a/TODO
> +++ /dev/null
> @@ -1,4 +0,0 @@
> -- add a flag to Key to execute the command on release (needed for commands
> - affecting the keyboard grab, see scrot -s for example)
> -- add updategeom() hook for external tools like dzen
> -- consider onscreenkeyboard hooks for tablet deployment



[hackers] [dwm][PATCH] Remove BUGS and TODO

2018-05-02 Thread Christopher Drelich
It is not clear if BUGS and TODO are up-to-date, and if people are
already working on (or have solved these issues.) We also don't know
much about an individuals setup. There are much better methods of
keeping track of this information besides textfiles in the source
tree. Issue trackers, wikis, etc.. are all viable options.

It seems best to remove these files and discuss further options. It
might even be useful to find a place to talk about wanted patches
(Both thsoe that would and would not be included in the main code
base.)

---

diff --git a/BUGS b/BUGS
deleted file mode 100644
index 6c9574a..000
--- a/BUGS
+++ /dev/null
@@ -1,44 +0,0 @@

-
-18:17 < Biolunar> when i change my resolution in dwm (to a smaller
one) and then back to the native, the top bar is not repainted. that's
since 5.7.2, in 5.6 it worked fine
-18:19 < Biolunar> is it just happening to me or a (known) bug?
-18:24 < Biolunar> and in addition, mplayers fullscreen is limited to
the small resolution after i changed it back to the native
-
-reproducible with xrandr -s but not with --output and --mode, strange
-

-
-yet another corner case:
-open a terminal, focus another monitor, but without moving the mouse
-pointer there
-if there is no client on the other monitor to get the focus, then the
-terminal will be unfocused but it will accept input
-

-
-Donald Allen reported this:
-
-starting emacs from dmenu in archlinux results in missing configure
of emacs, but mod1-space or mod1-shift-space fix this problem. this
problem is new and did not happen in 1.6 xorg servers
-

-
-voltaic reports this:
-
-When I use two monitors, one larger in resolution than the other, the
-bar is drawn using the smaller x-dimension on both screens. I think
-what's happening is that there are two bars drawn, but the short bar
-is always on top of the long bar such that I can't see the information
-under the short bar. If I switch to the small screen, hide the short
-bar, and then switch to the large screen, the long bar is drawn
-correctly.
-
-A similar problem occurs when I have started dwm on a small resolution
-monitor (laptop screen) and then I switch to a large external display.
-When I do this, the bar itself is drawn for the original smaller
-resolution, but the information to be printed on the bar is
-right-aligned for a longer bar. So what I see is a bar that has the
-right hand side of it cut-off. See attached screenshot.
-
-I am using standard options for xrandr such as --output VGA1 --auto, etc.
-

diff --git a/TODO b/TODO
deleted file mode 100644
index b33a08d..000
--- a/TODO
+++ /dev/null
@@ -1,4 +0,0 @@
-- add a flag to Key to execute the command on release (needed for commands
- affecting the keyboard grab, see scrot -s for example)
-- add updategeom() hook for external tools like dzen
-- consider onscreenkeyboard hooks for tablet deployment



[hackers] [dwm][PATCH] Added BINPREFIX to Makefile

2018-05-02 Thread Christopher Drelich
Replaced ${PREFIX} with ${BINPREFIX} in style of ${MANPREFIX}

---

diff --git a/Makefile b/Makefile
index d34bb30..ec37850 100644
--- a/Makefile
+++ b/Makefile
@@ -47,23 +47,23 @@ dist: clean
  @rm -rf dwm-${VERSION}

 install: all
- @echo installing dwm executable file to ${DESTDIR}${PREFIX}/bin
- @mkdir -p ${DESTDIR}${PREFIX}/bin
- @cp -f dwm ${DESTDIR}${PREFIX}/bin
- @chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
- @echo installing dwm executable file to ${DESTDIR}${PREFIX}/bin
- @cp -f transient ${DESTDIR}${PREFIX}/bin
- @chmod 755 ${DESTDIR}${PREFIX}/bin/transient
+ @echo installing dwm executable file to ${DESTDIR}${BINPREFIX}
+ @mkdir -p ${DESTDIR}${BINPREFIX}
+ @cp -f dwm ${DESTDIR}${BINPREFIX}
+ @chmod 755 ${DESTDIR}${BINPREFIX}/dwm
+ @echo installing dwm executable file to ${DESTDIR}${BINPREFIX}
+ @cp -f transient ${DESTDIR}${BINPREFIX}
+ @chmod 755 ${DESTDIR}${BINPREFIX}/transient
  @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
  @mkdir -p ${DESTDIR}${MANPREFIX}/man1
  @sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
  @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1

 uninstall:
- @echo removing dwm executable file from ${DESTDIR}${PREFIX}/bin
- @rm -f ${DESTDIR}${PREFIX}/bin/dwm
- @echo removing transient executable file from ${DESTDIR}${PREFIX}/bin
- @rm -f ${DESTDIR}${PREFIX}/bin/transient
+ @echo removing dwm executable file from ${DESTDIR}${BINPREFIX}
+ @rm -f ${DESTDIR}${BINPREFIX}/dwm
+ @echo removing transient executable file from ${DESTDIR}${BINPREFIX}
+ @rm -f ${DESTDIR}${BINPREFIX}/transient
  @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
  @rm -f ${DESTDIR}${MANPREFIX}/man1/dwm.1

diff --git a/config.mk b/config.mk
index f285241..43ef6e1 100644
--- a/config.mk
+++ b/config.mk
@@ -7,6 +7,7 @@ VERSION = 6.1

 # paths
 PREFIX = /usr/local
+BINPREFIX = ${PREFIX}/bin
 MANPREFIX = ${PREFIX}/share/man

 X11INC = /usr/X11R6/include



[hackers] [dwm][PATCH] Functions in same order as their declaration

2018-05-02 Thread Christopher Drelich
In dwm.c the functions are declared in alphabetical order and then are
defined in alphabetical order. The exception for this is main, for
obvious reasons. However, setclientstate() and updatebarpos() are
declared in the correct order, but defined in the wrong order. There
doesn't seem to be any reason for this, so this patch corrects that.

---

diff --git a/dwm.c b/dwm.c
index c98678d..6fe6eb8 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1423,15 +1423,6 @@ sendmon(Client *c, Monitor *m)
  arrange(NULL);
 }

-void
-setclientstate(Client *c, long state)
-{
- long data[] = { state, None };
-
- XChangeProperty(dpy, c->win, wmatom[WMState], wmatom[WMState], 32,
- PropModeReplace, (unsigned char *)data, 2);
-}
-
 int
 sendevent(Client *c, Atom proto)
 {
@@ -1458,6 +1449,15 @@ sendevent(Client *c, Atom proto)
 }

 void
+setclientstate(Client *c, long state)
+{
+long data[] = { state, None };
+
+XChangeProperty(dpy, c->win, wmatom[WMState], wmatom[WMState], 32,
+PropModeReplace, (unsigned char *)data, 2);
+}
+
+void
 setfocus(Client *c)
 {
  if (!c->neverfocus) {
@@ -1799,6 +1799,19 @@ unmapnotify(XEvent *e)
 }

 void
+updatebarpos(Monitor *m)
+{
+m->wy = m->my;
+m->wh = m->mh;
+if (m->showbar) {
+m->wh -= bh;
+m->by = m->topbar ? m->wy : m->wy + m->wh;
+m->wy = m->topbar ? m->wy + bh : m->wy;
+} else
+m->by = -bh;
+}
+
+void
 updatebars(void)
 {
  Monitor *m;
@@ -1821,19 +1834,6 @@ updatebars(void)
 }

 void
-updatebarpos(Monitor *m)
-{
- m->wy = m->my;
- m->wh = m->mh;
- if (m->showbar) {
- m->wh -= bh;
- m->by = m->topbar ? m->wy : m->wy + m->wh;
- m->wy = m->topbar ? m->wy + bh : m->wy;
- } else
- m->by = -bh;
-}
-
-void
 updateclientlist()
 {
  Client *c;



Re: [hackers] [slstatus][PATCH] volume: Cast SOUND_MIXER_READ_DEVMASK to int to avoid warning.

2018-05-02 Thread Aaron Marcher

Thanks, applied.

Cheers!

--
Web: https://drkhsh.at/ or http://drkhsh5rv6pnahas.onion/
Gopher: gopher://drkhsh.at or gopher://drkhsh5rv6pnahas.onion
GPG: 0x7A65E38D55BE96FE
Fingerprint: 4688 907C 8720 3318 0D9F AFDE 7A65 E38D 55BE 96FE



[hackers] [slstatus] volume: Cast SOUND_MIXER_READ_DEVMASK to int to avoid warning. || parazyd

2018-05-02 Thread git
commit 34010907a6fdcb2b3fbd09eb06740e5f9f8d1e4f
Author: parazyd 
AuthorDate: Wed May 2 11:38:27 2018 +0200
Commit: Aaron Marcher 
CommitDate: Wed May 2 11:49:15 2018 +0200

volume: Cast SOUND_MIXER_READ_DEVMASK to int to avoid warning.

diff --git a/components/volume.c b/components/volume.c
index 7c831c9..41a112d 100644
--- a/components/volume.c
+++ b/components/volume.c
@@ -26,7 +26,7 @@ vol_perc(const char *card)
return NULL;
}
 
-   if (ioctl(afd, SOUND_MIXER_READ_DEVMASK, ) == -1) {
+   if (ioctl(afd, (int)SOUND_MIXER_READ_DEVMASK, ) == -1) {
fprintf(stderr, "ioctl 'SOUND_MIXER_READ_DEVMASK': %s\n", 
strerror(errno));
close(afd);
return NULL;



[hackers] [slstatus][PATCH] volume: Cast SOUND_MIXER_READ_DEVMASK to int to avoid warning.

2018-05-02 Thread parazyd
---
 components/volume.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/volume.c b/components/volume.c
index 7c831c9..41a112d 100644
--- a/components/volume.c
+++ b/components/volume.c
@@ -26,7 +26,7 @@ vol_perc(const char *card)
return NULL;
}
 
-   if (ioctl(afd, SOUND_MIXER_READ_DEVMASK, ) == -1) {
+   if (ioctl(afd, (int)SOUND_MIXER_READ_DEVMASK, ) == -1) {
fprintf(stderr, "ioctl 'SOUND_MIXER_READ_DEVMASK': %s\n", 
strerror(errno));
close(afd);
return NULL;
-- 
2.17.0




[hackers] [slstatus] ip: Sort headers alphabetically || Aaron Marcher

2018-05-02 Thread git
commit b2b6eb638eadcdd5ea091d74f65b1c0a97e0df0a
Author: Aaron Marcher 
AuthorDate: Wed May 2 08:21:32 2018 +0200
Commit: Aaron Marcher 
CommitDate: Wed May 2 08:21:32 2018 +0200

ip: Sort headers alphabetically

diff --git a/components/ip.c b/components/ip.c
index 422b448..b1f8a05 100644
--- a/components/ip.c
+++ b/components/ip.c
@@ -1,14 +1,13 @@
 /* See LICENSE file for copyright and license details. */
-#if defined(__OpenBSD__)
-#include 
-#include 
-#endif
-
 #include 
 #include 
 #include 
 #include 
 #include 
+#if defined(__OpenBSD__)
+#include 
+#include 
+#endif
 
 #include "../util.h"