Re: [dev] [dwm] Bluetooth XF86 keys not working

2023-01-16 Thread Storkman



On January 17, 2023 3:03:52 AM UTC, Anskrevy  
wrote:
>I've got XF86XK_AudioPlay bound in my config.h with the necessary
>include file, and this hotkey works when I use my keyboard. However,
>when sent from a pair of bluetooth headphones the hotkey isn't
>triggered. I've got the following xev output which shows the two keys
>are slightly different
>

This was actually recently fixed.
https://git.suckless.org/dwm/commit/89f9905714c1c1b2e8b09986dfbeca15b68d8af8.html



[dev] [dwm] Bluetooth XF86 keys not working

2023-01-16 Thread Anskrevy

I've got XF86XK_AudioPlay bound in my config.h with the necessary
include file, and this hotkey works when I use my keyboard. However,
when sent from a pair of bluetooth headphones the hotkey isn't
triggered. I've got the following xev output which shows the two keys
are slightly different

Bluetooth event from xev:
KeyPress event, serial 34, synthetic NO, window 0x1c1,
root 0x6b2, subw 0x0, time 1714630, (-534,257), root:(623,303),
state 0x0, keycode 208 (keysym 0x1008ff14, XF86AudioPlay), 
same_screen YES,

XKeysymToKeycode returns keycode: 172
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

Keyboard event from xev:
KeyPress event, serial 34, synthetic NO, window 0x1c1,
root 0x6b2, subw 0x0, time 1664827, (-534,257), root:(623,303),
state 0x0, keycode 172 (keysym 0x1008ff14, XF86AudioPlay), 
same_screen YES,

XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

In line 3 of the xev output from the bluetooth event the keycode
is 208 instead of 172 which is returned by XKeysymToKeycode.

Looking at the output of xmodmap -pk | grep -E "(172|208)" we get:

172 0x1008ff14 (XF86AudioPlay)
0x1008ff31 (XF86AudioPause)
0x1008ff14 (XF86AudioPlay)
0x1008ff31 (XF86AudioPause)
208 0x1008ff14 (XF86AudioPlay)
0x (NoSymbol)   
0x1008ff14 (XF86AudioPlay)

Formatted to look better.

At this point I've just got a lot of information but I'm not sure how to
get dwm to grab keycode 208 or why it's even different in the first
place. The only solution I can think of is adding a modified Key struct
where the KeySym is a KeyCode instead. This would require modification
to the grabkeys function or another function all together. The keypress
function would also need to be modified as there would now be two arrays
to search through.

I couldn't find a patch regarding this so I don't think I'm reinventing
the wheel. However, I do think my solution is poor and because of that
I'd like to know if anyone can think of cleverer solution to this issue.

Thanks for reading.



Re: [SPAM Warning!][dev] [dwm] view() and toggleview() functions

2023-01-16 Thread Storkman



On January 16, 2023 11:21:57 AM UTC, A Farzat  wrote:
>Btw, on the email subject it says [SPAM Warning!]. Is it anything I need
>to be concerned with?

Spam filters hate the .xyz TLD because it's supposedly "frequently used by 
spammers". I don't know why single out that one in particular, but it's enough 
for some servers to send perfectly legitimate mail straight to hell even if 
your mail server isn't on any actual blacklist.

>
>Thanks for clarifying!
>
>- Farzat



Re: [dev] st: no need for scrollback patch or program by using -o option

2023-01-16 Thread Страхиња Радић
On 23/01/16 12:33, Страхиња Радић wrote:
> Most of what's to be said in "defense" of st and other suckless software is 
> already out there on suckless.org, including the sorry state of XTerm being 
> the 
> driving idea behind writing st, which the OP turned upside-down, so that's 
> one 
> more reason against responding, and enough to see it's trolling.

s/OP/person Markus responded to/


signature.asc
Description: PGP signature


Re: [dev] st: no need for scrollback patch or program by using -o option

2023-01-16 Thread Страхиња Радић
On 23/01/14 09:25, Markus Wichmann wrote:
> On Fri, Jan 13, 2023 at 07:53:41PM -0600, Dave Blanchard wrote:
> > I experimented with st for a week or so, before finally realizing that
> > it's poorly-written trash. It has no advantages over XTerm at all.
> >
> 
> So where's the patch?
> 
> Given that a terminal emulator is a necessary part of the Trusted
> Computing Base if the system has X11, I'd prefer it to be as simple as
> possible, so that it is not exploitable. st is simple enough to be able
> to roughly gauge whether it has memory bugs or not. XTerm is such
> overwritten tripe I cannot gauge that at all.
> 
> Ciao,
> Markus

Obvious trolling should receive no response. This kind of noise belongs to 
Reddit and similar communities, where it is commonplace.

Most of what's to be said in "defense" of st and other suckless software is 
already out there on suckless.org, including the sorry state of XTerm being the 
driving idea behind writing st, which the OP turned upside-down, so that's one 
more reason against responding, and enough to see it's trolling.


signature.asc
Description: PGP signature


Re: [dev] [dwm] view() and toggleview() functions

2023-01-16 Thread NRK
On Mon, Jan 16, 2023 at 08:21:57PM +0900, A Farzat wrote:
> Btw, on the email subject it says [SPAM Warning!]. Is it anything I need
> to be concerned with?

No, you're good. It was just a false positive on my end and I forgot to
remove that before replying.

- NRK



Re: [SPAM Warning!][dev] [dwm] view() and toggleview() functions

2023-01-16 Thread A Farzat
On 23/01/16 12:10pm, NRK wrote:
> On Sun, Jan 15, 2023 at 06:28:55PM +0900, A Farzat wrote:
> > 2- In the view() function, there is this line:
> > ```c
> > selmon->seltags ^= 1; /* toggle sel tagset */
> > ```
> > What is the purpose of this line? In fact, what is the purpose of having
> > two tagsets in the first place? From what I see, all the tag
> > functionality can be achieved using only one tagset.
> 
> It's for going back to the previous layout via `MODKEY+TAB`.
> 
> - NRK

I see, so that's why it is outside the if statement.

Btw, on the email subject it says [SPAM Warning!]. Is it anything I need
to be concerned with?

Thanks for clarifying!

- Farzat


signature.asc
Description: PGP signature