Logs: liberachat/#xmonad
| 2023-03-17 11:15:44 | × | hightower3 quits (~hightower@141-136-194-244.dsl.iskon.hr) (Ping timeout: 246 seconds) |
| 2023-03-17 11:46:47 | → | hightower2 joins (~hightower@85.94.71.188) |
| 2023-03-17 12:02:23 | × | derfflinger quits (~derffling@user/derfflinger) (Remote host closed the connection) |
| 2023-03-17 12:02:41 | → | derfflinger joins (~derffling@user/derfflinger) |
| 2023-03-17 12:58:35 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 2023-03-17 14:52:23 | × | derfflinger quits (~derffling@user/derfflinger) (Quit: Leaving) |
| 2023-03-17 16:07:24 | × | fnurglewitz quits (uid263868@id-263868.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 2023-03-17 16:19:57 | → | ft joins (~ft@p3e9bc443.dip0.t-ipconnect.de) |
| 2023-03-17 16:21:16 | → | Tom joins (~Tom@151.246.204.197) |
| 2023-03-17 16:22:03 | Tom | is now known as Lensci |
| 2023-03-17 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 |
| 2023-03-17 16:26:25 | <geekosaur> | yes but it won't be particularly easy |
| 2023-03-17 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]" |
| 2023-03-17 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 |
| 2023-03-17 16:28:54 | <Lensci> | nice |
| 2023-03-17 16:34:02 | <geekosaur> | what happens is we ungrab the button, so we dont receive it in that case 😞 |
| 2023-03-17 16:38:33 | <geekosaur> | well. should still be possible without doing a grab, by adjusting `rootMask` and catching it in `handleEventHook` |
| 2023-03-17 16:39:22 | → | sagax joins (~sagax_nb@user/sagax) |
| 2023-03-17 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 |
| 2023-03-17 16:41:47 | → | catman joins (~catman@user/catman) |
| 2023-03-17 16:47:21 | <geekosaur> | https://paste.tomsmeding.com/FZh6ZIIn something like this |
| 2023-03-17 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) |
| 2023-03-17 16:48:07 | <geekosaur> | if you actually need the full one that'll be a little more work |
| 2023-03-17 16:52:06 | × | catman quits (~catman@user/catman) (Ping timeout: 255 seconds) |
| 2023-03-17 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 ) |
| 2023-03-17 17:02:01 | <Lensci> | It must be, unfortunately |
| 2023-03-17 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)` |
| 2023-03-17 17:18:31 | <geekosaur> | pithy we don't export `with` or it'd be `withWindowSet (W.with True (const False))` |
| 2023-03-17 17:18:37 | <geekosaur> | *pity |
| 2023-03-17 17:22:08 | <geekosaur> | `withWindowSet (isJust . W.peek)` |
| 2023-03-17 17:22:35 | <geekosaur> | actually you want `isNothing` there, so it's `True` for an empty ws |
| 2023-03-17 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 |
| 2023-03-17 17:23:21 | <geekosaur> | line 5 |
| 2023-03-17 17:23:35 | <geekosaur> | hm, no, needs to be in X |
| 2023-03-17 17:24:18 | <geekosaur> | `empty <- withWindowSet (isNothing . W.peek)` then line 5 (which becomes line 6) is `if w == rootw && empty then` |
| 2023-03-17 17:25:55 | <geekosaur> | although at that point the root window check is redundant |
| 2023-03-17 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 |
| 2023-03-17 17:27:16 | <geekosaur> | not that it's very expensive |
| 2023-03-17 17:30:31 | <geekosaur> | https://paste.tomsmeding.com/KBzENBNl |
| 2023-03-17 17:31:13 | <geekosaur> | note that I still haven't tested this |
| 2023-03-17 17:35:16 | <geekosaur> | well, I am now and it has errors. hold on |
| 2023-03-17 17:39:31 | <geekosaur> | https://paste.tomsmeding.com/SuWOf1iZ |
| 2023-03-17 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? |
| 2023-03-17 17:52:15 | <geekosaur> | layout hook? I'd expect that to throw a type error. it's a handleEventHook |
| 2023-03-17 17:52:43 | <geekosaur> | and "defining the mouse event" is editing line 5 |
| 2023-03-17 17:52:53 | <geekosaur> | where I have `spawn …` |
| 2023-03-17 17:53:26 | <geekosaur> | mouse presses when there's no active window never reach the normal mouse event handler |
| 2023-03-17 18:05:58 | <Lensci> | oh wow it works, thank you very much |
| 2023-03-17 18:06:18 | <Lensci> | I think I understood about 10% of what you said but still managed to get by somehow |
| 2023-03-17 18:08:26 | <Lensci> | it seems to trigger on every mouse click, can I just modify it to do it only on right click? |
| 2023-03-17 19:01:06 | × | Lensci quits (~Tom@151.246.204.197) (Quit: Client closed) |
| 2023-03-17 22:52:23 | → | catman joins (~catman@user/catman) |
| 2023-03-17 23:39:08 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 2023-03-17 23:45:24 | × | catman quits (~catman@user/catman) (Quit: WeeChat 3.8) |
| 2023-03-17 23:47:29 | → | catman joins (~catman@user/catman) |
| 2023-03-17 23:48:25 | × | joshproehl quits (~quassel@user/joshproehl) (Quit: Disappearing act!) |
| 2023-03-17 23:48:40 | → | joshproehl joins (~quassel@user/joshproehl) |
| 2023-03-18 00:09:32 | × | mncheck quits (~mncheck@193.224.205.254) (Ping timeout: 246 seconds) |
| 2023-03-18 00:30:29 | × | chomwitt quits (~chomwitt@2a02:587:7a19:9200:1ac0:4dff:fedb:a3f1) (Ping timeout: 256 seconds) |
| 2023-03-18 01:28:03 | × | telser_ quits (~quassel@user/telser) (Ping timeout: 265 seconds) |
| 2023-03-18 01:28:28 | → | telser joins (~quassel@user/telser) |
| 2023-03-18 01:40:04 | × | catman quits (~catman@user/catman) (Ping timeout: 276 seconds) |
| 2023-03-18 02:00:32 | → | srz joins (~srz@179.36.116.51) |
| 2023-03-18 02:54:11 | × | srz quits (~srz@179.36.116.51) (Read error: Connection reset by peer) |
| 2023-03-18 03:03:39 | × | banc quits (~banc@154.47.24.197) (Ping timeout: 248 seconds) |
| 2023-03-18 03:19:07 | × | td_ quits (~td@i5387092E.versanet.de) (Ping timeout: 248 seconds) |
| 2023-03-18 03:20:52 | → | td_ joins (~td@i5387093F.versanet.de) |
| 2023-03-18 03:21:05 | → | banc joins (~banc@154.47.24.197) |
| 2023-03-18 04:24:02 | → | catman joins (~catman@user/catman) |
| 2023-03-18 04:25:34 | × | catman quits (~catman@user/catman) (Client Quit) |
| 2023-03-18 04:49:40 | → | catman joins (~catman@user/catman) |
| 2023-03-18 05:36:51 | × | catman quits (~catman@user/catman) (Ping timeout: 250 seconds) |
| 2023-03-18 08:04:59 | → | kora9 joins (uid591798@user/Kora9) |
| 2023-03-18 08:40:47 | → | murchadha[m] joins (~murdchadh@2001:470:69fc:105::3:3103) |
| 2023-03-18 08:45:48 | → | malook joins (~Thunderbi@2a02:9b0:4042:f67a:b789:e024:7bab:75ce) |
| 2023-03-18 08:54:16 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 276 seconds) |
| 2023-03-18 08:55:29 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 2023-03-18 09:13:52 | ← | malook parts (~Thunderbi@2a02:9b0:4042:f67a:b789:e024:7bab:75ce) () |
| 2023-03-18 13:38:00 | Solid | bought stickers for ZuriHac \o/ |
| 2023-03-18 13:42:05 | × | sagax quits (~sagax_nb@user/sagax) (Quit: Konversation terminated!) |
| 2023-03-18 14:59:52 | → | catman joins (~catman@user/catman) |
| 2023-03-18 15:02:00 | × | catman quits (~catman@user/catman) (Client Quit) |
| 2023-03-18 15:03:37 | → | catman joins (~catman@user/catman) |
| 2023-03-18 15:08:09 | × | hightower2 quits (~hightower@85.94.71.188) (Ping timeout: 255 seconds) |
| 2023-03-18 15:15:10 | × | catman quits (~catman@user/catman) (Ping timeout: 276 seconds) |
| 2023-03-18 15:26:48 | <liskin> | ♥ |
| 2023-03-18 15:42:58 | → | hightower2 joins (~hightower@141-136-194-244.dsl.iskon.hr) |
| 2023-03-18 17:49:42 | × | telser quits (~quassel@user/telser) (Ping timeout: 255 seconds) |
| 2023-03-18 17:51:21 | → | telser joins (~quassel@user/telser) |
| 2023-03-18 18:21:41 | → | catman joins (~catman@user/catman) |
| 2023-03-18 18:34:40 | × | kora9 quits (uid591798@user/Kora9) (Quit: Connection closed for inactivity) |
| 2023-03-18 18:37:41 | × | catman quits (~catman@user/catman) (Ping timeout: 246 seconds) |
| 2023-03-18 19:39:04 | × | telser quits (~quassel@user/telser) (Ping timeout: 276 seconds) |
| 2023-03-18 19:39:44 | → | telser joins (~quassel@user/telser) |
| 2023-03-18 19:49:48 | × | telser quits (~quassel@user/telser) (Ping timeout: 246 seconds) |
| 2023-03-18 19:50:25 | → | telser joins (~quassel@user/telser) |
| 2023-03-18 20:26:09 | → | kora9 joins (uid591798@user/Kora9) |
| 2023-03-18 20:28:24 | × | telser quits (~quassel@user/telser) (Ping timeout: 252 seconds) |
| 2023-03-18 20:48:23 | → | chomwitt joins (~chomwitt@ppp-94-67-217-45.home.otenet.gr) |
| 2023-03-18 20:50:09 | → | telser joins (~quassel@user/telser) |
All times are in UTC.