Logs: freenode/#xmonad
| 2021-02-17 14:12:27 | <geekosaur> | partially |
| 2021-02-17 14:38:48 | <ttmx> | Did you see my screenshot from yesterday? :D |
| 2021-02-17 14:39:34 | <ttmx> | And unrelated, but I have a script that whenever I change song, it outputs a new line, is there any way to use that on the xmobar? |
| 2021-02-17 14:48:31 | <Solid> | xmobar has a `CommandReader' plugin |
| 2021-02-17 14:48:46 | <Liskni_si> | and there's also https://github.com/jaor/xmobar/blob/master/examples/xmonadpropwrite.hs |
| 2021-02-17 14:52:41 | × | geekosaur quits (82650c7a@130.101.12.122) (Quit: Connection closed) |
| 2021-02-17 14:53:26 | × | thc202 quits (~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds) |
| 2021-02-17 14:53:51 | → | thc202 joins (~thc202@unaffiliated/thc202) |
| 2021-02-17 15:08:45 | × | idhugo_ quits (~idhugo@80-62-117-86-mobile.dk.customer.tdc.net) (Ping timeout: 246 seconds) |
| 2021-02-17 15:33:49 | <ttmx> | I seemingly can't find docs for the commandreader? Solid |
| 2021-02-17 15:33:53 | <ttmx> | Any chance I could get a link? |
| 2021-02-17 15:47:33 | × | eb0t_ quits (~eblip@unaffiliated/eblip) (Read error: Connection reset by peer) |
| 2021-02-17 15:47:38 | × | def_jam quits (~eblip@unaffiliated/eblip) (Read error: Connection reset by peer) |
| 2021-02-17 15:49:02 | → | eb0t_ joins (~eblip@unaffiliated/eblip) |
| 2021-02-17 15:49:22 | → | def_jam joins (~eblip@unaffiliated/eblip) |
| 2021-02-17 16:31:58 | → | idhugo_ joins (~idhugo@80-62-117-97-mobile.dk.customer.tdc.net) |
| 2021-02-17 16:35:15 | <ttmx> | Can I set a different "active" color for each one of the workspace icons? |
| 2021-02-17 16:47:35 | → | nomeata joins (~jojo@dslb-002-203-232-155.002.203.pools.vodafone-ip.de) |
| 2021-02-17 16:54:19 | <Liskni_si> | sure, ppWhatever are functions that take workspace names and then possibly add stuff to it, so you can match on the workspace name and use different colors |
| 2021-02-17 16:54:33 | × | nomeata quits (~jojo@dslb-002-203-232-155.002.203.pools.vodafone-ip.de) (Quit: Client exiting) |
| 2021-02-17 17:00:03 | × | hexo quits (~hexo@gateway/tor-sasl/hexo) (Remote host closed the connection) |
| 2021-02-17 17:00:27 | → | hexo joins (~hexo@gateway/tor-sasl/hexo) |
| 2021-02-17 17:13:29 | → | geekosaur joins (82650c7a@130.101.12.122) |
| 2021-02-17 17:26:48 | → | malook joins (~Thunderbi@2a02:9b0:4000:9581:d59d:c621:4a4d:7d75) |
| 2021-02-17 17:31:25 | → | seschwar joins (~seschwar@unaffiliated/seschwar) |
| 2021-02-17 17:32:16 | × | malook quits (~Thunderbi@2a02:9b0:4000:9581:d59d:c621:4a4d:7d75) (Quit: malook) |
| 2021-02-17 17:34:45 | × | idhugo_ quits (~idhugo@80-62-117-97-mobile.dk.customer.tdc.net) (Ping timeout: 264 seconds) |
| 2021-02-17 17:46:36 | <Solid> | ttmx: https://github.com/jaor/xmobar/blob/master/doc/plugins.org#commandreader-pathtoprogram-alias |
| 2021-02-17 17:50:44 | <ttmx> | Thank you! |
| 2021-02-17 17:51:00 | <ttmx> | Can I not give it arguments |
| 2021-02-17 17:51:02 | <ttmx> | ? |
| 2021-02-17 17:52:20 | <Solid> | I'm not sure how it starts that program; depending on that you may just get away with "my-program --foo" |
| 2021-02-17 17:54:41 | <geekosaur> | looking at that link I'd guess you need to wrap it in a script |
| 2021-02-17 17:54:53 | <Solid> | or that yes |
| 2021-02-17 17:55:46 | <ttmx> | And does the commandreader restart the program if it exits? |
| 2021-02-17 17:55:51 | <ttmx> | Its such little documentation :( |
| 2021-02-17 17:56:11 | <geekosaur> | about par for xmobar >.> there are reasons I don't run it |
| 2021-02-17 17:56:55 | <Solid> | ttmx: no it doesn't |
| 2021-02-17 17:57:17 | <Solid> | if the program dies it displays "EXITED" :) |
| 2021-02-17 17:57:57 | <geekosaur> | so your script will need to run it in a loop, apparently |
| 2021-02-17 17:58:02 | <ttmx> | Uploaded file: https://uploads.kiwiirc.com/files/babda45e4fa793cbf07e97677b6b8f00/image.png |
| 2021-02-17 17:58:09 | <ttmx> | I just want this but with no refresh rate ree |
| 2021-02-17 17:58:19 | <ttmx> | Which is what my script does lol |
| 2021-02-17 17:58:27 | <ttmx> | Is there a module that runs it in a loop |
| 2021-02-17 17:58:28 | <ttmx> | ? |
| 2021-02-17 17:58:29 | <Solid> | geekosaur: the newer commands are better documented :/ |
| 2021-02-17 18:00:12 | <Liskni_si> | would be a nice weekend project for someone who wants to learn a bit of Haskell to rewrite xmobar's mpris plugin to listen on the bus instead of polling |
| 2021-02-17 18:00:27 | <ttmx> | I got it to work, just a little weird |
| 2021-02-17 18:00:32 | <Liskni_si> | obviously just hacking something together with playerctl real quick is way easier |
| 2021-02-17 18:00:42 | <ttmx> | Which is what I did :P |
| 2021-02-17 18:00:52 | <Liskni_si> | but, you know, "meaningful contributions" and all that :-/ |
| 2021-02-17 18:00:57 | <ttmx> | Yesyes :P |
| 2021-02-17 18:01:15 | <ttmx> | I'm up for it of someone's hand is cold and wants to hold mine |
| 2021-02-17 18:11:19 | <Solid> | maybe it's time for me to learn what a dbus is |
| 2021-02-17 18:12:39 | <geekosaur> | a poorly thought out local messaging interface. sadly, it's what we have to work with, not something more sensible |
| 2021-02-17 18:14:24 | <geekosaur> | https://github.com/geekosaur/xmonad.hs/blob/pyanfar/xmonad.hs#L281-L291 |
| 2021-02-17 18:15:24 | <geekosaur> | (I suspect the utf8 decode changes after Liskni_si's recent work lands, I'll figure out how then :) |
| 2021-02-17 18:16:30 | × | ttmx quits (5e3ee76f@gateway/web/cgi-irc/kiwiirc.com/ip.94.62.231.111) (Ping timeout: 265 seconds) |
| 2021-02-17 18:19:21 | <geekosaur> | I have no code for listening on dbus since all I need is the send side |
| 2021-02-17 18:19:41 | <geekosaur> | but there's a dbus package that should support both and have examples (one hopes…) |
| 2021-02-17 18:21:06 | <Liskni_si> | geekosaur: well you'll just drop the decodeString and everything will work as always |
| 2021-02-17 18:21:42 | <geekosaur> | that's how it looks to me but I'm not quite certain the dbus package is doing the sane thing either |
| 2021-02-17 18:22:33 | <Liskni_si> | shouldn't really matter but feel free to dig as deep as you wish :-) |
| 2021-02-17 18:25:21 | → | ADG1089__ joins (~aditya@122.163.133.103) |
| 2021-02-17 18:28:53 | <Solid> | aha so one would basically only have to match on a certain "this thing has changed" signal and then yell at the monitor to update itself? |
| 2021-02-17 18:31:21 | <geekosaur> | I don't know for certain how you'd integrate this with xmobar but I'd imagine a thread listening on dbus and updating an MVar and the monitor checking the MVar every so often |
| 2021-02-17 18:33:03 | <geekosaur> | or a Chan but then the monitor will have to deal with multiple updates |
| 2021-02-17 18:33:31 | <Liskni_si> | in xmobar plugins already run in their own threads |
| 2021-02-17 18:33:58 | <Liskni_si> | and they are passed a function that writes into a TVar that the main thread then reads and redraws |
| 2021-02-17 18:34:21 | <geekosaur> | oh, so it already just about does the right thing :) |
| 2021-02-17 18:34:31 | <Liskni_si> | there's absolutely no need to invent anything fancy, just write a function that listens on dbus and calls an action whenever anything changes |
| 2021-02-17 18:35:42 | <geekosaur> | there may even be examples of listening on dbus in there (that mpris2 monitor may be an example) |
| 2021-02-17 18:36:36 | <AlexNevesky> | geekosaur: could u take a look at my config and see how i would implement ewmh desktops as i have no idea what im doing wrong? |
| 2021-02-17 18:37:00 | <geekosaur> | @where paste |
| 2021-02-17 18:37:00 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
| 2021-02-17 18:37:19 | <Solid> | Liskni_si: just trying to get a high-level understanding of how this would work :) |
| 2021-02-17 18:37:20 | <Liskni_si> | the existing mpris2 only polls, but xmobar does have a listening dbus thread somewhere else |
| 2021-02-17 18:37:51 | <AlexNevesky> | https://gitlab.com/brttmsn/dotfiles/-/blob/master/.xmonad/xmonad.hs -- This is my current xmonad config. Everytime i put ewmh down where the documentation says i get an error |
| 2021-02-17 18:38:03 | <Liskni_si> | Solid: yeah, I'm happy to provide highlevel explanations :-) |
| 2021-02-17 18:38:21 | <Solid> | I feel like a hack sometimes for not knowing these basics things :/ |
| 2021-02-17 18:38:40 | <AlexNevesky> | i really need to sit down a couple of days a week and learn haskell |
| 2021-02-17 18:39:05 | <Solid> | in reality I'm just a mathematician who realized that if he wrote maths in _just_ the right way it compiles and does useful things =) |
| 2021-02-17 18:39:11 | <Liskni_si> | Solid: don't worry, I know about dbus but I know little about lenses |
| 2021-02-17 18:39:22 | <Solid> | haha |
| 2021-02-17 18:40:00 | <Liskni_si> | (was listening to a podcast from 2013 with ekmett today while washing the dishes, so now I know a bit more, though) |
| 2021-02-17 18:40:30 | <Liskni_si> | made me wonder how I managed to do Haskell for so long while avoiding them |
| 2021-02-17 18:41:24 | <Solid> | that is quite a feat |
| 2021-02-17 18:41:33 | <Solid> | but it's better to underuse than to overuse lenses tbh |
| 2021-02-17 18:41:58 | <Solid> | though that feeling when you finally find a use for `<<.=' is amazing as well :> |
| 2021-02-17 18:42:07 | <Solid> | AlexNevesky: `xmonad $ ewmh $ docks defaults' |
| 2021-02-17 18:42:24 | <geekosaur> | AlexNevesky, I think you want: xmonad $ ewmh . docks defaults { |
| 2021-02-17 18:42:39 | <geekosaur> | hm, that's possible too |
| 2021-02-17 18:42:52 | <Liskni_si> | do we have "xmonad $ ewmh . docks defaults" anywhere in the docs, btw? |
| 2021-02-17 18:43:15 | <AlexNevesky> | no |
| 2021-02-17 18:43:48 | <Liskni_si> | Solid: do you study maths or cs btw? |
| 2021-02-17 18:43:53 | <AlexNevesky> | Solid: thanks that worked. No errors or kickbackss |
| 2021-02-17 18:44:18 | <Solid> | Liskni_si: we have `main = xmonad $ ewmh def{ handleEventHook ...' |
| 2021-02-17 18:44:21 | <Solid> | which is close enough |
| 2021-02-17 18:44:24 | <Solid> | (I think) |
| 2021-02-17 18:44:40 | <AlexNevesky> | Anyone have a good online resource for learning haskell? |
All times are in UTC.