Re: [dev] [dwm] Obtain focused monitor

From: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Sun, 8 Jan 2023 13:44:22 +0100

On Sun, Jan 08, 2023 at 07:40:21PM +0900, A Farzat wrote:
> On 23/01/08 11:32am, Hiltjo Posthuma wrote:
> > On Sun, Jan 08, 2023 at 07:19:10PM +0900, A Farzat wrote:
> > > Is there a way to obtain the currently focused monitor in dwm? I want to
> > > use it in my script to control which monitor gets its brightness
> > > modified.
> > >
> > > Regards,
> > > Farzat
> >
> > selmon
> >
> > --
> > Kind regards,
> > Hiltjo
> >
>
> And how do I access that command? If possible I want to access it from
> a shell script.
>
> I am open to modifying the dwm source code if necessary.
>
> Regards,
> Farzat

Hi,

For example using the dmenumon variable, it is set in spawn():
http://git.suckless.org/dwm/commit/ba56fe9fea0a28d8184a727a987836a0903e2682.html

Hope this helps,

-- 
Kind regards,
Hiltjo
Received on Sun Jan 08 2023 - 13:44:22 CET

This archive was generated by hypermail 2.3.0 : Sun Jan 08 2023 - 13:48:07 CET