Home liberachat/#xmonad: Logs Calendar

Logs on 2023-03-17 (liberachat/#xmonad)

00:31:09 × thunderrd quits (~thunderrd@183.182.111.130) (Ping timeout: 256 seconds)
00:53:18 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
01:39:42 catman joins (~catman@user/catman)
01:57:31 × chomwitt quits (~chomwitt@2a02:587:7a19:9200:1ac0:4dff:fedb:a3f1) (Ping timeout: 246 seconds)
01:59:49 × catman quits (~catman@user/catman) (Ping timeout: 276 seconds)
02:09:05 beastwick parts (~beastwick@pool-74-102-103-88.nwrknj.fios.verizon.net) (WeeChat 3.0)
02:17:07 × bla quits (~bla@83.24.152.76.ipv4.supernova.orange.pl) (Ping timeout: 250 seconds)
02:18:00 bla joins (~bla@79.191.245.1.ipv4.supernova.orange.pl)
02:47:18 × bla quits (~bla@79.191.245.1.ipv4.supernova.orange.pl) (Ping timeout: 268 seconds)
02:52:08 × burp_ quits (~quassel@hedgewars/sysadmin/burp) (Ping timeout: 252 seconds)
02:52:21 hightower3 joins (~hightower@141-136-194-244.dsl.iskon.hr)
02:54:52 bla joins (~bla@79.191.245.1.ipv4.supernova.orange.pl)
02:55:04 × hightower2 quits (~hightower@20-10.dsl.iskon.hr) (Ping timeout: 276 seconds)
03:03:07 × banc quits (~banc@154.47.24.197) (Ping timeout: 248 seconds)
03:19:22 × td_ quits (~td@i53870903.versanet.de) (Ping timeout: 268 seconds)
03:20:40 banc joins (~banc@154.47.24.197)
03:21:08 td_ joins (~td@i5387092E.versanet.de)
03:24:33 × bla quits (~bla@79.191.245.1.ipv4.supernova.orange.pl) (Ping timeout: 256 seconds)
03:24:44 bla joins (~bla@79.191.70.127.ipv4.supernova.orange.pl)
05:05:14 × srk quits (~sorki@user/srk) (Remote host closed the connection)
05:05:35 srk joins (~sorki@user/srk)
06:03:15 × ft quits (~ft@p3e9bc443.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
06:10:54 derfflinger joins (~derffling@user/derfflinger)
06:18:59 chomwitt joins (~chomwitt@2a02:587:7a19:9200:1ac0:4dff:fedb:a3f1)
06:26:59 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 246 seconds)
06:29:27 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
07:04:41 ft joins (~ft@p3e9bc443.dip0.t-ipconnect.de)
07:14:12 mncheck joins (~mncheck@193.224.205.254)
07:57:51 fnurglewitz joins (uid263868@id-263868.lymington.irccloud.com)
08:26:06 × ft quits (~ft@p3e9bc443.dip0.t-ipconnect.de) (Quit: leaving)
08:43:24 × derfflinger quits (~derffling@user/derfflinger) (Remote host closed the connection)
08:43:43 derfflinger joins (~derffling@user/derfflinger)
09:38:06 × derfflinger quits (~derffling@user/derfflinger) (Remote host closed the connection)
09:39:26 derfflinger joins (~derffling@user/derfflinger)
10:00:19 Superficial joins (~user@gtsat.inesc-id.pt)
10:01:48 Superficial parts (~user@gtsat.inesc-id.pt) ()
11:15:44 × hightower3 quits (~hightower@141-136-194-244.dsl.iskon.hr) (Ping timeout: 246 seconds)
11:46:47 hightower2 joins (~hightower@85.94.71.188)
12:02:23 × derfflinger quits (~derffling@user/derfflinger) (Remote host closed the connection)
12:02:41 derfflinger joins (~derffling@user/derfflinger)
12:58:35 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds)
14:52:23 × derfflinger quits (~derffling@user/derfflinger) (Quit: Leaving)
16:07:24 × fnurglewitz quits (uid263868@id-263868.lymington.irccloud.com) (Quit: Connection closed for inactivity)
16:19:57 ft joins (~ft@p3e9bc443.dip0.t-ipconnect.de)
16:21:16 Tom joins (~Tom@151.246.204.197)
16:22:03 Tom is now known as Lensci
16:22:54 <Lensci> Is there anyway to make xmonad run a script only when you press the specific mouse button on an empty workspace
16:26:25 <geekosaur> yes but it won't be particularly easy
16:27:42 <Lensci> I thought there would be an easy way to check if there is a window or not then either abort it or go to something like const $ "xdotool [whatever]"
16:28:33 <geekosaur> actually I may be wrong since it's passed the window clicked on; I'll have to check what happens if there isn't one
16:28:54 <Lensci> nice
16:34:02 <geekosaur> what happens is we ungrab the button, so we dont receive it in that case 😞
16:38:33 <geekosaur> well. should still be possible without doing a grab, by adjusting `rootMask` and catching it in `handleEventHook`
16:39:22 sagax joins (~sagax_nb@user/sagax)
16:40:02 <geekosaur> wait, `rootMask` already has `buttonPressMask`. so you can do it in `handleEventHook`. just make sure it's on the root window
16:41:47 catman joins (~catman@user/catman)
16:47:21 <geekosaur> https://paste.tomsmeding.com/FZh6ZIIn something like this
16:47:48 <geekosaur> I cheated slightly, assuming if it's the root window then there are no windows (this is true for almost all layouts)
16:48:07 <geekosaur> if you actually need the full one that'll be a little more work
16:52:06 × catman quits (~catman@user/catman) (Ping timeout: 255 seconds)
17:01:28 <Solid> Lensci: if it doesn't have to be a mouse button then there is plenty functionality of doing *something* on an empty workspace with e.g. [XMonad.Actions.TopicSpace]( https://hackage.haskell.org/package/xmonad-contrib/docs/XMonad-Actions-TopicSpace.html ) or [XMonad.Actions.DynamicProjects]( https://hackage.haskell.org/package/xmonad-contrib/docs/XMonad-Actions-DynamicProjects.html )
17:02:01 <Lensci> It must be, unfortunately
17:12:29 <Lensci> I am new to haskell and xmonad in general so this may seem stupid but can I get the number of windows in focused workspace then let the action run if it is equal to 0? I saw something like this while looking for simpler/less painful ways to do it `withWindowSet (pure . length . W.index)`
17:18:31 <geekosaur> pithy we don't export `with` or it'd be `withWindowSet (W.with True (const False))`
17:18:37 <geekosaur> *pity
17:22:08 <geekosaur> `withWindowSet (isJust . W.peek)`
17:22:35 <geekosaur> actually you want `isNothing` there, so it's `True` for an empty ws
17:23:03 <geekosaur> that could then be added to the code I gave you, as part of the conditional that checks for the root window
17:23:21 <geekosaur> line 5
17:23:35 <geekosaur> hm, no, needs to be in X
17:24:18 <geekosaur> `empty <- withWindowSet (isNothing . W.peek)` then line 5 (which becomes line 6) is `if w == rootw && empty then`
17:25:55 <geekosaur> although at that point the root window check is redundant
17:26:40 <geekosaur> I think I'd rewire so the WindowSet check, which is more expensive, is done only when the click is on the root window
17:27:16 <geekosaur> not that it's very expensive
17:30:31 <geekosaur> https://paste.tomsmeding.com/KBzENBNl
17:31:13 <geekosaur> note that I still haven't tested this
17:35:16 <geekosaur> well, I am now and it has errors. hold on
17:39:31 <geekosaur> https://paste.tomsmeding.com/SuWOf1iZ
17:51:07 <Lensci> odd it compiled successfully but it doesn't seem to do anything when I run it, just putting it on layout hook and defining the mouse event isn't enough?
17:52:15 <geekosaur> layout hook? I'd expect that to throw a type error. it's a handleEventHook
17:52:43 <geekosaur> and "defining the mouse event" is editing line 5
17:52:53 <geekosaur> where I have `spawn …`
17:53:26 <geekosaur> mouse presses when there's no active window never reach the normal mouse event handler
18:05:58 <Lensci> oh wow it works, thank you very much
18:06:18 <Lensci> I think I understood about 10% of what you said but still managed to get by somehow
18:08:26 <Lensci> it seems to trigger on every mouse click, can I just modify it to do it only on right click?
19:01:06 × Lensci quits (~Tom@151.246.204.197) (Quit: Client closed)
22:52:23 catman joins (~catman@user/catman)
23:39:08 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
23:45:24 × catman quits (~catman@user/catman) (Quit: WeeChat 3.8)
23:47:29 catman joins (~catman@user/catman)
23:48:25 × joshproehl quits (~quassel@user/joshproehl) (Quit: Disappearing act!)
23:48:40 joshproehl joins (~quassel@user/joshproehl)

All times are in UTC on 2023-03-17.